Repository navigation
Find an example: search the design's inputs for an untried case or a slipped mistake - #20
Merged
Merged
Conversation
…slipped mistake
Health's coverage gaps and slipped planted mistakes get a "Find an example"
button. The simulator tries the examples' inputs (as they are and changed)
and fresh sequences of values the design uses, keeps the first that reaches
the case (or makes the mistaken copy differ at an output), cuts it to the
shortest, undoes input changes it doesn't need, and ends with checks of
what the design did. The draft opens in Examples, unsaved, for a person to
check. Deterministic; no AI, no cost.
POST /projects/{id}/spec/find-example.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Health's coverage gaps ("Never tried: …") and planted mistakes that slipped through ("If
count + 1werecount - 1…") get a Find an example button (the old button is now Add in words). The simulator searches the design's inputs:The draft opens in Examples, unsaved, titled "Tries …" / "Notices if …", for a person to check (a wrong check there = a bug found). Deterministic (seeded), no AI, no cost. If nothing is found, it says why.
Files
crates/wafer-api/src/search.rs(new): the search, with tests.design.rs,lib.rs:POST /projects/{id}/spec/find-example(editor, 20 s budget + shrinking).mistakes.rs:planted()plants one reported mistake;coverage.rs:text_of();spec.rs:half_pscrate-visible.api.ts(findExample,FindTarget),Design.tsx(FindExamplebutton, adds the draft and selects it),styles.css.docs/user-guide/design-view.md(Health),docs/api.md; CHANGELOG.Checked
count + 1→count - 1is caught by the found example; stale targets are refused in words.tx <= 1left out in uart_tx) changes nothing visible.cargo fmt --check, clippy-D warnings,cargo test --workspace, web typecheck and build.🤖 Generated with Claude Code