Repository navigation
feat(comms): carry the agent turn sequence to the stored message and the settle sink (RIG-4323) - #1617
Open
rigel-mintaka wants to merge 6 commits into
Conversation
|
❌ This stack could not start testing because there was a merge conflict. See more details here.
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 4, 2026 12:54
|
Compass engineering docs preview: https://compass-agent-rig-4324-turn.compass-eng-docs.pages.dev Deployed from |
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 4, 2026 16:04
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 4, 2026 16:05
rigel-mintaka
force-pushed
the
compass-agent/rig-4324-turn-sequence-agent
branch
from
October 5, 2026 18:13
9da05bc to
6df6ebf
Compare
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 5, 2026 18:13
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 5, 2026 18:13
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 5, 2026 18:52
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 5, 2026 18:52
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 5, 2026 19:00
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 5, 2026 19:00
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 5, 2026 19:13
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 5, 2026 19:13
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 5, 2026 19:42
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 5, 2026 19:42
rigel-mintaka
force-pushed
the
compass-agent/rig-4324-turn-sequence-agent
branch
from
October 5, 2026 20:09
2f02d6d to
2c810c3
Compare
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 5, 2026 20:10
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 5, 2026 20:10
rigel-mintaka
marked this pull request as ready for review
October 5, 2026 22:07
rigel-mintaka
force-pushed
the
compass-agent/rig-4324-turn-sequence-agent
branch
from
October 6, 2026 05:50
2c810c3 to
15e495f
Compare
rigel-mintaka
changed the base branch from
compass-managed/rig-4325-turn-bounded-settle
to
main
October 6, 2026 05:50
rigel-mintaka
changed the base branch from
main
to
compass-managed/rig-4325-turn-bounded-settle
October 6, 2026 05:50
mattwilkinsonn
added this pull request to stack #1823
October 7, 2026 00:21
mattwilkinsonn
approved these changes
Oct 7, 2026
Contributor
|
/trunk merge |
rigel-mintaka
force-pushed
the
compass-agent/rig-4324-turn-sequence-agent
branch
from
October 7, 2026 01:53
15e495f to
813d73e
Compare
…G-4324) compass-agent keeps a per-session-identity turn counter. agent_start increments it, comms posts carry it on PostMessageRequest.turn_sequence, and the agent_end SessionFrame carries it on turn_sequence. Each new value is written as an SDK custom session entry, so a resume of the same session id continues from the transcript. A new session id starts at 1. Refs RIG-4324 Co-authored-by: Matt Wilkinson <matt@rigel.build>
…t (RIG-4324) Co-authored-by: Matt Wilkinson <matt@rigel.build>
…he turn sequence (RIG-4324) The SDK can supersede or drop an agent_end, which desynced the FIFO start/end pairing and stamped every later settle one turn behind. A terminal end now settles the current sequence and clears the queues. An in-place SDK identity change no longer restores a lower sequence, since the server's settle mark outlives it. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…tled (RIG-4324) A control prompt can start the next run in the gap between the core agent_end and the session's terminal end. Settling current() there fired that run's holds while it streamed. Settle below the first core start whose session agent_start has not been seen. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…G-4324) The core loop goes idle before the session emits its terminal agent_end, so a raw control prompt in that window started a run the pending end settled. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…rops stale starts (RIG-4324) Waiting on waitForIdle covers the trailing session end, scheduled continues, and a missing end. With no early core start possible, a terminal end clears captured starts. Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-agent/rig-4324-turn-sequence-agent
branch
from
October 7, 2026 04:06
813d73e to
895aaea
Compare
This branch has not been deployed
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.
Agent half of T1 in the settle turn-order record (DL-382). Stacks on #1603, the current top of the #1602 line, so the stack stays linear. This change needs only #1602's proto fields.
TurnSequence(packages/compass-agent/src/turn-sequence.ts) is a per-session-identity counter.agent_startincrements it, and each new value is written as an SDK custom session entry (compass_turn_sequence). The entry travels in the transcript, so a resume of the same session id continues from the highest stored value. A new session id starts at 1. The counter refuses to pass int64 max.EventMapperstamps the value on the internalSessionFrame.turn_sequenceof theagent_endframe. The server copies it to the public frame. Other frames stay 0.PostMessageRequest.turn_sequence.Tests: successive turns stamp 1, 2, 3 on
agent_end; a post carries the current turn; a stored value is restored; a new identity starts at 1; the int64 ceiling. A realSessionManagerround trip (write, close,open) continues at 3. That test fails if the custom entry is not written.Merge order: land #1704 (RIG-4418) before this. Without it, a Reload restarts the SDK session and the counter goes back to 1 while the server still holds the old settle value. This PR stays draft until #1704 merges; then it is rebased onto main, re-reviewed, and promoted.
Refs RIG-4324
Co-authored-by: Matt Wilkinson matt@rigel.build