Skip to content

feat(backend): stream conversation patch delivery - #332

Draft
sandersonstabo wants to merge 2 commits into
agent/portable-versioned-layout-v2-port-6fd9d33from
agent/backend-conversation-delivery-writer-port-19975ca
Draft

feat(backend): stream conversation patch delivery#332
sandersonstabo wants to merge 2 commits into
agent/portable-versioned-layout-v2-port-6fd9d33from
agent/backend-conversation-delivery-writer-port-19975ca

Conversation

@sandersonstabo

@sandersonstabo sandersonstabo commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Depends on #331.

Scope

  • add the backend-owned lazy unidirectional conversation delivery writer
  • send the first real PatchBatch frame before advancing the subscription registrar
  • reuse one stream across contiguous batches and reset unfinished ownership on failure/cancellation
  • preserve typed open, send, registry, and finish failures
  • register the focused real-loopback proof in Cargo and Bazel

Exclusions

  • no queue, notifier task, connection-driver integration, listener/startup composition, frontend routing, or Event frames

Verification

  • exact-head jobs=1 backend leaf gate passed at 55fdb03fce8162459d1d36011a55538c21e014f6
  • focused build passed
  • 8/8 real-loopback Rust cases passed
  • fresh production and test Clippy markers passed
  • root format and locked/offline Cargo metadata passed
  • exact seven-path hash/status guards and Bazel shutdown passed

Gate receipt: D:/artisan-editor-gate-logs/backend-conversation-delivery-writer-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 a backend-owned lazy conversation delivery writer that sends the first real PatchBatch frame before advancing the subscription registrar, reusing one stream across contiguous batches and resetting unfinished ownership on failure or cancellation.

  • Opens a server uni stream only for real replay batches; Current and ResnapshotRequired outcomes return without touching the wire or registrar.
  • Advances the registrar only after the batch envelope is sent; open, send, registry, and finish failures preserve their typed sources and consume the writer.
  • Resets a dropped unfinished stream with a fixed application code.
  • Adds 8 real-loopback tests covering publish, reuse, send failure, registry failure, and cancellation.

Exclusions

  • No queue, notifier task, connection-driver integration, listener/startup composition, frontend routing, or Event frames.

Written for commit 55fdb03. 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