Repository navigation
Description
Current delivery decision (2026-11-15)
Use canonical Apps entrypoints and retire old Python module paths in the same PR that moves their implementations. The final tracked package root contains only __init__.py and __main__.py; a build-generated _version.py is separate metadata. Preserve the normal inferrsi command and python -m inferrsi, not indefinite inferrsi.cli / inferrsi.arguments import aliases. This closes root-level scattering, old entrypoints and core dependency boundaries; it does not include a further internal refactor of existing subpackages.
Related architecture: #387 and #371. Shared contracts/resources: #451. Existing-path retirement/core closure: #412. MindIE-specific relocation is separate: #452.
PR checklist
- A1 — Switch to canonical Apps CLI and delete the root CLI modules. Move implementation to the
apps/cli/package (apps/cli/__init__.pyexposes the canonicalmain,apps/cli/arguments.pyholds the parser); point the console script toinferrsi.apps.cli:mainand make root__main__.pydelegate only to that canonical entry. Update active plugins, DSH/Codex/WorkSwarm entrypoints, docs and current tests in this same PR; delete rootcli.pyandarguments.py. Do not add permanent forwarders or module-registry tricks. Remove thecli.pyentry fromAPPLICATION_ENTRIESintests/_gate_policy_support.pyin this same PR (apps/cli/is already classified asappsby its first path segment), so a reintroduced rootcli.pyis not admitted as Apps. Cover the PR Connect report Dashboard and trace to fixed attempt records #450 fixed surfaces in the migrated CLI:status/trace/report/dashboard --record-refsuccess paths and their error branches (missing--storage-config, fixedreport/dashboardwithout--output,--livewith--output,--portwithout--live), byte-comparing behavior with Connect report Dashboard and trace to fixed attempt records #450's head. - A2 — Move chart rendering and benchmark application composition. Move
summary_charttoapps/views/summary_chart.pyandbenchmark_operationstoapps/benchmark_operations.py. Update Dashboard/reporting/tool/CLI consumers and tests in this same PR; delete both old root files. Do not turn rendering into authoritative evaluation. Runtools/campaign_summary_chart.pyas a real entry point in acceptance, removebenchmark_operations.pyfromAPPLICATION_ENTRIESintests/_gate_policy_support.pyso the tuple ends empty, and update the gate tests without relaxing the rule.
Dependencies and incoming work
Preferred queue: C1, C2 (#451), then R1 (#412), then A1 and A2. R1 does not technically require C1/C2 or A1: it can update the current CLI consumers while retiring the existing paths. Keep those as preferred integration order, not artificial architecture blockers. A1 is scheduled after R1 to move an already-clean CLI once; A2 is based on A1's canonical Apps entrypoint. No implementation session starts merely because its read-only plan is complete.
PR #449 is merged. Retain its fixed-record status route and --record-ref, --storage-config, --assessment-ref validation. PR #450 currently adds fixed report/Dashboard/trace surfaces: if it merges first, migrate that actual implementation; if this migration lands first, #450 must target the canonical Apps entrypoints. Do not recreate or overwrite the ContextProvider/candidate-store work in #446/#448. Refresh this observation at implementation time rather than treating open PR code as main.
Acceptance
- Preserve normal command behavior, exit codes and stdout/stderr bytes, including failure cases and the existing host matrix; retire old Python imports explicitly.
- Verify console / python-module / plugin entrypoints and installed-wheel execution outside the checkout, including resources.
- Keep the existing OBS reader/layout decision and evaluator/factual-record authority unchanged; no new evaluate command, warning layer or format retirement.
- Update testing injection points to the canonical implementation while retaining real execution/inspection injection semantics and old-command behavioral comparisons; do not delete coverage to hide regressions.
- Record exact root-file removals and a shrinking tracked-root inventory. Overall
isolation_completeremains false until the complete closure in task: R01 — retire legacy root paths and close core dependencies #412 is actually proven.
Delivery discipline
- One implementation Claude session handles only the current PR in an isolated worktree. A second Claude session may only plan the next PR in a separate planning worktree; it must not edit source.
- Move implementation, update all active consumers/docs/tests, and delete the corresponding old root modules in the same PR. Do not introduce permanent compatibility shells or module-registry aliases.
- Preserve CLI command behavior, original evidence bytes, record/format contracts and isolation/security checks. Announce retired Python import/serialization module paths; historical frozen evidence remains pinned to its original commit or wheel, not rewritten.
- Before each implementation or review handoff, refresh main and confirmed dependencies. A completed plan is not implementation or approval. No automatic merge.
Historical context retained
The original scope, approved on 2026-11-12, depended on K01, #397 and OBS, preferably after B01, and required the three-host/installed-wheel matrix. Those prerequisites are now merged. The earlier permanent-forwarder decision for root CLI modules and the old “do not delete shells” restriction are superseded by the revised owner decision above; the command/format/fact/security acceptance requirements are not. #397 remains the standardized Apps output slice, not a vehicle for new migration scope. Existing issue discussion and review history are not rewritten by this checklist update.
Activity
amy-why-3459 commentedon Nov 12, 2026
谢谢,方向我同意:根
cli.py/arguments.py/__main__.py作为永久精确转发,不计入兼容 allowlist。实施前有两点需要先对齐:status:proposed。 我刚核对过,当前 main(e2f4cd1e)上还没有src/inferrsi/apps/。apps/cli这个路径和 Apps 包本身都依赖 task: Apps 应用层详细设计与迁移计划(CLI / Python / Plugin) #371 被接受。建议在正文的"前置"里把"task: Apps 应用层详细设计与迁移计划(CLI / Python / Plugin) #371 接受 Apps 路径"写成显式条件,和 task: B01 — 旧 run/evaluate 整链迁入最终归属 #414 的写法保持一致。from inferrsi.apps.cli import main这类再导出,加上__main__的调用,不含其他逻辑。门禁规则按文件内容或 AST 判定,而不是只看 import 边。验收时可以对 console script、python -m inferrsi、DSH 和 Codex 插件这三类宿主各跑一次相同命令,比较退出码和 stdout/stderr 是否逐字节一致,这样更有说服力。另外,正文写了"建议也在 B01 之后"。如果 A-entry 先于 B01 合入,
apps/cli会暂时直接调用旧harness.runner,这条 Apps→H 边本身合法,只是 B01 时要再改一次调用点。按依赖顺序安排更省返工。[-]task: A-entry — CLI 实现迁入 Apps 并保留永久精确转发[/-][+]task: A-entry — canonical Apps entrypoints and application composition[/+]amy-why-3459 commentedon Nov 15, 2026
看到正文按 2026-11-15 的交付决定更新了:根
cli.py/arguments.py不再保留永久转发,A1 直接删除,另增加 A2。我之前提的前置条件已经满足:#371 设计已 Accepted,src/inferrsi/apps/也已在 main 上。针对新内容补几点:1373ef8e)的 27 个根文件,正好被 C1(4)、C2(2)、R1(11)、A1(cli、arguments)、A2(summary_chart、benchmark_operations)和 M1(4)全部覆盖。全部完成后只剩__init__.py和__main__.py,与目标一致。建议把这张"文件 → 负责 PR"的对照表记在本 issue 或 rfc: K/H/B 与 Apps 公开接口详细设计(最小交接与模块边界) #387,作为 C1 根文件清单检查逐 PR 缩减的依据。d4c2936上已有两份 LGTM Approve。这样 A1 要迁移的是_fixed_attempt_command和新的trace子命令。"stdout/stderr 逐字节一致"的对比建议覆盖status/trace/report/dashboard的--record-ref路径,以及它们的参数错误分支(例如缺--storage-config、固定 report 缺--output)。summary_chart和benchmark_operations目前被这些地方引用:apps/views/dashboard.py、apps/legacy/reporting.py、cli.py、tools/campaign_summary_chart.py,以及tests/_gate_policy_support.py、test_target_module_import_gate.py、test_summary_chart.py、test_benchmark_operations.py等测试。其中tools/campaign_summary_chart.py是可以直接运行的脚本入口,建议在验收里也跑一次。gate policy 测试里写死的精确路径也要一起更新,不要放宽规则。amy-why-3459 commentedon Nov 15, 2026
更新后的 A1/A2 已经包含 #450 固定路径的对比,以及
tools/campaign_summary_chart.py的验收,谢谢。还有一个小细节:tests/_gate_policy_support.py:22的APPLICATION_ENTRIES = ("cli.py", "benchmark_operations.py")会把这两个根文件当作appsimporter 对待(第 143 行)。正文把更新它写在了 A2 里,但其中cli.py这一项属于 A1:A1 删除根cli.py时应该同步移除这一项。apps/cli/的第一级目录本来就是apps,不需要这个特例。否则这个已经没有用的条目会让以后重新出现的根cli.py继续被当成 Apps 放行。A2 再移除benchmark_operations.py,最终让APPLICATION_ENTRIES变为空。