Repository navigation
Conversation
When a workflow run fails before GitHub Actions creates any jobs, listJobsForWorkflowRunAttempt returns an empty array. Keep zero-job completed runs in listRuns with agent_ran=false so applyRun records a non-counted no_agent line without charging unexplained, while still skipping runs that have jobs without push_routing_history. Fixes #80795 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messagePR #80800 reviewed at head 0e97fe9: applicable adaptive-routing/compiler contracts remain aligned; no specification update, inline finding, or review submission was needed.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. The No-op messageLean already. Ship.
|
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messageCompleted PR #80800 review: no merge-blocking findings; review submitted and review-history ledger appended.
|
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Reviewed the changed lines in push_routing_history.cjs and its focused test. No merge-blocking correctness or reliability issue was found. The new zero-job path is guarded by the existing generation/run-number fence, and the added test covers recording, unexplained accounting, and deduplication behavior. The independent specialist pass completed; its candidates were adjudicated and discarded as either fenced out, speculative, or non-blocking coverage concerns.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change that records zero-job startup failures in routing history.
No open issues 🎉
What changed in this PR
This PR fixes #80795 by recording zero-job startup failures in adaptive routing history as non-counted no_agent entries, avoiding repeated job lookups while those entries remain retained.
Changes:
- Preserve zero-job failures for audit recording without increasing
state.unexplained, while continuing to ignore runs with jobs but no history writer. - Add regression coverage for
failureandstartup_failureconclusions, pre-opt-in exclusions, and job-lookup deduplication on subsequent saves.
| File | Description |
|---|---|
actions/setup/js/push_routing_history.test.cjs |
Tests zero-job audit entries, unchanged unexplained counts, and subsequent lookup behavior. |
actions/setup/js/push_routing_history.cjs |
Limits the writer-job skip guard to runs with at least one job. |
Review effort: Balanced (adaptive)
🧪 Test Quality Sentinel Report✅ Test Quality Score: 90/100 — Excellent
📊 Metrics (1 tests)
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 90/100. 0% implementation tests (threshold: 30%). No violations.
🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 7.4K
Comment /review to run again
Fixes #80795
In adaptive routing (#79102), when a workflow run fails before GitHub Actions creates any jobs (for example a YAML or startup failure such as Auto-Triage Issues run 4768),
listJobsForWorkflowRunAttemptreturns an empty job list[].Previously,
listRunsinactions/setup/js/push_routing_history.cjsskipped any failed run without apush_routing_historyjob so that runs compiled while adaptive routing was turned off are not charged. Because an empty job list also lacks apush_routing_historyjob, zero-job startup failures were skipped too, leaving a gap inruns.jsonland causing later saves to re-querylistJobsForWorkflowRunAttemptfor that run until it ages off the 100-run page.This PR distinguishes zero-job startup failures from runs that created jobs without
push_routing_history, keeping pre-opt-in runs ignored while recording zero-job startup failures as non-countedno_agentaudit lines without incrementingstate.unexplained.Example
Suppose run 50 already saved on the current generation, run 51 failed while adaptive routing was off (jobs list contains only
agent), and run 52 failed at workflow startup with zero jobs ([]). When run 54 saves:[agent]unexplainedunchangedunexplainedunchanged[]no_agent,unexplainedunchanged, skipped on later saves while retained inruns.jsonlWith this PR, run 54 appends a non-counted
no_agentline for run 52 toruns.jsonl:{"run":"9052","number":52,"attempt":1,"at":"2026-11-24T10:00:00Z","generation":null,"scope":null,"mode":null,"role":null,"pair":null,"outcome":null,"credits":null,"counted":false,"note":"no_agent"}Deduplication after an audit line ages out of the 500-line
runs.jsonlretention window is tracked separately in #80780.Changes
actions/setup/js/push_routing_history.cjs: inlistRuns, apply the missing-writer / completed-writer skip guard only whenjobs.length > 0, so zero-job runs stay inlistingwithagent_ran: falseandapplyRunrecords a non-countedno_agentaudit line.actions/setup/js/push_routing_history.test.cjs: add a unit test covering zero-job startup failures (failureandstartup_failureconclusions) alongside a failed run whose jobs contain onlyagent, verifyingno_agentrecording, unchangedstate.unexplained, ignored pre-opt-in runs, and no redundant jobs lookup on the next save.Verification
Validated on
0e97fe910b:npx vitest run --no-file-parallelism --testTimeout=60000 push_routing_history.test.cjs routing_history.test.cjs: 2 test files, 64 passed.npm run typecheck: passed (0 errors).npx prettier --end-of-line auto --check push_routing_history.cjs push_routing_history.test.cjs: passed.eslint --config eslint-factory/eslint.config.cjs push_routing_history.cjs push_routing_history.test.cjs: passed (0 errors).