Skip to content

gates: close the three weak spots of the v0.46.0 potency audit (#333) - #336

Merged
avrabe merged 1 commit into
mainfrom
fix/gate-weak-spots-333
Nov 7, 2026
Merged

avrabe merged 1 commit into
mainfrom
fix/gate-weak-spots-333

Conversation

@avrabe

@avrabe avrabe commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #333, the three weak spots the gate-potency audit found before v0.46.0.

None of the three was inert, and none bore on a verified claim. Each is now negative-controlled: the injected fault passes the old gate and fails the new one.

The fixes

Gate Weak spot Fix Old gate on the fault New gate on the fault
tools/systest/install-shadow.sh (REQ-INSTALLSHADOW-001) It ran check_shadow only through the check-only hook, so it never proved the installer calls it. A second layer runs install.sh's normal path, with --version v9.9.9, against a fake curl that serves a local archive and its sums. It asserts the shadow warning in the installer's own output, and the quiet case when the install wins PATH. check_shadow at install.sh:304 replaced with :: exit 0 exit 1
pr_gates_cannot_be_switched_off (REQ-SYSTEST-001) It flagged only if: lines containing vars.. An allowlist of the four if: conditions in use replaces the denylist. Inline fixtures make the negative control permanent: vars., github.repository and github.actor switches are flagged at job and step level, and every allowed form passes. github.repository == 'x/y' && prepended to ci.yml:83: exit 0 exit 101
tools/trace-gate.py A draft verification with steps: [] counted as evidence. An edge counts only from a non-draft verification that names at least one step. steps may be a string or a list. tools/test_trace_gate.py, 8 cases, run against the old rule: 5 fail 8 pass

One judgement call in the trace-gate rule

inspection and review verifications count without steps. Two inspection records, VER-LAYERREPO-001 and VER-CRATEPAYLOAD-001, record published facts about other repositories that this repository's CI cannot run, and one of them says so in its own text. Requiring a step there would force an invented one.

With this rule, no verified requirement changes status. Without the exemption, REQ-LAYERREPO-001 would fail. The first draft of the rule also wrongly rejected string-valued steps, which nine records use, and that would have failed REQ-MUTANTDEBT-001.

Local gates, rebased on 09330c6

  • cargo fmt --check: OK.
  • clippy with -D warnings: clean.
  • Workspace tests: 1980 passed, 0 failed.
  • tools unittest: OK, including the 8 new trace-gate cases.
  • rivet validate: PASS.
  • rivet check verification-evidence, trace-gate, claim-check, tracepack-check and review-check all exit 0.
  • install-shadow.sh: exit 0.
  • shellcheck 0.11.0, the version CI pins, with -S warning over the tracked scripts: clean.
  • Python 3.9 floor check on the two Python files: 0 findings.

🤖 Generated with Claude Code

https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu

install-shadow: also run install.sh's normal path against a fake curl and
assert the shadow warning in the installer's own output. Replacing the call
site at install.sh:304 with `:` left the old gate at exit 0; it now exits 1.

pr_gates_cannot_be_switched_off: an allowlist of the four `if:` conditions in
use replaces the `vars.` denylist. Prepending `github.repository == 'x/y' &&`
to a required job's `if:` passed the old scanner (exit 0) and fails the new
one (exit 101). Inline fixtures keep that negative control permanent.

trace-gate: a `verifies` edge counts only from a non-draft verification that
names at least one step (string or list). An `inspection` or `review` counts
without steps: VER-LAYERREPO-001 and VER-CRATEPAYLOAD-001 record published
facts about other repositories that this repository's CI cannot run, and
requiring a step would force an invented one. No verified requirement changes
status. tools/test_trace_gate.py holds 8 cases; with the old rule 5 fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
@avrabe
avrabe merged commit 44701d7 into main Nov 7, 2026
47 checks passed
@avrabe
avrabe deleted the fix/gate-weak-spots-333 branch November 7, 2026 17:08
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.

Gate potency at v0.46.0: three gates weaker than they look (install-shadow call site, PR-gate switch scanner, trace-gate empty evidence)

1 participant