What happened
PR #540 tried to add flapping detection guidance to skills/retro-analysis/SKILL.md. A core challenge was correlating dispatch-repo workflow runs to source-repo PRs and commits. Over rounds 1–6, the section built increasingly complex workarounds: timestamp-based heuristics, branch-name grep matching, and cross-repo PR lookups. Each approach introduced edge cases that the reviewer flagged, requiring further fixes. In round 7, the reviewer discovered that dispatch-repo run logs contain event_payload JSON with pull_request.head.sha and pull_request.number directly — a straightforward mapping that eliminated the need for all the correlation workarounds. This single discovery invalidated the entire approach the section had been iterating on for 18 days.
What could go better
The retro-analysis skill's existing "Reading agent logs and artifacts" section documents how to view job outcomes, search logs for errors, and download artifacts — but it does not mention event_payload as a data source for mapping dispatch-repo runs to source-repo PRs and commits. If this correlation method had been documented in the skill, the PR author (and future agents or humans writing skill guidance) would have known about it upfront and could have avoided building fragile timestamp-based workarounds. Confidence: high — the event_payload discovery was the direct trigger for closing the PR and rewriting at a higher altitude. The successor PR #834 incorporates this insight in its flapping-detection section, but the general workflow-tracing guidance in the skill would also benefit.
Proposed change
Add a run-correlation entry to the "Reading agent logs and artifacts" section in skills/retro-analysis/SKILL.md. After the existing code blocks for viewing job outcomes and searching for errors, add a block documenting that dispatch-repo run logs contain event_payload JSON with fields like pull_request.head.sha, pull_request.number, and pull_request.base.ref, and that these provide direct run-to-PR/commit mapping without timestamp heuristics. Include a brief gh run view <RUN_ID> --repo "$DISPATCH_REPO" --log 2>&1 | grep -o 'event_payload.*' example. This is complementary to PR #834 which adds event_payload usage only within the new flapping-detection section — this proposal covers the general tracing guidance used by all retro tasks.
Validation criteria
The next 3 retro agent runs that need to correlate dispatch-repo runs to source-repo PRs should use event_payload directly rather than building timestamp-based or branch-name-grep workarounds. Any future skill PRs adding run-correlation logic should reference event_payload as the primary method.
Generated by retro agent from #540
What happened
PR #540 tried to add flapping detection guidance to
skills/retro-analysis/SKILL.md. A core challenge was correlating dispatch-repo workflow runs to source-repo PRs and commits. Over rounds 1–6, the section built increasingly complex workarounds: timestamp-based heuristics, branch-name grep matching, and cross-repo PR lookups. Each approach introduced edge cases that the reviewer flagged, requiring further fixes. In round 7, the reviewer discovered that dispatch-repo run logs containevent_payloadJSON withpull_request.head.shaandpull_request.numberdirectly — a straightforward mapping that eliminated the need for all the correlation workarounds. This single discovery invalidated the entire approach the section had been iterating on for 18 days.What could go better
The retro-analysis skill's existing "Reading agent logs and artifacts" section documents how to view job outcomes, search logs for errors, and download artifacts — but it does not mention
event_payloadas a data source for mapping dispatch-repo runs to source-repo PRs and commits. If this correlation method had been documented in the skill, the PR author (and future agents or humans writing skill guidance) would have known about it upfront and could have avoided building fragile timestamp-based workarounds. Confidence: high — theevent_payloaddiscovery was the direct trigger for closing the PR and rewriting at a higher altitude. The successor PR #834 incorporates this insight in its flapping-detection section, but the general workflow-tracing guidance in the skill would also benefit.Proposed change
Add a run-correlation entry to the "Reading agent logs and artifacts" section in
skills/retro-analysis/SKILL.md. After the existing code blocks for viewing job outcomes and searching for errors, add a block documenting that dispatch-repo run logs containevent_payloadJSON with fields likepull_request.head.sha,pull_request.number, andpull_request.base.ref, and that these provide direct run-to-PR/commit mapping without timestamp heuristics. Include a briefgh run view <RUN_ID> --repo "$DISPATCH_REPO" --log 2>&1 | grep -o 'event_payload.*'example. This is complementary to PR #834 which adds event_payload usage only within the new flapping-detection section — this proposal covers the general tracing guidance used by all retro tasks.Validation criteria
The next 3 retro agent runs that need to correlate dispatch-repo runs to source-repo PRs should use event_payload directly rather than building timestamp-based or branch-name-grep workarounds. Any future skill PRs adding run-correlation logic should reference event_payload as the primary method.
Generated by retro agent from #540