Skip to content

id-sync: B06 observable rejection events at the ingest gate - #11944

Merged
dezren39 merged 1 commit into
mainfrom
b06-rejection-events
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
b06-rejection-events

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: the B32 signed-ingest gate refused bad envelopes but left no record. An operator could not see what was refused, on which path, or why, and nothing showed that a refusal was handled the same way on local and remote paths.

After: ObservedGate wraps the B32 gate and records every refusal as a typed RejectionEvent in a local-only, hash-chained log, with per-class counters and an optional exporter. Admission outcomes and the admitted set are unchanged.

How: federation/slices/b06_rejection_events.rs maps each RejectReason to one of nine classes and records the ingress path, claimed signer, the identity the presented key is actually bound to, declared and presented payload digests, claimed time and the gate's policy digest. Each record links to the previous one's SHA-256 (domain id-sync/b06-rejection-event/v1), and verify_chain catches edits, drops and reordering. Turning the exporter off keeps recording and fail-closed behavior.

tests/federation_b06.rs (invariant oracle, 7 tests) runs random envelope streams across all ingress paths through a bare B32 gate and the observed gate in lockstep: same outcomes, same admitted set, exactly one event per refusal with fields checked against values the test computes itself, none per admission, and an intact chain. Like the other slices, the module is path-included and not yet wired into lib.rs.

Refs #10247


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

ObservedGate wraps the B32 IngestGate, returns exactly its outcome,
and appends one typed, hash-chained, local-only RejectionEvent per
refusal (reason class, ingress path, claimed signer and key binding,
declared vs presented payload digest, gate policy digest). An optional
exporter can be switched off without changing fail-closed behavior.

Refs #10247

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 22:11
@dezren39
dezren39 merged commit 8a5e35f into main Nov 18, 2026
@dezren39
dezren39 deleted the b06-rejection-events branch November 18, 2026 22:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T22:13:02.592719Z 509f5d3 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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.

2 participants