refactor(harness): migrate triage to env.runner/env.sandbox (ADR 0055)#2763
Conversation
Replace runner_env with env.runner and forge.github.runner_env with forge.github.env.runner in the triage harness template. Migrate the passthrough vars from triage.env (host_files) to forge.github.env.sandbox, eliminating the need for the .env host file. - triage.yaml: runner_env → env.runner, forge runner_env → forge env.runner/sandbox - Delete env/triage.env (pure passthrough, now in env.sandbox) - Update scaffold and harness tests to check both legacy RunnerEnv and new Env.Runner Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
PR Summary by QodoMigrate triage harness env to env.runner/env.sandbox (ADR 0055)
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Site previewPreview: https://6a771dd5-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ❌ Failure · Started 6:12 PM UTC · Completed 6:25 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. Missing sandbox vars locally
|
| env: | ||
| runner: | ||
| GITHUB_ISSUE_URL: ${GITHUB_ISSUE_URL} | ||
| GH_TOKEN: ${GH_TOKEN} | ||
| sandbox: | ||
| GITHUB_ISSUE_URL: "${GITHUB_ISSUE_URL}" | ||
| GH_TOKEN: "${GH_TOKEN}" |
There was a problem hiding this comment.
1. Missing sandbox vars locally 🐞 Bug ≡ Correctness
In triage.yaml, GITHUB_ISSUE_URL and GH_TOKEN are now only provided via forge.github.env.sandbox, so when fullsend run triage is executed outside CI without --forge github, ResolveForge is skipped and the sandbox will not receive these required variables. The triage agent inside the sandbox relies on GITHUB_ISSUE_URL (and GH auth) for gh issue view, so the run will fail despite the host env-file being loaded.
Agent Prompt
### Issue description
`internal/scaffold/fullsend-repo/harness/triage.yaml` now injects `GITHUB_ISSUE_URL` and `GH_TOKEN` into the sandbox only via `forge.github.env.sandbox`. When `fullsend run` is executed outside CI and the user does not pass `--forge github`, `detectForgePlatform()` returns an empty string and `ResolveForge()` becomes a no-op, so these sandbox vars are never merged and the triage agent cannot run.
### Issue Context
- Outside CI, `detectForgePlatform()` returns `""` unless `--forge` is explicitly set.
- The sandbox environment only gets runtime exports (e.g., `CLAUDE_CONFIG_DIR`), `.env.d` sourced files, and `env.sandbox` exports.
- The triage agent prompt uses `GITHUB_ISSUE_URL` inside the sandbox.
### Fix Focus Areas
- internal/scaffold/fullsend-repo/harness/triage.yaml[31-47]
### Implementation guidance
Choose one (prefer #1 for backwards-compatible local runs):
1) Add top-level `env.sandbox` passthroughs for `GITHUB_ISSUE_URL` and `GH_TOKEN` (and optionally top-level `env.runner` for the same keys) so the sandbox receives them even when forge is not resolved.
2) Alternatively, if triage is intended to be forge-required, update the local-run docs to require `--forge github` (but this keeps the harness fragile for ad-hoc local runs).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
ReviewFindingsLow
Labels: PR migrates triage harness YAML schema from runner_env to env.runner/env.sandbox, touching harness config and tests. |
|
🤖 Finished Retro · ✅ Success · Started 11:59 AM UTC · Completed 12:09 PM UTC |
Retro: PR #2763 — migrate triage to env.runner/env.sandboxTimeline:
Observations:
No new proposals filed — all improvement opportunities are already tracked by existing open issues. The 422 regression (#2569) is the most impactful; this PR provides another concrete reproduction case. |
Summary
runner_envwithenv.runner(top-level and forge.github)triage.envpassthroughs toforge.github.env.sandbox, delete the.envfilePhase 2 of ADR 0055 (#2582).
Test plan
go test ./internal/harness/passesgo test ./internal/scaffold/passes🤖 Generated with Claude Code