fix(#7000): resolve role from harness config for status reconciliation - #7167
Conversation
The finalize step in action.yml passed the raw agent name (e.g., "grillme") as --role to reconcile-status. Custom agents that declare a different role in their harness config (e.g., role: review) caused mint 403 errors because the agent name is not an enrolled mint role. Thread the harness-resolved role through GITHUB_OUTPUT from fullsend run so the finalize step can use it. The action falls back to the agent name when the output is absent (backward compatibility with older CLI versions). Closes #7000
|
🤖 Finished Review · ❌ Failure (validation failed after 1 iteration(s)) · Started 2:47 PM UTC · Completed 2:49 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high |
|
🤖 Finished Review · ✅ Success · Started 3:03 PM UTC · Completed 3:22 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $6.03 |
|
Risk Assessment: moderate (2/5) DetailsRe-review: Tier 1 signals (file count, blast radius, zero protected paths, no dependency/CI changes, bot author) are unchanged from the prior assessment, and the only delta since that review is a same-logic reorder in run.go plus corresponding test-assertion updates - no new risk surface - so the prior moderate score of 2 is preserved, still weighted down from low by run.go and action.yml persistently high-churn, multi-author, high fix/revert-rate history. Previous runRisk Assessment: moderate (2/5) DetailsSmall, well-scoped bot-authored PR with no protected/security paths or CI/dependency changes that closes out a well-scoped production incident with a backward-compatible fallback, but internal/cli/run.go and action.yml are unusually high-churn, multi-author, high fix/revert-rate files with substantial coupling to files not touched in this PR, which keeps the composite at moderate rather than low. |
|
Looks good to me Previous runReviewFindingsHigh
Low
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 3:24 PM UTC · Completed 3:36 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $1.25 |
The role-emission block added a `role=<h.Role>` line to GITHUB_OUTPUT on every run, which broke three exact-match assertions in prescript_run_test.go that predate this change. Update those assertions to expect the new line, which also gives the new run.go code path patch coverage (the fixtures declare role: test, distinct from the "code" agent name, so the assertion proves h.Role, not the agent name, was relayed). Also move the role emission to immediately after the harness loads (where h.Role is already validated non-empty), instead of after the pre-script relay. This narrows the failure window called out in review: a validation step that aborts the run before the pre-script relay would previously leave GITHUB_OUTPUT without a role key, causing action.yml's finalize step to fall back to the raw agent name -- the original #7000 failure mode. Addresses review feedback on #7167
🔧 Fix agent — iteration 1 (bot-triggered)Fixed the High-severity test regression by updating three exact-match GITHUB_OUTPUT assertions to expect the new role=test line, which also supplies the missing patch coverage for the run.go role-emission path. Addressed the Low-severity design-completeness finding by moving role emission to immediately after harness load/validation, narrowing the window where an early failure would leave GITHUB_OUTPUT without a role key. Fixed (2):
Tests: passed Decision points
Next steps:
|
|
🤖 Review · ❌ Terminated · Started 3:38 PM UTC · Ended 3:53 PM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 3:38 PM UTC · Completed 3:53 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.46 |
|
🤖 Finished Retro · ✅ Success · Started 9:28 AM UTC · Completed 9:37 AM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $1.55 |
|
PR #7167 (fullsend-ai/fullsend) fixed mint 403 errors during status reconciliation for custom-role agents (e.g. The one rework driver — the code agent scoping its pre-PR test run too narrowly ('existing reconcile-status tests pass' rather than the whole Separately, the underlying bug class here (harness-declared No new proposals are being filed — the identified gaps are already covered by open issues (#492, #7140, #6563), and the review/fix cycle on this PR itself functioned correctly with no missed defects or false positives. |
Summary
grillme) that declare aroledifferent from their agent name in the harness configGITHUB_OUTPUTfromfullsend runso the finalize step inaction.ymlcan pass it toreconcile-status --roleChanges
internal/cli/run.go: After the pre-script relay, writeh.RoletoGITHUB_OUTPUTusing the existingwriteGitHubOutputhelper, gated onGITHUB_ACTIONS=trueaction.yml: Readsteps.run.outputs.roleasHARNESS_ROLEenv var in the finalize step; use${HARNESS_ROLE:-${AGENT}}for the--roleflaginternal/cli/reconcilestatus_test.go: Add test verifying a custom role (review) passes through to theMintRequestcorrectlyTest plan
TestNewReconcileStatusCmd_MintSuccess_CustomRoleverifies the custom role scenario from Mint status reconciliation should resolve role from harness config, not agent name #7000go buildandgo vetpass/fs-grillmeon a test PR inredhat-developer/rhdh-agenticand confirm no mint 403 errorCloses #7000
Post-script verification
agent/7000-reconcile-role-from-harness)34f2d076c5f6c3249c2e25467341ed5495518f13..HEAD)