A message posted without a mention while the agent works waits for the next
turn today, so the model reads it only once the work the line is about is
finished. The spec's turn rules already promise the mid-turn half ("the next
step of the running turn"); the runner implements the turn-boundary half only.
This wires the framework's steering hook, which is already in the pinned rhema-host-agent 0.5.2 (HostAgentConfig::steering, re-exported Steering)
and was simply passed as None.
What changes
runner::RoomSteering is the turn's source. The driver drains it between two
steps and appends one User-role message per drain, so the line lands in the
history without the step in flight dying.
The drain stops at the first line it cannot carry — a mention, which the drop
path owns and would otherwise be appended twice, or a message with images,
which a line of text cannot carry — and leaves absorbed_seq there, so the
boundary pass appends them in the log's order.
What it does drain advances absorbed_seq (in the row first, then in memory,
so a failed write re-announces rather than drops), so the next boundary pass
cannot repeat it.
agent::build_agent takes the source and passes it through.
What does not change
A mention still drops the turn future and restarts over the committed session.
That is the only way to stop a long shell command, and the interrupt semantics
in the spec's turn rules stay as written. This commit also does not touch
approval, the message tool, or the wire: a steered line reaches the room's
history, its author already prefixed by name: exactly as the boundary pass
writes it.
Verification
cargo fmt --all, cargo clippy --all-targets -- -D warnings and cargo test
were not run: the machine this was written on has no Rust toolchain and no C
compiler, so the tree could not be built. The diff is small and everything it
touches exists in 0.5.2, but treat it as unverified — please run the three
commands before merging.
Not this PR, but it is the answer to "why is it slow when nobody pings"
Time to first message is a prompt problem, not a steering problem: prompt.md
says "Do not narrate every command" and "always send one before your last
message", and the model reads that as "speak at the end". A first message right
after the plan settles TTFM without any framework work. Separate patch if you
want it.
A message posted without a mention while the agent works waits for the next
turn today, so the model reads it only once the work the line is about is
finished. The spec's turn rules already promise the mid-turn half ("the next
step of the running turn"); the runner implements the turn-boundary half only.
This wires the framework's steering hook, which is already in the pinned
`rhema-host-agent 0.5.2` (`HostAgentConfig::steering`, re-exported `Steering`)
and was simply passed as `None`.
**What changes**
- `runner::RoomSteering` is the turn's source. The driver drains it between two
steps and appends one User-role message per drain, so the line lands in the
history without the step in flight dying.
- The drain stops at the first line it cannot carry — a mention, which the drop
path owns and would otherwise be appended twice, or a message with images,
which a line of text cannot carry — and leaves `absorbed_seq` there, so the
boundary pass appends them in the log's order.
- What it does drain advances `absorbed_seq` (in the row first, then in memory,
so a failed write re-announces rather than drops), so the next boundary pass
cannot repeat it.
- `agent::build_agent` takes the source and passes it through.
**What does not change**
A mention still drops the turn future and restarts over the committed session.
That is the only way to stop a long shell command, and the interrupt semantics
in the spec's turn rules stay as written. This commit also does not touch
approval, the `message` tool, or the wire: a steered line reaches the room's
history, its author already prefixed by `name: ` exactly as the boundary pass
writes it.
**Verification**
`cargo fmt --all`, `cargo clippy --all-targets -- -D warnings` and `cargo test`
were **not** run: the machine this was written on has no Rust toolchain and no C
compiler, so the tree could not be built. The diff is small and everything it
touches exists in 0.5.2, but treat it as unverified — please run the three
commands before merging.
**Not this PR, but it is the answer to "why is it slow when nobody pings"**
Time to first message is a prompt problem, not a steering problem: `prompt.md`
says "Do not narrate every command" and "always send one before your last
message", and the model reads that as "speak at the end". A first message right
after the plan settles TTFM without any framework work. Separate patch if you
want it.
A message posted without a mention while the agent worked waited for the
next turn, so the model read it only once the work the line was about was
finished. The spec's turn rules already promised the mid-turn half ("the
next step of the running turn"); the runner implemented the turn-boundary
half only.
The turn now hands the framework a steering source. The driver drains it
between two steps and appends one User-role message per drain, so the line
lands in the history without the step in flight dying. The drain 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 it drains advances
`absorbed_seq`, so nothing is appended twice.
A mention still drops the turn: that is the only way to stop a running
command, and this change does not touch it.
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.
The first commit's cursor had two writers and started from a snapshot taken
before the boundary pass ran. 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.
6b2624f gives the row one writer: 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. A failed commit now reports
itself instead of being swallowed, and four tests cover the drain rule, the
handoff, and the row's waits.
cargo fmt --all --check, cargo clippy --all-targets -- -D warnings and cargo test pass on 6b2624f, so the "unverified" note above is settled.
The first commit's cursor had two writers and started from a snapshot taken
before the boundary pass ran. 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.
`6b2624f` gives the row one writer: `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. A failed commit now reports
itself instead of being swallowed, and four tests cover the drain rule, the
handoff, and the row's waits.
`cargo fmt --all --check`, `cargo clippy --all-targets -- -D warnings` and
`cargo test` pass on `6b2624f`, so the "unverified" note above is settled.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A message posted without a mention while the agent works waits for the next
turn today, so the model reads it only once the work the line is about is
finished. The spec's turn rules already promise the mid-turn half ("the next
step of the running turn"); the runner implements the turn-boundary half only.
This wires the framework's steering hook, which is already in the pinned
rhema-host-agent 0.5.2(HostAgentConfig::steering, re-exportedSteering)and was simply passed as
None.What changes
runner::RoomSteeringis the turn's source. The driver drains it between twosteps and appends one User-role message per drain, so the line lands in the
history without the step in flight dying.
path owns and would otherwise be appended twice, or a message with images,
which a line of text cannot carry — and leaves
absorbed_seqthere, so theboundary pass appends them in the log's order.
absorbed_seq(in the row first, then in memory,so a failed write re-announces rather than drops), so the next boundary pass
cannot repeat it.
agent::build_agenttakes the source and passes it through.What does not change
A mention still drops the turn future and restarts over the committed session.
That is the only way to stop a long shell command, and the interrupt semantics
in the spec's turn rules stay as written. This commit also does not touch
approval, the
messagetool, or the wire: a steered line reaches the room'shistory, its author already prefixed by
name:exactly as the boundary passwrites it.
Verification
cargo fmt --all,cargo clippy --all-targets -- -D warningsandcargo testwere not run: the machine this was written on has no Rust toolchain and no C
compiler, so the tree could not be built. The diff is small and everything it
touches exists in 0.5.2, but treat it as unverified — please run the three
commands before merging.
Not this PR, but it is the answer to "why is it slow when nobody pings"
Time to first message is a prompt problem, not a steering problem:
prompt.mdsays "Do not narrate every command" and "always send one before your last
message", and the model reads that as "speak at the end". A first message right
after the plan settles TTFM without any framework work. Separate patch if you
want it.
A message posted without a mention while the agent worked waited for the next turn, so the model read it only once the work the line was about was finished. The spec's turn rules already promised the mid-turn half ("the next step of the running turn"); the runner implemented the turn-boundary half only. The turn now hands the framework a steering source. The driver drains it between two steps and appends one User-role message per drain, so the line lands in the history without the step in flight dying. The drain 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 it drains advances `absorbed_seq`, so nothing is appended twice. A mention still drops the turn: that is the only way to stop a running command, and this change does not touch it.The first commit's cursor had two writers and started from a snapshot taken
before the boundary pass ran. 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.
6b2624fgives the row one writer:drainkeeps the cursor in memory,commitwrites it aftersave_sessionsucceeds, and the boundary pass handsits own cursor down in the config the turn reads. A failed commit now reports
itself instead of being swallowed, and four tests cover the drain rule, the
handoff, and the row's waits.
cargo fmt --all --check,cargo clippy --all-targets -- -D warningsandcargo testpass on6b2624f, so the "unverified" note above is settled.