Repository navigation
fix(harness): declare steering explicitly on every fleet harness with a pre-script - #1543
waynesun09 wants to merge 2 commits into
Conversation
PR Summary by QodoDeclare steering explicitly for all pre-script fleet harnesses
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
|
🤖 Finished Review · ✅ Success · Started 9:24 PM UTC · Completed 9:41 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $4.36 |
Code Review by Qodo
1. Harness changes need human approval
|
| steer: | ||
| enabled: true |
There was a problem hiding this comment.
1. Harness changes need human approval 📜 Skill insight § Compliance
The PR adds steer.enabled to files under harness/ and adds a test under scripts/, both protected infrastructure paths. The PR description explains the steering change and cites related issues, but these justified changes still require human review rather than automatic approval.
There was a problem hiding this comment.
Agreed. harness/ and scripts/ are protected paths, so this change needs explicit human approval before merge. No code change.
|
Risk Assessment: elevated (3/5) DetailsRe-review anchored at 3 (elevated): re-ran Tier1 script and Tier2 git log analysis on the same 9-file set (8 protected harness/CI-classified paths plus the new script) and confirmed both tiers are materially unchanged from the prior assessment - Tier1 composite 2.5 and Tier2 composite ~2.86 - yielding a weighted composite (62%/38%, no linked issue) of ~2.64, rounding to elevated (3), identical to the prior round with no articulable signal delta to justify a change. Previous runRisk Assessment: elevated (3/5) DetailsRe-review of a repo-config PR touching 9 files (8 protected harness/CI paths plus one new script wired into the Makefile, same 4-10 file bucket as the prior revision) with no linked issue (Tier1=62%/Tier2=38% redistribution) and no security-sensitive or dependency changes; Tier1 composite ~2.5 and Tier2 composite ~2.86 (driven by very high recent commit frequency, high author diversity, and heavy fix/revert history on the harness yaml files, offset by low code age and no reverts/sentiment flags) yield a weighted composite ~2.64, rounding to elevated (3) - unchanged from the prior assessment since Tier1/Tier2 signals are materially the same and the added Makefile line does not shift any bucket. Previous run (2)Risk Assessment: elevated (3/5) DetailsNo linked issue (Tier1=62%/Tier2=38% redistribution) on a repo-config PR touching 8 protected-path harness files with high historical churn and change coupling; composite ~2.74 rounds to elevated (3), driven by protected-path breadth and git-history churn rather than raw diff size or security sensitivity. |
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsMedium
Low
Previous run (3)ReviewFindingsMedium
Low
Next steps:
|
f634fa3 to
dc10ed1
Compare
|
Replies to the review of
|
|
🤖 Finished Review · ✅ Success · Started 9:44 PM UTC · Completed 10:01 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.83 |
Superseded by updated review
|
Re-verified against the lint rule now on fullsend-ai/fullsend#7461's branch (
The four |
dc10ed1 to
ca24548
Compare
|
🤖 Finished Review · ✅ Success · Started 11:50 AM UTC · Completed 12:04 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.09 |
The fullsend runner is making steering the default: a follow-up event on
the same work item is delivered into the run already in flight, and the
delivery is receipted so the queued run skips. The receipt records that
the runtime delivered the update, not that the agent acted on it, so an
agent that is not taught the runner-update envelope loses the update.
Only code, fix, review and triage are being taught it. prioritize and
retro are one-shot analyses with nothing to act on mid-run, and scribe is
scheduled with no work item, so all three opt out with
steer: {enabled: false}. Runners that predate the steer block ignore the
key.
harness-steer-optout-test.sh fails if any of the three stops setting
steer.enabled to the boolean false.
Refs fullsend-ai/fullsend#6957
Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
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>
ca24548 to
24529b2
Compare
|
🤖 Finished Review · ✅ Success · Started 7:51 PM UTC · Completed 8:07 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.29 |
jflowers
left a comment
There was a problem hiding this comment.
Summary
from what I can tell, this declares steer.enabled explicitly on all seven pre-script harnesses, with the right split. code, fix, review and triage opt in because they read the runner-update envelope; prioritize, retro and scribe opt out because a skipped queued run would drop the update on the floor. the guard test is wired into make script-test, and CI is green apart from one base-branch failure.
the change matches its stated intent, and the stacked base branch makes the #1163 ordering structural rather than a convention to remember. the fullsend-release merge constraint stays a human call, which the body states clearly. three low-severity spots worth a look below.
Advisories
-
scripts/harness-steer-optout-test.sh:34 (error handling) — what happens if yq itself fails here, for example a wrong version or malformed YAML? the command substitution would capture an error string, and the assertion would report a misleading FAIL instead of a clear tool failure. wondering if a guard on yq's exit code would surface the real problem.
-
scripts/harness-steer-optout-test.sh:15 (convention) — the script omits
-efromset -uo pipefail, which looks intentional for the FAILURES counter pattern. 28 of the 30 sibling test scripts useset -euo pipefail, so this one stands out. would a short comment explaining why-eis omitted save the next contributor a double-take? -
scripts/harness-steer-optout-test.sh:65 (coverage) — the generic check reads only the top-level
pre_scriptkey, so overlay-level declarations escape it. code.yaml's Jira overlay carries its ownpre_scripttoday, but the top-level key covers it. would a future harness with an overlay-onlypre_scriptslip past this check silently?
CI
the behaviour check fails on this PR, but the same check fails on the base branch steer-recheck too. that reads as pre-existing rather than PR-caused, so it does not affect my read of this change.
This review was generated by /uf.review-pr (AI-assisted).
| fi | ||
| # Exactly the boolean false: a missing key, null, or the string "false" would | ||
| # leave steering on. | ||
| got="$(yq '.steer.enabled | (tag + ":" + tostring)' "${file}")" |
There was a problem hiding this comment.
what happens if yq itself fails here, for example a wrong version or malformed YAML? the command substitution would capture an error string, and the assertion would report a misleading FAIL instead of a clear tool failure. wondering if a guard on yq's exit code would surface the real problem. this is the same pattern documented in learning/shell-testing-20261012T185453.
| # steer.enabled unset. This test fails on any such harness. | ||
| # | ||
| # Run from the repo root: bash scripts/harness-steer-optout-test.sh | ||
| set -uo pipefail |
There was a problem hiding this comment.
the script omits -e from set -uo pipefail, which looks intentional for the FAILURES counter pattern. 28 of the 30 sibling test scripts use set -euo pipefail, so this one stands out. would a short comment explaining why -e is omitted save the next contributor a double-take?
| # Every harness with a pre_script declares steer.enabled as a boolean. | ||
| for file in "${REPO_ROOT}"/harness/*.yaml; do | ||
| name="$(basename "${file}" .yaml)" | ||
| if [[ "$(yq '.pre_script // ""' "${file}")" == "" ]]; then |
There was a problem hiding this comment.
the generic check reads only the top-level pre_script key, so overlay-level declarations escape it. code.yaml's Jira overlay carries its own pre_script today, but the top-level key covers it. would a future harness with an overlay-only pre_script slip past this check silently?
Summary
The fullsend runner is making steering the default (fullsend-ai/fullsend#7461). With steering on, a follow-up event on the same work item is delivered into the run already in flight. The delivery is receipted, so the queued run skips, including its pre-script. Default-on therefore widens the pre-script bypass. fullsend's harness lint warns when a harness sets
pre_scriptand leavessteer.enabledunset.This PR makes every fleet harness with a pre-script declare steering explicitly:
pre_scriptsteer.enabledcodescripts/pre-code.sh(Jira overlay:scripts/pre-code-jira.sh)truefixscripts/pre-fix.shtruereviewscripts/pre-review.shtruetriagescripts/pre-triage.shtrueprioritizescripts/pre-prioritize.shfalseretroscripts/pre-retro.shfalsescribescripts/pre-scribe.shfalseprioritize, retro and scribe stay
falsebecause they do not read the envelope. Withtrue, the queued run would be skipped while the agent ignores the update, so the update would be lost. An explicitfalsestill silences the lint:steer.enabledis a pointer, so an explicit value is distinct from an unset one.Overlays carry only forge-config fields and cannot override
steer. The top-level block incode.yamltherefore also covers the Jira overlay's pre-script.Merge constraints
enabled: trueis correct only once code, fix, review and triage recognize a runner update. That is feat(agents): re-check the work item once and act on runner mid-run updates #1163, so this PR is stacked on it.pre_script/steer.enabledlint warning. Any runner that honours the key steers these four agents. That includes builds where the default is still off.Runners released before steering ignore the key. The v0.43.0 harness loader decodes with plain
yaml.Unmarshaland has no unknown-field check. Loadingharness/fix.yamlwith asteerblock through v0.43.0'sLoadRawandValidatesucceeds.Changes
harness/prioritize.yaml,harness/retro.yaml,harness/scribe.yaml:steer: {enabled: false}.harness/code.yaml,harness/fix.yaml,harness/review.yaml,harness/triage.yaml:steer: {enabled: true}.scripts/harness-steer-optout-test.sh(wired intomake script-test) checks three things:false.true.harness/*.yamlwith apre_scriptdeclaressteer.enabledas a boolean.Testing
bash scripts/harness-steer-optout-test.sh: 14/14 pass.harness/triage.yamlaway printsFAIL: triage — harness/triage.yaml not found. Removing the block fromharness/fix.yamlfails both new assertions. The output ismust set steer.enabled: true (got !!null:null)andhas a pre_script but leaves steer.enabled unset (got !!null). Restoring the block passes.make lint(skillsaw): grade A, 0 errors, baseline unchanged.gitlinton both commits: clean.behaviourpasses on the rebased stack.0acd8392c): all seven harnesses, including code's Jira overlay, produce 0steer.enabledwarnings.fix.yamlwith itssteerblock removed produces 1.