fix(compatibility): packet 只冻结它所退役的注册条目,不再冻结整份 manifest - #83
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
🔒 Repowise is not analyzing this repository The PR bot is free on public repositories. This one is private, which needs a Pro plan. |
|
Important Review skippedToo many files! This PR contains 125 files, which is 25 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (125)
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 |
1a1d46b to
92b9323
Compare
… the whole manifest Six packets — E02, E03, E04, E07, E08, E10 — carried the entire orchestration/integrations.json in their frozen source set. That file also holds every capability's toolchainDigests, which must be re-pinned whenever any pinned Rust source changes. So editing one unrelated source file invalidated all six packets and rewrote 112 files. That is not a theoretical cost. #81 changed 7 source files and pushed 119, which is over CodeRabbit's 100-file limit: the governance mechanism disabled machine review of the code it governs. A packet's staleness claim is about the registry state of the capability it retires. A digest of some other capability's source file is not part of that claim. The frozen entry is now a projection — the named integration objects plus the manifest policy header, ordinal-sorted by id, compact JSON, sha256 — rather than the file. e02-recommender advisory.workflow-recommend e03-provider-preflight provider.repowise-adapt e04-codenexus-direct localization.codenexus-lite, provider.codenexus-adapt e07-native-code evidence.native-code e08-hospital diagnosis.hospital e10-index artifact.index-committed-only E04 takes two ids because its legacy participant, localization.codenexus-lite, is still a live registry entry, so its state genuinely belongs in the claim. For the other five the legacy participant is either already deleted from the registry or identical to the replacement id. Generator and verifier previously repeated the frozen set and the root resolution in two files that a comment begged future editors to keep in sync by hand. Both now dot-source one helper, Get-FrozenManifestProjection.ps1, so they cannot drift. A missing or duplicated integration id throws rather than projecting nothing — an empty projection would be a silent governance hole. Packets regenerated once each at their recorded EvaluatedAt (1785441780); file sets are unchanged. Verified the coupling is actually gone: mutating a toolchainDigests hex digit for project.orientation — an integration in none of the six projections — now leaves all 8 packets and 2 audits passing, where the same class of edit produced "6 of 10 checks failed" before. Reverted byte-exact afterwards. Refs #78
bed8419 to
2d42ae6
Compare
叠在 #82 上。
问题
E02、E03、E04、E07、E08、E10 六个 packet 把整份
orchestration/integrations.json放进冻结源集。那份文件同时装着每个能力的toolchainDigests,而任何被指钉的 Rust 源文件一改就得重新指钉。于是改一个不相干的源文件 = 六个 packet 全部失效 = 重写 112 个文件。这不是理论成本。#81 改了 7 个源文件却推出 119 个,超过 CodeRabbit 的 100 文件上限:
治理机制关掉了对它所治理代码的机器评审。
改法
packet 的陈旧性主张是关于「它所退役的那个能力的注册状态」。另一个能力的源文件摘要不属于这个主张。
冻结项从整份文件改成投影:选中相关的 integration 对象 + manifest 的
policy头,按 id 序数排序(与文件顺序和 host locale 无关),compact JSON,SHA-256。advisory.workflow-recommendprovider.repowise-adaptlocalization.codenexus-lite,provider.codenexus-adaptevidence.native-codediagnosis.hospitalartifact.index-committed-onlyE04 取两个 id,因为它的 legacy participant
localization.codenexus-lite仍然是活的注册条目,状态确实属于它的主张。其余五个的 legacy participant 要么已从注册表删除,要么与替换 id 相同。顺带消灭一处「靠人肉保持同步」
生成器和校验器原本各写一遍
$frozen列表和根解析,靠一句注释恳请后来者手动保持一致("This must mirror New-*.ps1's $frozen set and root resolution exactly")。现在两边都 dot-source 同一个Get-FrozenManifestProjection.ps1,想漂移也漂不了。id 缺失或重复直接 throw,而不是投影出一个空集——空投影是一个静默的治理漏洞。
验证
六个 packet 各用自己的生成器在其记录的
EvaluatedAt(1785441780)重生成一次,文件集合不变。test-retirement-packets.ps1:8 packets + 2 audits 全 PASSsentrux --operation gate:No degradation detectedtest-atomic-capability-contract.ps1:exit 0cargo test:44 个 suite 全绿证明耦合真的断了:挑
project.orientation——一个不在任何投影里的 integration——把它toolchainDigests改一个十六进制位,重跑套件,8 packets + 2 audits 仍全 PASS。同类改动在改之前会产生retirement packet suite failed: 6 of 10 checks(本 PR 的红色基线就是这么来的)。之后逐字节还原,sha256 与改前一致。Refs #78