Repository navigation
id: universal signed-and-validated admission gate for both cores (A9120-signature-gate, #10275) - #12893
Merged
Conversation
…(A9120-signature-gate, #10275) One gate on every admission path for both cores, per design part A cross-cutting invariant 1 (S1.12-S1.20): semantic validation, signature + payload verification (digest recomputed on receipt), signer binding against a directory and the authenticated principal, namespace/tenant authorization through the A9116 seam pattern, and policy (admitted domains, payload budget). Local producers sign before entering; no unsigned-local exception. The AdmissionReceipt is the only accepted state transition and has no constructor outside the gate — no route bypass. - pkgs/id/crates/id-core/src/admission_gate.rs (new) - pkgs/id/crates/id-core/tests/admission_gate.rs (new) — model oracle: generated operations vs an independent reference model - pkgs/id/hosted-worker/src/admission-gate.ts (new) — TS mirror, same pipeline/stages/rejection classes; compiles the atlas SHA-256 profile verifier (blake3 admissions stay with the Rust core and refuse `unsupported` here, as an excluding dispatch does in Rust) - pkgs/id/hosted-worker/test/admission-gate.test.ts (new) No crate-root/manifest changes (owned by 9110-02); the test includes the module by path, per the sibling-slice pattern. Oracle: cargo test -p id-core --test admission_gate → 6 passed; bun test admission-gate.test.ts → 8 pass.
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. |
|
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 51 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. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements slice A9120-signature-gate for #10275 — the universal signed-and-validated admission gate for both cores (design part A, cross-cutting invariant 1, S1.12–S1.20).
Preflight (task 17114): all five native blockers re-verified CLOSED via gh REST before implementation — #9083, #10160, #10226, #10244, #10257. Record: #10275 (comment)
What lands (exactly the issue's four owned files, +1759/−0):
pkgs/id/crates/id-core/src/admission_gate.rs—AdmissionGatewith one pipeline on both admission paths (admitfor constructed envelopes,admit_canonicalfor wire bytes): (1) semantic validation incl. canonical round trip, (2) signature + payload verification via the A9114 envelope (digest recomputed on receipt), (3) signer binding — directory-registered key must equal the body key and the authenticated principal must be the signer, (4) namespace/tenant authorization via the injected A9116-pattern seam (shippedScopeBindingAuthorizer: body context must equal the authenticated tenant scope), (5) policy — admitted domains + payload budget.AdmissionReceipthas private fields and no constructor outside the gate: no route bypass. The gate consumes the design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects #9083 context contract shape; it does not define tenancy.pkgs/id/crates/id-core/tests/admission_gate.rs— the declared model oracle: proptest generates admission operations (valid, tampered payload, forged signature, unknown/rebound signer, wrong principal, wrong scope, oversized, unadmitted domain, garbage bytes, non-canonical construction, duplicates) against an independent reference model; every accepted set and rejection class compared after every operation. Plus targeted tests for receipt fields, the no-unsigned-local-exception rule, wire/constructed path equivalence, and context validation.pkgs/id/hosted-worker/src/admission-gate.ts+test/admission-gate.test.ts— TS mirror: same pipeline, stage order and rejection classes over the canonical-CBOR codec + WebCrypto Ed25519. Its profile dispatch compiles the atlas-chunk-sha256-utf8 verifier; raw-blake3-256 payload IDs refuseunsupportedin this build (as an excluding Rust dispatch does) — blake3 admissions stay with the Rust core.No crate-root/manifest changes (owned by 9110-02); the test includes the module by path, per the sibling-slice pattern. No production rollout.
Verification (laptop, this branch): the issue's exact oracle command —
cargo test -p id-core --test admission_gate→ 6 passed / 0 failed;cd pkgs/id/hosted-worker && bun test admission-gate.test.ts→ 8 pass / 0 fail.rustfmt --checkclean on both Rust files.Closes #10275.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.