Skip to content

fix(#1062): reference TARGET_REPO_DIR instead of undefined REPO_DIR - #1063

Merged
ralphbean merged 5 commits into
fullsend-ai:mainfrom
ggallen:worktree-fix-1062-repo-dir-env
Aug 27, 2026
Merged

fix(#1062): reference TARGET_REPO_DIR instead of undefined REPO_DIR#1063
ralphbean merged 5 commits into
fullsend-ai:mainfrom
ggallen:worktree-fix-1062-repo-dir-env

Conversation

@ggallen

@ggallen ggallen commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Harness YAML files (fix.yaml, code.yaml) now reference ${TARGET_REPO_DIR} (pass-through) instead of ${REPO_DIR} which production workflows never set
  • Eval script (run-fullsend.sh) emits TARGET_REPO_DIR instead of REPO_DIR to match the harness declaration
  • Updates stale comments that referenced the old variable name

Fixes #1062

Test plan

  • Trigger a /fs-fix on any repo using unpinned agents — env validation should pass (no more REPO_DIR is not set error)
  • Trigger a /fs-code on any repo — same validation pass
  • Run eval harness for fix agent — TARGET_REPO_DIR is emitted in the env file and resolves correctly

🤖 Generated with Claude Code

ggallen and others added 5 commits August 26, 2026 21:49
Throwaway experiment for fullsend-ai#469 review finding — will be
reverted immediately after observing results.

Signed-off-by: Greg Allen <gallen@redhat.com>
…s fork

Signed-off-by: Greg Allen <gallen@redhat.com>
Cleanup after verifying (fullsend-ai#469 review finding) that
removing then re-adding a label does fire a fresh labeled webhook event.

Signed-off-by: Greg Allen <gallen@redhat.com>
… REPO_DIR

Production workflows set TARGET_REPO_DIR via setup-agent-env.sh (stripping
the FIX_/CODE_ prefix). The harness YAML files introduced in fullsend-ai#1050
referenced ${REPO_DIR}, which is never set in production — only in the eval
script. Change the harness to pass-through ${TARGET_REPO_DIR} and update
the eval script to emit TARGET_REPO_DIR to match.

Closes fullsend-ai#1062

Signed-off-by: Greg Allen <gallen@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ggallen
ggallen requested a review from a team as a code owner August 27, 2026 01:51
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix target repository environment variable passthrough

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Pass TARGET_REPO_DIR through code and fix harness runner environments.
• Align eval-generated environment files with production variable naming.
• Prevent validation failures caused by the undefined REPO_DIR placeholder.
Diagram

graph TD
  A["Production setup"] --> B["TARGET_REPO_DIR"] --> C["Code harness"] --> E["Runner scripts"]
  F["Eval runner"] --> B
  B --> D["Fix harness"] --> E
Loading
High-Level Assessment

Using TARGET_REPO_DIR end-to-end is the optimal approach because production already defines that canonical variable. Retaining REPO_DIR or adding compatibility aliases would preserve an unnecessary second name and could hide future configuration mismatches.

Files changed (3) +6 / -6

Bug fix (3) +6 / -6
run-fullsend.shEmit the canonical target repository variable during evaluations +4/-4

Emit the canonical target repository variable during evaluations

• The eval environment file now writes 'TARGET_REPO_DIR' instead of 'REPO_DIR', matching production and the harness declarations. Related comments now describe the canonical variable name.

eval/scripts/run-fullsend.sh

code.yamlPass TARGET_REPO_DIR through the code harness +1/-1

Pass TARGET_REPO_DIR through the code harness

• The code agent runner environment now expands 'TARGET_REPO_DIR' from the identically named input rather than the undefined 'REPO_DIR' placeholder.

harness/code.yaml

fix.yamlPass TARGET_REPO_DIR through the fix harness +1/-1

Pass TARGET_REPO_DIR through the fix harness

• The fix agent runner environment now uses the production-defined 'TARGET_REPO_DIR' variable directly, preventing environment validation failures.

harness/fix.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (2)

Grey Divider


Action required

1. TARGET_REPO_DIR lacks regression test 📜 Skill insight ▣ Testability
Description
The PR changes the runtime environment contract used by both code and fix harnesses, but changes no
test file to verify that TARGET_REPO_DIR is emitted and resolves through each harness. A future
producer/consumer mismatch could therefore reintroduce the validation failure this PR fixes.
Code

eval/scripts/run-fullsend.sh[169]

+      emit_env "TARGET_REPO_DIR" "${TARGET_DIR}"
Relevance

●● Moderate

Behavioral contract changes are accepted, but no close precedent establishes mandatory regression
tests for this harness change.

PR-#1050
PR-#381

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance ID 1538339 requires every behavioral change to have a corresponding test change. These
three runtime contract lines changed while the PR diff contains no added or modified test file.

eval/scripts/run-fullsend.sh[169-169]
harness/code.yaml[70-70]
harness/fix.yaml[68-68]
Skill: code-implementation

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changed `TARGET_REPO_DIR` producer/consumer contract has no corresponding test change.

## Issue Context
Add a behavioral regression test that exercises the eval producer and both harness declarations, asserting that `TARGET_REPO_DIR` is emitted and passed through with the expected target repository path.

## Fix Focus Areas
- eval/scripts/run-fullsend.sh[169-169]
- harness/code.yaml[70-70]
- harness/fix.yaml[68-68]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Protected infrastructure paths modified 📜 Skill insight § Compliance
Description
This PR modifies harness/ and eval/scripts/, which are protected infrastructure paths requiring
explicit human review. Issue #1062 explains the changes, but the rule still prohibits automated
approval.
Code

harness/code.yaml[70]

+    TARGET_REPO_DIR: "${TARGET_REPO_DIR}"
Relevance

● Weak

Recent precedent rejected protected-path governance findings when the change itself was authorized
by the PR context.

PR-#631

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance ID 1538392 explicitly classifies harness/ and scripts/ as protected paths. The cited
changed lines show modifications under both protected path categories.

harness/code.yaml[70-70]
harness/fix.yaml[68-68]
eval/scripts/run-fullsend.sh[169-169]
Skill: pr-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR modifies protected infrastructure paths and therefore must not be auto-approved.

## Issue Context
The linked issue and PR description justify the edits, but Compliance ID 1538392 still requires human approval for changes under `harness/` and `scripts/`.

## Fix Focus Areas
- harness/code.yaml[70-70]
- harness/fix.yaml[68-68]
- eval/scripts/run-fullsend.sh[169-169]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. REPO_DIR comment changed alone 📘 Rule violation ⚙ Maintainability
Description
The comment at line 34 is changed in an isolated hunk without any functional code change on the same
or immediately adjacent lines. This violates the rule against standalone comment edits even though a
related environment-variable change occurs elsewhere in the file.
Code

eval/scripts/run-fullsend.sh[34]

+# TARGET_REPO_DIR=${GITHUB_WORKSPACE}/target-repo for post-scripts.
Relevance

● Weak

Recent precedent rejected an identical standalone comment-only finding in run-fullsend.sh.

PR-#631

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance ID 1540690 prohibits comment-only modifications when the associated surrounding code
remains unchanged. The cited hunk changes only the comment at line 34; neighboring lines are context
and contain no functional modification.

Rule 1540690: Do not change comments on lines without functional code changes in a diff
eval/scripts/run-fullsend.sh[34-34]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
An isolated comment was renamed without an adjacent functional code change.

## Issue Context
Compliance ID 1540690 permits comment updates only when paired with the functional code they document on the same or immediately adjacent lines, unless the block is structurally refactored.

## Fix Focus Areas
- eval/scripts/run-fullsend.sh[34-34]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 56 rules
✅ Skills: 4 invoked
  code-review
  code-implementation
  pr-review
  docs-review
Review mode: ⚖️ Balanced

Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread eval/scripts/run-fullsend.sh
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 27, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:53 AM UTC · Completed 2:05 AM UTC

Commit: 15405a1 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.04

@ralphbean
ralphbean enabled auto-merge August 27, 2026 01:54
@ralphbean
ralphbean added this pull request to the merge queue Aug 27, 2026
Merged via the queue into fullsend-ai:main with commit 19f8eab Aug 27, 2026
40 checks passed
@fullsend-ai-retro

fullsend-ai-retro Bot commented Aug 27, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 2:04 AM UTC · Completed 2:12 AM UTC

Commit: 15405a1 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.25

@fullsend-ai-review

Copy link
Copy Markdown

Review skipped — this PR is already merged.

The /fs-review command only reviews open PRs/MRs.

Posted by fullsend post-review check

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #1063 — fix(#1062): reference TARGET_REPO_DIR instead of undefined REPO_DIR

Timeline: Ralph Bean filed #1062 at 01:43 UTC on 2026-08-27, reporting a critical production outage: all fix and code agent runs failed immediately after PR #1050 merged. The harness files referenced ${REPO_DIR}, which production workflows never set — they set TARGET_REPO_DIR. The triage agent correctly identified the severity as critical, documented the exact three-file fix, and noted the bootstrap problem: the code agent depends on harness/code.yaml to launch, so it cannot fix its own harness file. As predicted, /fs-code failed. Greg Allen authored PR #1063 manually — a surgical 6-line rename across 3 files — and it was approved and merged within 11 minutes.

What went well:

Root cause in PR #1050: The code agent added TARGET_REPO_DIR: "${REPO_DIR}" to harness env.runner blocks — using REPO_DIR instead of the production-canonical TARGET_REPO_DIR. The review agent reviewed PR #1050 three times (~$10.27 total) without catching this naming mismatch. After a fix agent patched the eval script to emit REPO_DIR, CI passed, but production still broke because production sets TARGET_REPO_DIR, not REPO_DIR. Total agent cost for the #1050 + #1063 saga: ~$18.73 for what should have been a correct 3-line change.

Evidence for existing issues:

  • #1061 (CI test for harness env var / eval sync): This incident is exactly the scenario CI test: validate harness env var references resolve in eval scripts #1061 proposes to prevent — the initial missing emit_env call would have been caught.
  • #788 (Review agent should flag missing eval coverage when agent behavior files change): The review agent did not flag the eval script gap when harness env.runner blocks were modified.
  • #763 (Review correctness sub-agent should validate harness config field values): The review agent did not validate that the ${REPO_DIR} reference was semantically correct.

Proposals filed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Production workflows broken: harness env references undefined REPO_DIR instead of TARGET_REPO_DIR

2 participants