GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — poc(id): #2241 intermittent-signature live stream prototype by dezren39 · Pull Request #4435 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Throwaway PoC for #2241 — intermittent-signature live stream

Implements the wire shape settled by the design in #2240 (doc/2026-11-01_design_id2240.md, merged in PR #3867) as a single runnable example: pkgs/id/examples/session_checkpoint_poc.rs.

Hard rule (#2056): prototype only. This lives in examples/, touches no production path, and must not be merged into the permanent feature or built on before a review round. It is landed for review exactly as #2241 specifies.

What it does

  • Session header committing to a fresh per-session MAC key (BLAKE3 commitment per the design formula; the raw key never appears in any record), 256-frame / 2000 ms segment policy pinned in the header.
  • Per-frame HMAC-SHA-256 using the design's exact domain string and formula (id.session.frame.v1), frame digests and the ordered rolling BLAKE3 segment root (id.session.segment.v1 / id.session.segment.step.v1) exactly as specified in design §1.
  • Segment checkpoints closed by count (256), interval (2 s), commit flush, and disconnect flush; each checkpoint is an Ed25519-signed record chained to its immediate predecessor with state_before/state_after continuity.
  • A verifier that distinguishes the design's two levels: keyless replay verification (root recomputed from the segment body) and MAC-authenticated verification (key holders), and rejects truncated tails and tampered MACs.

Demonstrated (run output)

crypto self-checks: SHA-256 + HMAC-SHA-256 known answers OK
session: 700 frames, 5 checkpoints (count/interval/commit/disconnect boundaries)
header: 2 participants, delivered MAC key matches the signed commitment
chain: all checkpoints verify (signature, linkage, MAC-authenticated roots)
scenario 1 (late joiner): checkpoint snapshot reconstructs the live document (696 bytes, keyless replay-verified)
scenario 2 (reconnect): peer holding segments 0..1 reconciled at the next checkpoint boundary and replayed to the live document
scenario 3 (truncated tail): verifier rejected the shortened body (checkpoint commits 49 frames, body carries 46)
tamper check: a flipped frame MAC is rejected
measurements over 700 frames: per-event signing = 700 signatures / 44800 bytes; PoC = 5 checkpoint signatures (320 bytes) + 700 frame MACs (22400 bytes) = 22720 auth bytes; signatures reduced 99.3%, auth bytes reduced 49.3%
ALL DEMOS PASSED

Unit tests in the example (cargo test --example session_checkpoint_poc): 3 passed — crypto known answers, chain verification + truncation detection, late-joiner snapshot equality.

Simplifications vs the design (explicit, PoC-scoped)

  • Session ID is a BLAKE3 hash of the header core instead of a chain::sign event ID; no ChainExt fields are added (that is the permanent implementation's job, post-review).
  • The checkpoint snapshot travels inside the segment body instead of the content-addressed body path.
  • SHA-256/HMAC-SHA-256 are implemented locally in the example (known-answer-checked at startup: FIPS 180-4 + RFC 4231) so the example needs no optional-feature dependencies.
  • Ops are toy append/backspace frames standing in for web/collab.rs steps/cursors.

Refs #2241, #2240, #2034, #2056. Queue task 5237.


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
poc(id): #2241 intermittent-signature live stream prototype (task 5237)
957cc11
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 16:03
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You'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 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b699e569-3ff3-4697-b6c9-13bab9fdb2c8
Commits

Reviewing files that changed from the base of the PR and between 08e3c68 and 2ab308f.

Files selected for processing: 1

  • pkgs/id/examples/session_checkpoint_poc.rs
  • 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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T07:07:24.969941Z
We couldn’t complete this review. Comment @codex review to try again.
2ab308f New commits
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 2, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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: 957cc11a3c

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/examples/session_checkpoint_poc.rs
Comment on lines +479 to +482
if !self.segment_frames.is_empty()
&& at_ms.saturating_sub(self.segment_start_ms) >= u64::from(self.header.max_interval_ms)
{
self.close_segment(CloseReason::Interval)?;

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Close expired segments independently of incoming frames

When frames pause, the interval boundary is never processed until another frame arrives, so the advertised 2-second checkpoint limit does not bound the unsigned tail. This already occurs in build_session: the segment starting at 2000 ms remains open throughout the pause and is only checkpointed when frame 300 arrives at 6000 ms. If no further frame or graceful disconnect arrives, it remains unsigned indefinitely. Add a timer or explicit clock-tick mechanism to the prototype and exercise it during the scripted pause so the demo actually validates the count-or-time policy.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 4, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in e851254 (task 8925): Producer now has an explicit clock API, tick(at_ms), which checkpoints the open segment with CloseReason::Interval when the tick crosses max_interval_ms from the segment start — no incoming frame required. build_session ticks at 4560 ms during the 3 s pause, closing segment 1 at the boundary instead of at frame 300's arrival. Regression test idle_segment_checkpoints_on_tick_at_time_boundary: tick at 1999 ms is a no-op, tick at 2000 ms closes frames 0..=1 as Interval, later frames start a fresh segment and the chain verifies. cargo test --example session_checkpoint_poc: 6/6 pass; cargo run: ALL DEMOS PASSED.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/examples/session_checkpoint_poc.rs
Comment on lines +618 to +622
Ok(if key.is_some() {
VerifyLevel::MacAuthenticated
} else {
VerifyLevel::ReplayVerifiedKeyless
})

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Replay the state transition before reporting replay verification

For the keyless late-joiner scenario, verify_segment returns ReplayVerifiedKeyless after checking the transcript root and snapshot hash, without applying the committed operations from state_before. An owner-signed checkpoint containing a snapshot unrelated to its frames therefore passes and is reported as replay-verified; even invalid canonical operations are never parsed here. The separate replay_from call only covers the reconnect scenario. Either replay through the deterministic toy consumer before returning this level or report a distinct transcript/snapshot-commitment verification status instead.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 4, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in e851254 (task 8925): SegmentBody now carries state_before_snapshot (the document at the segment's first frame), and verify_segment — in both the keyless and MAC paths — hashes it against checkpoint.state_before, parses every canonical frame with Op::from_canonical, applies the operations, and requires the replay to land exactly on the committed snapshot/state_after before returning ReplayVerifiedKeyless. Regression test keyless_verification_rejects_snapshot_the_frames_do_not_produce: an owner-signed checkpoint committing a snapshot unrelated to its frames (snapshot hash matching the signed state_after, so the old check passed) is now rejected; the genuine body still verifies keyless. cargo test --example session_checkpoint_poc: 6/6 pass.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/examples/session_checkpoint_poc.rs
Comment on lines +574 to +578
owner
.verify(
&checkpoint.core_bytes(&header.session_id),
&Signature::from_bytes(&checkpoint.signature),
)

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Recompute the header hash before trusting its fields

If a supplied header's participant list or policy is modified while retaining its original session_id, both chain and segment verification still succeed: this signature check authenticates only the supplied ID, and neither verifier recomputes the header-core hash constructed in Producer::new. For example, replacing header.participants[1] passes even the separate MAC-key commitment check while changing the purported session roster. Using a header hash instead of a signed start-event ID is an explicit PoC simplification, but it still requires recomputing that hash to bind the header fields to the checkpoint signature. Share the header-core encoding with the verifier and reject mismatched IDs before accepting the header's policy or participants.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 4, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in e851254 (task 8925): the header-core construction is now a shared function, header_core_bytes(header), used by Producer::new to derive the session ID; verify_segment and verify_chain both recompute it via verify_header and reject any header whose participants, initial state, nonce, MAC commitment, or policy limits do not recompute to the supplied session_id. Regression test tampered_header_participant_is_rejected: replacing header.participants[1] while keeping the original session_id now fails both segment and chain verification. cargo test --example session_checkpoint_poc: 6/6 pass.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39 dezren39 mentioned this pull request Nov 2, 2026
id: PoC: intermittent-signature live stream for collaborative editing #2241
Closed
@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state and removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 2, 2026
@github-actions github-actions Bot assigned dezren39 Nov 3, 2026
developing-today[bot]
poc(id): address #2241 PR #4435 Codex P2 findings (task 8925)
e851254
- tick(): idle segments checkpoint at the interval boundary without waiting for a frame; build_session ticks at 4560 ms during the pause

- verify_segment now replays the segment frames onto the committed pre-state (SegmentBody carries state_before_snapshot) before reporting replay-verified; a signed snapshot the frames do not produce is rejected

- verifiers recompute the header core (header_core_bytes) and bind participants/policy to session_id in verify_segment and verify_chain

- regression tests: idle tick boundary, forged-snapshot keyless replay, tampered header participant; cargo test --example session_checkpoint_poc 6/6 pass, cargo run demos pass
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 4, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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: e851254e71

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/examples/session_checkpoint_poc.rs Outdated
Comment on lines +394 to +395
fn frame_count(&self) -> u64 {
self.last_frame_seq - self.first_frame_seq + 1

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 4, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Validate frame bounds with checked arithmetic

For an owner-signed checkpoint with a reversed or overflowing frame range, this calculation panics in debug builds instead of returning a verification error. In release builds, a range of 0..=u64::MAX wraps to a count of zero, allowing verify_segment to accept an empty body when the checkpoint commits the corresponding empty root and unchanged state. This defeats the frame-count and max_frames checks. Reject reversed ranges and use checked subtraction/addition before comparing the count or advancing the chain's expected sequence.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 10, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 2ab308f (task 14382): Checkpoint::frame_count now returns Option<u64> computed with checked_sub + checked_add, so a reversed range or 0..=u64::MAX is a verification error instead of a debug panic / release wrap-to-zero. verify_segment resolves the count once with that error before comparing it against the body length and the signed max_frames policy, and verify_chain advances the expected frame sequence with checked_add and errors on overflow. Regression test reversed_or_overflowing_frame_range_is_rejected: an owner-signed checkpoint with a reversed range is rejected, an owner-signed 0..=u64::MAX checkpoint with an empty body is rejected, and chain verification rejects a sequence that would advance past u64::MAX. cargo test --example session_checkpoint_poc (in pkgs/id): 7/7 pass (including the new regression test); cargo run: ALL DEMOS PASSED.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
repo-worker-code-k
poc(id): validate #2241 PR #4435 frame ranges with checked arithmetic…
2ab308f
… (task 14382)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 579371b into main Nov 10, 2026
6 of 9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/5237-2241-intermittent-signature-poc branch November 10, 2026 07:08
This was referenced Nov 12, 2026
id: protocol v1 phase 2 — PoC: intermittent-signature live stream for collaborative editing (#2036) #3795
Closed
poc(id): #3795 intermittent-signature live stream PoC — protocol v1 phase 2 #9386
Merged
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.