Repository navigation
fix(pr-pipeline): end a workflow-stale issue run green and re-fire it - #9537
Conversation
An issue-lane run that waited in its slot past a lane workflow merge failed red at the read runner's workflow-current step before any model turn. That step now sets stale=true and ends green: a dedicated `Stop on stale workflow files` step runs, go is false, so no model turn, outcome marker or caller job follows, and the run counts as no failure. work-unblock's sweep finds that step in the run's job listing and re-fires the issue once per version of the lane workflow files, as it does a failed run. Each run's job listing is read once and shared. Refs: #9498 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d case Assert the stale re-fire reads a run's job listing once, word the script header to match work-unblock.yml, remove the held case that returned before any job read, and drop an issue reference from a test comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed No findings on PR #9537 at 18e6d3c. I read the full diff and What I checked:
|
|
claude-security-review reviewed No security findings. critical-findings: 0 I read the full diff and PR context, then the read runner's job outputs and What I checked
A green stale run is now invisible to failure telemetry (the PR calls this out). That is an observability trade-off, not a security issue. |
Refs: #9498
Summary
An issue-lane run that waits in its concurrency slot while a lane workflow change merges failed red at the read runner's
workflow-currentstep, before any model turn. That red run was noise in lane telemetry, and work-unblock's sweep re-fired it only because it failed. This PR ends that run green and keeps the re-fire.Fix
pr-run-activity-read.yml: on a blob difference,workflow-currentwritesstale=true, prints a::warning::workflow-staleline and exits 0. A newStop on stale workflow filesstep runs only then.issue-prioris skipped andgoisfalse, soissue-run-startedisfalseandreuse-branchis empty. Every caller job keyed on those (apply-issue-patch,run-checks,report-statuses,report-outcome) skips. No outcome marker is posted, so the issue is never read as done. The run concludessuccess, so morning-brief's lane section, which counts onlyfailure,timed_outandstartup_failure, does not count it.label-unblocked.mjs:stoppedStalematches that step atconclusion: successin aresolve-issuejob of a green run. The sweep then re-fires the run like a failed one: once per version of the two lane workflow files, recorded in the existing marker comment. Each run's job listing is now read once per sweep, throughjobLister, and shared bydidNoWork,cancelledBeforeWorkandstoppedStale, so the new check makes no extra API call.work-unblock.ymlheader,pr-run-activity.mdand a pr-pipeline changelog fragment are updated.Exposure 2 (a lane workflow merge during the model run, which refuses the
apply-issue-patchmint) is handled in the companion broker PR in melodic-software/azure-iac. That PR is not deployed yet.Verification
node --test .github/scripts/work-unblock/label-unblocked.test.mjs: 127 pass, 0 fail. New tests: a green stale-stopped run is re-fired, is not re-fired again on the same workflow files, and is re-fired once more on new files. A green run whose stop step was skipped, or whose stop step sits in another job, is not re-fired, and neither is a held issue's. Removing thestoppedStalecall makes the re-fire test fail (126 pass, 1 fail).node --test .github/actions/resolve-config/callers.test.mjs: 161 pass, 0 fail. The stale cases now assert exit 0 withstale=truewritten toGITHUB_OUTPUT, and the fresh cases assert that nothing is written. The test also covers the stop step's andissue-prior's conditions, andgoreturningrun=falseonSTALE=true.nice bash scripts/check-affected.sh --uncommitted: 9 passed, 4 skipped, over 7 changed files.actionlinton both edited workflows: clean.Related
apply-issue-patchmint under the same superseded-workflow conditions asreport-outcome.🤖 Generated with Claude Code