sniff-qa 0.8.1 → 0.9.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/.claude-plugin/icon.png +0 -0
- package/.claude-plugin/plugin.json +9 -2
- package/CHANGELOG.md +34 -0
- package/README.md +144 -105
- package/dist/{anthropic-api-ZR3UEB3Z.js → anthropic-api-7PHYF6PN.js} +2 -2
- package/dist/{chunk-7ZOFYET5.js → chunk-64FUDSRY.js} +30 -13
- package/dist/chunk-64FUDSRY.js.map +1 -0
- package/dist/{chunk-CZKMOAXU.js → chunk-7BLJCICM.js} +2 -2
- package/dist/{chunk-EGANHIIE.js → chunk-T72SLMTY.js} +48 -5
- package/dist/chunk-T72SLMTY.js.map +1 -0
- package/dist/{claude-code-ZFTBQXY4.js → claude-code-GJPWO6DN.js} +2 -2
- package/dist/{claude-exploration-provider-QJH6IPYU.js → claude-exploration-provider-XOVJPJ23.js} +2 -2
- package/dist/claude-exploration-provider-XOVJPJ23.js.map +1 -0
- package/dist/cli/index.js +28 -14
- package/dist/cli/index.js.map +1 -1
- package/dist/crawl-XPHT3KIZ.js +23 -0
- package/dist/{crawl-command-RDWGHZC4.js → crawl-command-JHZN4GK7.js} +10 -6
- package/dist/{crawl-command-RDWGHZC4.js.map → crawl-command-JHZN4GK7.js.map} +1 -1
- package/dist/{ensure-browsers-AYKMLUHV.js → ensure-browsers-5NAQQMEC.js} +29 -15
- package/dist/ensure-browsers-5NAQQMEC.js.map +1 -0
- package/dist/{formatter-HC3LT3VH.js → formatter-4VI3ZX5Y.js} +29 -6
- package/dist/formatter-4VI3ZX5Y.js.map +1 -0
- package/dist/generator-AFHVMWC3.js +7 -0
- package/dist/index.d.ts +15 -5
- package/dist/index.js +3 -3
- package/dist/mcp/server.js +22 -9
- package/dist/mcp/server.js.map +1 -1
- package/dist/{prompt-builder-D3FBH534.js → prompt-builder-JT3GQBYP.js} +2 -2
- package/dist/prompt-builder-JT3GQBYP.js.map +1 -0
- package/dist/{provider-BCKFVPTN.js → provider-MMQ6EIBV.js} +6 -6
- package/dist/{quality-run-YAURB242.js → quality-run-KJMBBAQT.js} +2 -2
- package/dist/{report-7FQFH4HW.js → report-XK2MCX2N.js} +3 -3
- package/dist/{unified-YSOTPG5B.js → unified-OEGLPOGE.js} +7 -7
- package/dist/{write-report-6RJWN54I.js → write-report-Y4UPVXUO.js} +2 -2
- package/package.json +6 -8
- package/dist/chunk-7ZOFYET5.js.map +0 -1
- package/dist/chunk-EGANHIIE.js.map +0 -1
- package/dist/claude-exploration-provider-QJH6IPYU.js.map +0 -1
- package/dist/crawl-ZXZRF4Q7.js +0 -15
- package/dist/ensure-browsers-AYKMLUHV.js.map +0 -1
- package/dist/formatter-HC3LT3VH.js.map +0 -1
- package/dist/generator-HIFV67NI.js +0 -7
- package/dist/prompt-builder-D3FBH534.js.map +0 -1
- /package/dist/{anthropic-api-ZR3UEB3Z.js.map → anthropic-api-7PHYF6PN.js.map} +0 -0
- /package/dist/{chunk-CZKMOAXU.js.map → chunk-7BLJCICM.js.map} +0 -0
- /package/dist/{claude-code-ZFTBQXY4.js.map → claude-code-GJPWO6DN.js.map} +0 -0
- /package/dist/{crawl-ZXZRF4Q7.js.map → crawl-XPHT3KIZ.js.map} +0 -0
- /package/dist/{generator-HIFV67NI.js.map → generator-AFHVMWC3.js.map} +0 -0
- /package/dist/{provider-BCKFVPTN.js.map → provider-MMQ6EIBV.js.map} +0 -0
- /package/dist/{quality-run-YAURB242.js.map → quality-run-KJMBBAQT.js.map} +0 -0
- /package/dist/{report-7FQFH4HW.js.map → report-XK2MCX2N.js.map} +0 -0
- /package/dist/{unified-YSOTPG5B.js.map → unified-OEGLPOGE.js.map} +0 -0
- /package/dist/{write-report-6RJWN54I.js.map → write-report-Y4UPVXUO.js.map} +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sniff",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Autonomous QA scanner via sniff-qa: walks your running app in a real browser and reports real bugs (broken pages/links, console/network errors, broken forms, state-loss, empty/placeholder data, bad loading/error states, responsive + a11y) with reproduction proof, severity, confidence, and a fix. No API key.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Boudjemaa",
|
|
@@ -9,5 +9,12 @@
|
|
|
9
9
|
"homepage": "https://github.com/Aboudjem/sniff",
|
|
10
10
|
"repository": "https://github.com/Aboudjem/sniff",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
|
-
"keywords": [
|
|
12
|
+
"keywords": [
|
|
13
|
+
"testing",
|
|
14
|
+
"qa",
|
|
15
|
+
"playwright",
|
|
16
|
+
"accessibility",
|
|
17
|
+
"mcp",
|
|
18
|
+
"sniff-qa"
|
|
19
|
+
]
|
|
13
20
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.0] - 2026-11-17
|
|
11
|
+
|
|
12
|
+
Every report now opens with the answer. The first walk on a new machine works.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **Verdict first.** The terminal report, the HTML report and the MCP walk result now open with a
|
|
17
|
+
`PASS` or `FAIL` line and the three findings to fix first. The detail follows. In the
|
|
18
|
+
terminal the verdict follows the real exit decision, so `--fail-on` and `assert` budgets show in it.
|
|
19
|
+
- **Shorter report lines.** Screenshot paths print relative to the folder you ran sniff in.
|
|
20
|
+
- **Help that starts with the commands people type,** and the exit codes.
|
|
21
|
+
- **Pinned launchers.** `.mcp.json` and the plugin manifests run `sniff-qa@0.9.0`, so every plugin
|
|
22
|
+
user runs the same code.
|
|
23
|
+
- `npm test` runs the suite once (`vitest run`). Watch mode moved to `npm run test:watch`.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **The first walk no longer crashes when Chromium was never downloaded.** The browser check
|
|
28
|
+
tested a path Playwright returns even when the file is absent. It now tests the file, so sniff
|
|
29
|
+
downloads the browser. `sniff doctor` reports the browser correctly too.
|
|
30
|
+
- The browser download prints to stderr, so `--json` output stays parseable.
|
|
31
|
+
- `npm audit --omit=dev` reports 0 vulnerabilities after a lockfile refresh.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- `server.json` lists the npm package, so MCP registry clients can install sniff.
|
|
36
|
+
The release workflow now publishes to the registry.
|
|
37
|
+
- `gemini-extension.json` for the Gemini CLI.
|
|
38
|
+
- `npm run proof` re-prints the fixture score the README quotes.
|
|
39
|
+
- A test keeps the version equal across every manifest and checks the README names each MCP tool.
|
|
40
|
+
- `.claude-plugin/icon.png`, so `claude plugin validate --strict` passes. The contributor notes moved
|
|
41
|
+
from `CLAUDE.md` to `.claude/CLAUDE.md`, which Claude Code still loads, so the plugin root holds
|
|
42
|
+
no file the plugin loader ignores.
|
|
43
|
+
|
|
10
44
|
## [0.8.1] - 2026-09-03
|
|
11
45
|
|
|
12
46
|
A motion identity, and the literal synthwave scenery removed. No behaviour changes.
|
package/README.md
CHANGED
|
@@ -8,100 +8,111 @@
|
|
|
8
8
|
<a href="https://www.npmjs.com/package/sniff-qa"><img src="https://img.shields.io/npm/v/sniff-qa?style=flat-square&color=FF006E&logo=npm&label=npm" alt="npm version"></a>
|
|
9
9
|
<a href="https://github.com/Aboudjem/sniff/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Aboudjem/sniff/ci.yml?style=flat-square&color=00D4FF&label=CI" alt="CI"></a>
|
|
10
10
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache_2.0-7C3AED?style=flat-square" alt="License Apache 2.0"></a>
|
|
11
|
-
<a href="https://github.com/Aboudjem/sniff/stargazers"><img src="https://img.shields.io/github/stars/Aboudjem/sniff?style=flat-square&color=2BE8C8" alt="Stars"></a>
|
|
12
11
|
</p>
|
|
13
12
|
|
|
14
13
|
<p align="center"><b>English</b> · <a href="READMEs/zh-CN.md">简体中文</a> · <a href="READMEs/ja.md">日本語</a> · <a href="READMEs/es.md">Español</a> · <a href="READMEs/fr.md">Français</a></p>
|
|
15
14
|
|
|
16
|
-
<p align="center"><b>Point it at your running app. It
|
|
15
|
+
<p align="center"><b>Point it at your running app. It clicks through your pages in a real browser and tells you what is broken, with the steps to reproduce it.</b></p>
|
|
17
16
|
|
|
18
|
-
<p align="center"><a href="#what-
|
|
19
|
-
|
|
20
|
-
<img alt="sniff walking a buggy app and streaming findings with severity, confidence, steps to reproduce, and a fix" src="https://raw.githubusercontent.com/Aboudjem/sniff/main/.github/assets/demo.gif" width="100%">
|
|
17
|
+
<p align="center"><a href="#what-you-get">What you get</a> · <a href="#install">Install</a> · <a href="#how-it-works">How it works</a> · <a href="#works-with">Works with</a> · <a href="#proof">Proof</a> · <a href="#faq">FAQ</a> · <a href="#limits">Limits</a></p>
|
|
21
18
|
|
|
22
19
|
```bash
|
|
23
|
-
|
|
24
|
-
claude plugin install sniff@10x
|
|
20
|
+
npx sniff-qa --url http://localhost:3000
|
|
25
21
|
```
|
|
26
22
|
|
|
27
|
-
## What
|
|
23
|
+
## What you get
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fills things like a user would, and judges what actually happened.
|
|
25
|
+
A report that opens with the verdict, then the three things to fix first, then every finding.
|
|
26
|
+
This is the top of a real run on this repo's planted-bug fixture (2026-11-17, sniff 0.9.0):
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
plus the screenshot and the console or network excerpt the check captured. No steps, no finding.
|
|
37
|
-
- **It has been measured.** On a fixture app planted with 21 bugs across all 12 classes, plus a
|
|
38
|
-
clean control page, sniff finds 21 of 21 and reports nothing on the control page.
|
|
28
|
+
```text
|
|
29
|
+
VERDICT FAIL: 26 findings (1 critical, 13 high, 11 medium, 1 low)
|
|
30
|
+
Walked 12 pages, checked 13 links, in 53.8s. 1 low-confidence finding hidden, show with --all.
|
|
39
31
|
|
|
40
|
-
|
|
32
|
+
Fix these first:
|
|
33
|
+
1. Page returns HTTP 500 on /crash [critical]
|
|
34
|
+
2. Page returns HTTP 404 on /dead [high]
|
|
35
|
+
3. Page returns HTTP 404 on /missing [high]
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
For any other agent, the Vercel skills CLI installs the same three skills:
|
|
37
|
+
Every finding, with the steps that reproduce it:
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
CRITICAL (1)
|
|
40
|
+
• [confirmed] Page returns HTTP 500
|
|
41
|
+
/crash (route/broken-page)
|
|
42
|
+
- Navigate to /crash
|
|
43
|
+
- Server responded with HTTP 500
|
|
44
|
+
fix: The route throws server-side. Check the server logs/handler for this path and return a valid page or a proper error page.
|
|
45
|
+
shot: sniff-reports/crawl/_crash-desktop.png
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
Each finding carries a severity, a confidence label, the route, the steps, a fix and a screenshot.
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
| Output | Flag | Use it for |
|
|
51
|
+
| :-------------- | :---------- | :------------------------------------------ |
|
|
52
|
+
| Terminal report | (default) | Reading the result now |
|
|
53
|
+
| HTML page | `--report` | Sending to someone, one self-contained file |
|
|
54
|
+
| JSON | `--json` | Scripts and other tools |
|
|
55
|
+
| Exit code | `--fail-on` | Failing CI on real bugs |
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
| Exit code | Meaning |
|
|
58
|
+
| :-------- | :------------------------------------------------------------------------------ |
|
|
59
|
+
| `0` | No finding reached the `--fail-on` severities (default: critical and high) |
|
|
60
|
+
| `1` | A finding reached them, an `assert` budget was breached, or sniff could not run |
|
|
57
61
|
|
|
58
|
-
<
|
|
59
|
-
<summary>Node version, project install, and CI</summary>
|
|
62
|
+
<img alt="sniff walking a buggy app and streaming findings with severity, confidence, steps to reproduce, and a fix" src="https://raw.githubusercontent.com/Aboudjem/sniff/main/.github/assets/demo.gif" width="100%">
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
`npx sniff-qa ci` writes a GitHub Actions workflow with browser caching and report artifacts.
|
|
63
|
-
</details>
|
|
64
|
+
## Install
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
Node.js 22 or newer. Pick one path.
|
|
66
67
|
|
|
67
|
-
**
|
|
68
|
+
**Command line, no editor.** Start your app, then walk it from a second terminal:
|
|
68
69
|
|
|
69
70
|
```bash
|
|
70
|
-
|
|
71
|
+
npx sniff-qa --url http://localhost:3000
|
|
71
72
|
```
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
The npm package is `sniff-qa`. Do not run `npx sniff`: that is an unrelated package.
|
|
75
|
+
|
|
76
|
+
**Claude Code plugin**, through the [10x marketplace](https://github.com/Aboudjem/10x):
|
|
75
77
|
|
|
76
78
|
```bash
|
|
77
|
-
|
|
79
|
+
claude plugin marketplace add Aboudjem/10x
|
|
80
|
+
claude plugin install sniff@10x
|
|
78
81
|
```
|
|
79
82
|
|
|
80
|
-
**
|
|
81
|
-
repo's own planted-bug fixture, from `npx sniff-qa --url http://localhost:4321 --ci --max-pages 12`:
|
|
83
|
+
**Skills for any agent**, through the Vercel skills CLI:
|
|
82
84
|
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
+
```bash
|
|
86
|
+
npx skills add Aboudjem/sniff
|
|
87
|
+
```
|
|
85
88
|
|
|
86
|
-
|
|
89
|
+
**MCP server**, for any MCP client:
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/crash (route/broken-page)
|
|
91
|
-
- Navigate to /crash
|
|
92
|
-
- Server responded with HTTP 500
|
|
93
|
-
fix: The route throws server-side. Check the server logs/handler for this path and return a valid page or a proper error page.
|
|
94
|
-
shot: sniff-reports/crawl/_crash-desktop.png
|
|
95
|
-
|
|
96
|
-
✓ Scan complete: 26 issue(s) found. Exit code 1 so CI fails on bugs; pass --fail-on none to always exit 0.
|
|
91
|
+
```bash
|
|
92
|
+
claude mcp add sniff-qa -- npx -y sniff-qa --mcp
|
|
97
93
|
```
|
|
98
94
|
|
|
99
|
-
|
|
100
|
-
the
|
|
95
|
+
The first walk downloads a Chromium build once (about 165 MB). Run `npx sniff-qa doctor` to check
|
|
96
|
+
Node, the browser and your dev server.
|
|
97
|
+
|
|
98
|
+
<details>
|
|
99
|
+
<summary>Project install and CI</summary>
|
|
100
|
+
|
|
101
|
+
`npm install -D sniff-qa` adds it to a project. `npx sniff-qa ci` writes a GitHub Actions workflow
|
|
102
|
+
with browser caching and report artifacts.
|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
## How it works
|
|
101
106
|
|
|
102
107
|
<img alt="How sniff works: crawl, act, assert, prove, report" src="https://raw.githubusercontent.com/Aboudjem/sniff/main/.github/assets/how-it-works.svg" width="100%">
|
|
103
108
|
|
|
104
|
-
|
|
109
|
+
1. **Find the app.** It uses `--url`, or a dev server on a common port.
|
|
110
|
+
2. **Walk it.** A headless Chromium follows your links, clicks buttons and fills forms, like a user.
|
|
111
|
+
3. **Judge what happened.** Each page is checked for 12 classes of bugs.
|
|
112
|
+
4. **Prove it.** A finding needs a route, the steps, a screenshot and the console or network excerpt.
|
|
113
|
+
5. **Report.** Verdict first, then the fix-first list, then the detail.
|
|
114
|
+
|
|
115
|
+
The 12 classes:
|
|
105
116
|
|
|
106
117
|
<picture>
|
|
107
118
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Aboudjem/sniff/main/.github/assets/features-dark.svg">
|
|
@@ -109,73 +120,101 @@ the environment looks wrong.
|
|
|
109
120
|
<img alt="The 12 classes of bugs sniff finds" src="https://raw.githubusercontent.com/Aboudjem/sniff/main/.github/assets/features-light.svg" width="100%">
|
|
110
121
|
</picture>
|
|
111
122
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- **An exit code**, non-zero when findings reach the `--fail-on` severity, so CI fails on real bugs.
|
|
115
|
-
- **A confidence label** on each. `uncertain` is hidden from the terminal unless you pass `--all`.
|
|
123
|
+
With no app running, `sniff` reads your source instead (`sniff scan`). It flags debug statements,
|
|
124
|
+
placeholder text and broken imports, and tells you how to start the real walk.
|
|
116
125
|
|
|
117
|
-
|
|
126
|
+
The MCP server exposes these tools:
|
|
118
127
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
| Tool | What it does |
|
|
129
|
+
| :--------------- | :------------------------------------------------------ |
|
|
130
|
+
| `sniff` | One entry point: `mode: "walk"`, `"scan"` or `"report"` |
|
|
131
|
+
| `sniff_scan` | Source-only scan, no browser |
|
|
132
|
+
| `sniff_run` | Source scan plus browser checks |
|
|
133
|
+
| `sniff_discover` | Generates scenarios from your source and drives them |
|
|
134
|
+
| `sniff_install` | Downloads the Playwright browser |
|
|
135
|
+
| `sniff_report` | Reads the last saved results |
|
|
125
136
|
|
|
126
|
-
|
|
137
|
+
`--caps scan,report` narrows the server to those two tools, with no browser at all.
|
|
127
138
|
|
|
128
|
-
Works
|
|
129
|
-
`npx skills add`. The skills are Markdown, so they run on whatever model your editor points at.
|
|
139
|
+
## Works with
|
|
130
140
|
|
|
131
|
-
|
|
132
|
-
|:--|:--|
|
|
133
|
-
| Claude Code | `claude plugin install sniff@10x` |
|
|
134
|
-
| Any of 70+ agents | `npx skills add Aboudjem/sniff` |
|
|
135
|
-
| Codex, Gemini CLI, OpenCode, Pi | `./install.sh codex` |
|
|
136
|
-
| VS Code (Copilot) | `./install.sh copilot` |
|
|
137
|
-
| Everything else | see [docs/editors.md](docs/editors.md) |
|
|
141
|
+
Each row was tested on 2026-11-17 against the sniff 0.9.0 build.
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
| Agent | What ran | Tested |
|
|
144
|
+
| :------------- | :------------------------------------------------------------------------------- | :--------- |
|
|
145
|
+
| Claude Code | `claude -p` with sniff as an MCP server called `sniff_scan` and read 2 findings | 2026-11-17 |
|
|
146
|
+
| Codex CLI | `codex exec` with sniff as an MCP server called `sniff_scan` and read 2 findings | 2026-11-17 |
|
|
147
|
+
| Gemini CLI | `gemini extensions validate .` accepted `gemini-extension.json` | 2026-11-17 |
|
|
148
|
+
| Any MCP client | `node sniff-tests/mcp-smoke.mjs` listed 6 tools and a walk returned 20 findings | 2026-11-17 |
|
|
149
|
+
| Skills CLI | `npx skills@1.9.0 add Aboudjem/sniff` installed the 3 skills into a temp folder | 2026-11-17 |
|
|
150
|
+
|
|
151
|
+
Documented, not tested today: Cursor, VS Code with Copilot, Windsurf, OpenCode and Zed.
|
|
152
|
+
Their snippets are in [docs/editors.md](docs/editors.md).
|
|
153
|
+
|
|
154
|
+
## Proof
|
|
155
|
+
|
|
156
|
+
Two commands re-print every number on this page.
|
|
141
157
|
|
|
142
158
|
```bash
|
|
143
|
-
|
|
144
|
-
codex mcp add sniff-qa -- npx -y sniff-qa --mcp
|
|
159
|
+
npm run build && npm run proof
|
|
145
160
|
```
|
|
146
161
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
162
|
+
It starts the planted-bug fixture, walks it, and scores the report. Output on 2026-11-17:
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
Recall: 21/21 (100%)
|
|
166
|
+
Findings: 27 deduped (27 raw)
|
|
167
|
+
Matched: 27 Candidate FP: 0 Precision proxy: 100%
|
|
168
|
+
Hard FP on clean page (/clean): 0
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The fixture holds 21 planted bugs across all 12 classes, plus a clean control page.
|
|
172
|
+
The scorer is [sniff-tests/score-fixture.mjs](sniff-tests/score-fixture.mjs).
|
|
173
|
+
The bugs are listed in [sniff-tests/planted-bugs/MANIFEST.json](sniff-tests/planted-bugs/MANIFEST.json).
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
npm test
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Prints `Test Files 50 passed (50)` and `Tests 534 passed (534)` on 2026-11-17.
|
|
180
|
+
The suite includes the fixture gate. It fails the build if recall drops below 85%.
|
|
181
|
+
It also fails on any finding on the clean page.
|
|
182
|
+
|
|
183
|
+
## FAQ
|
|
184
|
+
|
|
185
|
+
**Do I need an API key or an account?**
|
|
186
|
+
No. The walk and the source scan run on your machine. Nothing is sent anywhere unless you set up the optional AI exploration yourself.
|
|
187
|
+
|
|
188
|
+
**Will a walk change data in my app?**
|
|
189
|
+
It can. A walk clicks buttons and submits real forms, so point it at a dev or staging app.
|
|
190
|
+
|
|
191
|
+
**Why did it exit 1 when nothing crashed?**
|
|
192
|
+
Exit 1 means it found bugs at a failing severity, so CI fails the build. Pass `--fail-on none` to always exit 0.
|
|
193
|
+
|
|
194
|
+
**Will it edit my code?**
|
|
195
|
+
No. Walking and scanning never touch your source. Only `sniff fix` edits files, and only when you run it.
|
|
150
196
|
|
|
151
|
-
|
|
197
|
+
**Can it walk a logged-in app?**
|
|
198
|
+
Yes. Pass `--storage-state auth.json`. Cookie and token values from that file are redacted from the written reports.
|
|
152
199
|
|
|
153
|
-
|
|
154
|
-
> No API key, no account, no signup, and no AI provider unless you set one up yourself. Walking and
|
|
155
|
-
> scanning never edit your source. `sniff fix` is the only command that rewrites code, and only when
|
|
156
|
-
> you run it.
|
|
200
|
+
More answers are in [docs/faq.md](docs/faq.md).
|
|
157
201
|
|
|
158
|
-
|
|
159
|
-
> A walk clicks buttons and submits real forms, so it can create real data. Point it at a dev or
|
|
160
|
-
> staging app, not at production. The first walk also downloads a Chromium build and caches it, so
|
|
161
|
-
> that one run needs internet access.
|
|
202
|
+
## Limits
|
|
162
203
|
|
|
163
|
-
-
|
|
164
|
-
|
|
165
|
-
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
`--fail-on none` turns off the severity gate, though an `assert` budget can still fail the run.
|
|
204
|
+
- It needs a running app for the walk. Without one you only get the source scan.
|
|
205
|
+
- The first walk needs internet to download Chromium once.
|
|
206
|
+
- Dead-link checking follows external links, so a walk requests the third-party URLs your pages link to.
|
|
207
|
+
- Redaction covers report text, not screenshot pixels. A screenshot of a logged-in page can show private data.
|
|
208
|
+
- It finds what a user would see. It does not read your server logs or measure load.
|
|
169
209
|
|
|
170
210
|
## Learn more
|
|
171
211
|
|
|
172
|
-
- [docs/editors.md](docs/editors.md)
|
|
173
|
-
- [docs/authenticated-walks.md](docs/authenticated-walks.md)
|
|
174
|
-
- [docs/assert-budgets.md](docs/assert-budgets.md)
|
|
175
|
-
- [docs/comparison.md](docs/comparison.md)
|
|
176
|
-
- [docs/faq.md](docs/faq.md), the questions this page does not answer
|
|
212
|
+
- [docs/editors.md](docs/editors.md): install and MCP snippets for every agent
|
|
213
|
+
- [docs/authenticated-walks.md](docs/authenticated-walks.md): walking a logged-in app
|
|
214
|
+
- [docs/assert-budgets.md](docs/assert-budgets.md): capping findings by severity in `sniff.config`
|
|
215
|
+
- [docs/comparison.md](docs/comparison.md): how sniff differs from linters and E2E frameworks
|
|
177
216
|
- [CHANGELOG.md](CHANGELOG.md) · [CONTRIBUTING.md](CONTRIBUTING.md) · [LICENSE](LICENSE)
|
|
178
217
|
|
|
179
218
|
---
|
|
180
219
|
|
|
181
|
-
<p align="center"><sub>Built by <a href="https://github.com/Aboudjem">Adam Boudjemaa</a> · <a href="LICENSE">Apache 2.0</a> ·
|
|
220
|
+
<p align="center"><sub>Built by <a href="https://github.com/Aboudjem">Adam Boudjemaa</a> · <a href="LICENSE">Apache 2.0</a> · built on <a href="https://playwright.dev">Playwright</a> and <a href="https://github.com/dequelabs/axe-core">axe-core</a></sub></p>
|
|
@@ -8,7 +8,7 @@ var AnthropicAPIProvider = class {
|
|
|
8
8
|
this.model = model;
|
|
9
9
|
}
|
|
10
10
|
async generateTests(context) {
|
|
11
|
-
const { buildSystemPrompt, buildUserPrompt } = await import("./prompt-builder-
|
|
11
|
+
const { buildSystemPrompt, buildUserPrompt } = await import("./prompt-builder-JT3GQBYP.js");
|
|
12
12
|
const { parseGeneratedTest } = await import("./response-parser-PUGNWF7S.js");
|
|
13
13
|
const { default: Anthropic } = await import("@anthropic-ai/sdk");
|
|
14
14
|
const client = new Anthropic({ apiKey: this.apiKey });
|
|
@@ -32,4 +32,4 @@ var AnthropicAPIProvider = class {
|
|
|
32
32
|
export {
|
|
33
33
|
AnthropicAPIProvider
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=anthropic-api-
|
|
35
|
+
//# sourceMappingURL=anthropic-api-7PHYF6PN.js.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SEV_ORDER,
|
|
3
|
+
fixFirst,
|
|
4
|
+
verdictLine
|
|
5
|
+
} from "./chunk-T72SLMTY.js";
|
|
1
6
|
import {
|
|
2
7
|
redactText,
|
|
3
8
|
redactValue,
|
|
@@ -259,7 +264,7 @@ var pageHealthDetector = async (ctx) => {
|
|
|
259
264
|
severity: "high",
|
|
260
265
|
confidence: "likely",
|
|
261
266
|
steps: [`Navigate to ${ctx.route}`, "The page loaded (HTTP 2xx) but rendered no visible content"],
|
|
262
|
-
suggestedFix: "A 200 response rendered an empty document
|
|
267
|
+
suggestedFix: "A 200 response rendered an empty document, likely a client-side render crash or missing data. Check the console for errors and verify the page mounts.",
|
|
263
268
|
dedupeKey: "blank"
|
|
264
269
|
});
|
|
265
270
|
}
|
|
@@ -745,7 +750,7 @@ var loadingStateDetector = async (ctx) => {
|
|
|
745
750
|
title: "Failed request shows no error state to the user",
|
|
746
751
|
severity: "medium",
|
|
747
752
|
confidence: "likely",
|
|
748
|
-
steps: [`Navigate to ${ctx.route}`, `A request failed (${f.method} ${f.url} \u2192 ${f.status})`, "The page shows no error message, retry, or fallback
|
|
753
|
+
steps: [`Navigate to ${ctx.route}`, `A request failed (${f.method} ${f.url} \u2192 ${f.status})`, "The page shows no error message, retry, or fallback, so the failure is silent"],
|
|
749
754
|
suggestedFix: "Render a visible error state when a request fails (message + retry), instead of swallowing the error.",
|
|
750
755
|
networkExcerpt: ctx.evidence.networkExcerpt(),
|
|
751
756
|
dedupeKey: "missing-error-state"
|
|
@@ -808,7 +813,7 @@ var flowDetector = async (ctx) => {
|
|
|
808
813
|
title: "Multi-step flow dead-ends (no enabled way forward)",
|
|
809
814
|
severity: "high",
|
|
810
815
|
confidence: "likely",
|
|
811
|
-
steps: [`Navigate to ${ctx.route}`, "Advance past the first step", "Fill the step inputs", "The only forward/finish control stays disabled
|
|
816
|
+
steps: [`Navigate to ${ctx.route}`, "Advance past the first step", "Fill the step inputs", "The only forward/finish control stays disabled, so the flow cannot be completed"],
|
|
812
817
|
suggestedFix: "Enable the forward/finish control when the step is valid, or provide another way to complete the flow.",
|
|
813
818
|
dedupeKey: "dead-end"
|
|
814
819
|
});
|
|
@@ -1123,20 +1128,32 @@ function sevRank(s) {
|
|
|
1123
1128
|
}
|
|
1124
1129
|
|
|
1125
1130
|
// src/crawl/index.ts
|
|
1126
|
-
|
|
1131
|
+
import { relative, isAbsolute } from "path";
|
|
1132
|
+
function displayPath(path, cwd) {
|
|
1133
|
+
if (!cwd || !isAbsolute(path)) return path;
|
|
1134
|
+
const rel = relative(cwd, path);
|
|
1135
|
+
return rel && !rel.startsWith("..") && !isAbsolute(rel) ? rel : path;
|
|
1136
|
+
}
|
|
1127
1137
|
function formatReportText(report, opts = {}) {
|
|
1128
1138
|
const shown = report.findings.filter((f) => opts.all || f.confidence !== "uncertain");
|
|
1129
1139
|
const hidden = report.findings.length - shown.length;
|
|
1140
|
+
const { pagesVisited, linksChecked, durationMs } = report.stats;
|
|
1130
1141
|
const lines = [];
|
|
1131
1142
|
lines.push("");
|
|
1132
|
-
lines.push(`
|
|
1133
|
-
lines.push(
|
|
1143
|
+
lines.push(` VERDICT ${verdictLine(shown, opts.failed)}`);
|
|
1144
|
+
lines.push(
|
|
1145
|
+
` Walked ${pagesVisited} page${pagesVisited === 1 ? "" : "s"}, checked ${linksChecked} link${linksChecked === 1 ? "" : "s"}, in ${(durationMs / 1e3).toFixed(1)}s.` + (hidden > 0 ? ` ${hidden} low-confidence finding${hidden === 1 ? "" : "s"} hidden, show with --all.` : "")
|
|
1146
|
+
);
|
|
1147
|
+
lines.push("");
|
|
1148
|
+
if (shown.length === 0) return lines.join("\n");
|
|
1149
|
+
const first = fixFirst(shown);
|
|
1150
|
+
lines.push(first.length === shown.length ? " Fix these:" : " Fix these first:");
|
|
1151
|
+
first.forEach((f, i) => {
|
|
1152
|
+
lines.push(` ${i + 1}. ${f.title} on ${f.reproduction.route} [${f.severity}]`);
|
|
1153
|
+
});
|
|
1154
|
+
lines.push("");
|
|
1155
|
+
lines.push(" Every finding, with the steps that reproduce it:");
|
|
1134
1156
|
lines.push("");
|
|
1135
|
-
if (shown.length === 0) {
|
|
1136
|
-
lines.push(" No issues found. \u2713");
|
|
1137
|
-
lines.push("");
|
|
1138
|
-
return lines.join("\n");
|
|
1139
|
-
}
|
|
1140
1157
|
const bySev = /* @__PURE__ */ new Map();
|
|
1141
1158
|
for (const f of shown) {
|
|
1142
1159
|
const arr = bySev.get(f.severity) ?? [];
|
|
@@ -1153,7 +1170,7 @@ function formatReportText(report, opts = {}) {
|
|
|
1153
1170
|
for (const s of f.reproduction.steps) lines.push(` - ${s}`);
|
|
1154
1171
|
lines.push(` fix: ${f.suggestedFix}`);
|
|
1155
1172
|
if (f.needsOutOfBandVerification) lines.push(` note: needs out-of-band verification (e.g. confirm the email/job actually completed)`);
|
|
1156
|
-
if (f.reproduction.screenshotPath) lines.push(` shot: ${f.reproduction.screenshotPath}`);
|
|
1173
|
+
if (f.reproduction.screenshotPath) lines.push(` shot: ${displayPath(f.reproduction.screenshotPath, opts.cwd)}`);
|
|
1157
1174
|
lines.push("");
|
|
1158
1175
|
}
|
|
1159
1176
|
}
|
|
@@ -1164,4 +1181,4 @@ export {
|
|
|
1164
1181
|
runCrawl,
|
|
1165
1182
|
formatReportText
|
|
1166
1183
|
};
|
|
1167
|
-
//# sourceMappingURL=chunk-
|
|
1184
|
+
//# sourceMappingURL=chunk-64FUDSRY.js.map
|