Repository navigation
Conversation
…age (#3810 slice 4b) verify_key_signature now admits a ceremony key superseded into history, so exports of rebound bindings verify on import; the rebind chain (service attestation plus backing records) still links it to the current key. Adds 13 hosted_export tests (delayed/fast-path history round-trips, every remaining ExportError refusal, canonical order + JSON wire round-trip) and a binding-level regression test. Evidence: cargo test -p id --lib → 540 passed, 0 failed; hosted_export 22/22. Clippy not run: toolchain skew (clippy-driver reports rustc 1.99.1 vs rustc 1.99.0, E0514 on deps); cargo check --all-targets clean except pre-existing warnings.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 019897e76d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| #[test] | ||
| fn key_signature_verifies_for_a_rebound_binding() { |
There was a problem hiding this comment.
Prefix the newly added test functions with test_
The 15 new test functions across this file and hosted_export.rs omit the test_ prefix explicitly required by the naming convention in pkgs/id/AGENTS.md. Rename these newly introduced tests to follow the documented package convention.
AGENTS.md reference: pkgs/id/AGENTS.md:L140-L140
Useful? React with 👍 / 👎.
|
Related uncovered verification gap filed as #13289: verify_import currently trusts object.blob_refs and does not bind them to the envelope's actual document content citation. I confirmed with a temporary repro that a valid signed document.put citing content A plus an unrelated carried blob B passes verify_import and is reported complete by ingest, while A remains unavailable. #13196's refusal tests are valuable but do not cover this mapping; #13289 records the acceptance criteria. |
|
Superseded in part — Lane WB (archer), 2026-11-23. This PR's production fix ( |
Summary
Next slice of #3810 (tracked under #2852 slice 4, spec §6): import verification now handles rebound bindings, and every remaining §6.2 refusal path has a test.
HostedBindingService::verify_key_signatureadmitted only a transcript key equal to the current binding key, so no export of a rebound binding could ever verify on import (BindingKeySignatureInvalidon every history-carrying binding). It now also admits a ceremony key superseded intohistory; the rebind chain (service attestation over the record plus backing rebind records, both still checked inverify_importstep 2) is what links it to the current key. Doc comment updated.hosted_export, 1 inhosted_binding): delayed-rebind history round-trip (objects signed pre- and post-rotation both verify), fast-path (old-key-signature) history verifies with no backing records, and one test per remaining refusal:HistoryUnbacked,RebindRecordMismatch, tampered rebind record,ManifestBindingMismatch,BindingKeySignatureInvalid,BindingAttestationInvalid,CountMismatch,ObjectsDigestMismatch,DuplicateObject,MissingBlob, plus canonical-order storage and a JSON wire round-trip asserting the identical object/hash set.origin/mainwithBindingKeySignatureInvalid(the bug above), not with a compile error; they pass after the fix. The refusal tests characterize the already-correct step 1–3 checks.Closes no issue by itself: #3810 stays open for the remaining wiring (live per-user store enumeration + R2 blob fetch feeding
build_export, and §6.2 step-4 ingest), which needs the hosted data plane as input — see next slice below. Requires: nothing (purepkgs/idRust; no DO/Worker changes).Evidence
019897e76d9(fleet-build-lock, workspacepkgs/id):cargo test -p id --lib→ 540 passed, 0 failed (hosted_export 22/22, hosted_binding includes newkey_signature_verifies_for_a_rebound_binding).cargo check -p id --all-targets→ clean; the only warnings touching these files were a pre-existing unused-import (Verifier, removed in this PR) and a pre-existing missing-docs warning onsign_service_bytes.cargo fmt --checkon both files → clean (workspace has pre-existing drift in untouchedid-core/bridge files).cargo clippy. Environment toolchain skew: clippy-driver reports rustc 1.99.1 while rustc is 1.99.0, so clippy fails with E0514 on dependency crates before reaching this code (e.g.id-currency-registry). Nightly CI clippy is the venue of record here.Merge Danger
Low. One 6-line condition change in
verify_key_signatureplus its doc comment; everything else is#[cfg(test)]code. The condition only widens acceptance for bindings whose transcript key appears in their own attested history — fresh bindings behave exactly as before (covered by existingtampered_records_fail_verification). No serialization, schema, or API changes; no Worker/DO/TS changes.{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T10:35:16Z", "session_id": "ses_e5df84d4bc9ffePZPoIbfJmtbG", "lane": null, "host": "amd", "worktree": "/home/user/git/code-worktrees/oc-code-05-3810", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/code-worktrees/oc-code-05-3810", "repo": "developing-today/code", "branch": "lane-oc-code-05-3810-export-refusals", "sha": "019897e76d988c924a074310dfb22f24ff186dca" }, "auth_subject": "oc-code-01", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.