fix(dispatch): pass pr-head-sha to action.yml in harness-run job - #5573
Conversation
PR Summary by QodoFix harness-run dispatch to pass PR head SHA into composite action
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
|
🤖 Review · |
Site previewPreview: https://7ae32f89-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The harness-run job — which runs custom third-party agents registered via .fullsend/config.yaml — was not included in the #5274 fix that threaded pr-head-sha through to the five stage jobs (triage, code, review, fix, retro). Without it, comment-triggered custom harness agents fall through to the GITHUB_SHA fallback and operate on the wrong commit. Extract .pull_request.head.sha from matrix.event_payload (which the Go harnessdispatch package already populates correctly via a real API lookup) and pass it as pr-head-sha to the composite action, mirroring the existing stage jobs. Extend TestReusableDispatchPRHeadSHAPassthrough to cover harness-run alongside the five stage jobs. Closes #5329 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
9220b47 to
49cb559
Compare
|
🤖 Finished Review · ✅ Success · Started 3:13 PM UTC · Completed 3:24 PM UTC |
ReviewFindingsMedium
Labels: PR fixes a dispatch bug in the harness-run job's SHA passthrough |
|
🤖 Finished Retro · ✅ Success · Started 12:51 PM UTC · Completed 1:04 PM UTC Commit: |
Retro: PR #5573 —
|
Summary
pr-head-shafrommatrix.event_payloadthrough toaction.ymlin theharness-runjob, mirroring the fix fix(dispatch): resolve PR head SHA for issue_comment events #5274 applied to the five stage jobs (triage, code, review, fix, retro)GITHUB_SHAand operate on the wrong commitTestReusableDispatchPRHeadSHAPassthroughto coverharness-runalongside the five stage jobsRoot cause
harness-run's "Run harness agent" step was omitted from #5274. It passes neither the explicitpr-head-shainput nor a wrappedevent_payloadtoaction.yml, so the SHA resolution falls through to tier 3 (GITHUB_SHA) — the config-repo checkout SHA instead of the PR's actual head.The fix
The Go
harnessdispatchpackage already populatesmatrix.event_payloadwith the correct SHA via a real API lookup (opts.Forge.GetPullRequestInfo). This PR simply extracts it and passes it through:Test plan
TestReusableDispatchPRHeadSHAPassthroughnow includesharness-runsubtest — passesinternal/scaffoldtest suite passesmake lintcleanCloses #5329