refactor(harness): migrate prioritize agent to env.runner/env.sandbox (ADR 0055)#2759
Conversation
… (ADR 0055) Replace deprecated runner_env with the unified env schema for the prioritize harness. Move sandbox env vars from the prioritize.env host file into forge.github.env.sandbox and delete the now-unused env file. Update tests to check both legacy RunnerEnv and new Env.Runner maps, keeping backward compatibility with agents that haven't migrated yet. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
PR Summary by Qodorefactor(harness): migrate prioritize to env.runner/env.sandbox (ADR 0055)
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Site previewPreview: https://e194f8fe-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 6:03 PM UTC · Completed 6:15 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Code Review by Qodo
1. Forge-only sandbox env
|
|
Looks good to me — clean mechanical migration of the prioritize harness from deprecated FindingsLow
Labels: PR modifies harness config and scaffold templates specifically for the prioritize agent's env migration. |
| assert.NotEmpty(t, h.PreScript, "PreScript should be set after forge resolution") | ||
| assert.NotEmpty(t, h.PostScript, "PostScript should be set after forge resolution") | ||
| assert.NotEmpty(t, h.RunnerEnv, "RunnerEnv should be non-empty after merge") | ||
| hasRunnerEnv := len(h.RunnerEnv) > 0 || (h.Env != nil && len(h.Env.Runner) > 0) |
There was a problem hiding this comment.
[low] test-assertion-consistency
The boolean variable + assert.True pattern for checking env presence differs from the established assert.NotEmpty/assert.Contains patterns elsewhere. Functionally correct for backward compatibility but inconsistent with test conventions. Same pattern at internal/scaffold/scaffold_test.go:635.
| @@ -333,11 +334,22 @@ func TestResolveForge_ScaffoldRunnerEnvMerge(t *testing.T) { | |||
| h, loadErr := LoadWithOpts(path, LoadOpts{ForgePlatform: "github"}) | |||
| require.NoError(t, loadErr) | |||
There was a problem hiding this comment.
[low] test adequacy
The combined-map assertion pattern in TestResolveForge_ScaffoldRunnerEnvMerge masks which field (RunnerEnv vs Env.Runner) each key lands in after forge resolution. Acceptable during migration since other tests verify field placement directly. Same pattern at internal/scaffold/scaffold_test.go:703.
|
🤖 Finished Retro · ✅ Success · Started 11:59 AM UTC · Completed 12:05 PM UTC |
Retro: PR #2759 — Migrate prioritize agent to env.runner/env.sandboxVerdict: Clean workflow, no new proposals. This was a human-authored refactoring PR (ralphbean, assisted by Claude Opus 4.6) that migrated the prioritize harness from deprecated What went well
Points of interest
No new proposals filed — all improvement opportunities identified are already tracked in existing open issues. |
Migrate prioritize harness from deprecated runner_env to env.runner/env.sandbox per ADR 0055. Move sandbox env vars from prioritize.env host file into forge.github.env.sandbox. Delete the now-unused env file. Update tests for backward compatibility.