room: advance the steer cursor after the checkpoint
ci / test (push) Successful in 59s
ci / checks (push) Successful in 55s
ci / web (push) Successful in 17s
ci / publish-edge-image (push) Skipped
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m49s
ci / publish-edge-chart (push) Skipped
ci / checks (pull_request) Canceled after 0s
ci / test (pull_request) Canceled after 0s
ci / chart (pull_request) Canceled after 0s
ci / web (pull_request) Canceled after 0s
ci / docker (pull_request) Canceled after 0s
ci / publish-edge-image (pull_request) Canceled after 0s
ci / publish-edge-chart (pull_request) Canceled after 0s

The steering source seeded from `config.absorbed_seq`, which the runner
loaded before the boundary pass advanced the row. When the burst that
started the turn held a chat line before the mention, the first drain read
that line back, appended it a second time, and moved the row backwards,
so the next boundary pass appended the mention again.

The row now has one writer. `RoomSteering::drain` keeps the cursor in
memory, `commit` writes it after `save_session` succeeds, and the
boundary pass hands its own cursor down in the config the turn reads.
That is the order the boundary pass already uses, append then checkpoint
then advance, and the framework's contract for a steering source: a line
that comes back is deduped within the turn, a line retired too early is
gone.

A failed commit leaves the row behind, so a line can repeat, and it
reports the failure instead of swallowing it. The drain rule moves to
`steerable`, a pure function over the messages, and four tests cover it,
the cursor handoff, and the row's waits.
This commit is contained in:
vhaudiquet committed 2026-12-02 18:01:38 +01:00
1 parent d310735c71
commit 6b2624f0ba
4 files changed
+263 -43

No files matched your search

+10 -5
View File
@@ -194,11 +194,16 @@ The mid-turn half of that is the framework's steering hook
(`HostAgentConfig::steering`), not a step-level drop: the turn's
`RoomSteering` source hands the driver one User-role line per drain at a
step boundary, so a member can correct the agent while it works without
the step in flight dying. It stops at the first line it cannot carry —
a mention, which the drop path owns, or a message with images, which a
line cannot — and leaves the cursor there, so the boundary pass appends
them in the log's order. What steering still cannot do is stop a running
command: only the mention drop does that, and only between steps.
the step in flight dying. It stops at the first line it cannot carry, a
mention (the drop path owns that one) or a message with images (a line
of text cannot hold them), and leaves the cursor there, so the boundary
pass appends them in the log's order. The source only reads that
cursor. The turn writes it after the session holding the drained lines
is saved, the order the boundary pass already uses: append, checkpoint,
advance. A crash before the checkpoint repeats a line at worst, and the
framework's per-turn dedupe drops the repeat. What steering still cannot
do is stop a running command: only the mention drop does that, and only
between steps.
A burst of mentions that lands before the first drop completes all goes
into the same restart, in order, one message each. Nothing is folded.