blastproof 0.31.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -274
- package/dist/chunk-O6UTUPT6.js +387 -0
- package/dist/chunk-O6UTUPT6.js.map +1 -0
- package/dist/cli.js +156 -264
- package/dist/cli.js.map +1 -1
- package/dist/{snapshot-JISKGGMN.js → snapshot-ECNLGVUG.js} +4 -2
- package/package.json +1 -1
- package/dist/chunk-DO4WZKLT.js +0 -124
- package/dist/chunk-DO4WZKLT.js.map +0 -1
- /package/dist/{snapshot-JISKGGMN.js.map → snapshot-ECNLGVUG.js.map} +0 -0
package/README.md
CHANGED
|
@@ -11,13 +11,7 @@
|
|
|
11
11
|
[](https://github.com/marketplace/actions/blastproof-e2e-ai-testing)
|
|
12
12
|
[](./LICENSE)
|
|
13
13
|
|
|
14
|
-
**Open-source AI testing agent for pull requests.** Write end-to-end tests
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
git diff → impact mapping → test generation → agentic execution → report + score
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
100% local. MIT. Bring your own LLM key.
|
|
14
|
+
**Open-source AI testing agent for pull requests.** Write end-to-end tests in plain English. An agent runs them in a real browser, picks only the ones your diff can affect, and scores the result before merge.
|
|
21
15
|
|
|
22
16
|
<img src="https://raw.githubusercontent.com/hamc/blastproof/main/.github/dogfood.gif" width="100%"
|
|
23
17
|
alt="A terminal running blastproof against this repo's demo app. It passes four steps, then fails
|
|
@@ -26,173 +20,57 @@ git diff → impact mapping → test generation → agentic execution → report
|
|
|
26
20
|
|
|
27
21
|
▶ **[Watch the introduction](https://www.youtube.com/shorts/miqN5FzMF_k)** — what it does, in a minute.
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
## Why blastproof
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
- **Your tests live in your repository.** Plain-English YAML, reviewed in pull requests like code. No selectors to maintain: the agent reads the page the way a screen reader does.
|
|
26
|
+
- **It runs where your code runs.** On your machine or in your CI. No account, no subscription, no dashboard to sign in to. The only thing that leaves your network is the model call, to the provider you choose — or none, with a local model through Ollama. MIT licensed.
|
|
27
|
+
- **It costs cents, and you can cap it.** This repository's own 10-test suite takes about 110 model calls and 240k tokens per run on `claude-haiku-4.5`: about **$0.35 a run**, or 3–4 cents a test, at list prices. With `--impacted`, a pull request runs only the tests its diff can affect. A [budget](./docs/configuration.md#budget--bounding-what-a-run-spends) caps calls, tokens and time, and `--dry-run` costs nothing.
|
|
28
|
+
- **How often it is wrong is measured, not promised.** On this repository's benchmark, a seeded bug that should fail a test and a correct app that should pass it, both reference models got every verdict right in the latest measurement: 0 wrong in 89 runs on `claude-haiku-4.5` and 0 in 90 on `gpt-6-luna`. The demo app flatters, and the [method and its limits](./docs/reliability.md) are public.
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
**It fits best** when you cannot send your application to a hosted service, when you want tests as code rather than in someone else's UI, or when you already have an LLM key. **It does not fit yet** if your markup is not accessible, if your key journeys need drag and drop, file upload or several tabs, or if you are on Windows, which is untested. [Does this fit your application?](./docs/writing-tests.md#does-this-fit-your-application) has the details.
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
The fastest path is your coding agent, which can answer most setup questions by looking at your project:
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
37
|
npx skills add hamc/blastproof
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
Then tell your agent: **"set up e2e tests"**. The skill
|
|
40
|
-
|
|
41
|
-
Two things it deliberately will not do, so their absence does not read as a defect: it does not configure [authentication](./docs/auth.md), and it does not wire up [CI](./docs/ci.md). Both are worth doing after you have seen a green run on your own machine.
|
|
40
|
+
Then tell your agent: **"set up e2e tests"**. The skill works with Claude Code, Cursor, Codex and others, and walks the whole path from checking your markup to a first green run. It leaves [authentication](./docs/auth.md) and [CI](./docs/ci.md) for after that run. It lives in [`skills/blastproof/`](./skills/blastproof/).
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## Quick start
|
|
42
|
+
By hand:
|
|
46
43
|
|
|
47
44
|
```bash
|
|
48
|
-
npm install -g blastproof
|
|
45
|
+
npm install -g blastproof # Node.js >= 20.19
|
|
49
46
|
cd your-project
|
|
50
|
-
blastproof init
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Point `base_url` at your running app in `.blastproof/config.yaml`, then check the setup — this needs **no API key and no browser**:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
blastproof run --dry-run
|
|
57
|
-
```
|
|
47
|
+
blastproof init # scaffolds .blastproof/; set base_url in its config.yaml
|
|
48
|
+
blastproof run --dry-run # checks the setup: no browser, no key
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npx playwright install --with-deps chromium # NEEDS SUDO — see below
|
|
63
|
-
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY, or local Ollama
|
|
50
|
+
npx playwright install --with-deps chromium # needs sudo; without it: npx playwright install chromium
|
|
51
|
+
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY, or a local Ollama
|
|
64
52
|
blastproof run
|
|
65
53
|
```
|
|
66
54
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Before `run`, `plan` or `test` do anything, they check what they are about to spend — the browser can launch, the model provider is reachable, `base_url` responds — and report every unmet one together, so a stopped app or a missing browser is never a wall you hit one crash at a time. A missing system library names the exact install command and says it needs root; nothing is installed on your behalf. Silent when everything is fine, and skipped entirely by `--dry-run`, which needs none of it.
|
|
70
|
-
|
|
71
|
-
Provider options, budgets and browser tuning: [Configuration](./docs/configuration.md).
|
|
72
|
-
|
|
73
|
-
## Does this fit your application?
|
|
74
|
-
|
|
75
|
-
Three questions. The first one decides most cases.
|
|
76
|
-
|
|
77
|
-
### 1. Is your markup accessible?
|
|
78
|
-
|
|
79
|
-
**A hard requirement, not a preference.** blastproof finds elements the way a screen reader does — by role, by label, by visible text. That is what removes selectors and survives redesigns. The cost is that there is deliberately no CSS or XPath fallback, so anything the accessibility tree cannot describe cannot be driven at all.
|
|
80
|
-
|
|
81
|
-
The agent acts on the element it read, not on a search for its name. Each element in the snapshot it reads carries a ref, and an action names that ref: two controls called `Delete` are two different targets, and `Add` is never mistaken for `Add New`. If the role and name the agent gives do not match the element the ref points at, the action is refused rather than performed. A ref is valid only for the snapshot it came from, so nothing like a selector is ever stored.
|
|
82
|
-
|
|
83
|
-
| works | cannot be driven |
|
|
84
|
-
| --- | --- |
|
|
85
|
-
| `<button>Add to cart</button>` | a `<div>` with a click handler |
|
|
86
|
-
| `<label for="email">` + `<input>` | an input with no label |
|
|
87
|
-
| `<button aria-label="Delete note">` | an icon-only button with no name |
|
|
88
|
-
| `<select>` with `<option>`s | an ARIA-less custom dropdown |
|
|
89
|
-
|
|
90
|
-
**An editable data grid needs one cell per step.** On a budgeting app's transaction register, a new row shows only the cell that has focus. The date input appears as `textbox [active]: 10/12/2026`, with no name. The empty payee and notes cells are plain `div`s, and the accessibility tree drops them. Each cell becomes a named input only once it is focused. A step asking for four values at once shows the agent one textbox, and it typed the payee into the date. Written one cell per step in keyboard order, the same journey passed:
|
|
91
|
-
|
|
92
|
-
```yaml
|
|
93
|
-
- click "Add New" and verify a new transaction row is open with its date field focused
|
|
94
|
-
- press Tab to move to the payee field, type Fast Internet, and choose "Fast Internet" from the suggestions
|
|
95
|
-
- press Tab three times to move to the payment field, type 12.34, and click "Add"
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
That test failed 3 runs of 3 written as one step, and passed 3 of 3 written this way, on 0.26.0 with `claude-haiku-5.5`. On the app's side, a label on each cell's input makes the one-step version readable too. If your core journey is a row editor, spend one test on it before adopting ([#67](https://github.com/hamc/blastproof/issues/67)).
|
|
99
|
-
|
|
100
|
-
**Run an accessibility checker on your app before installing anything.** The result predicts how well this will work better than anything else you could measure — and the fixes it suggests are worth making regardless of whether you adopt this tool.
|
|
101
|
-
|
|
102
|
-
### 2. Does your journey need anything on this list?
|
|
103
|
-
|
|
104
|
-
Not supported yet:
|
|
105
|
-
|
|
106
|
-
- **`iframe` content** — a hosted payment widget is invisible, so an embedded checkout cannot be driven end to end
|
|
107
|
-
- **scroll-to, drag and drop, file upload**
|
|
108
|
-
- **multiple tabs**, and native `alert` / `confirm` dialogs
|
|
109
|
-
|
|
110
|
-
**Windows is untested.** Development and CI run on Linux and macOS. Nothing is known to be broken and reports are welcome ([#8](https://github.com/hamc/blastproof/issues/8)).
|
|
111
|
-
|
|
112
|
-
If a critical journey needs one of these, that journey stays with your existing test suite. The two can coexist — nothing here replaces what you already have.
|
|
113
|
-
|
|
114
|
-
### 3. Can you point it at data you can throw away?
|
|
115
|
-
|
|
116
|
-
**Use a seeded database, a staging environment you can reset, or a throwaway account. Do not gate on a run against production data.**
|
|
117
|
-
|
|
118
|
-
Within a step, an action that commits — a click, or pressing Enter — is not performed twice: the runner refuses the repeat and tells the agent it already did that. This closes the case that used to produce duplicate records, where a submit answered by a redirect came back to a reset form and the agent, seeing no evidence of its own work, refilled it and submitted again. One repeat goes through: the same control pressed again right after itself, with nothing else done in between, when the page changed after the last press — a tour's "Next", a wizard, "load more".
|
|
119
|
-
|
|
120
|
-
It is **not** a guarantee of zero duplicate writes. An agent that reaches the same effect by a genuinely different route — another control that does the same thing — is not caught.
|
|
121
|
-
|
|
122
|
-
## How it works
|
|
123
|
-
|
|
124
|
-
<img src="https://raw.githubusercontent.com/hamc/blastproof/main/.github/coverage-flow.svg" width="100%"
|
|
125
|
-
alt="How a diff becomes a merge decision. In CI, unattended: changed files are matched against the routes: and ignore: globs; matched files contribute affected routes, files matching neither are reported as unclassified and fail the run only under --fail-on-unmapped. Tests declaring an affected route are executed and produce a weighted score, which --min-score gates on. An affected route no test declares is reported as a coverage gap and never fails the run. Separately and manually, outside CI: blastproof plan loads such a route in Chromium, makes one model call, and produces a YAML draft you review, edit and run before committing it.">
|
|
126
|
-
|
|
127
|
-
**The boundary in the middle is the point.** Everything above it runs unattended on every pull request and ends in an exit code. Everything below it is something you choose to run, on your machine, and review before it lands.
|
|
128
|
-
|
|
129
|
-
A route no test covers is *reported*, never failed — blocking on it would punish you for an incomplete map instead of teaching you to complete it. Turning that report into a test is the manual half, and the draft it produces is not trusted until a person has read it.
|
|
55
|
+
Before a run spends anything, it checks that the browser launches, the model provider answers and your app responds, and reports every problem at once with the command that fixes it. Providers, budgets and browser options: [Configuration](./docs/configuration.md).
|
|
130
56
|
|
|
131
57
|
## Writing tests
|
|
132
58
|
|
|
133
|
-
Tests live in `.blastproof/tests/` as plain-English YAML — no selectors:
|
|
134
|
-
|
|
135
59
|
```yaml
|
|
136
60
|
summary: Checkout with discount
|
|
137
61
|
priority: P0
|
|
138
|
-
tags: [checkout, discount]
|
|
139
62
|
routes: ["/cart", "/checkout"]
|
|
140
63
|
steps:
|
|
141
|
-
- add
|
|
142
|
-
- apply promo code SAVE20
|
|
143
|
-
- verify
|
|
144
|
-
- complete checkout
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
`priority` is P0–P2 (default P1). `tags`, `setup` steps, `auth` and `device` are optional — `auth: false` runs the test signed out, which a login test needs, and a selection in which *every* test declares it skips the login altogether. `device: Pixel 7` runs the test as a phone from [Playwright's device list](docs/configuration.md#device), so a responsive app's mobile interface can be tested beside its desktop one. `routes` declares the URLs a test covers, which is what `--impacted` selects on; write route strings consistently, since they compare by exact equality (`/cart` ≠ `/cart/`). `run` warns to stderr — non-fatal — when a test declares a route no `routes:` mapping declares, since that route contributes nothing to `--impacted` selection.
|
|
148
|
-
|
|
149
|
-
### Say what each step should produce
|
|
150
|
-
|
|
151
|
-
This is the one rule that decides whether a suite works. An outside evaluation took the **same application, same suite, same version from Score 64 to Score 100 by rewriting two steps** — nothing else changed:
|
|
152
|
-
|
|
153
|
-
```yaml
|
|
154
|
-
# Fragile: a bare action. Nothing says what should be true afterwards.
|
|
155
|
-
- submit the add-task form
|
|
156
|
-
- verify the new task "Fix the flaky test" appears in the task list
|
|
157
|
-
|
|
158
|
-
# Robust: the step carries its own outcome.
|
|
159
|
-
- submit the add-task form and verify the task "Fix the flaky test" appears
|
|
160
|
-
in the task list with priority High and status Open
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
The bare version fails on a shape that is everywhere: the form POSTs, the server redirects back to the same page, and the form comes back empty. The agent is asked whether "submit the add-task form" happened, and is looking at a page that is indistinguishable from one where nothing did. A step that names the outcome gives it something to check that survives the action.
|
|
164
|
-
|
|
165
|
-
Write steps that end in an observable result — text on the page, a count, a state change — and this class of failure does not arise.
|
|
166
|
-
|
|
167
|
-
**Inline error messages should be plain visible text.** `role="alert"` is read correctly from the accessibility tree and needs no special handling, but note that an alert your page has cleared shows up as an empty element: if a verdict says an alert exists whose content is missing, the message was emptied, not hidden.
|
|
168
|
-
|
|
169
|
-
### A step that enters a value writes the value
|
|
170
|
-
|
|
171
|
-
```yaml
|
|
172
|
-
- fill the note field with Order not received # runs
|
|
173
|
-
- fill the note field # cannot run
|
|
64
|
+
- add the Mechanical Keyboard to the cart
|
|
65
|
+
- apply promo code SAVE20 and verify the total shows a 20% discount
|
|
66
|
+
- complete checkout and verify the confirmation shows an order number
|
|
174
67
|
```
|
|
175
68
|
|
|
176
|
-
|
|
69
|
+
**Say what each step should produce.** A step that only names an action (`submit the form`) asks the judge whether something happened while it looks at a page that may have reset. A step that names its result (`submit the form and verify the task appears in the list`) gives it something to check. An outside evaluation took the same suite from Score 64 to Score 100 by rewriting two steps this way. The runner now judges an action step on a check that directly follows it, but a step that names its own result does not depend on that.
|
|
177
70
|
|
|
178
|
-
|
|
71
|
+
**A step that enters a value writes the value.** The agent is forbidden from inventing values: what it types must come from the step, the page or an `{{env.*}}` placeholder, and the runner refuses anything else rather than asking nicely. `run` warns about such steps before it starts; that check reads English only.
|
|
179
72
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
Two limits worth knowing. A value the page shows in one format and the field wants in another — `1234` in the step, `1,234.00` in the box — is refused, and the fix is to write the value the way it is typed. And a very short value (`3`) appears somewhere in almost any page, so it will pass; this closes fabricated content, not every fabricated character.
|
|
183
|
-
|
|
184
|
-
`run` also warns about it first — the same rule caught earlier, from the test file, on every path, before launching a browser or asking for a key:
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
Authoring (a step enters a value but names none):
|
|
188
|
-
Add a note (.blastproof/tests/notes.yaml) step 2:
|
|
189
|
-
fill the note field
|
|
190
|
-
→ fill the note field with <value>
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Non-fatal by default — `--fail-on-authoring` turns it into exit 1 for teams enforcing it in CI. Taking the value from the page is fine and is not flagged: `fill the recipient field with the address shown on the confirmation page`.
|
|
194
|
-
|
|
195
|
-
**The warning reads English only.** A suite written in another language runs exactly as well but is not inspected, and prints no warning saying so — silence from this check means "nothing found in English", never "this suite is clean". The runner's refusal has no such limit: it compares text rather than parsing grammar, so a suite in any language is still held to the rule at run time.
|
|
73
|
+
The full guide, including the accessibility requirement and what is not supported yet: [Writing tests](./docs/writing-tests.md).
|
|
196
74
|
|
|
197
75
|
## Commands
|
|
198
76
|
|
|
@@ -200,140 +78,24 @@ Non-fatal by default — `--fail-on-authoring` turns it into exit 1 for teams en
|
|
|
200
78
|
blastproof init # scaffold .blastproof/
|
|
201
79
|
blastproof run # run every test
|
|
202
80
|
blastproof run --impacted --base main # run only what the diff can affect
|
|
203
|
-
blastproof plan --base main # draft tests for
|
|
204
|
-
blastproof test --base main # run what covers the diff, then draft the gaps
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Common flags — `blastproof <command> --help` has the full list:
|
|
208
|
-
|
|
209
|
-
| flag | |
|
|
210
|
-
| --- | --- |
|
|
211
|
-
| `--dry-run` | Print the selection (or, for `plan`, the routes it would draft) and exit. No browser, no API key |
|
|
212
|
-
| `--tag` · `--priority` · `--query` | Select a subset of tests |
|
|
213
|
-
| `--url <url>` | Override `base_url` for this run (e.g. a PR preview) |
|
|
214
|
-
| `--min-score <n>` | Gate on a weighted score instead of all-must-pass |
|
|
215
|
-
| `--fail-on-unmapped` | Fail when a changed file matches no `routes:` or `ignore:` glob |
|
|
216
|
-
| `--fail-on-authoring` | Fail when a step enters a value but names none (warns by default) |
|
|
217
|
-
| `--junit [path]` · `--html [path]` | Write reports |
|
|
218
|
-
| `--concurrency <n>` | Run tests at once — [when that is safe](./docs/configuration.md#concurrency--running-tests-at-once) |
|
|
219
|
-
| `--write` | `plan` only — persist drafts instead of previewing |
|
|
220
|
-
| `--max-llm-calls` · `--max-tokens` · `--max-duration` | [Bound what a run may spend](./docs/configuration.md#budget--bounding-what-a-run-spends) |
|
|
221
|
-
|
|
222
|
-
Exit codes: **0** pass, **1** the gate failed or the run stopped (its budget, or the model provider refusing a call: `Run incomplete:`), **2** usage or config error.
|
|
223
|
-
|
|
224
|
-
**Generated drafts are never executed and never affect the score.** An unreviewed model-written test in the merge path fails in two directions: a hallucinated expectation blocks a correct PR, and a credulous one waves a broken change through while looking like coverage. `plan` makes the gap visible with a draft to review; it does not make an uncovered route safe.
|
|
225
|
-
|
|
226
|
-
## Impact mapping
|
|
227
|
-
|
|
228
|
-
`--impacted` runs only the tests whose `routes:` intersect the routes your diff can affect, mapped from changed files by globs you maintain in `.blastproof/config.yaml`:
|
|
229
|
-
|
|
230
|
-
```yaml
|
|
231
|
-
routes:
|
|
232
|
-
"src/cart/**": ["/cart", "/checkout"]
|
|
233
|
-
ignore:
|
|
234
|
-
- "**/*.md"
|
|
81
|
+
blastproof plan --base main # draft tests for routes no test covers
|
|
82
|
+
blastproof test --base main # both: run what covers the diff, then draft the gaps
|
|
235
83
|
```
|
|
236
84
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
Every changed file lands in one of three buckets: it matches `routes:` and contributes them, matches `ignore:` and is knowingly irrelevant, or **matches neither — nobody has said what it affects**. `--fail-on-unmapped` blocks on that third case, naming the files and both ways to resolve them.
|
|
240
|
-
|
|
241
|
-
**The diff is `git diff <base>...HEAD`, so it compares commits.** Work you have not committed — edited, staged or untracked — is not in it. That is the right comparison in CI, where everything is committed by the time the workflow runs, and the wrong one on the machine you are writing the change on: a run against a dirty working tree selects from your last commit, not from your editor.
|
|
242
|
-
|
|
243
|
-
It says so rather than leaving you to notice. Any working-tree change the diff excluded is named on stderr, with the routes it maps to, on `run --impacted` and `plan --base` alike — non-fatal, and it changes no exit code and nothing about what is selected. Files your `ignore:` globs already cover stay silent, and so do files already in the diff, whose routes are selected either way.
|
|
244
|
-
|
|
245
|
-
**Nothing is ignored by default**, on purpose: a default that guesses on your behalf would hide the first files worth thinking about. The flag is additive — a run can meet `--min-score` and still be blocked here, because "the tests I ran passed" and "something changed that nobody classified" are different claims.
|
|
246
|
-
|
|
247
|
-
Its limit is worth knowing: it catches files that are *unclassified*, not *misclassified*. A shared module mapped to one route when it can break five still slips through. Impact by import graph is the fix, and blastproof does not do it yet.
|
|
248
|
-
|
|
249
|
-
## Score and merge gating
|
|
250
|
-
|
|
251
|
-
Each run scores the percentage of executed test **weight** that passed, weighing 3 at P0, 2 at P1, 1 at P2 — so a failing checkout costs three times a failing tooltip.
|
|
252
|
-
|
|
253
|
-
```bash
|
|
254
|
-
blastproof run # any failure exits 1 (strict, the default)
|
|
255
|
-
blastproof run --min-score 80 # one failing P2 is tolerated
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
`--min-score` **replaces** the all-must-pass rule rather than adding to it. Only executed tests count: filtered and unrouted tests are neither numerator nor denominator, and a run that executed nothing scores 100, so a docs-only PR is never blocked. JUnit carries the score as a `<property name="score">`, and unrouted tests appear as `<skipped/>` so the coverage gap shows up in CI rather than vanishing. The warnings the run prints (uncommitted work, route drift, a step that names no value) are in both reports too: JUnit counts them in `<property name="warnings">` with their text in `<system-err>`, and the HTML report shows them right after the score.
|
|
259
|
-
|
|
260
|
-
**The verdict behind that number is pinned, and that is not the same as reproducible.** The model call that decides whether a step passed runs at temperature 0, so the same page and the same expectation are not re-sampled into a different answer — a gate that flips on identical input teaches people to re-run until green, which is worse than no gate. What pinning does not survive: provider-side batching, floating point, and a gateway routing two calls to different providers or quantizations. Expect far less variance, not a guarantee of the same output twice.
|
|
261
|
-
|
|
262
|
-
The calls that *choose* an action, and the one that drafts a test, are deliberately left free — that latitude is what re-resolves a control after a redesign instead of failing on it.
|
|
263
|
-
|
|
264
|
-
Wiring this into a pipeline, with the gating patterns worth knowing: [Running in CI](./docs/ci.md). The Action is listed on the GitHub Marketplace as [blastproof e2e AI testing](https://github.com/marketplace/actions/blastproof-e2e-ai-testing).
|
|
85
|
+
Exit codes: **0** pass, **1** the gate failed or the run stopped, **2** usage or config error. Flags, impact mapping, the score and the half that needs no browser or key: [Running, selecting and gating](./docs/running.md). Drafts from `plan` are never run or scored until you review and commit them.
|
|
265
86
|
|
|
266
|
-
##
|
|
87
|
+
## Learn more
|
|
267
88
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
blastproof plan --base main --dry-run # affected routes no test covers, no key needed
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
They report affected routes, files nobody has classified, and affected routes no test covers — a coverage-gap report with an exit code, useful even on a repo whose suite is Playwright or Cypress.
|
|
278
|
-
|
|
279
|
-
## Trust boundaries
|
|
280
|
-
|
|
281
|
-
The application under test is not trusted input: its page content reaches the model, so a page that controls its own accessible text can try to influence the agent. Two things constrain that.
|
|
282
|
-
|
|
283
|
-
**The agent cannot leave your application.** The boundary is `base_url`'s origin plus whatever `allowed_origins:` declares, and it constrains where the page **is**, not only where an action asked to go. A `navigate` outside it is refused before the request; a page that ends up outside it any other way — a redirect, a link to another host, a script setting the location — fails the step, and its content is never sent to the model. Enforced by comparison, not by asking the model nicely.
|
|
284
|
-
|
|
285
|
-
If your application legitimately spans hosts (an identity provider, a hosted payment step), declare them. A suite that was quietly walking onto a foreign page will now fail and name the origin to add.
|
|
286
|
-
|
|
287
|
-
**Your secrets stay out of prompts.** `{{env.*}}` placeholders survive intact and are substituted at the moment of typing. Every value your tests or auth recipe reference is redacted from everything else crossing into a prompt — page snapshots included — in literal and percent-encoded form, and replaced with a label naming its variable: `[redacted TEST_PASSWORD]`. The label carries the name and nothing derived from the value, so it tells a reader, and the model, *which* secret was there without telling anyone what it was. Redaction matches a known value case-insensitively and tolerantly of whitespace, so a page that uppercases what you typed is still covered. It does not chase a value your application re-encodes, hashes or truncates — no list of transforms can be complete, and one that pretends to be would make you careless. When a redaction is found only by that wider comparison, the run prints one warning naming the variable, because the same page could just as easily have returned a form nothing here can recognise. Treat all of it as a strong default rather than a guarantee against a hostile app.
|
|
288
|
-
|
|
289
|
-
**Redaction covers text, not pixels.** A failure screenshot shows whatever was on screen, including a value typed from `{{env.*}}` or echoed back by the page. So when anything in a run references `{{env.*}}`, the HTML report does not embed screenshots: each failure links to its PNG under `.blastproof/reports/` instead. That keeps `report.html` safe to attach to a pull request. The PNGs themselves are not masked, so do not upload `.blastproof/reports/` anywhere you would not put the secret ([#110](https://github.com/hamc/blastproof/issues/110)).
|
|
290
|
-
|
|
291
|
-
**A redacted value is asserted on by identity.** A step that verifies text equal to an `{{env.*}}` value reaches the judge through the mask, like the page does, so both sides read `[redacted NAME]`. The same label on both sides is a match; different labels are not. Until 0.21.0 every secret was redacted to the same `***`, and a step verifying one secret passed against a page showing another — measured, 3 times out of 3 ([#87](https://github.com/hamc/blastproof/issues/87)). What the judge still cannot check is anything *about* the value beyond which variable it is: its length, its format, a prefix. Assert on those with a value that is not in `{{env.*}}`.
|
|
292
|
-
|
|
293
|
-
The system prompt also tells the model that page content is data, never instruction. That raises the cost of casual injection and is **not** a boundary — the origin constraint is. Do not point blastproof at an application you would not run locally.
|
|
294
|
-
|
|
295
|
-
## blastproof tests itself
|
|
296
|
-
|
|
297
|
-
The **Dogfood** badge is blastproof running against the demo app in this repo — real Chromium, real model, scored and gated, with public logs. It catches real regressions rather than diffing strings: change the demo discount from 20% to 5% while the page still claims *"20% off"* and it fails the step — that is the run in the GIF at the top of this page, verbatim.
|
|
298
|
-
|
|
299
|
-
No selector was updated to catch that. The agent read the value, did the arithmetic, and disagreed with the page.
|
|
300
|
-
|
|
301
|
-
Try it yourself:
|
|
302
|
-
|
|
303
|
-
```bash
|
|
304
|
-
git clone https://github.com/hamc/blastproof && cd blastproof
|
|
305
|
-
npm install && npm run build
|
|
306
|
-
node examples/demo-app/serve.mjs 4173 &
|
|
307
|
-
export ANTHROPIC_API_KEY=...
|
|
308
|
-
node dist/cli.js run
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
### How often a verdict is wrong
|
|
312
|
-
|
|
313
|
-
A merge gate is judged by two numbers. A **false PASS** is a test that passes on an app with the bug it exists to catch. A **false FAIL** is a test that fails on a correct app. `npm run eval:reliability` measures both. It runs the suite above on the demo app as it is, and each test on **mutants**: copies of the app with one bug seeded. A *literal* mutant changes the value a step quotes. A *subtle* one reproduces the shape of a wrong verdict this project has already had, such as the right value in the wrong place, or a success message with no success behind it.
|
|
314
|
-
|
|
315
|
-
| | `claude-haiku-4.5` | `gpt-6-luna` |
|
|
316
|
-
| --- | --- | --- |
|
|
317
|
-
| false FAIL, correct app (40 test runs) | 0 (≤ 8.8%) | 0 (≤ 8.8%) |
|
|
318
|
-
| false PASS, literal bugs (30) | 0 (≤ 11.4%) | 0 (≤ 11.4%) |
|
|
319
|
-
| false PASS, subtle bugs (20) | 0 of 19 (≤ 16.8%) | 0 (≤ 16.1%) |
|
|
320
|
-
|
|
321
|
-
The bounds are 95% upper bounds: zero errors in 40 runs means "below about 9%", not "never". The first run of this table found a false PASS on Haiku, 2 subtle runs in 20. The confirmation showed order `#BP-1002`, another paragraph mentioned `#BP-1001` as a previous order, and a step checking for `#BP-1001` *in the confirmation* passed. That was fixed in the judge ([#147](https://github.com/hamc/blastproof/issues/147)). On 0.26.0, Haiku had one false FAIL in 40, in the notes test: the note was listed and counted, but the model had typed it into the empty field again, and the judge read the filled field as a form not yet submitted. One subtle run on Haiku ended incomplete, and is left out of its count.
|
|
322
|
-
|
|
323
|
-
The demo app is small and well labelled, so these numbers flatter. Expect a real application to do worse. The point of this table is that it can be reproduced, and that every change claiming better verdicts has to move it.
|
|
324
|
-
|
|
325
|
-
The same benchmark over seven more models, and why it chose the OpenAI and Ollama defaults, is in [Choosing a model](./docs/configuration.md#choosing-a-model).
|
|
326
|
-
|
|
327
|
-
Measured 2026-10-13 on 0.27.0, 5 samples, through OpenRouter. To reproduce:
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
npm run build
|
|
331
|
-
EVAL_MODELS=anthropic/claude-haiku-4.5,openai/gpt-6-luna npm run eval:reliability
|
|
332
|
-
```
|
|
89
|
+
- [Writing tests](./docs/writing-tests.md) — the rules that decide whether a suite works, and whether your app fits
|
|
90
|
+
- [Running, selecting and gating](./docs/running.md) — commands, `--impacted`, the score, and the free deterministic half
|
|
91
|
+
- [Configuration](./docs/configuration.md) — providers, models, budgets, browser, concurrency
|
|
92
|
+
- [Testing behind a login](./docs/auth.md) · [Running in CI](./docs/ci.md) — the GitHub Action is on the [Marketplace](https://github.com/marketplace/actions/blastproof-e2e-ai-testing)
|
|
93
|
+
- [Trust boundaries](./docs/trust-boundaries.md) — what the agent may reach, and how secrets stay out of prompts
|
|
94
|
+
- [How often a verdict is wrong](./docs/reliability.md) — the benchmark, and how to reproduce it
|
|
333
95
|
|
|
334
96
|
## Development
|
|
335
97
|
|
|
336
|
-
Built with AI assistance using spec-driven development: every change began as a written proposal with its design rationale, and
|
|
98
|
+
Built with AI assistance using spec-driven development: every change began as a written proposal with its design rationale, and `openspec/` keeps them, with the alternatives that were rejected and why. Start at [`AGENTS.md`](./AGENTS.md) and [`CONTRIBUTING.md`](./CONTRIBUTING.md). Open work lives in [issues](https://github.com/hamc/blastproof/issues).
|
|
337
99
|
|
|
338
100
|
```bash
|
|
339
101
|
npm install && npm run build && npm test
|