Repository navigation
refactor(C2): relocate resource facade and split evidence layout - #458
Conversation
Agent-assisted-by: Claude Code (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
Agent-assisted-by: Claude Code (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base cd8fcb452bd2c7969a7a6e2544aa1cb5f8ad5332 and head def0557ff99ddc804a7084710003eb5a80b7e04b (source checkpoint 23fc2a2ad21d4d9600780aa20daed2ebc9fb7eba, then the docs-only commit).
This also covers the formal architecture review of the docs/legacy-knowledge-manifest.json C2 relock requested in #451:
src/inferrsi/resources/repository_packs.pyis byte-identical to the retired root_repo_pack_data.py. SHA-256751d7bf663318962a2e73cf9d75369e0f8f8c2bda27964c56e44021b9f86c992matchestechnical_leaf.file_sha256and both sides ofmodule_path_revision.- The leaf module/file,
neutral_leaf_export, and thecatalog/infra.inspectionpair targets all point atinferrsi.resources.repository_packs. The nine-pair count is unchanged, and no pair remains oninferrsi._repo_pack_data. - The importlib anchor, allowed imports, two symbols, and
REPO_TYPESobject identity acrosscatalog,knowledge.catalog, andargumentsare preserved.resources/__init__.pyis import-free.contracts.evidenceonly builds paths;ensure_evidence_layoutlives inapps.evidence_layoutwith the samemkdir(parents=True, exist_ok=True)call. The two old root modules are gone with no alias, and the exact root inventory shrinks 23 → 21. - Hosted CI on this head is green, including
full-checkandinstalled-packageon 3.10 and 3.11. I did not independently re-run the author's outside-checkout wheel install.
No blocking findings. The issue stays open, as this PR does not close #451.
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base cd8fcb452bd2c7969a7a6e2544aa1cb5f8ad5332 and head def0557ff99ddc804a7084710003eb5a80b7e04b (source checkpoint 23fc2a2ad21d4d9600780aa20daed2ebc9fb7eba, then docs-only).
Acting reviewer: cursor[bot] via standing InferRSI steward delegation (independent of author Dong1017). Binding formal review to current head.
Verified against #451 C2 acceptance:
resources/repository_packs.pySHA-256751d7bf663318962a2e73cf9d75369e0f8f8c2bda27964c56e44021b9f86c992; old root_repo_pack_data.pyandevidence_paths.pyremoved with no alias;resources/__init__.pyimport-free; tracked root.pyinventory is 21.contracts.evidencehas no mkdir/filesystem writes;apps.evidence_layout.ensure_evidence_layoutretainsmkdir(parents=True, exist_ok=True).- Manifest
technical_leaf/catalog/infra.inspectiontargets point atinferrsi.resources.repository_packs; remaining_repo_pack_datastrings are revision-history / path-revision provenance only; nine compatibility pairs retained. - Focused local pytest on the ten claimed modules: all green; ruff clean on changed Python leaves. Hosted CI on this head green (
lint-and-smoke,full-check3.10/3.11,installed-package3.10/3.11,declarations,pr-references,dashboard-browser,knowledge-model-policy). - Formal architecture review of the C2 manifest relock: accepted on this head (aligns with amy-why-3459's prior Approve covering the same points).
No blocking findings. Refs #451 only; does not close the issue.
|
@amy-why-3459 @zengchuang-hw Please review C2, tracked by Issue451. This PR relocates the neutral repository-pack facade, separates pure evidence paths from Apps I/O, retires the two old root modules, and updates consumers and the exact root21/leaf guards. The manifest relock requires formal architecture review; validation and baseline limitations are documented in the PR body. |
zengchuang-hw
left a comment
There was a problem hiding this comment.
Post-merge independent review — C2 scoped code/architecture checks PASS; this is a COMMENT, not an approval or retrospective merge authorization.
Responding to #458 (comment) under the account owner's standing delegation to independently review InferRSI changes as zengchuang-hw. The PR was already merged by Dong1017 before this examination (2026-11-15 16:13:29 UTC); I did not merge it. This assessment does not establish that the required reviews existed before merge.
Range: base cd8fcb4 → exact head def0557. First review of this PR by this account; no previous review link or prior findings to resolve. I read the actual changes, Issue #451, AGENTS and applicable review/contribution guidance independently, without reading other reviewers' opinions.
Architecture/content findings:
- The relocated repository-pack reader is byte-identical to the base root file (SHA-256 751d7bf663318962a2e73cf9d75369e0f8f8c2bda27964c56e44021b9f86c992). The root-package resource anchor and seven pack semantics remain intact; the new parent initializer is docstring-only. Consumer identity remains shared, with no new Harness import.
- All three evidence function ASTs match their base implementations. Pure path construction is in contracts.evidence; mkdir remains exclusively in the moved Apps helper, preserving ordering, errors and partial-failure behavior.
- I examined the manifest relock: exact module/file and the two compatibility targets move together; the nine pairs, locked leaf bytes, exact imports and bounded parent rule remain. The closure checks do not exempt arbitrary resources siblings. This scoped C2 architecture review finds no blocking defect in that relock.
- Old module imports/function pickles are intentionally retired, documented and tested; root inventory is the exact 21-file stage, not an assertion that R1 or the final isolation boundary is complete. Packaged resource owner paths were not changed.
Independently executed at this head:
- Ten focused modules: 199 passed, 108 subtests passed (contracts package, evidence paths, first-wave isolation, compatibility shells, module boundaries, root inventory, repository packs, resource migration, smoke and import gate).
- Changed Python paths: Ruff passed; git diff --check passed.
- Base-byte / function-AST comparisons and active-source retired-import scan passed.
- Built a real SCM sdist, then wheel from that sdist at this exact head; installed the wheel into a separate fresh Python 3.12 venv. Ran unchanged tests/check_installed.py outside the checkout with isolated Python and INFERRSI_CHECKOUT_RESOURCES set: 128 records and all 923 applicable installed resource files verified, including byte-for-byte checkout comparison, seven-pack reads, canonical imports and cold no-core facade probe.
- GitHub reported 9 completed successful checks for this exact head (including both installed-package and full-check versions); those hosted runs are separately reported evidence, not a substitute for the independent checks above.
Retained execution limitations: the initial runtime lacked pytest. After provisioning an isolated test venv, the first focused run had 198 passes and one subprocess import failure because PYTHONPATH was not propagated; rerunning with explicit PYTHONPATH yielded the result above, without editing tests. The first installed check omitted the resource-comparison environment key; the subsequent run used the correct key and passed. I did not independently run the entire repository suite, Windows execution, GPU/service/campaign acceptance, or attest the author's backend/model provenance. No performance or final Issue #451 completion claim is made.
Blocking findings in the examined C2 slice: none. Additional pre-approval actions: not applicable to this already-merged PR; this COMMENT does not grant approval. Non-blocking follow-up: keep the remaining R1/final-boundary work and its separate review gates explicit.
Scope
Refs #451 — C2 in the accepted eight-PR sequence; this does not close the issue.
resources/repository_packs.py, with an import-free parent, one shared seven-entryREPO_TYPESobject, and the unchangedfiles("inferrsi").joinpath("harness", "data", "repo_packs", ...)anchor. Pack data stays with its current owner; no Harness/core import or new mandatory dependency.contracts/evidence.pyand directory creation intoapps/evidence_layout.py, preserving signatures, order, errors, and mkdir behaviour. Retire both old root modules in this PR, without shells or aliases; update active consumers and negative import/pickle checks.CHANGELOG.md,docs/architecture.md,docs/module-layout.md, anddocs/contracts/current-design.md, including the retirement/pickle notice and staged/final-boundary distinction. Historical/frozen evidence is not rewritten.R1's eleven old-entry retirements and permanent exact inspection rule are not implemented here; neither are A/M or later loader work. Existing staged isolation blockers remain, rather than prematurely asserting the final gate is clear. The older architecture data block and SVG were not expanded into a separate cleanup.
Independent validation
The tested source checkpoint is
23fc2a2ad21d4d9600780aa20daed2ebc9fb7eba; the final commit is documentation-only, and all 20 tested source/test/manifest path bytes were independently verified unchanged after documentation completion.test_contracts_package,test_evidence_paths,test_first_wave_isolation_policy,test_knowledge_compatibility_shells,test_module_boundaries,test_package_root_inventory,test_repository_packs_facade,test_resource_migration,test_smoke,test_target_module_import_gate).run_store.pyF811 diagnostics are outside this change.tests/check_installed.py, installed C2 semantics and distribution/version-origin checks all exit 0. 929 applicable installed resource files match the baseline bytes; all seven packs, identity/no-core/no-IO/path vectors pass.0.1.11.dev18+g23fc2a2ad; SHA-25674cb649250138a580ee90205b6792990f6dacaf6ca4930f7f1037eeccf2b32e3. This artifact belongs to the source checkpoint above, not a rebuild of the later docs-only head.Preserved environment failures: the first coordinator helper used the Windows default GBK decoder for UTF-8 JSON; only the outside-repository helper encoding was corrected. The first fresh no-deps venv full installed check lacked the project's already-declared optional
[skills]dependencyPyYAML>=6.0; installing that dependency in that venv made the unchanged checker pass. Original failed receipts remain. No checker bypass, global configuration change, dependency-policy change or repeated broad build/test run was used.Git/main and authorship
Base main is
cd8fcb452bd2c7969a7a6e2544aa1cb5f8ad5332(merged PR453, with #450 already in its ancestry), freshly fetched before delivery and unchanged. This branch contains the normal source checkpoint plus one normal documentation commit; no history rewrite or additional merge was necessary.All material changed product/source/test/manifest and documentation content is from the original Claude Code Fable session. Local provenance review replayed successful tool mutations for all 20 source/test/manifest paths from the base (ordinary Git LF/CRLF normalization only). The final four documents were independently written by that same session using Read/Edit only and replay-verified against their saved originals. An unused coordinator documentation draft stayed outside the checkout and was never supplied to the session or applied. The coordinator scoped the task, independently validated/read the results, and performed Git/PR metadata operations; it did not rewrite the product/docs content. No governance exception is sought.
The following model/effort values are the explicitly requested/reported client settings, not independent backend attestation.
Formal architecture/content review and the normal CI/review gates remain pending. No auto-merge or issue closure is requested.