Repository navigation
Record stream ownership and log diagnostic restart verdicts - #48
Merged
Merged
Conversation
pjeweb
marked this pull request as ready for review
November 14, 2026 08:22
3 of 5 tasks
pjeweb
added a commit
that referenced
this pull request
Nov 16, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 19, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 21, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 22, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 23, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
Author
|
Still carried in the integration train and not upstream, so it continues as #248. |
pjeweb
added a commit
that referenced
this pull request
Nov 25, 2026
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.
Why
When the box's backend restarts in the middle of a stream (after a crash or an update), it stops the running sender, so the stream drops even if nothing about it changed. Keeping an unchanged stream alive across a restart would need the new backend to know exactly what the old one started. Today it has no record of that at all.
What
How: each record is a versioned file with private permissions, written to a temporary file, flushed and renamed, and tagged with the boot identity so it's never reused after a reboot. A pure check compares the records with current evidence without stopping, signalling or adopting anything; the existing shutdown and orphan cleanup stay in charge.
apps/backend/docs/agents/stream-continuity-records.mddescribes the contract.This is evidence-gathering only; stream behaviour doesn't change.
How to verify
Run
apps/backend/src/tests/continuity-records.test.ts,continuity-observer.test.tsandlatest-report-writer.test.ts. Start and stop a stream on a dev box and check the startup log line with the "tear down" result and its reasons.Testing and limits
Risks
Low: a few small files per stream and one log line at startup. Nothing reads the records to make decisions yet.
Checklist