Repository navigation
feat(steer)!: learn of later events by listing the platform's own run records - #7451
waynesun09 wants to merge 6 commits into
Conversation
PR Summary by QodoSteer active runs using GitHub Actions follow-up records
AI Description
Diagram
High-Level Assessment
Files changed (31)
|
|
🤖 Review · Commit: |
Code Review by Qodo
1.
|
b7a748c to
fe11ae0
Compare
|
🤖 Finished Review · ✅ Success · Started 3:25 PM UTC · Completed 3:58 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $15.34 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ReviewFindingsHigh
Low
Not observed in current diff (previously flagged, and fixed this round): The prior Not re-raised this round (adjudicated, not a code change): A Next steps:
Previous runReviewFindingsHigh
Medium
Low
Next steps:
Previous run (2)ReviewFindingsHigh
Medium
Next steps:
Previous run (3)ReviewFindingsHigh
Not observed in current diff (previously flagged, and reverified as fixed this round): The prior Not re-raised this round (adjudicated, not a code change): A Next steps:
Previous run (4)ReviewFindingsHigh
Low
Not observed in current diff (previously flagged, and reverified as still fixed/resolved this round):
Methodology note — false positives from a stale checkout, corrected before synthesis: Several sub-agent findings this round cited files this PR does not itself modify ( Next steps:
Previous run (5)ReviewFindingsHigh
Low
Not observed in current diff (previously flagged, and reverified as still fixed this round): The prior Next steps:
Previous run (6)ReviewFindingsHigh
Low
Not observed in current diff (previously flagged): The prior Not re-raised this round (methodology correction, not a code change): A Next steps:
Previous run (7)ReviewFindingsHigh
Medium
Low
Resolved since the last review (methodology correction, not a code change): This round fetched Not re-raised this round:
Next steps:
|
fe11ae0 to
09fdce7
Compare
|
🤖 Finished Review · ✅ Success · Started 6:01 PM UTC · Completed 6:31 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $13.50 |
Site previewPreview: https://7ac0159c-site.fullsend-ai.workers.dev Commit: |
|
Risk Assessment: elevated (3/5) DetailsLarge diff spanning 45 files and 5,506 lines touches protected CI workflows and high-churn CLI/forge components with no linked closing issue, yielding an elevated composite risk score of 3 anchored to prior rounds; DefaultSteerEnabled remains false, bounding runtime blast radius. Previous runRisk Assessment: elevated (3/5) DetailsLarge diff spanning 44 files and 5,402 lines touches protected CI workflows and high-churn CLI/forge components with no linked closing issue, yielding an elevated composite risk score of 3, consistent with prior rounds; DefaultSteerEnabled remains false, bounding runtime blast radius. Previous run (2)Risk Assessment: elevated (3/5) DetailsLarge diff spanning 44 files and 5,402 lines touches protected CI workflows and high-churn CLI/forge components with no linked closing issue, yielding an elevated composite risk score of 3, consistent with prior rounds; DefaultSteerEnabled remains false, bounding runtime blast radius. Previous run (3)Risk Assessment: elevated (3/5) DetailsLarge diff spanning 44 files and 5,362 lines touches protected CI workflows and high-churn CLI/forge components with no linked closing issue, yielding an elevated composite risk score of 3, consistent with the prior round; DefaultSteerEnabled remains false, bounding runtime blast radius. Previous run (4)Risk Assessment: elevated (3/5) DetailsLarge diff spanning 42 files and 5,249 lines touches protected CI workflows and high-churn CLI/forge components with no linked closing issue, yielding an elevated composite risk score of 3; DefaultSteerEnabled remains false, bounding runtime blast radius. Previous run (5)Risk Assessment: elevated (3/5) DetailsLarge diff across 42 files touching CI workflows and protected paths with high churn and author contention on core CLI files, balanced by opt-in feature gating (DefaultSteerEnabled=false) and no dependency or security-sensitive-file changes. Previous run (6)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 signals remain elevated with large blast radius (42 files, 5,247 lines), CI workflow modifications, and 2 protected .github/ paths, compounded by high Tier 2 churn and multi-author contention on modified base files, balanced by default-disabled feature gating (DefaultSteerEnabled stays false) and scope alignment with linked issue #6957. Previous run (7)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 metadata signals (42 files, 5,169 lines changed, large blast radius, CI workflow modifications, and 2 protected paths) remain in elevated risk buckets, combined with high Tier 2 churn, multi-author contention, and regression history across touched base files, yielding a composite score of 3 with no linked closing issue. Previous run (8)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 metadata signals (42 files, 5,139 lines changed, large blast radius, CI workflow modifications, and 2 protected paths) remain in elevated risk buckets, combined with high Tier 2 churn, multi-author contention, and regression history across touched base files, yielding a composite score of 3 with no linked closing issue. Previous run (9)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 metadata signals (42 files, 5,136 lines changed, large blast radius, CI workflow modifications, and 2 protected paths) remain in elevated risk buckets, combined with high Tier 2 churn, multi-author contention, and regression history across touched base files, yielding a composite score of 3 with no linked issue. Previous run (10)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 metadata signals (42 files, 5,082 lines changed, large blast radius, CI workflow modifications, and 2 protected paths) remain in elevated risk buckets, combined with high Tier 2 churn, multi-author contention, and regression history across touched base files, yielding a composite score of 3 with no linked issue. Previous run (11)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 metadata signals (42 files, 5,082 lines changed, large blast radius, CI workflow modifications, and 2 protected paths) remain in elevated risk buckets, combined with high Tier 2 churn, multi-author contention, and regression history across touched base files, yielding a composite score of 3 with no linked issue. Previous run (12)Risk Assessment: elevated (3/5) DetailsRe-review anchoring preserves score 3 (elevated): Tier 1 metadata signals (42 files, 5,073 lines changed, large blast radius, CI workflow modifications, and 2 protected paths) remain in elevated risk buckets, combined with high Tier 2 churn, multi-author contention, and regression history across touched base files, yielding a composite score of 3 with no linked issue. Previous run (13)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved as Tier 1 signals (42 files, 4,732 lines changed, large blast radius, and 2 protected CI workflow paths) remain in the same risk buckets alongside high Tier 2 churn, multi-author contention, and regression history on touched base files, weighted at 62% Tier 1 and 38% Tier 2 given no linked issue. Previous run (14)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved as incremental additions (+2 files, +130 lines, totaling 42 files and 4,709 lines) remain within the same Tier 1 risk buckets alongside 2 protected CI workflow paths, with Tier 2 reflecting high churn, contention, and change coupling on touched base files, weighted at 62% Tier 1 and 38% Tier 2 given no linked issue. Previous run (15)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved because Tier 1 metadata signals remain in the same risk tiers as the prior review (40 files, 4,579 lines, 2 protected CI workflow paths, no dependency changes, non-bot/non-first-time author) and Tier 2 git history indicates high churn, multi-author contention, and change coupling across the modified core files, with weights redistributed to Tier 1 (62%) and Tier 2 (38%) given no linked issue. Previous run (16)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved because Tier 1 metadata signals remain in the same risk tiers as the prior review (39 files, 4,573 lines, 2 protected CI workflow paths, no dependency changes, non-bot/non-first-time author) and Tier 2 git history indicates high churn, multi-author contention, and change coupling across the modified core files, with weights redistributed to Tier 1 (62%) and Tier 2 (38%) given no linked issue. Previous run (17)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved because Tier 1 metadata signals remain unchanged (38 files, 4,564 lines, 2 protected workflow paths, CI workflow changes, non-bot author) and Tier 2 git history indicates high churn, multi-author contention, and change coupling on pre-existing modified files, with weights redistributed to Tier 1 (62%) and Tier 2 (38%) due to no linked issue. Previous run (18)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved because Tier 1 metadata signals remain unchanged (38 files, 4,545 lines, 2 protected workflow paths, CI workflow changes, non-bot author) and Tier 2 git history indicates high churn, author contention, and change coupling on pre-existing modified files, with weights redistributed to Tier 1 (62%) and Tier 2 (38%) due to no linked issue. Previous run (19)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: score 3 (elevated) is preserved because Tier 1 metadata signals remain unchanged in bucket terms (38 files in 26-50 range, 4,545 lines in >=2,000 range, 2 protected workflow paths, CI workflow modified, no dependency changes, non-bot/non-first-time author) and Tier 2 git history confirms high churn and author contention on pre-existing files, with weights redistributed to Tier 1 (62%) and Tier 2 (38%) due to no linked closing issue. Previous run (20)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: Tier 1 signals are unchanged in bucket terms from the prior assessment (38 vs 33 files both fall in the 26-50 bucket, 4425 vs 4169 lines both fall in the >=2000 bucket; still 2 protected .github/workflows/ paths, CI workflow changed, no dependency changes, non-bot/non-first-time author), and Tier 2 spot-checks on the pre-existing hot files reconfirm the same very-high churn already noted previously with no new delta. The prior composite score of 3 (elevated) is preserved with weights redistributed to Tier1=62%/Tier2=38% due to no linked issue. Previous run (21)Risk Assessment: elevated (3/5) DetailsRe-review anchoring applied: Tier 1 signals are unchanged from the prior assessment (identical 33-file/4169-line diff, 2 protected .github/workflows/ paths, CI workflow change, no dependency changes, non-bot/non-first-time author), and Tier 2 spot-checks confirm the previously noted very-high churn on touched workflow/hub files with no new delta, so the prior composite score of 3 (elevated) is preserved with weights redistributed to Tier1=62%/Tier2=38% due to no linked issue. Previous run (22)Risk Assessment: elevated (3/5) DetailsNo linked issue (weights redistributed to Tier1=62%/Tier2=38%). Tier 1 (~2.75) reflects a large 33-file/4169-line diff, two protected .github/workflows/ paths, and a CI workflow change, offset by a non-first-time/non-bot author and no dependency changes. Tier 2 (~3.6) reflects very high 30-day churn, broad multi-author contention, and heavy fix/revert history on the pre-existing forge/CLI/workflow hub files this PR touches, offset by very recent last-touch dates; new steerwatch/steer-CLI files have no independent history. Composite rounds to 3 (elevated), consistent with the prior assessment via re-review anchoring. Previous run (23)Risk Assessment: elevated (3/5) DetailsNo linked issue (weights redistributed to Tier1=62%/Tier2=38%; PR #7447 referenced as base is a prerequisite PR, not a tracked issue, and remains open/unmerged). Tier 1 (~3.0) is driven by a large 33-file/4169-line diff, two protected .github/workflows/ paths, and a CI workflow change, offset by a non-first-time/non-bot author and no dependency changes. Tier 2 (~2.86) reproduces very high 30-day churn, broad multi-author contention, and heavy fix/revert history on the pre-existing forge/CLI hub files this PR touches, offset by very recent last-touch dates. Composite rounds to 3 (elevated), consistent with the prior assessment via re-review anchoring; file count and line count match the prior round exactly. Previous run (24)Risk Assessment: elevated (3/5) DetailsNo linked issue (weights redistributed to Tier1=62%/Tier2=38%); Tier 1 (~2.75) is driven by a large 33-file/4169-line diff, two protected .github/workflows/ paths, and a CI workflow change, offset by a non-first-time/non-bot author and no dependency changes; Tier 2 (~2.86) reflects very high historical churn, multi-author contention, and fix/revert frequency on pre-existing forge/CLI hub files this PR touches, while new steerwatch/steer-CLI code is excluded under the new-file rule. Composite rounds to 3 (elevated), consistent with the prior assessment via re-review anchoring; the prior rationale's claim that sibling PR #7447 was merged is corrected as inaccurate this round (it remains open) but is not load-bearing for the score. Previous run (25)Risk Assessment: elevated (3/5) DetailsTier 1 signals (33 files, 4162 lines, large blast radius, 2 protected workflow paths, CI change, no dependency changes, non-bot/non-first-time author) fall in the same buckets as the prior round, and Tier 2 confirms the same high-churn/regression-fix pattern on pre-existing hub files while new steering logic remains excluded under the new-file rule; the merge of sibling PR #7447 into the base branch does not change Tier 3 availability (still no linked issue), so the prior composite of 3 (elevated) is preserved via re-review anchoring. Previous run (26)Risk Assessment: elevated (3/5) DetailsNo linked tracked issue, so weights redistribute to Tier1=62%/Tier2=38%. Tier1 (~2.75) driven by large diff (33 files/4022 lines, blast=large), two protected .github/workflows/ paths, and a CI workflow change, offset by a non-first-time/non-bot author and no dependency changes. Tier2 reflects high historical churn/regression-fix rates on pre-existing hub files this PR touches (e.g. internal/cli/run.go), while the bulk of new steering logic is excluded from Tier2 under the new-file rule. Composite rounds to 3 (elevated), consistent with the prior assessment across multiple rounds on this PR. Previous run (27)Risk Assessment: elevated (3/5) DetailsNo linked issue, so weights redistribute to Tier1=62%/Tier2=38%; Tier1 (~2.75) is driven by large diff size (33 files/3892 lines, blast=large), two protected .github/workflows/ paths, and a CI workflow change, offset by a non-first-time/non-bot author and no dependency changes; Tier2 (~2.71) reflects high historical churn/regression-fix rates and broad change-coupling on pre-existing hub files this PR touches, even though most new code is brand-new and excluded from Tier2 by the new-file rule; composite rounds to 3 (elevated), consistent with the prior assessment on this PR. Previous run (28)Risk Assessment: elevated (3/5) DetailsRe-review anchoring: Tier 1 signals unchanged bucket-for-bucket from the prior assessment (31 files, 2 protected .github/ paths, CI workflow changed, no dependency changes, non-bot/non-first-time author); Tier 2 confirms brand-new steer/steerwatch code plus continued high-churn edits to a small set of shared infrastructure files. No new risk factor since the prior round; composite preserved at 3 (elevated). Previous run (29)Risk Assessment: elevated (3/5) DetailsLarge multi-part feature PR (31 files, 3635 lines, 2 protected .github/ paths, CI workflow changed) drives an elevated Tier 1 composite (~2.75), moderated by a non-bot, non-first-time author and no dependency changes; Tier 2 is dominated by mostly brand-new files but includes real coupling risk from editing internal/cli/run.go, a very high-churn, multi-author, fix-prone core file. Weighted composite (62% Tier 1 / 38% Tier 2, no linked issue) rounds to 3 (elevated), consistent with a refactor-of-widely-touched-module-with-high-churn-and-no-linked-issue risk band. |
09fdce7 to
58d0331
Compare
|
🤖 Finished Review · ✅ Success · Started 9:36 PM UTC · Completed 9:59 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $12.05 |
|
🤖 Finished Review · ✅ Success · Started 10:07 PM UTC · Completed 10:30 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $11.45 |
|
🤖 Finished Review · ✅ Success · Started 11:18 PM UTC · Completed 11:47 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $17.09 |
|
🤖 Finished Review · ✅ Success · Started 12:23 AM UTC · Completed 12:52 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $15.09 |
|
🤖 Finished Review · ❌ Failure (agent timed out after 45m0s without completing (timeout: 45m0s)) · Started 4:06 PM UTC · Completed 4:52 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $14.10 |
|
🤖 Finished Review · ✅ Success · Started 5:09 PM UTC · Completed 5:41 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $19.08 |
|
On the two
No change needed in this PR. |
|
🤖 Finished Review · ✅ Success · Started 7:16 PM UTC · Completed 7:51 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $16.92 |
|
🤖 Finished Review · ❌ Failure (validation failed after 1 iteration(s)) · Started 8:28 PM UTC · Completed 8:41 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $6.82 |
|
🤖 Review · Started 8:56 PM UTC Commit: |
…sses The watcher had the provenance checks but nothing driving them. Add the loop: poll on a ticker and immediately at every turn end, fold every candidate a poll accepts into one steer, and settle when nothing new arrived, the cap is spent, the deadline passes or the context is done. The listing re-derives from the run's own start on every poll rather than advancing a cursor, so a candidate is bounded by freshness and deduplicated by run id. ListWorkflowRunsSince filters server-side to one workflow file and paginates to a fixed cap; GitLab returns ErrNotSupported, which is what the runner's GitHub-only gate already expects. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
…dentity Wire the watcher into the run: one per validation-loop iteration, carrying the judged run ids, delta window and steer count across iterations so max_steers stays a cap on the run. A steered run is bounded by a whole-run deadline anchored at the run's start rather than a per-iteration timeout, and the sandbox, the heartbeat and the timeout detection all read that same pair so none of them can promise time the run will not get. Resolve the logins this run's own output is posted under before bootstrap, and decline steering as an announced environment defect when they cannot be resolved. Steering without them would let a run absorb its own post-fix and post-code comments, which carry no marker to recognise them by, so no steering is the correct answer rather than a shorter exclusion list. Export FULLSEND_STEER_ACTIVE only for an iteration whose watcher is already running. The agent definitions treat the runner-update opening line as an injection attempt unless the variable is set, and that line is public, so exporting it before the watcher's live calls have succeeded would tell the agent to trust text any author can write. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
…workstation issue_comment and issues runs carry no pull_requests[], so an in-flight run has no server-side field to tell a follow-up run on its own work item from one on another. Give the per-repo shim a run-name naming the item, which the Actions API returns as display_title, and pin it against drift. A comment-triggered run appends its comment id, so a command pairs to its run exactly rather than by a timestamp that can cross when runs queue out of order. `fullsend steer <url> "<text>"` posts the stage's own slash command rather than a command of its own: the existing route arms already carry the right authorization floor for each stage, and the watcher accepts a follow-up run on provenance rather than on which words the comment opened with, so an ordinary /fs-review is absorbed exactly as anything else would be. BREAKING CHANGE: the per-repo shim's run-name retitles every Actions run in a repository that syncs it. Run titles now read `<owner>/<repo>#<number>` instead of GitHub's per-event default, and a comment-triggered run adds a ` comment:<id>` suffix, as in `acme/widgets#7 comment:2551234567`. The change arrives through scaffold sync rather than on opt-in — it is not gated behind steer.enabled. Update any dashboards, saved filters or scripts that match runs by title. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
ADR 0106 rejected polling forge events inside `fullsend run` because that needs input drivers, race-safe cursors and scheduling in the execution command. Record the mechanism that is left — the runner lists the execution platform's own run records for its own shim, with the job token — and the invariants that keep ADR 0106's limits intact. Document the mechanics beside the interface they extend: how a candidate is discovered and bound to this run, how a steered run settles, and the token, cost and remaining-time ceilings it runs inside. `max_steers` and `poll_interval_seconds` become live here; until now nothing read them. FULLSEND_STEER_ACTIVE is documented with the other run facts: the agents key the runner-update opening line on it, so absence is the default and presence means a watcher is running right now. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
…tarts Pi steers only a run that cannot fall back across models, and until now learned that inside Run: the watcher had already started, polled, and spent a steer slot before Steer reported the run unsupported. Add runtime.SteerDecliner. The runner asks SteerDeclineReason in steerEligible, before the watcher starts, and announces the decline whatever the harness says: it follows from the run's configuration, and with steering on by default no harness names it explicitly. pi_steer.go: gate input shared with eligibility, behaviour unchanged. piSteerGate and SteerDeclineReason both ask piSteerDecline over the chain piRunChain derives, which Run now uses too, so the two cannot disagree. run.go builds RunParams once, before the watcher, and passes the same value to the decline check and to rt.Run. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The pull request branch of buildDelta returned after the head and the reviews, and the label diff ran only for issues. An accepted `labeled` follow-up on a pull request therefore built an empty delta: the run was judged and marked seen but never delivered, so the update reached the agent only if something else changed. That is the shape of a pull request the coder App opens and labels ready-for-review a second later. Start now snapshots a pull request's labels from the issue record GitHub keeps for it, and every poll diffs them the way the issue path does, through a shared labelChange. The label baseline advances with a delivered steer, as an issue's does, so the same label is not sent twice. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 9:10 PM UTC · Completed 9:41 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $15.01 |
| return fmt.Errorf("reading labels of %s#%d: %w", w.cfg.Repo, w.cfg.Item.Number, err) | ||
| } | ||
| if issue != nil { | ||
| w.cfg.Item.Labels = issue.Labels |
There was a problem hiding this comment.
[low] logic-error
resolveItem() snapshots live labels/title/body at Start() (after checkout/mint/sandbox bootstrap, immediately before the agent starts). This is the intended baseline: resolveItem's own comment explains that an empty snapshot would report every already-present label as newly added on every poll. Comment-based deltas are windowed from freshAfter; labels are a set diff against the Start()-time snapshot instead — a deliberate difference, not an oversight, since the agent's own first turn already sees the current label set as initial context. The residual gap is narrow: a label that lands in the run's own bootstrap gap (before Start()) is already in the snapshot, so an accepted, later labeled follow-up run builds an empty delta and pollAndSteer's markSeen-without-receipt path means the queued run behind it still redoes the work per this PR's documented "no receipt yet" model. The new tests (TestBuildDelta_PullRequestLabels, TestPollAndSteer_PullRequestLabelIsDelivered) cover only a label change that happens after Start() (the actual steer path this PR targets); a label present before Start() is untested, and the PR body's own motivating example (a label added "a second after opening") sits right at this boundary.
Suggested fix: If a label landing in the run's own bootstrap gap should be treated as absorbed, add a test that sets the label on the stub before constructing/Start()-ing the watcher and assert a non-empty delta (or document explicitly that it is expected to fall to the queued run, matching the current behavior, and assert that contract instead).
There was a problem hiding this comment.
Agreed, the pre-Start label case should be pinned, not only explained. A test is prepared: TestPollAndSteer_LabelBeforeStartIsBaseline sets the label on the item before the watcher starts and asserts the expected, documented behaviour:
- the labeled follow-up is judged and no steer is delivered, because the label is already in the baseline the agent reads;
- nothing is receipted, so its own queued run still does the work.
It lands with the next push of this PR.
| // steer this one, so title binding is turned off: pull-request events | ||
| // still bind on pull_requests[], and an issue_comment follow-up falls | ||
| // to its own queued run. | ||
| if w.cfg.RunName != "" && runNameItem(run.DisplayTitle) != w.cfg.RunName { |
There was a problem hiding this comment.
[low] fail-open
The prior medium-severity finding here (steerWatcherConfig in internal/cli/steer.go always setting Config.RunName with no proof the repository's shim actually declares run-name) is fixed at this head: Watcher.Start() now clears cfg.RunName when runNameItem(run.DisplayTitle) != w.cfg.RunName, covered by TestStart_TitleBindingNeedsARunNameShim. A narrower residual remains: the check infers shim presence solely from the work-item half of DisplayTitle matching the configured RunName. Without a declared run-name, GitHub's display_title defaults to the issue/PR's own title — so a collaborator who can edit that title to exactly <owner>/<repo>#<N> (or with a comment:<id> suffix) before the victim run is created would still leave title binding enabled, letting a Route-authorized same-stage follow-up on a different item with the same crafted title false-bind. This PR's own shim template (shim-per-repo.yaml) and this repository's own shim now both declare run-name, so the residual hole applies only to repositories/shims that have not yet adopted it. Exploitation still requires an actor who can obtain an accepted, Route-authorized follow-up run — not anonymous external injection — and DefaultSteerEnabled remains false in this PR.
Suggested fix: After loading myRun in Start(), additionally treat myRun.DisplayTitle equaling the live issue/PR title (fetched independently, not just compared to the configured RunName string) as proof that no run-name shim is in effect, and clear cfg.RunName in that case too. Add a test where DisplayTitle is owner/repo#N specifically because that is the item's actual title (not because a shim set it), and assert a same-titled follow-up is rejected.
There was a problem hiding this comment.
Agreed; the residual is real. Without a run-name, GitHub titles my run with the item's own title, so an item retitled to <owner>/<repo>#<N> passed the first check.
The fix is prepared. After it reads the item, Start also turns title binding off when my run's title is exactly the item's live title. That is the forge's default title, whatever it spells, so it says nothing about the shim. A run-name shim titles the run RunName, which an item title matches only if someone set it that way, and failing closed is right then too.
TestStart_TitleBindingNeedsARunNameShim gains two cases:
- an item titled
org/repo#7: title binding is off, and only the pull-request event binds; - a run-name shim with an ordinary item title: title binding stays on.
Removing the new check fails the first case. One narrow gap remains: a title set before my run is created and changed back before Start reads it. The fix lands with the next push of this PR.
|
Superseded by #9029; the steer design was reworked on top of ADRs 0133/0141/0144/0151. |
A run already working on a work item now learns when that item changes, and absorbs the update
into the session it is already running.
It learns by listing the execution platform's own run records for its own shim: every legitimate
update already fires the repository's shim, so those records are a server-side log of what
happened since this run started. The listing uses the job token the stage already holds, is
filtered server-side to one workflow file and to runs created at or after this run's start, and
is re-derived from that start on every poll — there is no cursor, no input driver, and no
scheduling inside
fullsend run. A poll happens on an interval and immediately at every turn end,which is the moment a steer is free: the run either absorbs something and takes another turn, or
settles.
max_steersandpoll_interval_secondsbecome live here; until now nothing read them.A pull request's labels count as an update, as an issue's do. A label added mid-run, such as the
ready-for-reviewthe coder App adds a second after opening a pull request, reaches the agent asstate context instead of leaving that follow-up with an empty delta that is judged but never
delivered.
What this changes for a repository
Two things are visible without opting in to anything:
<owner>/<repo>#<number>. The per-repo shimneeds a
run-namebecauseissue_commentandissuesruns carry nopull_requests[], anddisplay_titleis then the only server-side field an in-flight run can bind a follow-up to.Dashboards, saved filters and scripts that match runs by title need updating.
fullsend steer <url> "<text>"reaches a run in flight from a workstation. It posts thestage's own slash command rather than a command of its own — the existing route arms already
carry the right authorization floor for each stage, and the watcher accepts a follow-up run on
provenance rather than on which words the comment opened with.
Not here yet: the queued run still redoes the work
This PR delivers steers and settles. It writes no processing receipt, so the run queued behind
an absorbed update cannot tell the work is done and does it again from scratch. Until the receipt
lands, absorbing an update therefore costs more than cancelling would: the run in flight reviews
the new head, and the queued run reviews it again.
That is the reason steering stays off by default here (
DefaultSteerEnabledis unchanged), andthe receipt is the next decision in the stack rather than an optimization to follow later.
Declining is a real outcome
A run declines steering, and says so, when its environment cannot support it — no job token, no
run id, an ambiguous stage job, a forge login it cannot resolve, or a pi model chain that can fall
back (the runtime would refuse the steer, so the run says so before its watcher starts). An
unresolvable login is not a degradation to a shorter exclusion list: the logins a run posts under are what keep it from
steering itself on its own output, and the post-fix and post-code comments carry no marker to
recognise them by, so no steering is the correct answer.
FULLSEND_STEER_ACTIVEfollows the same rule in the other direction. The agent definitions treatthe runner-update opening line as an injection attempt unless that variable is set, and the line
is public, so it is exported only once an iteration's watcher is actually running — never at
bootstrap, where the watcher's live API calls have not happened yet, and never inherited across
validation-loop iterations.
Base and scope
Based on #7447, which decides where an absorbed update's authority comes from. This PR decides
only how a run finds out there is one, recorded in ADR 0119. The six commits are the watcher loop
and the run listing; the runner wiring and the eligibility rules; the run-name binding and the
CLI; the docs; declining a pi run that can fall back before its watcher starts; and reporting a
pull request's label changes.
Implements the design recorded in #6957 (closed as completed; this stack ships it).
Verification
go build ./...,go vet ./...(including test packages),-raceoninternal/steerwatchandinternal/cli, plusinternal/scaffoldandinternal/forge/..., andpre-commitacross thebranch. One unrelated failure reproduces on the base without these commits:
TestApplyCIServerTLSCA_TrustsPrivateCAAndRejectsUntrusteddepends on the host's systemcertificate pool.