Skip to content

review-gate: settings-example-sync.test.sh asserts nothing and reports success when the root template is absent (|| exit 0 inside an eval ends the suite) #1507

Description

@bmethod

Summary

review-gate/tests/settings-example-sync.test.sh silently asserts NOTHING in any consumer that
lacks .agents/vstack.settings.toml.example. It produces zero output and exits 0, so it counts as
a passing suite while all 17 of its REVIEW_GATE key-presence and default-drift comparisons never
run.

Cause

The suite resolves ROOT_TEMPLATE to .agents/vstack.settings.toml.example and guards its checks
with:

[ -f "$ROOT_TEMPLATE" ] || exit 0

That guard is run through eval in the CURRENT shell, so the exit 0 terminates the whole SUITE
rather than skipping the one check it guards. The intent is clearly "skip this comparison when the
template is absent"; the effect is "end the run, report success".

Evidence

$ bash .agents/skills/review-gate/tests/settings-example-sync.test.sh
$ echo $?
0

Zero bytes of output. It is the only one of review-gate's nine tracked *.test.sh suites that
prints nothing — every sibling emits a pass summary, and the smallest of them still emits 25 bytes.
A consuming repo wiring the suites into CI therefore counts it inside "9 suite(s) passed".

Why this matters beyond the one suite

The || exit 0-inside-eval shape makes a suite vacuous rather than skipped, and it is invisible to
both of the usual detectors: it is not a tool-availability skip (no skip line is printed) and
not uid-dependent. A consumer can only find it by noticing the suite produced no output at all.

Suggested fix

Make the guard skip its own check rather than the process — e.g. wrap the comparison in an if [ -f "$ROOT_TEMPLATE" ]; then … else echo " skip root template absent"; fi, matching the
uniform reasoned skip line the other suites already print at every skip site. That also makes the
condition visible to consumers that gate on skips.

Repro

Run the suite in any checkout without .agents/vstack.settings.toml.example.

Metadata

Metadata

Labels

ci-infraCI, review gates, runners, and repo tooling

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions