feat: per-workflow/per-step CI diagnostics in agent fix prompts (implements #1050) #1051
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#1051
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Implement per-workflow/per-step CI-failure diagnostics in the agent's CI-fix prompt builder, so agents can diagnose and fix multi-workflow failures instead of burning their fix budget on the wrong thing.
Fixes the gap documented in bug report #1050. Full diagnosis, root-cause analysis, and fix sketch live there.
The change (summary — see #1050 for evidence and rationale)
In
lib/pr-lifecycle.shCI-failure block (~line 431-459):pipeline.workflows[]— for each workflow withstate == "failure", collect its failedchildren[](the actual failing step).GET /api/repos/{id}/logs/{pipeline_num}/{step_id}viawoodpecker_apiand tail 50 lines from just that step (not the pipeline-combined stream).ci_get_step_logs <pipeline_num> <step_id>helper inlib/ci-helpers.shthat does step-scoped log fetch (mirroring the existingci_get_logspattern).Optional follow-up (separate issue if substantial):
.disinto/ci-flakes.ymlallowlist for known-flakyworkflow:steppairs so the agent skips them in the "must fix" section. Current known flake:smoke-init:smoke-init(mock-Forgejo branch-index retry exhausts on PR builds — see evidence in #1050).Acceptance criteria
ci_get_step_logs <pipeline_num> <step_id>helper added tolib/ci-helpers.shwith doc comment matching the style ofci_get_logs.shellcheckclean.Affected files
lib/pr-lifecycle.sh— CI-failure prompt builder (~lines 431-459)lib/ci-helpers.sh— addci_get_step_logshelperlib/ci-helpers.sh:ci_commit_status— no change expected; mentioned so the agent doesn't trip over the error→failure mapping and think it needs changingRelated
Blocked — issue #1051
ci_exhausted_poll (3 attempts, PR #1052)2026-04-19T18:39:49Z