Skip to content

id-store: resumable stream subscription + completed target resolution (A9123-stream-subscribe, #10282) - #12995

Merged
dezren39 merged 1 commit into
mainfrom
lane-gc/10282-stream-subscribe
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-gc/10282-stream-subscribe

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Implements ID/Atlas slice A9123-stream-subscribe (issue #10282): the read side of addressable live streams (design part A §#9123, A-9123.1, S4.79–S4.82). The mandatory preflight gate cleared today — all four native blockers (#9083, #10160, #10246, #10274) are closed.

New files only (the slice's two owned files; crate-root export stays with 9110-02, the test includes the module and its dependencies by path):

  • pkgs/id/crates/id-store/src/stream_subscribe.rs — resume cursor = sequence + chain-record ID (never a timestamp), validated against the lifecycle's accepted chain: cursor_mismatch / cursor_ahead / cursor_expired are distinct typed rejections. Paged delivery under a max-items cap (A9119 discipline) with truncated + next cursor, heartbeat at the live head, observable cancellation as a terminal page, and terminal outcomes delivered only after the full retained replay. Completed streams resolve via the typed ResolutionView::Completed { final_id } — there is no redirect type, so no implicit redirect can exist — and only under the current authorization result, re-checked on subscribe, resume, every poll and resolve. Retained records fold against the accepted chain (record ID, prev link, stream + tenant-scope binding, signature re-verified) before anything is delivered.
  • pkgs/id/crates/id-store/tests/stream_subscribe.rs — the declared model oracle: an independent chain prefix/suffix + current-authorization reference model; 3 seeds × 140 generated operations compared after every step, plus fixed tests for exact-suffix resume, backpressure paging of one, cancellation, completion recheck under revoked authorization, abort/expiry claiming no final content, scope/fold validation, pruning expiry and cursor canonical round-trips/rejections.

Verification (laptop worktree off origin/main, nix develop in pkgs/id): cargo test -p id-store --test stream_subscribe — 11 passed / 0 failed, run post-rustfmt. Both files rustfmt-clean; no warnings in the new files.

Closes #10282.


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

… (A9123-stream-subscribe, #10282)

New module stream_subscribe.rs: the read side of addressable live
streams (S4.79-S4.82). Resume cursor is sequence + chain-record ID,
validated against the lifecycle's accepted chain (mismatch / ahead /
below-retention-floor are distinct typed rejections). Paged delivery
under a max-items cap with heartbeat at the live head, observable
cancellation, and terminal outcomes delivered only after the full
retained replay. Completed streams resolve via the typed
ResolutionView::Completed — no redirect type exists — and only under
the current authorization result, re-checked on subscribe, resume,
every poll and resolve. Retained records are folded against the
accepted chain (record ID, prev link, stream and tenant-scope
binding, signature) before anything is delivered.

Model test stream_subscribe.rs: independent prefix/suffix +
authorization reference model; 3 seeds x 140 generated operations
compared after every step, plus fixed tests for exact-suffix resume,
backpressure paging, cancellation, completion recheck, abort/expiry
claiming no final content, scope/fold validation and cursor
rejections. Oracle: cargo test -p id-store --test stream_subscribe
— 11 passed / 0 failed.

Crate-root export stays with 9110-02; the test includes the module
and its dependencies by path, per the stream-records pattern.
@dezren39
dezren39 merged commit ffc1816 into main Nov 23, 2026
1 check passed
@dezren39
dezren39 deleted the lane-gc/10282-stream-subscribe branch November 23, 2026 06:39
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

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 5 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: b576622e-6014-423d-9b37-2a08c85bf9bb
Commits

Reviewing files that changed from the base of the PR and between 10e8566 and acb9136.

Files selected for processing: 2

  • pkgs/id/crates/id-store/src/stream_subscribe.rs
  • pkgs/id/crates/id-store/tests/stream_subscribe.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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-23T06:41:11.900226Z acb9136 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.

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.

Implement resumable stream subscription and completed target resolution

1 participant