Files
sisi/verifiers/completeness/no-stubs-scan.md
T
swaitsandClaude Fable 5.2 2fc1fe9c2d
ci / tests (macos-latest, python 3.11) (push) Canceled after 0s
ci / tests (macos-latest, python 3.13) (push) Canceled after 0s
ci / tests (macos-latest, python 3.9) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.11) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.13) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.9) (push) Canceled after 0s
sisi 0.1.0: a shared rulebook and verification tool for AI coding agents
Contracts with a ladder of checks, an end-of-turn gate, retrospectives and
shared lessons, time-to-delivery measurement, a library of 140 verification
techniques and 20 recipes, personal data kept outside the clone, and
releases with rollback. Standard library only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 22:29:02 -07:00

2.4 KiB

id, title, answers, rung, section, languages, kinds, cost, detect, ran_here, verified
id title answers rung section languages kinds cost detect ran_here verified
no-stubs-scan Scanning for stubs, skipped tests, commented-out assertions and placeholder data Is anything still a placeholder, skipped, or switched off in what I am calling finished? 3 completeness any general low git --version yes ran

Use when

  • Always before saying "done". An unfinished function that compiles is the most common false finish.
  • Tests were added or changed: skipped and #[ignore]d tests count as missing.
  • You edited tests to get a green run (deleting or commenting an assertion is how a failing test gets quieted).

Do not use when

  • It is the only check. It finds markers, not missing work with no marker.

Set up

Commit scripts/stubscan.sh. Tune the pattern to the languages in use. Where a marker is legitimate (a documented known gap), list the file in the script's exclusions with a reason, not a blanket || true.

Minimal example

scripts/stubscan.sh:

#!/usr/bin/env bash
pat='todo!\(|unimplemented!\(|NotImplementedError|^\s*sorry\b|#\[ignore|@pytest\.mark\.(skip|xfail)|\.skip\(|\bxit\(|t\.Skip\(|^\s*//\s*(assert|expect)|^\s*#\s*assert|lorem ipsum'
if git grep -n -I -E -i -e "$pat" -- . ':!scripts/stubscan.sh' ':!docs'; then exit 1; fi

git grep exits 0 when it finds a match, so a match fails the script. Also look in the diff: git diff BASE | grep -E '^-.*(assert|expect)' lists assertions you removed. For unwrap()/panic!("not yet") and pass-only bodies, add patterns to taste.

Run

bash scripts/stubscan.sh

Passing looks like: no output, exit 0. Failure (run here) prints file:line for each todo!(), #[ignore] and commented assertion, and exits 1. Then also ask: is there placeholder data (names like foo, test@example.com, 12345) in shipped files, not tests? Grep for it by hand.

As a contract check

{"id": "no-stubs", "claim": "No stub markers, skipped tests or commented-out assertions in the tree", "kind": "general", "rung": 3, "cmd": "bash scripts/stubscan.sh", "expect": {"exit": 0}, "timeout_s": 60}

What a pass does not prove

A stub written without a marker (return 0, an empty else) passes. A test that asserts nothing passes (see vacuity-check, assertion-strength-review). The scan checks tracked and untracked files but not ignored ones. Do not weaken the pattern to get a pass; add a justified exclusion instead.