feat: letter-envelope TS_CID + CSHARP_CID (retire last self-reference pins)#52
Conversation
… pins) Extends PR #30's letter-envelope refactor to the last two peer kits that still carried machine-local truth about their own bytes inside the source tree. After this change, all five peer kits (rust, go, cpp, ts, csharp) verify their self-contracts bundles against externally signed attestation envelopes; the source tree carries no _CID := pins for any of them. Changes: - New attestation files .provekit/self-contracts-attestations/ts.json and .provekit/self-contracts-attestations/csharp.json, each carrying a foundation-v0 ed25519 signature over the freshly-minted bundle CID. - foundation-keygen: SELF_CONTRACTS_LANGS extended to include "ts" and "csharp"; sign-self-contracts accepts both. Two new round-trip unit tests plus a kit-suite guard test. - Makefile: TS_CID and CSHARP_CID constants deleted. mint-ts and mint-csharp now capture the freshly-minted CID from stdout and invoke verify-self-contracts against the attestation envelope, printing the bump dance on rejection. Bump-dance comment generalized over all five peers. Conformance: make conformance passes locally; all five mint targets verify their attestation envelopes. References: - PR #30 (rust/go/cpp letter-envelope cut) - protocol/specs/2026-05-02-bundle-attestation-protocol.md - protocol/specs/2026-05-02-binary-attestation-protocol.md Closes the structural pattern Sir flagged: the source tree no longer carries machine-local truth about its own bytes for any peer kit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 11 minutes and 35 seconds.Comment |
Summary
Extends PR #30's letter-envelope refactor to the last two peer kits that still carried machine-local truth about their own bytes inside the source tree (
TS_CID/CSHARP_CID). Closes task #212.After this change, all five peer kits (rust, go, cpp, ts, csharp) verify their self-contracts bundles against externally signed attestation envelopes. The source tree carries no
_CID :=pin for any peer.New attestation envelopes
Both signed under foundation-v0 (
ed25519:IVL40Zt5HSRFMkLhXy6rbLfP+ntqXtMAl5YOBpiB2xI=), pinneddeclaredAt: 2026-05-02T17:00:00Z:.provekit/self-contracts-attestations/ts.json->blake3-512:449339930add6457bf25542f2117a025daada4a4bd1de704737750ad6d1c1be814c284d31bb97159ca0b2d2c52f8c043a64533d3432195f5a0f338c5d4904d44(no drift from priorTS_CID).provekit/self-contracts-attestations/csharp.json->blake3-512:cec85197e5bc394cb97fa3b96c076eca5ace3eeda819f8a2b8b7001f85336dbfadc7e28be3a38676f81387f908b327f0fffeae7d6d04fe76a8c754e5db38c61e(matches CI value from PR fix(ci): bump CSHARP_CID after kit drift #36)Both files were generated by
sign-self-contractsand re-verified end-to-end viaverify-self-contractsandmake conformance.sign-self-contracts now accepts ts / csharp
The binary previously hard-rejected anything outside
[rust, go, cpp]. Two changes intools/foundation-keygen:src/lib.rs:SELF_CONTRACTS_LANGSextended to["rust", "go", "cpp", "ts", "csharp"]. Doc comment forself_contracts_attestation_path_forupdated to drop the "deferred to a follow-up" note.src/bin/sign_self_contracts.rs: usage strings extended; gating logic unchanged (it consultsSELF_CONTRACTS_LANGS).Tests added in
src/lib.rs:self_contracts_ts_round_trip_verifiesself_contracts_csharp_round_trip_verifiesself_contracts_lang_set_is_five_peers(guards the canonical kit suite)cargo test --release --manifest-path tools/foundation-keygen/Cargo.toml: 10/10 passing.Makefile diff summary
TS_CID := blake3-512:...andCSHARP_CID := blake3-512:...(two lines plus their explanatory comment block).mint-ts: now captures the CID frompnpm vitest run --reporter=verbose ...stdout and runsverify-self-contracts <ts.json> "$out". Default vitest reporter swallowed theconsole.log("catalog CID: ...")line; verbose preserves it.mint-csharp: same shape asmint-rust-- captures the CID fromdotnet runstdout and runsverify-self-contracts <csharp.json> "$out". Bump-dance error message follows the rust/go/cpp pattern.make helpfooter:tsandcsharpnow print as(envelope) .provekit/self-contracts-attestations/<lang>.jsoninstead of literal CIDs.all-mintfooter: same envelope format for consistency.grep -E '(TS|CSHARP)_CID :=' Makefilereturns no matches;CATALOG_CID :=is the only remaining_CID :=constant (preserved per scope; documented as separate follow-up).Spec note
protocol/specs/2026-05-02-bundle-attestation-protocol.mdalready describes the per-languageartifactNameset generically ("rust", "go", "cpp", etc.-- the §6.3 wording explicitly anticipates additions).2026-05-02-provekit-migrate-protocol.mdcovers catalog-version mechanics, not self-contracts. No spec edits were required.Smoke test
make conformancepasses locally:References
protocol/specs/2026-05-02-bundle-attestation-protocol.mdprotocol/specs/2026-05-02-binary-attestation-protocol.mdWhat this closes
The structural pattern Sir flagged in the PR #30 body: the source tree no longer carries machine-local truth about its own bytes for any peer kit. Bumping any of the five self-contracts CIDs is now a single explicit
sign-self-contracts <lang> <new-cid>event, gated by the foundation key.Test plan
cargo test --release --manifest-path tools/foundation-keygen/Cargo.toml(10/10 passing including 3 new self-contracts tests)make mint-tsverifiests.jsonenvelopemake mint-csharpverifiescsharp.jsonenvelopemake conformancepasses end-to-end with all 5 envelope verificationsTS_CID/CSHARP_CIDreferences anywhere in the repoGenerated with Claude Code