Skip to content

design(id): #2240 session checkpoint encoding - #3867

Merged
dezren39 merged 3 commits into
mainfrom
design/id-2240
Nov 2, 2026
Merged

dezren39 merged 3 commits into
mainfrom
design/id-2240

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a decision-ready, docs-only design record for #2240: typed session.start and session.checkpoint graph events, canonical CBOR and verifier contract, key/rotation policy, 256-frame-or-2-second boundaries, fork/waiting/pruning invariants, and class-specific peer_signature rules.

Scope

No implementation or PoC is included. The #2241 PoC remains gated on review under #2056. This PR does not close #2240.

Validation

  • git diff --check
  • Source paths and line references checked against the merged main tree at 6874cd4635357605f3dcabff2a9340b68ec62da4.

Related: #2240

@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 17:13
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T14:37:11.480899Z 047786e Manual request
ℹ️ 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.

)

pkgs/id/src/waiting.rs moved verbatim to pkgs/id/crates/id-core/src/waiting.rs
in 5969721 (#3447 Phase 1). The design doc cited the old path and called
the triage correction stale; on current main the old path is absent.
Task 5240 review fix; no design decision changes.
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · task 5240 review fix (queue worker, lane F)

One factual correction pushed in 25b1449 before merge: the design cited the waiting pool at pkgs/id/src/waiting.rs and called the Nov. 1 triage path correction stale. On current main that path is absent — the file moved verbatim to pkgs/id/crates/id-core/src/waiting.rs in 5969721 (#3447 Phase 1), and the cited line ranges (:37-55 caps, :48-55 seven-day DEFAULT_MAX_AGE_MS) match the new location. Three lines changed; no design decision is altered. Verified against the laptop primary at origin/main 56e66c9; git diff --check clean.

Full acceptance review (all five pinned decisions, record shapes, CBOR/vector spec, verifier walk) is in the task 5240 completion note on issue #2240. Merging once the Codex re-review of 25b1449 is clean/dispositioned.

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

Current head includes the 2026-11-02 path-correction (waiting.rs post-#3447 location) added during the task 5240 review. Please re-review the current head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25b1449bef

ℹ️ 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".

Comment thread doc/2026-11-01_design_id2240.md Outdated
3. **Validate start:** bind the session ID to the start event ID; check sorted unique participants/observers, initial-state hash, key suite/commitment shape, flush policy, and effective session limits against the world configuration. Authorized key holders also verify the delivered key against the commitment. The raw key is never expected in graph bytes.
4. **Resolve dependencies:** require the start event and immediate predecessor in `after`/the author chain before processing. If absent, leave the event waiting. If a dependency expires, do not accept the child as verified.
5. **Validate checkpoint chain:** check session owner, header ID, consecutive segment number, immediate predecessor, frame sequence/count bounds using checked arithmetic, state continuity, close reason, and root domain. Reject gaps, replays under another session ID, inconsistent state hashes, and segments exceeding the signed policy.
6. **Validate available frames:** if the segment body is present, verify each frame MAC, strict frame sequence, and the ordered rolling root; replay only under the class’s deterministic consumer. If bytes are absent, report “signed root committed; frames not independently replayed,” not “replay verified.”

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define a keyless verification path for retained segment bodies

When a retained segment body is fetched by an auditor who was not a session participant, this step requires MAC verification that the auditor cannot perform: the key policy delivers the secret only to header participants, and acceptance invariant 2 excludes it from checkpoint archives. Consequently, possessing the signed checkpoint and complete replay bytes is insufficient to complete the specified verifier walk. Distinguish keyless root/replay verification from MAC-authenticated verification, or specify how authorized historical auditors obtain the key.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 047786e1e (task 5240): verifier step 6 now distinguishes (a) keyless root/replay verification — any verifier with the segment body recomputes frame digests from the recorded (canonical frame, MAC) pairs, folds the rolling root, and replays, reported as 'replay-verified (keyless)' — from (b) MAC-authenticated verification, which is key-holders only. A non-participant auditor reaches (b) via post-close key disclosure (fresh per-session key; checkpoints/roots already signed, so disclosure cannot rewrite history). The segment-body paragraph in section 1 now also specifies the per-frame (canonical frame, frame MAC) record shape that makes keyless root recomputation possible.

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

Codex P2 (keyless verification path) fixed in 047786e1e — see the reply on the finding thread. Please re-review the current head.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 047786e1ef

ℹ️ 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".

@dezren39
dezren39 merged commit 2dcbb4e into main Nov 2, 2026
1 check failed
@dezren39
dezren39 deleted the design/id-2240 branch November 2, 2026 14:37
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.

id: design: session header + segment checkpoint event kind

1 participant