refactor(layout): rename archive/ to legacy/ and state per-file entry status honestly - #77
Conversation
… status honestly `archive/` was never an archive. It held the only installer, the recovery launcher, and the AGENTS.md-mandated session gate, while README named `archive/install-code-intel-pipeline.ps1` as the install entry point and admitted that several reports are still produced only by `archive/run-code-intel.ps1`. Moving the PS1 monoliths into a directory called `archive/` made `git ls-files` at the root look clean without moving a single contract, so the tree asserted a retirement that had not happened. Rename the directory to `legacy/`, which records the language tier rather than a lifecycle claim, and make the claim explicit per file instead: - README and docs/repository-layout.md now list still-live entry points (installer, recovery launcher, session gate, project discovery, bootstrap) separately from facades awaiting retirement, each with its ticket. - Correct two stale claims found on the way: `check-code-intel-tools.ps1` is described as the environment doctor although #48 replaced it with the native Rust probe (readers are now sent to `code-intel doctor`), and docs/repository-layout.md still said the PowerShell entry points live at the repository root. - Stop advertising `legacy/scripts/{benchmarks,adapters,incubator}` as existing buckets; only `tests/` exists today. Mechanical consequences of the move, in the order the gates require: - Live path literals rewritten across 154 files. Left untouched: CHANGELOG.md and docs/archive/ (historical records), the sealed evidence under orchestration/retirements/, and the mcm verb list in ADR-0001. - Digest pins re-synced to a fixpoint. Pins chain: the doctor toolchain digests, the shared capability_inventory.rs implementation digest, the ast-grep conformance pin, nine internalization records, two integrations.json entries, and the self-referential c03-r05-r12-measurements.json all had to settle before the packets could be frozen against them. - All seven regenerable retirement packets re-frozen after the pin sync, E05 before E10, and the final commitment reconciliation projection updated. E09 keeps its archive/ references: it is retired_out_of_band and frozen against a working-tree overlay that never existed as a commit, so it cannot be regenerated. Verified: cargo test -p code-intel 2629 passed across 45 suites; retirement packet suite 8 packets, 2 audits, 0 known-blocked; sentrux gate reports no degradation (240 files, 33 god files, quality 3484 -> 3488, identical to main); check-hardcoded-paths.ps1 OK. Refs #55
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Important Review skippedToo many files! This PR contains 393 files, which is 293 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (393)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…caught Two misses from the rename, both invisible to a `archive/` substring search: - `tests/test_repository_layout.py` built the contract-test directory from path segments (`ROOT / "archive" / "scripts" / "tests"`), so no `archive/` literal existed to rewrite. Point it at `legacy/`. Rename `PUBLIC_ROOT_ENTRY_POINTS` and its test to drop "root": nothing has been at the repository root since the PowerShell surface moved, and the old name asserted otherwise. - `legacy/` is one character shorter than `archive/`, which lets rustfmt fold a call in `tests/compatibility_retirement_gate.rs` back onto fewer lines. `cargo fmt --all` applied; no pin re-sync followed, since the reformatted file is not pinned by any orchestration record and the retirement packets stayed green. Verified: cargo test -p code-intel 2629 passed across 45 suites; python -m unittest discover -s tests 22 passed; retirement packet suite 8 packets, 2 audits, 0 known-blocked; sentrux gate reports no degradation; cargo fmt --all --check clean. Refs #55
The step named "Authoritative self-scan (release gate parity)" runs at ci.yml:80 and :415, before "Install portable pipeline" at :195 and :529. So on the runner no external provider is ever on PATH when the doctor node evaluates, and `sentrux_ready` is always the `builtin && !external` disjunct. The `(core && pro)` branch — the one every installed developer machine takes, and the one a stale shim forwarder breaks — had no coverage in the step that claims parity. That is not hypothetical: this worktree's self-scan failed its doctor node for hours because %LOCALAPPDATA%\code-intel\bin\sentrux-shim.ps1 still pointed at `archive/`, which #77 renamed to `legacy/`. CI was green throughout, not because the runner was healthier but because it never reached the branch. `doctor bootstrap` alone cannot catch it either: it deliberately reports ok while a present external provider is broken, since the built-in engines make an external one optional. The strict reading lived only in the DAG node. So the strict verdict becomes callable: `doctor bootstrap --require-provider-conformance` exits nonzero when a present provider is nonconforming, and both post-install Doctor steps now pass it. Proven both ways on this machine: with a broken overlay the flag exits 65 with the provider named, without the flag the same tree exits 0. The provider rows move to their own module rather than being restated in the new caller. Two copies of a governance rule drift, and this drift would be invisible until a machine and CI disagreed about whether an installation is sound. The module also keeps doctor_adapter.rs under the god-file threshold, which the gate caught when the rows and their tests briefly lived there — 33 -> 34 god files, quality -120. Splitting was the fix; re-baselining would have been the cheat. Pins re-synced across integrations.json, the internalization records, run-code-intel.ps1's request builder, and the test constants that mirror them; six packets regenerated at their recorded EvaluatedAt because the launcher edit is a genuine frozen-source change. Refs #78
* fix(ci): cover the doctor branch every installed machine takes The step named "Authoritative self-scan (release gate parity)" runs at ci.yml:80 and :415, before "Install portable pipeline" at :195 and :529. So on the runner no external provider is ever on PATH when the doctor node evaluates, and `sentrux_ready` is always the `builtin && !external` disjunct. The `(core && pro)` branch — the one every installed developer machine takes, and the one a stale shim forwarder breaks — had no coverage in the step that claims parity. That is not hypothetical: this worktree's self-scan failed its doctor node for hours because %LOCALAPPDATA%\code-intel\bin\sentrux-shim.ps1 still pointed at `archive/`, which #77 renamed to `legacy/`. CI was green throughout, not because the runner was healthier but because it never reached the branch. `doctor bootstrap` alone cannot catch it either: it deliberately reports ok while a present external provider is broken, since the built-in engines make an external one optional. The strict reading lived only in the DAG node. So the strict verdict becomes callable: `doctor bootstrap --require-provider-conformance` exits nonzero when a present provider is nonconforming, and both post-install Doctor steps now pass it. Proven both ways on this machine: with a broken overlay the flag exits 65 with the provider named, without the flag the same tree exits 0. The provider rows move to their own module rather than being restated in the new caller. Two copies of a governance rule drift, and this drift would be invisible until a machine and CI disagreed about whether an installation is sound. The module also keeps doctor_adapter.rs under the god-file threshold, which the gate caught when the rows and their tests briefly lived there — 33 -> 34 god files, quality -120. Splitting was the fix; re-baselining would have been the cheat. Pins re-synced across integrations.json, the internalization records, run-code-intel.ps1's request builder, and the test constants that mirror them; six packets regenerated at their recorded EvaluatedAt because the launcher edit is a genuine frozen-source change. Refs #78 * fix(orchestration): pin the doctor adapter digest to its committed bytes CI failed `registry_toolchain_digests_bind_the_adapter_and_dispatch_sources` on all four lanes while the same test passed locally. The pin had been computed from a working-copy state that a later `cargo fmt` changed, so the recorded digest described bytes no checkout would ever produce. Re-pinned from `git show HEAD:<path>` rather than from the working file, and verified every doctor/gate/snapshot source pinned in the registry now hashes identically in both. E08 regenerated: its frozen set carries doctor_adapter.rs. Refs #78
问题
archive/不是 archive。它装着唯一的安装器、恢复启动器、以及 AGENTS.md 强制要求的编码会话门禁,而 README 把archive/install-code-intel-pipeline.ps1写成安装主入口,第 391 行还亲口承认部分报告只由archive/run-code-intel.ps1产出。把 PS1 巨石挪进一个叫
archive/的目录,让根目录git ls-files看起来干净了,却没有搬动任何一条契约。目录名断言了一次并未发生的退役——对外部读者和本仓自己的审计都是错误信号。做法
改名为
legacy/:记录语言层归属,而不是生命周期主张。生命周期改为逐文件显式标注。README 与
docs/repository-layout.md现在分两组列:仍然活跃、目前没有替代品
legacy/install-code-intel-pipeline.ps1— 安装和修复入口,源码安装(含 macOS / Linux)唯一路径legacy/code-intel.ps1— 恢复启动器legacy/Invoke-SentruxAgentTool.ps1— 会话门禁,AGENTS.md 强制,退役前不可绕过([ps1-exit] T5 拆解 Invoke-SentruxAgentTool.ps1(114KB wrapper) #50)legacy/Find-CodeIntelProjects.ps1、legacy/bootstrap-new-machine.ps1已被取代或正在退役,不要新增调用
legacy/check-code-intel-tools.ps1— [ps1-exit] T3 doctor 收编:工具/运行时体检面进 Rust doctor envelope #48 已由原生 Rust probe 取代,改指code-intel doctorlegacy/run-code-intel.ps1— 收编进code-intel run([ps1-exit] T2 launcher 收编:run-code-intel.ps1 → code-intel run + thin forwarder #47)legacy/invoke-code-intel.ps1— v0.x 转发器顺带修掉的三处失实陈述
check-code-intel-tools.ps1描述为「环境 doctor」,而 [ps1-exit] T3 doctor 收编:工具/运行时体检面进 Rust doctor envelope #48 早已用原生 Rust probe 取代它。docs/repository-layout.md仍写着 "Keep these files at the repository root" —— 根目录已经没有任何 PS1 入口。scripts/{benchmarks,adapters,incubator}列为现有 bucket,实际只有tests/存在。改为写明其余是保留名。改名的机械代价
按门禁要求的顺序执行:
CHANGELOG.md与docs/archive/(历史记录)、orchestration/retirements/下的 sealed evidence、ADR-0001 的doctor/archive/cleanverb 列表。capability_inventory.rsimplementation digest(散在 4 个活文件)→ ast-grep conformance pin → 9 份 internalization record →integrations.json的artifact_ref.rs/compatibility_retirement_gate.rs→ 自引用的c03-r05-r12-measurements.json二阶效应。全部 settle 之后 packet 才能对着它们冻结。E09保留其archive/引用:它是retired_out_of_band,冻结在一个从不存在于任何 commit 的工作树 overlay 上,无法重生成。留着是历史记录的正确状态。验证
cargo test -p code-intel--operation gatecheck-hardcoded-paths.ps1legacy/路径引用存在性全仓扫描没有靠放松 baseline 换绿:
.sentrux/rules.toml与.sentrux/baseline.json均未改动阈值。复核时值得注意
CODE_INTEL_HOME在开发机上指向主 checkout。orchestration_manifest()优先读$CODE_INTEL_HOME/orchestration/integrations.json,所以在 worktree 里跑测试会去读主仓的 manifest,产生看着像真 drift 的假失败。本地复现请显式覆盖:CI 无此变量,不受影响。
另外:sentrux 扫描器不读
.gitignore,所以legacy/work/下的生成器临时目录(每轮重冻结会留一份 4742 行 facade 副本)会被算进 god file 计数。本地跑门禁前记得清理;干净 checkout 不受影响。不在本 PR 范围
没有把活入口拆去
tools/。那会再触发一轮 packet refreeze 与 digest 重算,工作量约翻倍;单目录 + 逐文件标注先把错误信号消掉。Refs #55