Repository navigation
feat(agents): re-check the work item once and act on runner mid-run updates - #1163
waynesun09 wants to merge 6 commits into
Conversation
PR Summary by QodoHandle runner updates and re-check work items before completion
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
|
🤖 Review · ❌ Terminated · Started 12:56 PM UTC · Ended 1:38 PM UTC Commit: |
Code Review by Qodo
1.
|
|
🤖 Finished Review · ❌ Failure (validation failed after 2 iteration(s)) · Started 12:56 PM UTC · Completed 1:38 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high |
|
🤖 Finished Review · ❌ Failure (validation failed after 2 iteration(s)) · Started 3:21 PM UTC · Completed 4:03 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high |
Every stage job cancels the run working on a work item as soon as a second event arrives for it. The replacement pays sandbox provisioning and bootstrap before the model reads anything, then re-reads the whole item from cold, so a burst of pushes discards finished work and buys nothing: on #6513 six force-pushes produced five completed reviews of commits that were superseded within minutes. FULLSEND_PRESERVE_RUNS lets a repository choose otherwise. Unset — the default everywhere — is exactly today's behaviour. Set to "true", the run in flight finishes and the newer event waits as the single pending run, which then works from the item's current state. The agent's side of that bargain, reconciling current state rather than the state that dispatched it, is fullsend-ai/agents#1163, and is inert until the run facts in the next commit reach the sandbox. Refs #6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com> The alignment test decoded cancel-in-progress as a Go bool, which an expression string cannot unmarshal into, so it moves to a yaml.Node and asserts the exact expression every stage job must carry. Signed-off-by: Wayne Sun <gsun@redhat.com>
Once a repository preserves the run in flight, that run can outlive the
state it was dispatched on, so an agent has to be able to tell what
changed underneath it before it writes its result. Export the two facts
it needs: the work item's head at run start, and the instant the run
started.
They go through bootstrapEnv rather than env.sandbox or an env/*.env
file, because .env.d files are sourced afterwards and would expand ${VAR}
host-side to an empty string, and a ${VAR} in harness env.sandbox
hard-fails ValidateRunnerEnvWith for every consumer that does not define
it. Both are reserved so a harness cannot shadow them.
An issue run exports an empty head rather than omitting the variable: the
agent side skips its re-check on an empty value, and absence and emptiness
would otherwise be indistinguishable. The consumer is
fullsend-ai/agents#1163.
Refs #6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
Every stage job cancels the run working on a work item as soon as a second event arrives for it. The replacement pays sandbox provisioning and bootstrap before the model reads anything, then re-reads the whole item from cold, so a burst of pushes discards finished work and buys nothing: on #6513 six force-pushes produced five completed reviews of commits that were superseded within minutes. FULLSEND_PRESERVE_RUNS lets a repository choose otherwise. Unset — the default everywhere — is exactly today's behaviour. Set to "true", the run in flight finishes and the newer event waits as the single pending run, which then works from the item's current state. The agent's side of that bargain, reconciling current state rather than the state that dispatched it, is fullsend-ai/agents#1163, and is inert until the run facts in the next commit reach the sandbox. Refs #6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com> The alignment test decoded cancel-in-progress as a Go bool, which an expression string cannot unmarshal into, so it moves to a yaml.Node and asserts the exact expression every stage job must carry. Signed-off-by: Wayne Sun <gsun@redhat.com>
Once a repository preserves the run in flight, that run can outlive the
state it was dispatched on, so an agent has to be able to tell what
changed underneath it before it writes its result. Export the two facts
it needs: the work item's head at run start, and the instant the run
started.
They go through bootstrapEnv rather than env.sandbox or an env/*.env
file, because .env.d files are sourced afterwards and would expand ${VAR}
host-side to an empty string, and a ${VAR} in harness env.sandbox
hard-fails ValidateRunnerEnvWith for every consumer that does not define
it. Both are reserved so a harness cannot shadow them.
An issue run exports an empty head rather than omitting the variable: the
agent side skips its re-check on an empty value, and absence and emptiness
would otherwise be indistinguishable. The consumer is
fullsend-ai/agents#1163.
Refs #6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
Every stage job cancels the run working on a work item as soon as a second event arrives for it. The replacement pays sandbox provisioning and bootstrap before the model reads anything, then re-reads the whole item from cold, so a burst of pushes discards finished work and buys nothing: on #6513 six force-pushes produced five completed reviews of commits that were superseded within minutes. FULLSEND_PRESERVE_RUNS lets a repository choose otherwise. Unset — the default everywhere — is exactly today's behaviour. Set to "true", the run in flight finishes and the newer event waits as the single pending run, which then works from the item's current state. The agent's side of that bargain, reconciling current state rather than the state that dispatched it, is fullsend-ai/agents#1163, and is inert until the run facts in the next commit reach the sandbox. Refs #6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com> The alignment test decoded cancel-in-progress as a Go bool, which an expression string cannot unmarshal into, so it moves to a yaml.Node and asserts the exact expression every stage job must carry. Signed-off-by: Wayne Sun <gsun@redhat.com>
Once a repository preserves the run in flight, that run can outlive the
state it was dispatched on, so an agent has to be able to tell what
changed underneath it before it writes its result. Export the two facts
it needs: the work item's head at run start, and the instant the run
started.
They go through bootstrapEnv rather than env.sandbox or an env/*.env
file, because .env.d files are sourced afterwards and would expand ${VAR}
host-side to an empty string, and a ${VAR} in harness env.sandbox
hard-fails ValidateRunnerEnvWith for every consumer that does not define
it. Both are reserved so a harness cannot shadow them.
An issue run exports an empty head rather than omitting the variable: the
agent side skips its re-check on an empty value, and absence and emptiness
would otherwise be indistinguishable. The consumer is
fullsend-ai/agents#1163.
Refs #6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
Every stage job cancels the run working on a work item as soon as a second event arrives for it. The replacement pays sandbox provisioning and bootstrap before the model reads anything, then re-reads the whole item from cold, so a burst of pushes discards finished work and buys nothing: on #6513 six force-pushes produced five completed reviews of commits that were superseded within minutes. FULLSEND_PRESERVE_RUNS lets a repository choose otherwise. Unset — the default everywhere — is exactly today's behaviour. Set to "true", the run in flight finishes and the newer event waits as the single pending run, which then works from the item's current state. The agent's side of that bargain, reconciling current state rather than the state that dispatched it, is fullsend-ai/agents#1163, and is inert until the run facts in the next commit reach the sandbox. Refs #6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com> The alignment test decoded cancel-in-progress as a Go bool, which an expression string cannot unmarshal into, so it moves to a yaml.Node and asserts the exact expression every stage job must carry. Signed-off-by: Wayne Sun <gsun@redhat.com>
Once a repository preserves the run in flight, that run can outlive the
state it was dispatched on, so an agent has to be able to tell what
changed underneath it before it writes its result. Export the two facts
it needs: the work item's head at run start, and the instant the run
started.
They go through bootstrapEnv rather than env.sandbox or an env/*.env
file, because .env.d files are sourced afterwards and would expand ${VAR}
host-side to an empty string, and a ${VAR} in harness env.sandbox
hard-fails ValidateRunnerEnvWith for every consumer that does not define
it. Both are reserved so a harness cannot shadow them.
An issue run exports an empty head rather than omitting the variable: the
agent side skips its re-check on an empty value, and absence and emptiness
would otherwise be indistinguishable. The consumer is
fullsend-ai/agents#1163.
Refs #6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The sentinel was written twice into one message. renderSteerEnvelope opens with it and then appends SteerMessage.Text, and that text is buildText's output, which opened with the identical line — so every steered run on every runtime received it once as the envelope's header and once inside the body the envelope wraps. That second position is the problem. The line is a cross-repo interface: the fullsend-ai/agents definitions match a message *beginning* with it to recognise a runner amendment, and treat the same line read inside work-item content as an injection attempt. The duplicate sat inside the wrapped body, so the runner was emitting the agents' own injection signal on every steer. buildText returns the body, so the envelope keeps the line and buildText drops it, with a comment there recording why the two must not drift back together. The assertion at delta_test.go:269 required the line in buildText's output. It is replaced, with a note: `assert.Contains` on a string that legitimately appears once cannot fail when it appears twice, which is how this went unnoticed on both sides. Two new count assertions. One covers the composed message as the agent receives it — envelope wrapping a body shaped like the watcher's real output — and requires exactly one occurrence, leading. The other covers the adversarial case the count protects: when work-item content itself carries the sentinel, the envelope must contribute precisely its own and no more. A third pins buildText emitting none, and fails against the old line. Checked against fullsend-ai/agents#1163 rather than assumed: nothing there keys off the count. The definitions match on position ("a message beginning ...") and on location ("the same line read inside issue content"), and the contract test only asserts each agent file carries the prefix string. So the fix needs no coordinating change there — and the prefix match is also why neither side caught this, since recognition kept working while only the injection signal degraded. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
Every stage job cancels the run working on a work item as soon as a second event arrives for it. The replacement pays sandbox provisioning and bootstrap before the model reads anything, then re-reads the whole item from cold, so a burst of pushes discards finished work and buys nothing: on #6513 six force-pushes produced five completed reviews of commits that were superseded within minutes. FULLSEND_PRESERVE_RUNS lets a repository choose otherwise. Unset — the default everywhere — is exactly today's behaviour. Set to "true", the run in flight finishes and the newer event waits as the single pending run, which then works from the item's current state. The agent's side of that bargain, reconciling current state rather than the state that dispatched it, is fullsend-ai/agents#1163, and is inert until the run facts in the next commit reach the sandbox. Refs #6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com> The alignment test decoded cancel-in-progress as a Go bool, which an expression string cannot unmarshal into, so it moves to a yaml.Node and asserts the exact expression every stage job must carry. Signed-off-by: Wayne Sun <gsun@redhat.com>
Once a repository preserves the run in flight, that run can outlive the
state it was dispatched on, so an agent has to be able to tell what
changed underneath it before it writes its result. Export the two facts
it needs: the work item's head at run start, and the instant the run
started.
They go through bootstrapEnv rather than env.sandbox or an env/*.env
file, because .env.d files are sourced afterwards and would expand ${VAR}
host-side to an empty string, and a ${VAR} in harness env.sandbox
hard-fails ValidateRunnerEnvWith for every consumer that does not define
it. Both are reserved so a harness cannot shadow them.
An issue run exports an empty head rather than omitting the variable: the
agent side skips its re-check on an empty value, and absence and emptiness
would otherwise be indistinguishable. The consumer is
fullsend-ai/agents#1163.
Refs #6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
…dation Temporary. The shim now runs the steering stack (fullsend#7461 tip), and the review definition must understand the runner-update envelope, which lands with fullsend-ai/agents#1163. Pin review to that branch's commit until it merges, then drop this entry. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
fb5e7bf to
dbe59e4
Compare
|
🤖 Finished Review · ✅ Success · Started 12:24 AM UTC · Completed 12:44 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $6.28 |
|
Replies to the Low findings from the review of
|
The fullsend runner makes steering the default. An absorbed update skips
the pre-script, so default-on widens the pre-script bypass (ADR 0113 and
0121). fullsend's harness lint therefore warns when a harness sets
pre_script and leaves steer.enabled unset.
code, fix, review and triage are the agents taught the runner-update
envelope. Each now declares steer: {enabled: true}. prioritize, retro
and scribe already declare false. That covers every harness with a
pre_script, and the fleet runs without the warning. Overlays cannot
override steer, so the top-level key also covers code's Jira pre-script.
The fullsend v0.43.0 harness loader decodes with plain yaml.Unmarshal
and ignores the key. Loading harness/fix.yaml with a steer block through
v0.43.0's LoadRaw and Validate succeeded. A runner that honours the key
steers these four agents, so this merges only after the agents learn
the envelope (#1163).
harness-steer-optout-test.sh now also fails when code, fix, review or
triage stops setting the boolean true, or when any harness with a
pre_script leaves steer.enabled unset.
Refs: fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
dbe59e4 to
9c9ae89
Compare
The fullsend runner makes steering the default. An absorbed update skips
the pre-script, so default-on widens the pre-script bypass (ADR 0113 and
0121). fullsend's harness lint therefore warns when a harness sets
pre_script and leaves steer.enabled unset.
code, fix, review and triage are the agents taught the runner-update
envelope. Each now declares steer: {enabled: true}. prioritize, retro
and scribe already declare false. That covers every harness with a
pre_script, and the fleet runs without the warning. Overlays cannot
override steer, so the top-level key also covers code's Jira pre-script.
The fullsend v0.43.0 harness loader decodes with plain yaml.Unmarshal
and ignores the key. Loading harness/fix.yaml with a steer block through
v0.43.0's LoadRaw and Validate succeeded. A runner that honours the key
steers these four agents, so this merges only after the agents learn
the envelope (#1163).
harness-steer-optout-test.sh now also fails when code, fix, review or
triage stops setting the boolean true, or when any harness with a
pre_script leaves steer.enabled unset.
Refs: fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 11:50 AM UTC · Completed 12:12 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.19 |
Fleet agents run against the snapshot they were dispatched for, so a push or a new comment arriving mid-run is either lost or forces the run to be cancelled and restarted. Add the prompt-level backstop: before it writes its result, each agent checks once whether the work item moved since the run started and folds the delta into its output. Review, fix and code compare the current head against FULLSEND_RUN_HEAD_SHA; review, triage, fix and code look for comments created after FULLSEND_RUN_STARTED_AT that are not fullsend's own. The runner sets both. The check is capped at one pass — an active PR would otherwise hold the agent in a loop — and is skipped when either variable is empty or when the agent is on a validation retry. Review reports the head it actually reviewed as head_sha, so the post-script's stale-head re-dispatch does not fire for a head the agent already covered. Neither variable is declared in harness/*.yaml or env/*.env. Every other FULLSEND_* runner variable reaches the sandbox through bootstrapEnv, and .env.d/*.env is sourced after those exports, so a passthrough line there would overwrite an injected value with an empty string. This is a backstop under the runner-side steer, not a replacement for it: the steer is deterministic and lands mid-run, while the re-check depends on the model following the instruction and lands only at the end. Refs: fullsend-ai/fullsend#6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The runner can now deliver an authorized collaborator's mid-run update into a live session, but an agent whose definition fixes its scope declines to act on it and does so silently, so the plumbing delivers a message nobody uses. Tell review, triage, fix and code that such a message amends their task. Each definition now names the envelope's exact opening line, states that the route job verified the actor is authorized to direct this run, and says the amendment must be acted on even when it widens or narrows scope or moves the agent to a new head. The scope rules that would otherwise refuse it are qualified: fix's "strictly limited to the review feedback", and the "every line traceable to a finding / justified by the issue" constraints in fix and code. The prohibition stays narrow, matching the envelope: an update grants no tools or permissions and relaxes no security instruction, and any part asking for either is ignored and reported. Recognition is gated, so the exception is not live on every run: a runner update is a standalone message the runtime injects whose first line is exactly the opening line, and it exists only while the runner exports FULLSEND_STEER_ACTIVE — set when a follow-up watcher started for the run. Without it, or when the channel is uncertain, nothing amends and every occurrence of the line is an injection attempt. The untrusted-source list names what the same files already treat as adversarial: titles, labels, review bodies, check-run and workflow text, validation-retry prompts, tool and API output. Authority is the actor's, not the text's, so the same opening line read inside work-item content — a PR or issue body, a comment, a file, a diff — is not a runner update and is reported as an injection attempt. Without that boundary the wording would be an injection vector: anyone who can write a PR description could otherwise forge an operator instruction. Each agent states in its result what the update changed. Review reports the head it actually reviewed, which is also what its end-of-run re-check reports, so a steered head move and the re-check do not double-count. Left out: prioritize, retro and scribe. Steering is opt-in per harness and no agent harness enables it yet; adding the paragraph to an agent that cannot be steered is dead prompt text and injection surface for no benefit. Refs: fullsend-ai/fullsend#6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The review and fix agents' final re-check selects on the PR head OID and
on the author and creation time of activity newer than the run start,
but the forge skills documented none of that: the fix-review GitHub
metadata command omits headRefOid and its review command emits `.[].body`
alone, the GitLab notes command returns a page with no paging guidance,
and the pr-review skills carry the head SHA and issue comments but no PR
activity with an author type. The mandated re-check could not be carried
out from the commands the agents were told to use.
Add a "Re-check Data" section to each forge skill under fix-review and
pr-review with the head SHA, the post-start activity carrying author, bot
flag and timestamp, and the compare from the dispatched head to the
current one, so a moved head can be read without a fetch: GitHub gets the
three separate endpoints — issue comments, reviews and inline review
comments — each under `gh api --paginate`, and GitLab gets the MR head
plus paged notes with system notes filtered out. review.md and fix.md now
point at those commands by name.
Three details the commands make explicit because getting them wrong is
silent: GitHub reviews carry `submitted_at`, not `created_at`; every forge
parses both timestamps before comparing against FULLSEND_RUN_STARTED_AT
(GitLab's carry fractional seconds, and GitHub's format is not this
repo's to promise); and the
compare is the tree diff only under conditions the response reports.
GitHub's REST compare accepts only the merge-base form (two-dot 404s),
so it equals the tree diff only while `status` is "ahead" — a
force-push reads "diverged" — and its file list is cut at 300. GitLab
takes `straight=true` for the direct diff and reports `compare_timeout`
and `too_large`; `--fail` keeps a missing SHA from reading as an empty
delta. The agents treat anything short of that as unverified. GitLab
notes are read newest first and filtered in jq against
FULLSEND_RUN_STARTED_AT, with the fractional seconds and offset
normalised, so the run-start cut is computed rather than eyeballed.
Every block was checked against the sandbox scanner the fleet pins
(tirith 0.4.1, --shell posix): a `break` inside a loop, and a `gh`
call inside `$( )`, are both refused as unresolvable, so the page loop
is gone and the head SHA goes through a file. The GitLab token goes
through a curl config file, as the pr-review skill already does.
Every GitHub command was also executed as written against this PR with
real values, which is how the `since` filter's first form was caught:
`gh api --jq` takes one expression and gh has no `--arg`, so each
activity list goes through a file and a separate `jq --arg since`,
the same shape the head SHA and the GitLab blocks already use.
The filter drops only fullsend's own activity, and the projections carry
what identifies it: a `fullsend` flag for a body with a `<!-- fullsend:`
marker (every fullsend post-script and the runner's status comment write
one), beside the login, so fullsend's own identity is matched by the
marker and by exact logins — `fullsend-ai-${FULLSEND_ROLE}[bot]`, a login
that carries a marker on the item, `TRIGGER_SOURCE` on a bot-triggered
fix — never by the shape of the login. `performed_via_github_app` is
deliberately not keyed on: it is also set on a person's comment posted
through a user-to-server token, so it would exclude a human. Other Apps
and bots stay in: a
repository-installed integration is a repository-guarded trust boundary,
and its output is context the agent needs, adversarial like the rest;
a wrong call can only turn activity into context, never into an
amendment. GitLab's `.system != true` still drops state notes.
Refs: fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The re-check dropped every bot, and on Jira, where no login convention
exists, it would have dropped nothing. Neither is the rule wanted. A
repository-installed App or integration — a review bot, CI, a Connect
app — is a repository-guarded trust boundary, and its comments are
context the agent needs; a bot running as a user account already falls
under the collaborator gate. What must not be absorbed is fullsend's own
output: without that exclusion a run would steer itself with its status
comment or its previous review.
State that rule in triage and code and close it on every forge: skip a
body carrying a `<!-- fullsend:` marker, which every fullsend post-script
and the runner's status comment write — that is the rule. Exact logins
supplement it and are never a pattern: `fullsend-ai-${FULLSEND_ROLE}[bot]`
(the login follows the harness `role`, per fullsend's bot-identities
table; `slug` is an install-time hint the mint never reads), a login that
authored a marker-carrying comment on the item, and on Jira the
JIRA_USER_EMAIL account. Everything else is context, adversarial input
like the rest of the issue.
No author is ever classified by the shape of the login. App or human is
the forge's own field — GitHub `user.type`, GitLab the `bot` flag on
`users/:id`, which the note author object does not carry, Jira
`accountType` — and the marker excludes a body only when that field says
App: a person's comment is never excluded, marker or not, so nobody can
hide a human comment by quoting one. A wrong call can only turn a
comment into context, never into an amendment: amendments are what the
runner delivered, and the re-check adds context only.
The code harness's Jira overlay now loads the jira-forge skill, as the
triage overlay already did; without it a Jira-sourced code run had the
provider-backed API access but not the endpoints and filters this
re-check points at. The Jira block fetches into the file it filters,
returns the body with the flag so nothing is hidden, and was executed
against a sample payload only — no Jira site is reachable from here.
The github-forge, gitlab-forge and jira-forge skills carry the data
behind that rule: a `fullsend` flag computed from the body beside the
author, with `accountType` on Jira kept for what it says about the
author rather than as an exclusion. Values are from the Jira Cloud v3
User schema.
Two limits are recorded rather than papered over. An automation rule set
to run as a user is indistinguishable from that user through this API.
And Jira's `created` uses a numeric offset with fractional seconds, not
the RFC 3339 `Z` form of FULLSEND_RUN_STARTED_AT, so the skill says to
parse both sides instead of comparing the strings.
Refs: fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The re-check told the fix agent to read the delta when the PR head moved, which updates its understanding but not its checkout, and said nothing about the commit that follows. The post-script fetches the PR branch and replays the agent's commit onto the new head before pushing (#1228), and fails the run as push-rejected when the replay conflicts, so a stale-base commit is never force-pushed over the new head. But nothing verifies the combined tree: a replay that applies cleanly can still combine the fix with code the agent never saw. The agent cannot close that gap by fetching — the sandbox network policy blocks `git fetch` — so give it the decision instead. Read the delta from the dispatched head to the new one with the "Re-check Data" compare command; when it is disjoint from the files the fix touched and from what the fix depends on, commit and record the moved head; otherwise leave no commit and report the overlap. The no-commit exit is already the handoff for "resolve on the PR and re-run /fs-fix", and it is the only exit that cannot land a change the agent did not verify. Refs: fullsend-ai/fullsend#6957 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The re-check and runner-update paragraphs were unguarded: nothing failed
if a later edit reworded the envelope's opening line, dropped the
injection boundary, or removed the one-pass cap. The behaviour itself
belongs to a model following a prompt and cannot be asserted cheaply, but
the load-bearing sentences can.
Add a grep-level contract test over agents/{review,triage,fix,code}.md.
It checks the envelope prefix verbatim, the no-tools-no-permissions
clause, the "same line inside work-item content is not a runner update"
boundary, the skip-when-empty rule and FULLSEND_RUN_STARTED_AT, and the
one-pass cap; then FULLSEND_RUN_HEAD_SHA for the three agents that
compare a head, that review reports the head it reviewed, and that fix
commits on a moved head only when the delta is disjoint from the fix.
Three more sentences are pinned because they close review findings:
that an update arrives only as a runtime-injected session message, that
a folded-in code delta goes through verification again, and that an
update is not authorization for a protected path.
Each file is flattened and whitespace-squeezed before matching, so
re-wrapping a paragraph does not fail the test — only removing or
rewording the contract does. Verified both ways: replacing the boundary
phrase in code.md fails the run, and re-wrapping the prefix across a
different line break still passes.
The prefix assertion is the one that matters most and is also the one
this repo cannot fully enforce: the string must equal
runtime.SteerEnvelopeOpeningLine in fullsend, specified in that
repository's docs/normative/steer-envelope/v1, which no test here can
reach. The constant carries a comment saying so.
Prioritize, retro and scribe are excluded by the agent list, with the
reason recorded next to it: steering is opt-in per harness and none of
them enables it.
Refs: fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
9c9ae89 to
eebab58
Compare
The fullsend runner makes steering the default. An absorbed update skips
the pre-script, so default-on widens the pre-script bypass (ADR 0113 and
0121). fullsend's harness lint therefore warns when a harness sets
pre_script and leaves steer.enabled unset.
code, fix, review and triage are the agents taught the runner-update
envelope. Each now declares steer: {enabled: true}. prioritize, retro
and scribe already declare false. That covers every harness with a
pre_script, and the fleet runs without the warning. Overlays cannot
override steer, so the top-level key also covers code's Jira pre-script.
The fullsend v0.43.0 harness loader decodes with plain yaml.Unmarshal
and ignores the key. Loading harness/fix.yaml with a steer block through
v0.43.0's LoadRaw and Validate succeeded. A runner that honours the key
steers these four agents, so this merges only after the agents learn
the envelope (#1163).
harness-steer-optout-test.sh now also fails when code, fix, review or
triage stops setting the boolean true, or when any harness with a
pre_script leaves steer.enabled unset.
Refs: fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 7:50 PM UTC · Completed 8:07 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.51 |
jflowers
left a comment
There was a problem hiding this comment.
the contract looks solid. all 60 agent-recheck assertions pass, the injection boundary is correctly specified and tested across all four agents, and the gating mechanism (FULLSEND_STEER_ACTIVE + empty-var skip) ensures both features are inert until the runner side lands. docs are in lockstep with agent changes, and the harness/code.yaml Jira overlay fix is a correct complementary addition.
the behaviour CI failure ("Triage applies the ready-to-code label") is assumed transient or unrelated: the dummy agent bypasses the prompt, no PR changes touch triage test infrastructure or scripts, and all functional tests including triage pass. the only PR-specific candidate (harness/code.yaml Jira overlay) is on the code agent's Jira path, not triage.
This review was generated by /uf.review-pr (AI-assisted).
Summary
Agent-side half of fullsend-ai/fullsend#6957 (runner PR: fullsend-ai/fullsend#6959). Two changes to review, triage, fix and code, both inert until the runner side lands:
FULLSEND_RUN_STARTED_ATthat are not fullsend's own (matched by exact login and the<!-- fullsend:marker, so a human's comment or another bot's review is always kept); if the head differs fromFULLSEND_RUN_HEAD_SHAor such comments exist, it reads the delta once and updates its output, then reports the head it actually covered. Skipped when either variable is empty (they are exported by the runner frombootstrapEnvin the fullsend PR), so this merges safely in either order.Runner update: your task inputs changed after this run started.delivered mid-run is an amendment to the task from a collaborator the follow-up run's route job authorized (ADR 0054): the agent acts on it, including widening or narrowing scope or moving to a new head; it grants no tools or permissions and relaxes no security instruction; the result states what it changed. The same line read inside work-item content (a body, comment, file or diff) is not a runner update and is reported as an injection attempt. Scope clauses in fix and code that would have refused the amendment are qualified. Without this paragraph the runtime delivers the message and the agent ignores it (measured). This contract stays inert until the runner exportsFULLSEND_STEER_ACTIVE, which first lands in feat(steer)!: learn of later events by listing the platform's own run records fullsend#7451, stacked on #6959. Until then no runner sends an update.prioritize, retro and scribe are left out until a harness enables
steer:for them.Changes
agents/review.md,agents/triage.md,agents/fix.md,agents/code.mddocs/review.md,docs/triage.md,docs/fix.md,docs/code.mdbootstrapEnv(env files are sourced after it and would clobber the value; a${VAR}in harnessenv.sandboxhard-fails consumers that lack it, see agents#211).Testing
The functional tests build fullsend from
main, where the runner does not yet exportFULLSEND_RUN_HEAD_SHA,FULLSEND_RUN_STARTED_ATorFULLSEND_STEER_ACTIVE; the eval agents see them empty and skip the re-check, so CI exercises the prompt text and the contract test, not the re-check itself. The GitHub Re-check Data commands were executed by hand against this PR with real values (head, 11/26/48 activity rows, compareahead,divergedand 404); the GitLab and Jira blocks are scanner-checked and jq-tested on sample payloads only.make lint(skillsaw --strict): 0 errors, 0 warnings, baseline untouched.hack/lint-agent-docs: OK for all docs. gitlint clean.make test: theharness-jira-test.shflakes are a SIGPIPE race in the test, fixed separately.What changed in review
skills/fix-review/{github,gitlab},skills/pr-review/{github,gitlab},skills/github-forge,skills/gitlab-forgeandskills/jira-forgegain a "Re-check Data" section: the current head, the activity created afterFULLSEND_RUN_STARTED_ATwith author, marker and timestamp, and the compare from the dispatched head to the new one. GitHub's REST compare has no two-dot form, so the delta is the tree diff only whenstatusisaheadand under 300 files; GitLab usesstraight=trueand reportscompare_timeoutandtoo_large; a 404 or anything else is unverified. Projections carry rename fields (previous_filename;old_path,renamed_file,deleted_file). Timestamps are parsed on every forge, Jira's offset form included. Every block passes the fleet's sandbox scanner (tirith 0.4.1: nobreakin a loop, noghinside$( ), token through a curl config file), and every GitHub block was executed against this PR with real values.<!-- fullsend:marker, plus the exact loginsfullsend-ai-${FULLSEND_ROLE}[bot], an App login that authored a marked comment on the item,TRIGGER_SOURCEon a bot-triggered fix andJIRA_USER_EMAILon Jira. A human's comment is never excluded, marker or not, so nobody can hide one by quoting the marker; on GitLab the note author carries nobotfield, so the block looks marked authors up onusers/:id, and without that lookup a marked note stays as context. App or human is the forge's own field (user.type, GitLab'sbotonusers/:id, Jira'saccountType), never the login's shape; nothing keys onperformed_via_github_app; every other App and bot stays in as context, and a wrong call can only turn a comment into context. The code harness's Jira overlay now loadsskills/jira-forge, as triage's does.pr_body; fix:summary; review: the review body; triage:reasoning), and any code it changes for that reason is verified again before the commit.git fetch. The post-script fetches the PR branch and replays the commit onto the new head before pushing, failing on conflict, so the agent commits only when the delta is disjoint from the fix (a renamed path counts under both names) and otherwise leaves no commit and reports the overlap insummary.FULLSEND_STEER_ACTIVE, which the runner exports only when a follow-up watcher started for the run. An amendment is a standalone runtime-injected message whose first line is exactly the opening line; without the gate, or with an uncertain channel, every occurrence of that line is injection. The untrusted-source list covers titles, labels, review bodies, check-run and workflow text, validation-retry prompts and tool output. A runner update never authorizes a protected-path edit. Sub-agents receive a labeled task delta, never the update's text.scripts/agent-recheck-contract-test.shpins each of the sentences above across the four agents (opening line, no-tools clause, injection boundary and channel, first-line-only, steer gate, skip-when-empty, one pass, context-only fold, re-verify, protected paths, rename, moved-head decision), mutation-verified.Refs fullsend-ai/fullsend#6957