Repository navigation
Publish auto-triage summaries when labels are queued first - #4992
Merged
Merged
Conversation
gh-aw publishes safe outputs in queue order, so the triage validator rejected the whole batch whenever the agent queued its Waiting for Author label change before the summary comment. Seven recent issues lost their completed triage summaries this way. Move label operations after the single summary before validation, then write the reordered batch back to the file that safe-output publication reads. Rejected batches are left unchanged and still block publication. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
priyankatiwari08
requested review from
a team
and
a balanced review from Copilot
November 4, 2026 10:23
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the triage publication-ordering change.
No open issues 🎉
What changed in this PR
Fixes issue auto-triage publication when label changes are queued before a completed summary. The change normalizes publication order while preserving validation safeguards; no product code, public APIs, or packages change.
Changes:
- Move early label operations after a single summary without mutating the input batch.
- Share file normalization and validation between the workflow and CLI, rewriting only accepted batches.
- Add regression coverage for ordering, rejected batches, file rewriting, and compiled workflow wiring.
| File | Description |
|---|---|
.github/workflows/issue-triage.md |
Calls the shared file validator before publication. |
.github/workflows/issue-triage.lock.yml |
Updates the generated workflow to match the validator integration. |
.github/scripts/validate-triage-output.cjs |
Adds queue normalization and validation-gated file rewriting. |
.github/scripts/tests/validate-triage-output.test.cjs |
Adds normalization, file, CLI, and workflow-wiring regression tests. |
.github/scripts/tests/README.md |
Documents reordered publication and its test coverage. |
Review effort: Balanced
paulmedynski
approved these changes
Nov 4, 2026
paulmedynski
enabled auto-merge (squash)
November 4, 2026 18:51
benrr101
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The issue auto-triage workflow failed to publish completed triage summaries whenever the agent queued its
Auto-Triage: Waiting for Authorlabel change before itsadd_commentsummary.Root cause. gh-aw publishes safe outputs in queue order. The pre-publication validator (
validate-triage-output.cjs) therefore rejected any batch with a label operation ahead of the comment (Triage cannot change labels before its summary comment.). This kept labels from changing without a visible summary, but it also discarded a complete, valid summary. In every failed run since Oct 14, the downloadedagent_output.jsoncontained a finished summary with the label operation queued first:remove_labels,add_commentremove_labels,add_commentadd_labels,add_commentremove_labels,add_commentremove_labels,add_commentremove_labels,add_commentremove_labels,add_commentThe prompt already asks for the comment first. The model does not follow that reliably, so the order is now fixed deterministically in trusted code instead.
Fix.
normalizeTriageOutputmoves label operations queued before a single summary to just after it. All other items keep their relative order. Batches without exactly one summary are returned unchanged, and validation still rejects them.validateTriageOutputFilenormalizes and then validates. Only if validation passes does it write the reordered batch back toGH_AW_AGENT_OUTPUT. "Process Safe Outputs" reads that same file, so the summary is published before the label. A rejected batch leaves the file untouched and still fails the step, which blocks publication.gh aw compile(gh-aw v0.88.2); the lock change is limited to that step and the frontmatter hash, and a second compile is a no-op.validateTriageOutputitself is unchanged and still rejects unnormalized label-first batches as a defense in depth.No product code, public API, or package changes.
Issues
Restores triage summaries for the failure mode above. After merge, maintainers can comment
/triageon #4969, #4965, #4953, #4940, #4904, #4879 and #4855 to regenerate their summaries.Not addressed here: #4709 was skipped for a different reason. The workflow's daily AI-credit limit was exceeded (11,256 against a 5,000 threshold), so the agent never ran.
Testing
node --test .github/scripts/tests/validate-triage-output.test.cjs: passed (30 tests, 0 failures). New tests cover:normalizeTriageOutputa no-op causes 4 of the new tests to fail.agent_output.jsonartifacts from runs 41619094928 (Suspected: async MARS command can lose its own fatal error, and sync MARS Read waits for CommandTimeout, after another session tears down the connection (managed SNI) #4969), 41109525171 (Unsized varchar Output parameters return empty values and Output/InputOutput reuse fails with invalid Size #4953) and 39032075412 (Zombified transaction executes and auto-commits SQL command #4855):Triage cannot change labels before its summary comment.add_comment, then the label op, and accepts them.gh aw compile issue-triage: succeeded. A second run leftissue-triage.lock.ymlbyte-identical.Guidelines
Please review the contribution guidelines before submitting a pull request: