Repository navigation
Description
Current delivery decision (2026-11-15)
Split legacy-path retirement and actual dependency closure into three bounded implementation PRs. Retire already-migrated old paths early instead of keeping every shell until the last integration change. Moving implementation, migrating active consumers/docs/tests and deleting old root modules belong in the same PR. Overall isolation is a real-tree result, not an issue-status or merge inference. This issue closes root-level scattering, old entrypoints and core dependency boundaries; it does not promise internal refactors of existing subpackages.
Related: #387, #371, Apps migration #408, shared contracts/resources #451, and Apps-only MindIE relocation #452.
PR checklist
- R1 — Retire existing legacy root paths and finish canonical inspection binding. Delete the seven Knowledge shells (
_skill_selection,_source_snapshot,catalog,knowledge_operations,knowledge_store,research,skill_catalog), the three B01 root paths (evaluation,execution,reporting), and rootinspection. In this same PR update all active consumers, including the CLI/arguments if they have not moved yet, tools/current tests/docs, the manifest and affected protected-path rules. Root inspection is not a trivial alias: first preserve its command/snapshot/repository-identity binding in the canonical Apps composition atapps/inspection.pyover the existing infra facts API. Do not delete behavior or injection assertions. Maintain the shrinking exact root-file inventory introduced in C1. If R1 is scheduled earlier, record its removals so that C1 initializes the guard from the real tree; R1 does not need a second root guard. Whencatalogis retired, consumers takeREPO_TYPESfromresources.repository_packsas the same object (identity assertion), never a copy. Record the exact remaining compatibility pairs at each step: the eight root-shell pairs disappear with the seven shells, and the neutral-leaf importer (infra.inspection -> resources.repository_packsafter C2) must be covered by a permanent rule outsidecompatibility_pairs, with a negative test that only that exact edge is allowed. Leaving it incompatibility_pairskeepsallowlist: 1infirst_wave_report()and makes the finalblockers == ()unreachable. - R2 — Close artifact-primitive dependencies in six Harness modules. Remove the
infra.artifactsreachability fromagent_sessions,candidates,optimization,optimization_session,projectandtask_protocol, using equivalent Harness-owned primitives or explicit suitable ports. Preserve writer/digest/hash/lock bytes, atomicity, failure and platform semantics. The existing report has 12 path hits from these six modules, not 12 modules: each module carries both the package-levelinferrsi.infraedge and theinferrsi.infra.artifactsedge, so removing both is the completion bar; replacing them with imports of otherinferrsi.inframodules does not count. The same PR also verifies that Harness has noinferrsi.modeledge (the current tree has none); the final gate counts bothinferrsi.infraandinferrsi.model. - R3 — Close five real execution boundaries and prove the combined tree. Handle
harness/task_protocol.py, the moe-forward-npu benchmark/grader, qwen21-denoise-npu benchmark and qwen3-tts-npu benchmark through legitimate bounded execution/host interfaces. Preserve candidate/sandbox/integrity controls and frozen input semantics. This PR contains real boundary fixes and final integration acceptance; do not create a ninth verification-only PR.
Dependencies and merge discipline
R1 has no hard prerequisite on C1/C2 (#451) or A1 (#408): deleting existing legacy paths does not itself require relocating a neutral resource leaf first. Prefer C1 → C2 → R1 in the serial queue to avoid rewriting contract/resource policy twice; do not wait for A1/A2/M1 to retire the existing eleven paths. C2 does require the contracts package delivered by C1. Start the shrinking root-file inventory guard in C1, then update its exact set here and in every removal PR. The final two-file target is checked only after the actual remaining moves.
R2 is logically independent and may be scheduled earlier if useful, but only one Claude implementation session runs at once. R2 and R3 both touch task_protocol; R3 must integrate R2's actual head. R3 implementation planning can start earlier, but its final integration/tested head must contain all accepted C/A/M/R predecessor changes. Do not represent a planned DAG as authorization for parallel coding sessions.
Acceptance
- R1 really removes the eleven paths, updates all active consumers in that PR and cleans the corresponding compatibility entries, recording the allowlist count at each step and which PR removes the last pair. Canonical injection behavior remains covered; frozen historical evidence bytes are not edited.
- R2 eliminates the six modules' infra/model reachability with positive/negative and platform-sensitive checks, covering both the package-level
inferrsi.infraandinferrsi.infra.artifactsedges, not a permanent allowance for Harness-to-infra imports, and keeping Harness -> model at zero. - R3 resolves the actual five reviewed execution-loader boundaries. Do not merely remove declarations, relax scanners or change expected output to manufacture isolation.
- On the final exact tree:
first_wave_report().blockers == (),new_core_closure_isolated is True, andisolation_complete is True. Harness has zero edges intoinferrsi.infraorinferrsi.model; the permanent neutral-leaf importer rule from R1 is part of this gate and is not counted as a compatibility pair. Negative controls reject old core paths, hidden dynamic imports and temporary forwarding. - The tracked root-file set is exactly
{__init__.py, __main__.py}; wheel checks separately allow only the declared generated_version.pymetadata. Installed-wheel/resources/host and Windows/Linux checks pass without changing original byte/fact/security contracts. - Record all retired paths and replacements in CHANGELOG. Root physical cleanliness and dependency isolation are both required; neither substitutes for the other.
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 2026-11-12 R01 scope already required retirement of seven Knowledge shells, three B01 root forwarders, the legacy manifest/allowlist and affected protected roots; installed-wheel/host checks and real positive/negative closure remained mandatory. Its final dependency list included K01/H02/B01/S01/OBS/A-entry, with no mandatory tag wait. The earlier permanent root CLI-forwarder carve-out and the assumption that every retirement must wait for the final PR are superseded by the owner's revised delivery decision. The neutral resource leaf still requires an explicitly reviewed no-core-import rule at its new canonical location; infra must not become a fourth core. No new product feature, K02 resource re-migration or formal replay/model experiment is included. Earlier issue discussion is retained; this update does not claim any new review or implementation acceptance.
Activity
amy-why-3459 commentedon Nov 12, 2026
谢谢,R01 作为收尾任务,验收设计得很好:"真实树
isolation_complete is True"加上"加回旧叶子或转发即失败"的反例。补充几点:rg/import 扫描证明 src、tools、tests、docs 以及三个宿主插件里都没有旧根路径的引用;外部消费者的情况也请在 PR 里说明。正文说"不额外等待固定 tag 周期",那么 CHANGELOG 里"移除路径 → 替代路径"的对照表就是用户唯一的迁移指引,建议逐条列出。infra.inspection → _repo_pack_data技术叶子消费者,以及根 cli/arguments/__main__精确转发)建议在门禁里各写一个反例测试,证明规则只放行这一条边或这一种形态,不会变成通配。status:proposed)。建议在 rfc: K/H/B 与 Apps 公开接口详细设计(最小交接与模块边界) #387 或本 issue 里维护一张依赖状态表,让 R01 的启动条件一目了然。[-]task: R01 — 退役兼容壳与 allowlist,完成整仓隔离[/-][+]task: R01 — retire legacy root paths and close core dependencies[/+]amy-why-3459 commentedon Nov 15, 2026
看到正文改成了 R1/R2/R3 三个 PR 的拆分。我在当前 main(
1373ef8e)上跑了first_wave_report(),和新写的内容逐项对照如下:allowlist: 9 compatibility pairs、legacy run forwarders: 3(对应 R1 的evaluation/execution/reporting)、harness reaches model/infra ... (12 hits)(对应 R2)、runtime resource loaders: 5(对应 R3)。R1 删除 11 个路径,但 allowlist 只有 9 对。建议在 R1 验收里写明 R1 之后 allowlist 应清空,或者列出剩下的确切几对及其负责 PR。inferrsi.infra和inferrsi.infra.artifacts。这和正文"12 path hits from these six modules"一致。所以 R2 必须连包级的inferrsi.infra边一起消除,改成 import infra 下的其他模块不算完成。另外,汇总字符串只显示第一个模块(agent_sessions -> inferrsi.infra (12 hits)),review 时建议看harness_model_infra的完整列表。catalog会影响REPO_TYPES。arguments.py现在从.catalog导入BACKENDS/KNOWLEDGE_REPOS/KNOWLEDGE_SCOPES/REPO_TYPES,而REPO_TYPES实际定义在_repo_pack_data.py。如果按首选顺序在 C2 之后做 R1,消费者应直接从resources.repository_packs取REPO_TYPES,保持同一个对象(和我在 task: consolidate shared contracts and packaged-resource access #451 提的 identity 检查一致)。如果 R1 提前,也不要在 Knowledge 的 canonical 模块里复制一份元组。infra.inspection → _repo_pack_data这条在 C2 后要迁到新位置。建议在 C2 或 R1 里配一个反例测试,证明它只放行这一条边。Dong1017 commentedon Nov 15, 2026
Posted by an agent on behalf of @Dong1017 (incremental review only; points already raised by Amy are not repeated).
Ran
first_wave_report()on current maind32eb968; the four blockers match Amy's numbers exactly. Two additions to her 6892341854 point 1:Exact mapping of the 9
compatibility_pairs. Eight are removed by R1 because they are edges from the seven root shells being deleted:_skill_selection -> knowledge._skill_selection,_source_snapshot -> knowledge._source_snapshot,catalog -> knowledge.catalog,catalog -> _repo_pack_data,knowledge_operations -> knowledge.knowledge_operations,knowledge_store -> knowledge.knowledge_store,research -> knowledge.research,skill_catalog -> knowledge.skill_catalog. The ninth,infra.inspection -> _repo_pack_data, is not a root-file edge:src/inferrsi/infra/inspection.py:10imports the neutral leaf and:56calls it. Even if C2 rewrites that pair to the newresources.repository_packslocation first, R1 would leaveallowlist: 1 compatibility pair, not zero. (The three legacy run forwarders are a separate blocker and are cleared by R1; they are not among the nine pairs.)That last pair cannot stay in
compatibility_pairsif R3's acceptance isblockers == ():tests/_gate_policy_support.py:553-554counts every manifest pair asallowlist: N, and removing the pair while the import remains producesviolations: 1—inferrsi.infra.inspection is a second importer of inferrsi._repo_pack_data(tests/_gate_policy_support.py:489-494; reproduced by callingfirst_wave_report()with only that pair removed). So reaching the final zero also needs a permanent neutral-leaf importer rule outside the compatibility allowlist (with the negative test Amy asked for), or an equivalent gate change; the acceptance text should name that mechanism, otherwise R1 leaves one blocker that no code deletion in the checklist can remove.