Coverage
Shows which branches, handlers and scenarios the checks reached, and which they never ran.
Understand coverage →GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing snappea.dev — Snap Pea Formal models for developers and their agents.Explore how your application behaves under retries, failures and unexpected event orderings. Check the design before you build, then use the same specs in your application tests. What a model looks likeA model is a short program that describes a design. This one is written in P: state machines that Here, two clients each add one to a shared counter. Each client reads, then writes Model.p The test starts two clients, then checks the total Test.p The checker finds an ordering that loses an increment
Assertion failed: expected 2 increments, counter is 1 This is the result for the model as written. Run it to get the checker's own output, then try Atomic increment. Runs in your browser; no code leaves this page. 2-second budget, mutation testing off.Open these files in the full Playground → One spec checks the design and the running codeA spec is a state machine that watches events and checks rules about them. Check the model's events while you design. Then check your application's events from ordinary tests, against the same spec. You, or an agent, write a model of the design. snappea check runs it thousands of times, each with a different ordering of messages, and the spec flags any run that breaks a rule. None of your service code is involved. When the checker finds a failing ordering in the model, turn it into a regression test that forces the same ordering on the real code. The diagram is an illustration, not a live check. Model checks cover the behavior and assumptions you modeled. Application checks cover the events your tests produce; they do not explore every execution of your code. Models are tested like codeA model can pass because it is right, or because its checks never look at the part that is wrong. Four checks tell the two apart. CoverageShows which branches, handlers and scenarios the checks reached, and which they never ran. Understand coverage →Mutation testingChanges the model in small ways and reports each change your specs did not notice. Mutation testing →LintsFlag specs no test selects, assertions that are always true, and specs that accept everything. Model lints →Driver limitsList what the test never tried: fixed client counts, input values and event orders. Driver limits →Built for agentsMost model checkers were designed for a person at a terminal. Snap Pea's commands, guide, error messages and checks were designed for an agent to run, and changes to them are measured with agent evals. Fewer missed design mistakes in pilot evalsIn pilot evals, agents modeled a design. Hidden broken versions of that design were then run against the specs and tests the agents wrote. Agents using Haiku agents, three to six runs per task. Eval setup and results The guide is in the binary
One command runs every check
JSON results, and errors that name the fix
A model with untested behavior fails the checkLint findings, coverage gaps and undetected mutants fail the check, so an agent cannot stop at a model that passes without testing anything. What the checker prints when the counter model misspells an event: How it comparesUpstream PSnap Pea runs the P models you already have, through either of two commands. Both are one binary that reads
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |