Skip to content

feat(efficacy): a self-test for the design probes - #126

Merged
braboj merged 1 commit into
mainfrom
feat/probes-self-test
Nov 4, 2026
Merged

braboj merged 1 commit into
mainfrom
feat/probes-self-test

Conversation

@braboj

@braboj braboj commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The last rule marked Missing, FR-09-06 (the design-structure probes), gets a self-test. probes.py plants a small build with one finding per probe and checks each probe's answer; 14 checks, no model call, nothing installed beyond Python.

Where Change
tests/efficacy/probes.py --self-test: a planted tariff package, a scorer's context with a real subprocess runner, 14 checks
tests/efficacy/trace.py, .github/workflows/self-tests.yml, AGENTS.md probes.py joins the modules with a self-test
docs/coverage.md FR-09-06: Missing → Self-test, naming 12 labels

What the planted build holds, and what each probe must say about it:

Probe Planted Expected
Layering a web module, a store module, a domain module roles web, persistence, domain
Routes Decimal("2") * Decimal("3") inside a route money in a route
Boolean parameters verbose: bool = False named by file, function, argument
Extension points class Rule(ABC) rule kinds present, export formats absent
Kind ladders three-deep if rule.kind == … depth 3
Public surface Jurisdiction not defined, Extra exported missing and extra
IO isolation price(invoice, connection: "sqlite3.Connection") leaked
Hygiene a print, a # see #123 comment, TariffError(Exception), logging with no NullHandler each reported
Robustness a file with a syntax error; no roots; a failing runner named, not fatal; missing, never zero

Trace: 88 checked, 6 untestable, 0 missing.

Found on the way, not changed here: the layering probe's layering_violations can never be non-empty, since a module that imports Flask or sqlite3 is by that fact classed web or persistence rather than domain. Filed separately.

Closes #109

🤖 Generated with Claude Code

https://claude.ai/code/session_01DpT5xPGzmuB6WLaUppMRKY

probes.py plants a build with one finding per design probe, layering,
routes doing money arithmetic, boolean parameters, an abstract base over
rule kinds, a kind ladder, the public surface, IO isolation and hygiene,
and checks each probe's answer. A probe that cannot run leaves its metric
missing, never zero. The trace, the CI loop and the coverage row take the
new module; no rule is left without a check.

Closes #109

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xPGzmuB6WLaUppMRKY
@braboj

braboj commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Codex review, round 1 (gpt-6-astra, high): no findings.

No actionable regressions were found in the diff. The probes and trace self-tests pass, and pyflakes reports no issues in the modified probes module.

The loop ends here; ready for the owner's review.

@braboj
braboj deleted the feat/probes-self-test branch November 4, 2026 11:23
@braboj
braboj restored the feat/probes-self-test branch November 4, 2026 11:24
@braboj braboj reopened this Nov 4, 2026
@braboj
braboj merged commit 5a15eb1 into main Nov 4, 2026
4 checks passed
@braboj
braboj deleted the feat/probes-self-test branch November 4, 2026 11:25
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.

Give the ten requirements marked Gap a self-test check

1 participant