Skip to content

feat(backend): add conversation subscription registry - #324

Draft
sandersonstabo wants to merge 3 commits into
agent/backend-conversation-query-port-f945d8efrom
agent/backend-conversation-subscription-registry-port-ecaa252
Draft

feat(backend): add conversation subscription registry#324
sandersonstabo wants to merge 3 commits into
agent/backend-conversation-query-port-f945d8efrom
agent/backend-conversation-subscription-registry-port-ecaa252

Conversation

@sandersonstabo

@sandersonstabo sandersonstabo commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Depends on #323.

Adds a deterministic per-connection conversation subscription registry with single-copy authority, pending-to-active activation, stale-lease fencing, exact unsubscribe ownership, monotonic generations, and contiguous cursor enforcement for published batches.

Scope:

  • backend registry source and focused integration tests
  • backend Cargo/Bazel/export registration
  • root backend suite visibility

Excludes request-handler/connection injection, QUIC writer ownership, notifier queues, startup replay, and frontend projection.

Verification:

  • //tests/backend:conversation_subscription_registry_test — 17/17
  • fresh production and integration-test Clippy markers
  • root format check
  • locked/offline Cargo metadata
  • exact seven-path hash/status guards
  • Bazel shutdown exit 0

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 a synchronous per-connection conversation subscription registry that fences writes with per-thread leases and enforces a pending-to-active lifecycle before batches can advance the cursor.

Details

  • Tracks one entry per thread with monotonic generation counting; replacing or removing an entry immediately stales its lease.
  • publish_batch accepts only an active lease, exact thread match, and a contiguous from_cursor equal to the current cursor, then advances to to_cursor.
  • All failures are typed and return without mutating state.
  • Excludes request-handler/connection injection, QUIC writer ownership, notifier queues, startup replay, and frontend projection.
  • Registers the new module in Cargo and Bazel and adds a 17-case integration test suite.

Written for commit 4dc90d6. 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