Skip to content

backend: prepare durable conversation subscriptions - #326

Draft
sandersonstabo wants to merge 5 commits into
agent/transport-server-dispatch-receipt-port-4dc90d6from
agent/backend-conversation-subscription-preparation-port-5ece543
Draft

backend: prepare durable conversation subscriptions#326
sandersonstabo wants to merge 5 commits into
agent/transport-server-dispatch-receipt-port-4dc90d6from
agent/backend-conversation-subscription-preparation-port-5ece543

Conversation

@sandersonstabo

@sandersonstabo sandersonstabo commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Dependency

Directly depends on #325 (Post-write Server Dispatch Receipt).

Scope

  • Prepare fresh subscriptions from one durable bounded snapshot read.
  • Validate resume cursors through durable bounded patch replay.
  • Register only Pending state at the exact response-declared cursor.
  • Return lossless resnapshot-required and typed repository/registration failures without partial mutation.
  • Make unsubscribe acknowledgement idempotent while retaining the exact removed/absent registry outcome.

Exclusions

No request-handler wiring, post-response activation, notification loop, delivery task/queue, QUIC stream ownership, startup/custody work, or frontend projection.

Verification

  • //tests/backend:conversation_subscription_preparation_test (9 Rust cases)
  • fresh production and test Clippy aspect markers
  • root format test
  • locked/offline Cargo metadata
  • exact seven-path hash/status guards and shutdown 0

Gate receipt: D:/artisan-editor-gate-logs/backend-conversation-subscription-preparation-20260829-gate2/receipt.json.


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


Summary by cubic

Adds the durable preparation seam for conversation subscriptions. Fresh and resume subscribes now register Pending at exactly the response-declared cursor, and stop acknowledgements are idempotent.

  • Durable reads always precede registry mutation, so repository or register failures leave existing state unchanged.
  • Fresh subscribes read one bounded snapshot; resume subscribes validate the cursor through one bounded patch replay.
  • Resume cursors beyond the durable tail return ResnapshotRequired with both requested and current cursors and make no registry change.
  • Prepared entries are only ever Pending; activation is the caller’s responsibility after the Subscribe response write is proven.
  • Stop returns the exact Removed or Absent registry outcome and never fabricates a removal.

Written for commit ab5109a. Summary will update on new commits.

Review in cubic

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.

1 participant