Repository navigation
Description
Today the only thing that keeps a script's env var reads in line with its harness is PR review. When review misses one, the fix we reach for is more review: the retro agent files "the review agent should flag X", and X goes into prompt prose. I'd like to move this check into a linter that gives the same answer every time.
To be clear up front: the tool I want to use for it is ripwire, which is my project (redhat-et/ripwire). I think it fits here, but I should not be the only judge of that.
Who guards this today?
Review, and the record shows it is a leaky gate.
- Review agent should flag key-value name mismatches in harness env pass-through entries #1064: fix(#999): provide TARGET_REPO_DIR to validation loop for Signed-off-by check #1050 wired
TARGET_REPO_DIRto${REPO_DIR}inenv.runner. The review agent reviewed it three times (about $10) and did not flag it. The retro's fix asks the review agent to catch it next time. - Review skill/harness does not consume the REVIEW_SPEC_HIERARCHY env var it defines #1254: the review harness defines
REVIEW_SPEC_HIERARCHYand nothing reads it. - Review correctness sub-agent should validate harness config field values, not just file existence #763 and Review correctness sub-agent should include common shell script pitfall checks #131: more retro asks for the review agent to check harness values and shell pitfalls.
- Fix copy-paste variable bug in post-scribe.sh new issues confidence gate #83: review did catch a wrong variable in
post-scribe.sh. The PR merged 20 minutes later anyway. - CI test: validate harness env var references resolve in eval scripts #1061 and Add eval config linter rule validating env-var sections against runner contract #539: the retro agent itself asks for a CI test of env var references against the runner contract. Both have been open since August.
- harness/triage.yaml has stale /tmp/workspace/ dest paths; env vars never reach sandbox #1: env vars never reached the triage sandbox, so triage produced no output. That one escaped to run time.
Not every one of these is something a Bash read check would catch. #1064 is a YAML naming mismatch and #1 was a bad path. They show the same pattern, though: the harness to script contract has no gate, so review carries it and sometimes drops it.
What would the linter check?
Both directions of the contract, for every pre_script and post_script:
- A script reads a var its harness does not supply and the script does not set. That is a run time failure waiting to happen.
- A harness supplies a var no script or skill reads (Review skill/harness does not consume the REVIEW_SPEC_HIERARCHY env var it defines #1254).
ripwire gives the script side: ripwire --flags --json lists every Bash env var read with its form (required ${X:?}, with a default ${X:-y}, plain, and a few others) and where each var is written. It has no runtime dependencies. The harness side is env.runner, plus the sandbox env schema from fullsend-ai/fullsend#8679 for the sandbox.
What does it see on main?
I ran ripwire 0.7.0 on agents main at d33dcfa (2026-11-30) and matched each pre and post script (the .src.sh source plus the libs it sources) against its harness with a quick script.
- 308 vars read across the 16 pre and post scripts. 33 reads are not named in their harness and not set in the script.
- Many of those are false alarms from my matching. For example,
REPOinpre-review.src.shis most likely set byforge_parse_pr_url. - Some are by design.
RETRO_JIRA_PROJECTis not inretro.yamlbecause operators supply it through abase:overlay (seedocs/retro.md). So the linter needs a way to declare optional, operator supplied vars, or it will be noise. - ripwire skips the 16 generated
.shfiles, so the check runs on.src.shandlib/.
So it needs tuning before it can block anything, which is why I'm proposing advisory first.
What am I proposing?
- An advisory CI job on PRs that touch
scripts/,skills/orharness/. It comments on new findings only. - Pin the ripwire version and checksum.
- Make it required only after main is clean and false alarms are rare.
- Close CI test: validate harness env var references resolve in eval scripts #1061 and Add eval config linter rule validating env-var sections against runner contract #539 with it, and point the review agent asks (Review agent should flag key-value name mismatches in harness env pass-through entries #1064, Review correctness sub-agent should validate harness config field values, not just file existence #763) at the linter instead of more prose.
#1994 (from #350) adds scripts/harness-config-lint-test.sh for harness structural invariants. The env contract could be one more assertion there instead of a separate job. @tgeagle081, would you rather it go in #1994, or stay separate?
What if we don't want another binary in CI?
Extend the grep approach from #1665 to the pre and post scripts. It is less precise (no read forms, no write tracking), but it adds no new dependency.
Part of #2216. Related: #1665, #1738.
Is an advisory job worth a two week trial?
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
fullsend-ai-triage commentedon Nov 30, 2026
🤖 Finished Triage · ✅ Success · Started 4:43 PM UTC · Completed 4:45 PM UTC
Commit:
d33dcfa· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.15
fullsend-ai-triage commentedon Nov 30, 2026
Triage notes for maintainers:
Decisions needed before implementation (not questions for the reporter):
Scope and tuning: The reporter's trial shows 33 unmatched reads of 308, with known false-positive classes (vars set by sourced lib functions) and by-design operator-supplied vars. An allowlist/declaration mechanism and handling of
.src.shplusscripts/lib(not the generated.sh) are needed for the check to be usable. Related open work: #1738, #1061, #539 (could be closed by this), #1064.Workflow changes required: This needs a new or modified CI job under
.github/workflows/. The code agent cannot modify workflow files under current permissions, so a human PR or maintainer action is required; auto-dispatch is skipped.Proposed test case:
No open PR currently addresses this issue.
Labels: This is a request for new CI capability rather than a defect, which matches the repository's enhancement label (New feature or request).
Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidance