Skip to content

CI: list every gate with a failure proof; first negative controls (Part of #7155) - #7159

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
feat/gate-controls
Oct 30, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
feat/gate-controls

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7155

Problem

A green gate only means something if it can go red. CodeQL read "No new alerts" on every PR while its analysis held no results (#7153), and nothing noticed, because no test ever asked it to fail. We had no list of what each gate claims to catch, or which gates have ever been shown to fail.

What this does

  • tests/tools/gate_controls.py lists every check that can hold a PR: what it claims to catch, the test that proves it can fail, and what it can still miss. That's 35 checks across the PR workflows. Run it to print the unproven ones.
  • tests/tools/test_gate_controls.py keeps the list honest. It fails if a PR workflow is missing from the list, a required check is missing, a named proof no longer exists, or the unproven count changes. The count (21) may only go down, and lowering it is forced when a gate gets a proof.
  • Adds three negative controls for gaps in required gates:
    • ruff-audit on a planted unused import, using real ruff, so a broken runner or parser can't pass unnoticed
    • ruff-audit failing on format alone, which had no test
    • mypy-audit failing on a new error, and passing the same error once baselined, which had no test
  • Fixes docs/ci.md: it said ci-gate wasn't in the ruleset yet. It is.

Do the controls fail when a gate is broken?

Yes. I temporarily made both run_ci_check() functions return 0: all 3 controls went red. With the code restored, all 8 tests pass. That sabotage isn't in this PR.

What this doesn't prove

  • A proof covers the gate's logic, not the workflow around it. The job's shell, skip paths and reach belong to the weekly control PR (part 2 of Pipeline controls: planted defects prove each gate can still go red #7155).
  • proof entries come from a read-only audit. The test checks that each named test exists, not that it's a good control. That audit got ruff-audit wrong (it missed test_ci_check_end_to_end), so treat the rest as a starting point.
  • 16 workflows are listed as "not audited yet".
  • Required gates still unproven: full-suite, whose aggregator shell has no test.

Cost

No new workflow or job. The tests run in full-suite in under a second, and the real-ruff control skips if ruff isn't installed.

Checks

  • tests/tools/test_gate_controls.py: 8 passed.
  • Related tests (-k 'workflow or classifier or docs or planner or gate or audit or baseline or suite'): 846 passed, 11 skipped. Not the full suite locally.

🤖 Generated with Claude Code

…rt of #7155)

A green gate means something only if it can go red. gate_controls.py lists each check that
can hold a PR and the test proving it can fail; the unproven count may only go down. Adds
controls for ruff-audit (real ruff on a planted finding, format alone) and mypy-audit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 30, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 30, 2026 15:56
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 8d93e73 into main Oct 30, 2026
33 checks passed
@squid-shepherd
squid-shepherd Bot deleted the feat/gate-controls branch October 30, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant