Repository navigation
Description
Scope decision (2026-11-19): the folding described below is not being implemented. Proving that an aggregate job failed only because of a shard needs analysis of what its steps run, which proved too error-prone on #3731. Accepted behavior: every failed job keeps its evidence; a failed job that directly
needsanother failed job gets a line naming it ("Depends on the failed job(s): …"); no folding, no reordering.
Problem
The CI-failure comment lists an aggregate job next to its own failing shard (issue #3680, item 3). For example "Run Full Test Suite" fails only because "Full Test Suite Shard 3/4" failed, yet both appear as separate failures with separate evidence, and the follow-up agent is asked to investigate both.
Expected
When a failed job is an aggregate of other failed jobs in the same workflow run, the comment lists the shard as the failure and mentions the aggregate once, as a consequence of it (for example "also failed: Run Full Test Suite, which only reports the shards"), without its own evidence block.
This must be proven per run, never guessed from names. A job counts as an aggregate only if both hold:
- the workflow file at the failing commit shows the job
needsone or more jobs that failed in this run (for a matrix, the matrix job id), and - the job's own failure is only its result gate: no step of it failed other than a step whose purpose is to check the
needsresults, or the job has no steps that ran tests/builds of its own.
If the workflow file cannot be read, the YAML cannot be parsed, or either condition is uncertain, list the job as a separate failure exactly as today.
Acceptance
- Unit tests with this repository's own
Run Full Test Suite+ shard layout: one shard fails → the aggregate is folded; no shard fails but the aggregate does → listed on its own; aggregate has a failing step of its own besides the gate → listed on its own; workflow file unreadable → listed on its own. - The CI-failure follow-up prompt receives the same folded list as the comment.
- Existing CI-failure comment tests still pass.
Implementation
Work in packages/core/src/webhook/ciFailureCommentGrouping.ts and packages/core/src/webhook/ciFailureFollowup.ts. Fetch the workflow file for the run's head SHA through the existing GitHub client (one request per workflow run, cached for the comment being built) and parse jobs.<id>.needs. Map API job names back to job ids carefully (matrix jobs have expanded names); when the mapping is ambiguous, do not fold. Keep the decision a pure function over (jobs, steps, parsed workflow) so it is unit-testable.
Activity
propr-dev commentedon Nov 19, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53726/claude-opus-5-5-ci-failure-comment-fold-a-20261119-0646-x8d3725-epic-0-9-0wsissue-3726-20261119-0646-claude-opus-5-5-x8d🔍 Track Task Execution
feat(ai): The PR no longer folds anything. A failed job that directly…
[3726 by Claude Opus 5.5] CI-failure comment: fold an aggregate job u…
feat(ai): I changed the wording only for F1. No code changed, and not…