Conversation
When a code-push operation (create_pull_request / push_to_pull_request_branch) fails, all subsequent non-add_comment messages are cancelled. This cancellation was already correctly excluded from the general failure count (line 1136 uses was missing the same guard. The result: a cancelled discussion appeared in the failure issue as: 'Discussion "..." in unknown: Unknown error' Both values were fallbacks because: - message?.repo is not set on agent-output discussion items (repo comes from the handler config, not the agent), so it fell back to 'unknown' - r.error is not set on cancelled results (only r.reason is), so it fell back to 'Unknown error' The root failure (protected-file PR block) was already reported; the cancelled-discussion entry was just noise that confused readers. Fixes: discussions are no longer reported as independent errors. 2. Use r.error || r.reason as the error message (covers non-cancelled cases where only reason is set). 3. Fall back to process.env.GITHUB_REPOSITORY for repo when message.repo is absent. Closes #27185 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🩺 Examination complete! CI Failure Doctor has delivered the diagnosis. Prescription issued! 💊 |
🩺 CI Doctor DiagnosisChecked SummaryOne check is failing: Failing Checks
Detailed AnalysisPrettier config (
The offending code (lines 1257–1259 of // Current (multi-line — Prettier rejects this at printWidth=240):
const createDiscussionErrorCount = processingResult.results.filter(
r => r.type === "create_discussion" && !r.success && !r.deferred && !r.skipped && !r.cancelled,
).length;The fully-inlined version is ~176 characters, well under the 240-char print width, so Prettier wants it on one line: // Correct (single line):
const createDiscussionErrorCount = processingResult.results.filter(r => r.type === "create_discussion" && !r.success && !r.deferred && !r.skipped && !r.cancelled).length;This was introduced in the PR when Recommended Fixes
Prevention TipsWhen adding conditions to a long filter chain, run Analysis Steps
|
|
@ccopilot review all comments |
|
@copilot review all comments |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/cf41eae8-4372-420a-93db-13a1ea291ce7 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Reviewed all PR comments and applied the actionable feedback from CI Doctor. I pushed commit
Reviewed all comments and addressed the actionable item. Commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Root Cause Analysis
Investigated run 24629165601 from issue #27185.
The "unknown unknown error" in the failure report was:
What actually happened
create_pull_requestwas blocked by the protected-files guard (.github/aw/github-mcp-server.md)create_discussioncreate_discussionresult had{ success: false, cancelled: true, reason: "Cancelled: code push operation failed..." }— but noerrorfield!r.cancelled(unlike the general failure counter at line 1136 which correctly excludes cancelled items)repo = "unknown"(agent-output discussion items don't carry arepofield) anderror = "Unknown error"(noerrorfield on cancelled results)The root failure (protected-file PR block) was already reported in the issue — the cancelled-discussion entry was just confusing noise.
Changes
actions/setup/js/safe_output_handler_manager.cjs— 3 fixes:!r.cancelledto bothcreate_discussionerror filters (lines 1245 and 1255), consistent with how the general failure count already works at line 1136r.error || r.reasonas the error message so non-cancelled cases where onlyreasonis set still get a useful messageprocess.env.GITHUB_REPOSITORYfor repo whenmessage.repois absent (agent-output discussion items don't always include a repo)Testing
All 53 existing
safe_output_handler_manager.test.cjstests pass (3 skipped, no regressions). The failing tests inmake test-jsare all pre-existing environment issues (Go version mismatch, ENOSPC, etc.) unrelated to this change.Expected improvement
After this fix, when a code-push fails and cancels a
create_discussion, the failure issue will only show the actual code-push error — not a confusing secondary "in unknown: Unknown error" message.Warning
The following domain was blocked by the firewall during workflow execution:
invalid.example.invalidTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.