Skip to content

Find examples for everything: one search for every gap and slipped mistake - #25

Merged
dtt-github merged 1 commit into
mainfrom
feature/find-all-examples
Nov 6, 2026
Merged

dtt-github merged 1 commit into
mainfrom
feature/find-all-examples

Conversation

@dtt-github

Copy link
Copy Markdown
Owner

Step 1 of the plan to 0.1.0.

What

Health gets a new card, Find examples for everything. One button searches for examples for every case no example tries and every planted mistake that slipped through, all at once. Before this, each one needed its own click.

  • Shared examples. Each example found is checked against the targets still open. Every target it also covers is ticked off, so a few examples cover many.
  • One review list. Each example is shown as a sentence, with what it covers. For example: "After reset: down is set to 1; 2 clock cycles pass; count must be 14", which tries down && !up and catches count - 1 as count + 1 (line 14). Untick any you don't want, then Add. They open in Examples unsaved.
  • Not found. Targets with no example are listed with the reason.
  • Cost. No AI and nothing to pay. Up to about 10 s per search and 90 s in total.

How

  • search::find_all searches the targets in turn using the existing find. After each search it checks the new example against the targets still open: a gap counts as covered if the branch is taken, a mistake if it fails with the mistake planted. Later searches start from the examples found so far.
  • The new endpoint POST /api/projects/{id}/spec/find-examples accepts 1–60 targets.

Checks

  • New test finds_examples_for_everything_at_once, on the up/down counter starter with one example:
    • 3 examples cover all 12 gaps and slipped mistakes.
    • An impossible target is reported with its reason.
    • With the drafts added, every covered gap is tried and every covered mistake is caught.
  • Browser, on the "Weak counter check" project:
    • 2 examples covered 6 of 6.
    • After adding and saving them, 5 of 5 examples pass.
    • Health then shows "The examples try every case the design tells apart" and "Your examples catch all 12 planted mistakes".
  • fmt, clippy, workspace tests, typecheck and web build all pass.
  • Docs updated: user guide, API reference and CHANGELOG.

🤖 Generated with Claude Code

…stake

Health gets a card that searches for examples for every untried case and
every planted mistake that slipped through at once (search::find_all).
Each example found is run against the targets still open and covers every
one it also reaches, and later searches start from the examples found, so a
few examples cover many. The results list each example as a sentence with
what it covers, to untick or add together; the rest say why they weren't
found. POST /api/projects/{id}/spec/find-examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtt-github
dtt-github merged commit 74d2278 into main Nov 6, 2026
2 checks passed
@dtt-github
dtt-github deleted the feature/find-all-examples branch November 6, 2026 20:15
@dtt-github dtt-github mentioned this pull request Nov 6, 2026
4 tasks done
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.

1 participant