Repository navigation
fix: prioritize default-branch runs in health checks - #76084
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ 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. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
❌ Design Decision Gate 🏗️ failed to deliver outputs during design decision gate check.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification 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. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
There was a problem hiding this comment.
Reviewed the changed lines in the pre-fetched diff. I found no actionable correctness, performance, or maintainability issues that warrant an inline comment. Validation was static only per review instructions; tests/builds were not run. The specialist pass was unavailable because its file-read tool invocation was denied, so this assessment is based on independent review.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
|
Warning The 🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (273 new lines under 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify that the implementation matches the decision. 🔍 Evidence used for this decision
📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
ADRs in References: §42550827229
|
There was a problem hiding this comment.
🟡 Changes recommended
Sampling defects can exhaust shared request budgets, incorrectly mark truncated default-branch collection complete, and prioritize unmerged fork-PR evidence over published default-branch runs.
3 open issues
What changed in this PR
This PR updates gh aw health to prioritize the repository’s default-branch runs before PR and other branch evidence, reducing the risk that unmerged failures consume the collection budget first.
Changes:
- Resolves the default branch and introduces two-pass sampling with shared limits and deduplication.
- Adds default-branch identity and pass-completion status to reports.
- Extends regression tests and updates CLI help, health guidance, and release notes.
| File | Description |
|---|---|
pkg/cli/health_timeout_test.go |
Updates partial-report expectations for interrupted branch passes. |
pkg/cli/health_sampling.go |
Resolves the default branch and sequences branch-specific sampling. |
pkg/cli/health_sampling_test.go |
Tests ordering, metadata errors, interruptions, and deduplication. |
pkg/cli/health_failures_first.go |
Shares failure-inventory limits and filters candidates by pass. |
pkg/cli/health_failures_first_test.go |
Tests the shared failure-listing budget. |
pkg/cli/health_command.go |
Updates command help and report capabilities. |
pkg/cli/health_collection.go |
Adds branch-priority state and report output. |
docs/src/content/docs/setup/cli.md |
Documents collection priority, shared limits, and report fields. |
.github/aw/debug-workflow-health.md |
Updates health-investigation guidance. |
.changeset/patch-health-default-branch-first.md |
Adds a patch release note. |
Review effort: Balanced (auto)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "4eff15a67a4bbc9ac0116cab02a2d1b38e26651d",
"kind": "requested",
"schema_version": "1",
"state": "957bfc43463c6ca88a2a046793a4665f4e70f71de188e3edeceb11bf4847bce6",
"work": [
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e"
],
"workflow": "pr-sous-chef"
}
|
Reuse default-branch evidence for later-pass stopping, retain scope-specific failure coverage, exclude PR events from the prioritized pass, and document the collection decision. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Regarding this comment: No code change is requested by this status report. I am not treating reported_no_action as proof of complete review or successful publication. |
|
Regarding this comment: No code change is requested by this review-in-progress notice. The sampling corrections address the separate actionable review threads. |
|
Regarding this comment: Added and linked the missing ADR documenting the health collection decision. This addresses the design-documentation requirement, not the gate's separate output-delivery failure; workflow permissions are unchanged. |
|
Regarding this comment: No actionable test correction is included in this status report, so no change is attributed to its no-op outcome. Added regression coverage for all three sampling defects and ran the focused Health tests independently. |
|
Regarding this comment: No specification correction is requested by this status report, and reported_no_action is not proof of complete review. The collection decision is now documented in the linked ADR. |
|
Regarding this comment: No code change is requested by this completion notice or the associated static review summary. The three separate sampling findings have been fixed and validated independently. |
|
Regarding this comment: Partially accepted: the claimed draft was absent, so I added a complete ADR-76084 with the requested sections and references to ADR-70552 and ADR-71786, then linked it in the PR body. The changes are pushed through this session's existing branch access; no authentication or branch-protection workaround was introduced. |
Merged latest |
|
🎉 This pull request is included in a new release. Release: |

Why
Recent PR failures can reflect broken, unmerged code rather than regressions in published workflows. Previously, these failures could consume the health command's bounded evidence budget before default-branch runs were examined.
Approach
Resolve the repository's actual default branch from GitHub, then collect its non-PR failure representatives and chronological samples before reviewing PR and other branch runs. PR events always belong to the later pass, even when their source branch has the default branch's name. Keep default-branch evidence when collection is interrupted, deduplicate runs across passes, and share the existing five-candidate-per-workflow and ten-page failure-listing limits across both passes.
The later pass reuses per-workflow default-branch evidence for stopping after at least one page, without allowing that evidence to satisfy known non-default failure scopes. Chronological pagination truncation leaves default-branch pass completeness false.
Reports expose the resolved default branch and whether its pass completed, and clarify that PR failures do not necessarily indicate a default-branch regression. PR runs still contribute to the later evidence pass; this changes collection priority, not their classification as failures. Updated CLI help, health guidance, and a patch changeset document the behavior.
ADR: ADR-76084: Prioritize Default-Branch Runs in Health Checks
Validation