Repository navigation
feat(server): archive the transcript tail when a session ends without Stop (RIG-4135) - #1464
Merged
trunk-io[bot] merged 1 commit intoOct 2, 2026
Conversation
… Stop (RIG-4135) When the hub sees a session end without Stop (the Runner reports a bound session unknown, or a re-enroll reaps its binding) it now runs the same session_end flush Stop does, detached and under the session's tenant. The PG tail is kept, so a later resume is unaffected; the manifest dedups an identical range. Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Compass engineering docs preview: https://compass-server-rig-4135-arch.compass-eng-docs.pages.dev Deployed from |
rigel-mintaka
marked this pull request as ready for review
October 2, 2026 01:20
This was referenced Oct 2, 2026
mattwilkinsonn
added this pull request to stack #1467
October 2, 2026 03:19
mattwilkinsonn
approved these changes
Oct 2, 2026
|
This pull request was merged into |
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.
This PR is part of a stack containing 4 PRs:
mainFixes RIG-4135 (Matt's ruling: B, archive on a detected end). Stacked on #1463.
Change
runnerhub.SessionEndSink. The hub calls it when a session ends without Stop:dropLostSession, when the owning Runner answers a deliver with NOT_FOUND (the container is lost), under the session's tenant from fix(runnerhub): scope Runner-originated binding calls to the session's tenant (RIG-4146) #1463;archiveEndedruns the sink detached from the Runner stream, with a 2-minute bound.server.archiveSessionEndis Stop's existing best-effortsession_endflush, moved out ofStopAgentSession. The Stop path and the newsessionEndArchiversink now share it.session_endnever prunes, so a later resume still reads the PG tail. A resume followed by Stop archives the larger range again. Overlappingsession_endsegments have no reader that cares: resume reads onlysafety_valve.Tests
TestSessionEndedWithoutStopIsArchived(runnerhub): the lost drop and the re-enroll reap each archive exactly the ended session, and a foreign Runner's refusal archives nothing. Removing either hook makes it fail ("no session-end archive within 10s").TestReenrollReapArchivesSessionEnd(server pgtest): a reaped session gets onesession_endsegment over [1..2], and both PG rows stay. Unwiring the sink makes it fail ("session_end segments = 0 after the re-enroll reap").crash_leaves_no_session_endbecamecrash_archives_session_end: against real Garage,podman rm -fthe container and @mention the agent; asession_endsegment carrying the first reply appears, and nothing is pruned as superseded. The fullTestLegS3DurabilityValvespasses (5/5).-race). Lint reports 0 issues in the touched files.Known gap