fix(bridge): durable streams + decouple job from connection + single-instance guard#62
Draft
drewstone wants to merge 1 commit into
Draft
fix(bridge): durable streams + decouple job from connection + single-instance guard#62drewstone wants to merge 1 commit into
drewstone wants to merge 1 commit into
Conversation
…instance guard [WIP] Build-stage durability work captured as a draft for review/resume. See PR comment for spec, checklist, completion criteria, ranked alternatives, decisions, and resume steps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Durable streams + decouple job from connection + single-instance guard
Fixes the three cli-bridge faults that let a dropped connection or a stray restart kill a live agent run.
BRIDGE_PORTexits cleanly instead of racing the bind and severing the running instance's streams. The systemd unit is unaffected.Last-Event-ID, with idempotent dispatch by run id so a retry re-attaches to the same run instead of cold-starting.Verification
A second instance on the same port exits cleanly; a client disconnect leaves the subprocess running; a reconnect with
Last-Event-IDreplays missed events; a retry re-attaches.Relationship to the shared package
cli-bridge is the local mirror of the production sandbox API; its run buffer re-points onto the shared
EventStreamStorefrom@tangle-network/sdk-core/durabilityonce that package publishes, so local and production share one durable-stream contract.