Skip to content

fix(compatibility): packet 只冻结它所退役的注册条目,不再冻结整份 manifest - #83

Merged
2233admin merged 1 commit into
mainfrom
fix/packet-freeze-projection
Jul 31, 2026
Merged

fix(compatibility): packet 只冻结它所退役的注册条目,不再冻结整份 manifest#83
2233admin merged 1 commit into
mainfrom
fix/packet-freeze-projection

Conversation

@2233admin

Copy link
Copy Markdown
Owner

叠在 #82 上。

问题

E02、E03、E04、E07、E08、E10 六个 packet 把整份 orchestration/integrations.json 放进冻结源集。那份文件同时装着每个能力的 toolchainDigests,而任何被指钉的 Rust 源文件一改就得重新指钉。于是改一个不相干的源文件 = 六个 packet 全部失效 = 重写 112 个文件。

这不是理论成本。#81 改了 7 个源文件却推出 119 个,超过 CodeRabbit 的 100 文件上限:

CodeRabbit: Review skipped — 119 files exceed the limit of 100

治理机制关掉了对它所治理代码的机器评审。

改法

packet 的陈旧性主张是关于「它所退役的那个能力的注册状态」。另一个能力的源文件摘要不属于这个主张。

冻结项从整份文件改成投影:选中相关的 integration 对象 + manifest 的 policy 头,按 id 序数排序(与文件顺序和 host locale 无关),compact JSON,SHA-256。

Packet 投影的 integration id
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 取两个 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 全 PASS
  • sentrux --operation gate:No degradation detected
  • test-atomic-capability-contract.ps1:exit 0
  • cargo test:44 个 suite 全绿

证明耦合真的断了:挑 project.orientation——一个不在任何投影里的 integration——把它 toolchainDigests 改一个十六进制位,重跑套件,8 packets + 2 audits 仍全 PASS。同类改动在改之前会产生 retirement packet suite failed: 6 of 10 checks(本 PR 的红色基线就是这么来的)。之后逐字节还原,sha256 与改前一致。

Refs #78

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@repowise-bot

repowise-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🔒 Repowise is not analyzing this repository

The PR bot is free on public repositories. This one is private, which needs a Pro plan.

See plans · Manage this repository

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 125 files, which is 25 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a5aa0d44-a383-46a2-bf96-e1b2d9871583

📥 Commits

Reviewing files that changed from the base of the PR and between 9d10436 and 2d42ae6.

📒 Files selected for processing (125)
  • legacy/tools/compatibility/Get-FrozenManifestProjection.ps1
  • legacy/tools/compatibility/New-CodeNexusDirectRetirementPacket.ps1
  • legacy/tools/compatibility/New-HospitalRetirementPacket.ps1
  • legacy/tools/compatibility/New-IndexRetirementPacket.ps1
  • legacy/tools/compatibility/New-NativeCodeRetirementPacket.ps1
  • legacy/tools/compatibility/New-ProviderPreflightRetirementPacket.ps1
  • legacy/tools/compatibility/New-RecommenderRetirementPacket.ps1
  • legacy/tools/compatibility/Test-CodeNexusDirectRetirementPacket.ps1
  • legacy/tools/compatibility/Test-HospitalRetirementPacket.ps1
  • legacy/tools/compatibility/Test-IndexRetirementPacket.ps1
  • legacy/tools/compatibility/Test-NativeCodeRetirementPacket.ps1
  • legacy/tools/compatibility/Test-ProviderPreflightRetirementPacket.ps1
  • legacy/tools/compatibility/Test-RecommenderRetirementPacket.ps1
  • orchestration/retirements/e02-recommender/compatibility-retirement-deletion-diff.json
  • orchestration/retirements/e02-recommender/compatibility-retirement-manifest.json
  • orchestration/retirements/e02-recommender/compatibility-retirement-ticket.json
  • orchestration/retirements/e02-recommender/e00-request.json
  • orchestration/retirements/e02-recommender/e01-request.json
  • orchestration/retirements/e02-recommender/e01-stderr.txt
  • orchestration/retirements/e02-recommender/evidence/c00-necessity.json
  • orchestration/retirements/e02-recommender/evidence/compatibility-window.json
  • orchestration/retirements/e02-recommender/evidence/contract-parity.json
  • orchestration/retirements/e02-recommender/evidence/dependency-d02-clean-machine.json
  • orchestration/retirements/e02-recommender/evidence/dependency-repo-snapshot.json
  • orchestration/retirements/e02-recommender/evidence/effect-parity.json
  • orchestration/retirements/e02-recommender/evidence/golden-parity.json
  • orchestration/retirements/e02-recommender/evidence/independent-approval.json
  • orchestration/retirements/e02-recommender/evidence/registry-reconciliation.json
  • orchestration/retirements/e02-recommender/evidence/replacement-atom.json
  • orchestration/retirements/e02-recommender/evidence/rollback-execution.json
  • orchestration/retirements/e02-recommender/evidence/usage-observation.json
  • orchestration/retirements/e02-recommender/gate-out/compatibility-retirement-decision.json
  • orchestration/retirements/e03-provider-preflight/compatibility-retirement-deletion-diff.json
  • orchestration/retirements/e03-provider-preflight/compatibility-retirement-manifest.json
  • orchestration/retirements/e03-provider-preflight/compatibility-retirement-ticket.json
  • orchestration/retirements/e03-provider-preflight/e00-request.json
  • orchestration/retirements/e03-provider-preflight/e01-request.json
  • orchestration/retirements/e03-provider-preflight/e01-stderr.txt
  • orchestration/retirements/e03-provider-preflight/evidence/c00-necessity.json
  • orchestration/retirements/e03-provider-preflight/evidence/compatibility-window.json
  • orchestration/retirements/e03-provider-preflight/evidence/contract-parity.json
  • orchestration/retirements/e03-provider-preflight/evidence/dependency-a04-admissibility.json
  • orchestration/retirements/e03-provider-preflight/evidence/dependency-repo-snapshot.json
  • orchestration/retirements/e03-provider-preflight/evidence/effect-parity.json
  • orchestration/retirements/e03-provider-preflight/evidence/golden-parity.json
  • orchestration/retirements/e03-provider-preflight/evidence/independent-approval.json
  • orchestration/retirements/e03-provider-preflight/evidence/registry-reconciliation.json
  • orchestration/retirements/e03-provider-preflight/evidence/replacement-atom.json
  • orchestration/retirements/e03-provider-preflight/evidence/rollback-execution.json
  • orchestration/retirements/e03-provider-preflight/evidence/usage-observation.json
  • orchestration/retirements/e03-provider-preflight/gate-out/compatibility-retirement-decision.json
  • orchestration/retirements/e04-codenexus-direct/compatibility-retirement-deletion-diff.json
  • orchestration/retirements/e04-codenexus-direct/compatibility-retirement-manifest.json
  • orchestration/retirements/e04-codenexus-direct/compatibility-retirement-ticket.json
  • orchestration/retirements/e04-codenexus-direct/e00-request.json
  • orchestration/retirements/e04-codenexus-direct/e01-request.json
  • orchestration/retirements/e04-codenexus-direct/e01-stderr.txt
  • orchestration/retirements/e04-codenexus-direct/evidence/c00-necessity.json
  • orchestration/retirements/e04-codenexus-direct/evidence/compatibility-window.json
  • orchestration/retirements/e04-codenexus-direct/evidence/contract-parity.json
  • orchestration/retirements/e04-codenexus-direct/evidence/dependency-b05.json
  • orchestration/retirements/e04-codenexus-direct/evidence/effect-parity.json
  • orchestration/retirements/e04-codenexus-direct/evidence/golden-parity.json
  • orchestration/retirements/e04-codenexus-direct/evidence/independent-approval.json
  • orchestration/retirements/e04-codenexus-direct/evidence/registry-reconciliation.json
  • orchestration/retirements/e04-codenexus-direct/evidence/replacement-atom.json
  • orchestration/retirements/e04-codenexus-direct/evidence/rollback-execution.json
  • orchestration/retirements/e04-codenexus-direct/evidence/usage-observation.json
  • orchestration/retirements/e04-codenexus-direct/gate-out/compatibility-retirement-decision.json
  • orchestration/retirements/e07-native-code/compatibility-retirement-deletion-diff.json
  • orchestration/retirements/e07-native-code/compatibility-retirement-manifest.json
  • orchestration/retirements/e07-native-code/compatibility-retirement-ticket.json
  • orchestration/retirements/e07-native-code/e00-request.json
  • orchestration/retirements/e07-native-code/e01-request.json
  • orchestration/retirements/e07-native-code/e01-stderr.txt
  • orchestration/retirements/e07-native-code/evidence/c00-necessity.json
  • orchestration/retirements/e07-native-code/evidence/compatibility-window.json
  • orchestration/retirements/e07-native-code/evidence/contract-parity.json
  • orchestration/retirements/e07-native-code/evidence/dependency-inventory.json
  • orchestration/retirements/e07-native-code/evidence/dependency-snapshot.json
  • orchestration/retirements/e07-native-code/evidence/effect-parity.json
  • orchestration/retirements/e07-native-code/evidence/golden-parity.json
  • orchestration/retirements/e07-native-code/evidence/independent-approval.json
  • orchestration/retirements/e07-native-code/evidence/registry-reconciliation.json
  • orchestration/retirements/e07-native-code/evidence/replacement-atom.json
  • orchestration/retirements/e07-native-code/evidence/rollback-execution.json
  • orchestration/retirements/e07-native-code/evidence/usage-observation.json
  • orchestration/retirements/e07-native-code/gate-out/compatibility-retirement-decision.json
  • orchestration/retirements/e08-hospital/compatibility-retirement-deletion-diff.json
  • orchestration/retirements/e08-hospital/compatibility-retirement-manifest.json
  • orchestration/retirements/e08-hospital/compatibility-retirement-ticket.json
  • orchestration/retirements/e08-hospital/e00-request.json
  • orchestration/retirements/e08-hospital/e01-request.json
  • orchestration/retirements/e08-hospital/e01-stderr.txt
  • orchestration/retirements/e08-hospital/evidence/c00-necessity.json
  • orchestration/retirements/e08-hospital/evidence/compatibility-window.json
  • orchestration/retirements/e08-hospital/evidence/contract-parity.json
  • orchestration/retirements/e08-hospital/evidence/dependency-a04.json
  • orchestration/retirements/e08-hospital/evidence/dependency-b07.json
  • orchestration/retirements/e08-hospital/evidence/effect-parity.json
  • orchestration/retirements/e08-hospital/evidence/golden-parity.json
  • orchestration/retirements/e08-hospital/evidence/independent-approval.json
  • orchestration/retirements/e08-hospital/evidence/registry-reconciliation.json
  • orchestration/retirements/e08-hospital/evidence/replacement-atom.json
  • orchestration/retirements/e08-hospital/evidence/rollback-execution.json
  • orchestration/retirements/e08-hospital/evidence/usage-observation.json
  • orchestration/retirements/e08-hospital/gate-out/compatibility-retirement-decision.json
  • orchestration/retirements/e10-index/compatibility-retirement-deletion-diff.json
  • orchestration/retirements/e10-index/compatibility-retirement-manifest.json
  • orchestration/retirements/e10-index/compatibility-retirement-ticket.json
  • orchestration/retirements/e10-index/e00-request.json
  • orchestration/retirements/e10-index/e01-request.json
  • orchestration/retirements/e10-index/e01-stderr.txt
  • orchestration/retirements/e10-index/evidence/c00-necessity.json
  • orchestration/retirements/e10-index/evidence/compatibility-window.json
  • orchestration/retirements/e10-index/evidence/contract-parity.json
  • orchestration/retirements/e10-index/evidence/dependency-e05.json
  • orchestration/retirements/e10-index/evidence/effect-parity.json
  • orchestration/retirements/e10-index/evidence/golden-parity.json
  • orchestration/retirements/e10-index/evidence/independent-approval.json
  • orchestration/retirements/e10-index/evidence/registry-reconciliation.json
  • orchestration/retirements/e10-index/evidence/replacement-atom.json
  • orchestration/retirements/e10-index/evidence/rollback-execution.json
  • orchestration/retirements/e10-index/evidence/usage-observation.json
  • orchestration/retirements/e10-index/gate-out/compatibility-retirement-decision.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

… 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
@2233admin
2233admin force-pushed the fix/packet-freeze-projection branch from bed8419 to 2d42ae6 Compare July 31, 2026 12:34
@2233admin
2233admin changed the base branch from fix/manifest-checkout-ambiguity to main July 31, 2026 12:34
@2233admin
2233admin merged commit 5aeb01a into main Jul 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant