@veraxhq/verax 0.1.0 → 0.2.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 +123 -88
- package/bin/verax.js +11 -452
- package/package.json +14 -36
- package/src/cli/commands/default.js +523 -0
- package/src/cli/commands/doctor.js +165 -0
- package/src/cli/commands/inspect.js +109 -0
- package/src/cli/commands/run.js +402 -0
- package/src/cli/entry.js +196 -0
- package/src/cli/util/atomic-write.js +37 -0
- package/src/cli/util/detection-engine.js +296 -0
- package/src/cli/util/env-url.js +33 -0
- package/src/cli/util/errors.js +44 -0
- package/src/cli/util/events.js +34 -0
- package/src/cli/util/expectation-extractor.js +378 -0
- package/src/cli/util/findings-writer.js +31 -0
- package/src/cli/util/idgen.js +87 -0
- package/src/cli/util/learn-writer.js +39 -0
- package/src/cli/util/observation-engine.js +366 -0
- package/src/cli/util/observe-writer.js +25 -0
- package/src/cli/util/paths.js +29 -0
- package/src/cli/util/project-discovery.js +277 -0
- package/src/cli/util/project-writer.js +26 -0
- package/src/cli/util/redact.js +128 -0
- package/src/cli/util/run-id.js +30 -0
- package/src/cli/util/summary-writer.js +32 -0
- package/src/verax/cli/ci-summary.js +35 -0
- package/src/verax/cli/context-explanation.js +89 -0
- package/src/verax/cli/doctor.js +277 -0
- package/src/verax/cli/error-normalizer.js +154 -0
- package/src/verax/cli/explain-output.js +105 -0
- package/src/verax/cli/finding-explainer.js +130 -0
- package/src/verax/cli/init.js +237 -0
- package/src/verax/cli/run-overview.js +163 -0
- package/src/verax/cli/url-safety.js +101 -0
- package/src/verax/cli/wizard.js +98 -0
- package/src/verax/cli/zero-findings-explainer.js +57 -0
- package/src/verax/cli/zero-interaction-explainer.js +127 -0
- package/src/verax/core/action-classifier.js +86 -0
- package/src/verax/core/budget-engine.js +218 -0
- package/src/verax/core/canonical-outcomes.js +157 -0
- package/src/verax/core/decision-snapshot.js +335 -0
- package/src/verax/core/determinism-model.js +403 -0
- package/src/verax/core/incremental-store.js +237 -0
- package/src/verax/core/invariants.js +356 -0
- package/src/verax/core/promise-model.js +230 -0
- package/src/verax/core/replay-validator.js +350 -0
- package/src/verax/core/replay.js +222 -0
- package/src/verax/core/run-id.js +175 -0
- package/src/verax/core/run-manifest.js +99 -0
- package/src/verax/core/silence-impact.js +369 -0
- package/src/verax/core/silence-model.js +521 -0
- package/src/verax/detect/comparison.js +2 -34
- package/src/verax/detect/confidence-engine.js +764 -329
- package/src/verax/detect/detection-engine.js +293 -0
- package/src/verax/detect/evidence-index.js +177 -0
- package/src/verax/detect/expectation-model.js +194 -172
- package/src/verax/detect/explanation-helpers.js +187 -0
- package/src/verax/detect/finding-detector.js +450 -0
- package/src/verax/detect/findings-writer.js +44 -8
- package/src/verax/detect/flow-detector.js +366 -0
- package/src/verax/detect/index.js +172 -286
- package/src/verax/detect/interactive-findings.js +613 -0
- package/src/verax/detect/signal-mapper.js +308 -0
- package/src/verax/detect/verdict-engine.js +563 -0
- package/src/verax/evidence-index-writer.js +61 -0
- package/src/verax/index.js +90 -14
- package/src/verax/intel/effect-detector.js +368 -0
- package/src/verax/intel/handler-mapper.js +249 -0
- package/src/verax/intel/index.js +281 -0
- package/src/verax/intel/route-extractor.js +280 -0
- package/src/verax/intel/ts-program.js +256 -0
- package/src/verax/intel/vue-navigation-extractor.js +579 -0
- package/src/verax/intel/vue-router-extractor.js +323 -0
- package/src/verax/learn/action-contract-extractor.js +335 -101
- package/src/verax/learn/ast-contract-extractor.js +95 -5
- package/src/verax/learn/flow-extractor.js +172 -0
- package/src/verax/learn/manifest-writer.js +97 -47
- package/src/verax/learn/project-detector.js +40 -0
- package/src/verax/learn/route-extractor.js +27 -96
- package/src/verax/learn/state-extractor.js +212 -0
- package/src/verax/learn/static-extractor-navigation.js +114 -0
- package/src/verax/learn/static-extractor-validation.js +88 -0
- package/src/verax/learn/static-extractor.js +112 -4
- package/src/verax/learn/truth-assessor.js +24 -21
- package/src/verax/observe/aria-sensor.js +211 -0
- package/src/verax/observe/browser.js +10 -5
- package/src/verax/observe/console-sensor.js +1 -17
- package/src/verax/observe/domain-boundary.js +10 -1
- package/src/verax/observe/expectation-executor.js +512 -0
- package/src/verax/observe/flow-matcher.js +143 -0
- package/src/verax/observe/focus-sensor.js +196 -0
- package/src/verax/observe/human-driver.js +643 -275
- package/src/verax/observe/index.js +908 -27
- package/src/verax/observe/index.js.backup +1 -0
- package/src/verax/observe/interaction-discovery.js +365 -14
- package/src/verax/observe/interaction-runner.js +563 -198
- package/src/verax/observe/loading-sensor.js +139 -0
- package/src/verax/observe/navigation-sensor.js +255 -0
- package/src/verax/observe/network-sensor.js +55 -7
- package/src/verax/observe/observed-expectation-deriver.js +186 -0
- package/src/verax/observe/observed-expectation.js +305 -0
- package/src/verax/observe/page-frontier.js +234 -0
- package/src/verax/observe/settle.js +37 -17
- package/src/verax/observe/state-sensor.js +389 -0
- package/src/verax/observe/timing-sensor.js +228 -0
- package/src/verax/observe/traces-writer.js +61 -20
- package/src/verax/observe/ui-signal-sensor.js +136 -17
- package/src/verax/scan-summary-writer.js +77 -15
- package/src/verax/shared/artifact-manager.js +110 -8
- package/src/verax/shared/budget-profiles.js +136 -0
- package/src/verax/shared/ci-detection.js +39 -0
- package/src/verax/shared/config-loader.js +170 -0
- package/src/verax/shared/dynamic-route-utils.js +218 -0
- package/src/verax/shared/expectation-coverage.js +44 -0
- package/src/verax/shared/expectation-prover.js +81 -0
- package/src/verax/shared/expectation-tracker.js +201 -0
- package/src/verax/shared/expectations-writer.js +60 -0
- package/src/verax/shared/first-run.js +44 -0
- package/src/verax/shared/progress-reporter.js +171 -0
- package/src/verax/shared/retry-policy.js +14 -1
- package/src/verax/shared/root-artifacts.js +49 -0
- package/src/verax/shared/scan-budget.js +86 -0
- package/src/verax/shared/url-normalizer.js +162 -0
- package/src/verax/shared/zip-artifacts.js +65 -0
- package/src/verax/validate/context-validator.js +244 -0
- package/src/verax/validate/context-validator.js.bak +0 -0
package/README.md
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
🛡️ VERAX
|
|
1
|
+
# 🛡️ VERAX
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A forensic observation engine for real user outcomes
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
VERAX observes and reports gaps between what your code explicitly promises and what users can actually observe.
|
|
6
|
+
|
|
7
|
+
Silent user failures don’t crash your site.
|
|
8
|
+
They don’t throw errors.
|
|
7
9
|
They simply lose users quietly.
|
|
8
10
|
|
|
9
|
-
VERAX exists to surface those
|
|
11
|
+
VERAX exists to surface those gaps — with evidence, not guesses.
|
|
10
12
|
|
|
11
13
|
🤔 What is VERAX?
|
|
12
14
|
|
|
13
15
|
A silent user failure happens when your code clearly implies that something should happen —
|
|
14
16
|
but from the user’s point of view, nothing meaningful does.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
Concrete examples:
|
|
17
19
|
|
|
18
20
|
A button click that should navigate… but doesn’t.
|
|
19
21
|
|
|
@@ -21,17 +23,31 @@ A form submission that triggers an API call… but shows no feedback.
|
|
|
21
23
|
|
|
22
24
|
A state update that runs in code… but never reaches the UI.
|
|
23
25
|
|
|
24
|
-
These issues are frustrating for users and
|
|
26
|
+
These issues are frustrating for users and notoriously hard for teams to notice.
|
|
25
27
|
|
|
26
|
-
VERAX reads your source code to understand what
|
|
27
|
-
When
|
|
28
|
+
VERAX reads your source code to understand what is promised, then opens your site in a real browser and experiences it like a user.
|
|
29
|
+
When expectations and reality don’t align, VERAX reports the gap clearly and honestly.
|
|
28
30
|
|
|
29
31
|
VERAX does not guess intent.
|
|
30
|
-
It only reports
|
|
32
|
+
It only reports observations backed by explicit code promises.
|
|
33
|
+
|
|
34
|
+
🧠 Clarification: “Silent failure”
|
|
35
|
+
|
|
36
|
+
In VERAX, a silent failure is not a judgment about correctness.
|
|
37
|
+
|
|
38
|
+
It means:
|
|
39
|
+
|
|
40
|
+
For a promised interaction (for example, a click expected to navigate or save),
|
|
41
|
+
no observable, user-visible effect could be verified
|
|
42
|
+
(no URL change, no network request, no feedback).
|
|
43
|
+
|
|
44
|
+
This does not mean your code is wrong.
|
|
45
|
+
It means the observation produced no verifiable effect for the promise being evaluated.
|
|
31
46
|
|
|
32
47
|
✅ What VERAX does (today)
|
|
33
48
|
|
|
34
|
-
🔍
|
|
49
|
+
🔍 Observes and reports gaps between code promises and user-visible outcomes
|
|
50
|
+
(by comparing code-derived expectations with real browser behavior)
|
|
35
51
|
|
|
36
52
|
🧠 Extracts expectations from source code using static analysis:
|
|
37
53
|
|
|
@@ -39,23 +55,24 @@ Navigation from HTML links and React Router / Next.js routes
|
|
|
39
55
|
|
|
40
56
|
Network actions from fetch / axios calls with static URLs
|
|
41
57
|
|
|
42
|
-
State mutations from React useState, Redux dispatch,
|
|
58
|
+
State mutations from React useState, Redux dispatch, Zustand set
|
|
43
59
|
|
|
44
|
-
🖱️ Observes websites like a real user using Playwright
|
|
60
|
+
🖱️ Observes websites like a real user using Playwright
|
|
61
|
+
(clicks, forms, navigation, scrolling)
|
|
45
62
|
|
|
46
|
-
📊 Assigns confidence levels (HIGH / MEDIUM / LOW) based on evidence strength
|
|
63
|
+
📊 Assigns confidence levels (HIGH / MEDIUM / LOW) based on evidence strength and coverage
|
|
47
64
|
|
|
48
|
-
🧾 Provides
|
|
65
|
+
🧾 Provides concrete evidence for every reported discrepancy:
|
|
49
66
|
|
|
50
67
|
Screenshots
|
|
51
68
|
|
|
52
69
|
Network activity
|
|
53
70
|
|
|
54
|
-
Console
|
|
71
|
+
Console logs
|
|
55
72
|
|
|
56
73
|
DOM and state changes
|
|
57
74
|
|
|
58
|
-
💻 Runs as a CLI tool
|
|
75
|
+
💻 Runs as a CLI tool via `verax run` (and inspects results with `verax inspect`)
|
|
59
76
|
|
|
60
77
|
🧱 Supports real-world projects:
|
|
61
78
|
|
|
@@ -71,7 +88,7 @@ Next.js (App Router & Pages Router)
|
|
|
71
88
|
|
|
72
89
|
❌ Does not guess intent — no heuristics, no assumptions
|
|
73
90
|
|
|
74
|
-
❌ Does not support dynamic routes (/user/${id} is intentionally skipped)
|
|
91
|
+
❌ Does not support dynamic routes (e.g. /user/${id} is intentionally skipped)
|
|
75
92
|
|
|
76
93
|
❌ Does not replace QA or tests — it complements them
|
|
77
94
|
|
|
@@ -79,7 +96,7 @@ Next.js (App Router & Pages Router)
|
|
|
79
96
|
|
|
80
97
|
❌ Does not work for every framework
|
|
81
98
|
|
|
82
|
-
❌ Does not detect every bug — only
|
|
99
|
+
❌ Does not detect every bug — only gaps backed by explicit code promises
|
|
83
100
|
|
|
84
101
|
❌ Does not use AI — all results are deterministic and explainable
|
|
85
102
|
|
|
@@ -87,128 +104,138 @@ Next.js (App Router & Pages Router)
|
|
|
87
104
|
|
|
88
105
|
VERAX runs three phases automatically:
|
|
89
106
|
|
|
90
|
-
1
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Project structure
|
|
95
|
-
|
|
96
|
-
Routes
|
|
97
|
-
|
|
98
|
-
What interactions promise to do
|
|
99
|
-
Creates a manifest of expectations derived directly from code.
|
|
100
|
-
|
|
101
|
-
2️⃣ Observe
|
|
102
|
-
|
|
103
|
-
Opens your site in a real browser and interacts naturally:
|
|
107
|
+
1) **Learn**
|
|
108
|
+
Analyze source code to derive explicit, proven expectations
|
|
109
|
+
(routes, static network actions, state changes).
|
|
104
110
|
|
|
105
|
-
|
|
111
|
+
2) **Observe**
|
|
112
|
+
Open the site in a real browser and execute user interactions safely,
|
|
113
|
+
recording what actually happens.
|
|
106
114
|
|
|
107
|
-
|
|
115
|
+
3) **Detect**
|
|
116
|
+
Compare code-derived expectations with observed outcomes and report:
|
|
117
|
+
- Discrepancies
|
|
118
|
+
- Coverage gaps
|
|
119
|
+
- Unknowns
|
|
120
|
+
- Safety blocks
|
|
108
121
|
|
|
109
|
-
|
|
110
|
-
Records what actually happens.
|
|
111
|
-
|
|
112
|
-
3️⃣ Detect
|
|
113
|
-
|
|
114
|
-
Compares code expectations with real behavior.
|
|
115
|
-
Reports a finding only when code promised an outcome that did not occur — with evidence and confidence.
|
|
116
|
-
|
|
117
|
-
You run one command. VERAX handles the rest.
|
|
122
|
+
All with evidence.
|
|
118
123
|
|
|
119
124
|
📦 Installation
|
|
120
125
|
|
|
121
126
|
Requirements: Node.js 18+
|
|
122
127
|
|
|
123
|
-
From npm
|
|
124
|
-
|
|
128
|
+
From npm:
|
|
129
|
+
|
|
130
|
+
npm install -g @veraxhq/verax
|
|
125
131
|
|
|
126
132
|
From source:
|
|
133
|
+
|
|
127
134
|
git clone <repository-url>
|
|
128
|
-
cd
|
|
135
|
+
cd verax
|
|
129
136
|
npm install
|
|
130
137
|
npm link
|
|
131
138
|
|
|
132
|
-
|
|
133
|
-
Scan a website:
|
|
134
|
-
verax scan --url <http://localhost:3000>
|
|
139
|
+
## Commands
|
|
135
140
|
|
|
136
|
-
|
|
137
|
-
verax scan --url <http://localhost:3000> --json
|
|
141
|
+
VERAX provides these CLI commands:
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
verax
|
|
143
|
+
- `verax` — Interactive mode (detects URL or prompts for it)
|
|
144
|
+
- `verax run --url <url> [--src <path>] [--out <path>]` — Non-interactive CI mode (strict, explicit)
|
|
145
|
+
- `verax inspect <runPath>` — Inspect results from a previous run
|
|
146
|
+
- `verax doctor [--json]` — Verify environment (Node, Playwright, Chromium binary)
|
|
147
|
+
- `verax --version` — Show CLI version
|
|
148
|
+
- `verax --help` — Show help text
|
|
141
149
|
|
|
142
|
-
|
|
143
|
-
verax flow --flow ./flows/login.json --url <http://localhost:3000>
|
|
150
|
+
## Examples
|
|
144
151
|
|
|
145
|
-
|
|
152
|
+
Run a non-interactive scan (ideal for CI):
|
|
146
153
|
|
|
147
|
-
|
|
154
|
+
```bash
|
|
155
|
+
verax run --url http://localhost:3000 --src . --out .verax
|
|
156
|
+
```
|
|
148
157
|
|
|
149
|
-
|
|
158
|
+
Run interactive mode (default auto-detection):
|
|
150
159
|
|
|
151
|
-
|
|
160
|
+
```bash
|
|
161
|
+
verax
|
|
162
|
+
```
|
|
152
163
|
|
|
153
|
-
|
|
164
|
+
Check environment readiness:
|
|
154
165
|
|
|
155
|
-
|
|
166
|
+
```bash
|
|
167
|
+
verax doctor --json
|
|
168
|
+
```
|
|
156
169
|
|
|
157
|
-
|
|
170
|
+
Inspect a previous run:
|
|
158
171
|
|
|
159
|
-
|
|
172
|
+
```bash
|
|
173
|
+
verax inspect .verax/runs/2026-01-11T12-34-56Z_abc123
|
|
174
|
+
```
|
|
160
175
|
|
|
161
|
-
|
|
176
|
+
📁 Output (CI-friendly)
|
|
162
177
|
|
|
163
|
-
|
|
178
|
+
Run a scan:
|
|
164
179
|
|
|
165
|
-
|
|
180
|
+
```bash
|
|
181
|
+
verax run --url http://localhost:3000 --src . --out .verax
|
|
182
|
+
```
|
|
166
183
|
|
|
167
|
-
|
|
184
|
+
Artifacts are written to:
|
|
185
|
+
|
|
186
|
+
`.verax/runs/<runId>/`
|
|
187
|
+
|
|
188
|
+
Including:
|
|
168
189
|
|
|
169
|
-
|
|
190
|
+
- `summary.json` — overall observation summary with digest counts
|
|
191
|
+
- `findings.json` — reported discrepancies with evidence
|
|
192
|
+
- `learn.json` — code-derived expectations
|
|
193
|
+
- `observe.json` — browser observations and outcomes
|
|
194
|
+
- `evidence/` — screenshots and logs
|
|
170
195
|
|
|
171
|
-
|
|
196
|
+
🚦 Exit codes (tool-only semantics)
|
|
172
197
|
|
|
173
|
-
|
|
198
|
+
Exit codes reflect tool execution status only.
|
|
199
|
+
They do not represent site quality or correctness and must not be used as a pass/fail gate without explicit user logic.
|
|
174
200
|
|
|
175
|
-
|
|
201
|
+
0 — VERAX executed successfully (regardless of findings, gaps, or confidence)
|
|
176
202
|
|
|
177
|
-
|
|
203
|
+
2 — Tool crashed or failed internally
|
|
178
204
|
|
|
179
|
-
|
|
205
|
+
64 — Invalid CLI usage (missing args, invalid flags)
|
|
180
206
|
|
|
181
|
-
|
|
207
|
+
65 — Invalid input data (e.g. malformed JSON, unreadable manifest)
|
|
182
208
|
|
|
183
|
-
|
|
209
|
+
📊 Reading results (observer-first)
|
|
184
210
|
|
|
185
|
-
|
|
211
|
+
Each reported discrepancy includes:
|
|
186
212
|
|
|
187
|
-
|
|
213
|
+
Promise context: navigation, network action, state change, feedback
|
|
188
214
|
|
|
189
|
-
|
|
215
|
+
Outcome classification: silent failure, coverage gap, unproven interaction, safety block, informational
|
|
190
216
|
|
|
191
|
-
|
|
217
|
+
Evidence: screenshots, network artifacts, console logs, trace references
|
|
192
218
|
|
|
193
|
-
|
|
219
|
+
Confidence: coverage ratio and silence impact
|
|
194
220
|
|
|
195
|
-
|
|
221
|
+
Confidence (observer truth)
|
|
196
222
|
|
|
197
|
-
|
|
223
|
+
Confidence reflects the quality and completeness of observation,
|
|
224
|
+
not the quality or correctness of the site.
|
|
198
225
|
|
|
199
|
-
|
|
226
|
+
HIGH (≥80) — strong evidence and coverage; observations are reliable
|
|
200
227
|
|
|
201
|
-
|
|
228
|
+
MEDIUM (60–79) — likely discrepancy with some ambiguity
|
|
202
229
|
|
|
203
|
-
|
|
230
|
+
LOW (<60) — weak or partial evidence; interpret cautiously
|
|
204
231
|
|
|
205
|
-
|
|
232
|
+
🧭 When VERAX is a good fit
|
|
206
233
|
|
|
207
234
|
SaaS signup and pricing flows
|
|
208
235
|
|
|
209
236
|
React and Next.js projects
|
|
210
237
|
|
|
211
|
-
CI pipelines that need UX
|
|
238
|
+
CI pipelines that need UX reality checks
|
|
212
239
|
|
|
213
240
|
Teams that value evidence over assumptions
|
|
214
241
|
|
|
@@ -232,6 +259,14 @@ It is designed for early adopters and technical teams.
|
|
|
232
259
|
VERAX is not a SaaS product.
|
|
233
260
|
It runs locally or in CI. There is no hosted service.
|
|
234
261
|
|
|
262
|
+
⚠ Important
|
|
263
|
+
|
|
264
|
+
VERAX does not certify correctness.
|
|
265
|
+
Zero findings do not mean a site is safe.
|
|
266
|
+
|
|
267
|
+
VERAX exists to prevent false certainty, not to grant confidence.
|
|
268
|
+
Use the Decision Snapshot and evidence to make a human judgment.
|
|
269
|
+
|
|
235
270
|
📄 License
|
|
236
271
|
|
|
237
272
|
MIT
|