refactor(harness): migrate review agent to env.runner/env.sandbox (ADR 0055)#2758
Conversation
PR Summary by QodoMigrate review harness to env.runner/env.sandbox (ADR 0055)
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Site previewPreview: https://2143fe08-site.fullsend-ai.workers.dev Commit: |
|
🤖 Review · ❌ Terminated · Started 5:58 PM UTC · Ended 6:21 PM UTC |
Code Review by Qodo
1. Unset threshold fails validation
|
| env: | ||
| runner: | ||
| FULLSEND_OUTPUT_SCHEMA: ${FULLSEND_DIR}/schemas/review-result.schema.json | ||
| sandbox: | ||
| PRIOR_REVIEW_SHA: "${PRIOR_REVIEW_SHA}" | ||
| PRIOR_REVIEW_PROVENANCE: "${PRIOR_REVIEW_PROVENANCE}" | ||
| REVIEW_FINDING_SEVERITY_THRESHOLD: "${REVIEW_FINDING_SEVERITY_THRESHOLD}" |
There was a problem hiding this comment.
2. Unset threshold fails validation 🐞 Bug ☼ Reliability
internal/scaffold/fullsend-repo/harness/review.yaml now references
${REVIEW_FINDING_SEVERITY_THRESHOLD} in env.sandbox, and fullsend run validates that every
${VAR} reference exists in the host environment. The reusable review workflow does not define
REVIEW_FINDING_SEVERITY_THRESHOLD, so the review job can fail early with an environment validation
error.
Agent Prompt
## Issue description
`fullsend run` calls `Harness.ValidateRunnerEnvWith(os.LookupEnv)` which errors when any `${VAR}` reference in `env.runner`/`env.sandbox` is *unset* (missing from the environment, even if conceptually optional).
This PR introduces `env.sandbox.REVIEW_FINDING_SEVERITY_THRESHOLD: "${REVIEW_FINDING_SEVERITY_THRESHOLD}"` but the reusable workflow that runs the review agent does not define `REVIEW_FINDING_SEVERITY_THRESHOLD` at all, so the workflow can fail before running pre_script/agent.
## Issue Context
`REVIEW_FINDING_SEVERITY_THRESHOLD` is documented as optional (empty/unset should behave like `low`), but the runner’s validation requires the host variable to exist if referenced.
## Fix Focus Areas
- .github/workflows/reusable-review.yml[167-177]
- internal/scaffold/fullsend-repo/harness/review.yaml[37-43]
## Suggested fix
Add `REVIEW_FINDING_SEVERITY_THRESHOLD` to the reusable workflow env for the “Run review agent” step, setting it to an empty string by default (or to a repo/org variable), e.g.:
```yaml
env:
...
REVIEW_FINDING_SEVERITY_THRESHOLD: ${{ vars.REVIEW_FINDING_SEVERITY_THRESHOLD }}
```
This ensures the variable is always present (possibly empty), satisfying validation while preserving optional behavior.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
🤖 Finished Review · ❌ Failure · Started 5:58 PM UTC · Completed 6:20 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 6:54 PM UTC · Completed 7:07 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me Previous runReviewFindingsMedium
Low
Labels: PR modifies review agent harness YAML config and scaffold integration tests for env var delivery migration. Previous runLooks good to me Previous run (2)ReviewFindingsMedium
Low
Labels: PR modifies review agent harness YAML config and scaffold integration tests for env var delivery migration. |
3ab61da to
6297ef7
Compare
|
🤖 Finished Review · ✅ Success · Started 7:40 PM UTC · Completed 7:52 PM UTC |
…R 0055) Replace deprecated runner_env with env.runner and migrate sandbox environment variables from the host_files-based review.env to env.sandbox in the harness YAML. - Top-level runner_env → env.runner (FULLSEND_OUTPUT_SCHEMA) - forge.github.runner_env → forge.github.env.runner (REVIEW_TOKEN, etc.) - Generic sandbox vars (PRIOR_REVIEW_SHA, PRIOR_REVIEW_PROVENANCE, REVIEW_FINDING_SEVERITY_THRESHOLD) → env.sandbox - GitHub-specific sandbox vars (GITHUB_PR_URL, GH_TOKEN, PR_NUMBER, REPO_FULL_NAME) → forge.github.env.sandbox - Delete env/review.env and remove its host_files entry - Update scaffold integration tests to accept both RunnerEnv and Env.Runner after forge resolution Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
f00aab7 to
ee28d40
Compare
|
🤖 Finished Review · ✅ Success · Started 12:34 PM UTC · Completed 12:44 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 3:04 PM UTC · Completed 3:14 PM UTC |
Retro: PR #2758 — migrate review agent to env.runner/env.sandbox (ADR 0055)Timeline
Key findings
Proposals
Proposals filed
|
Migrates review agent harness from deprecated runner_env to unified env.runner/env.sandbox schema per ADR 0055. Moves sandbox env vars from env/review.env host_files into declarative env.sandbox sections. Updates scaffold integration tests.