@gate-forge/cli 0.13.7 → 0.13.9
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/CHANGELOG.md +166 -0
- package/README.md +1 -0
- package/dist/adapter-audit.d.ts.map +1 -1
- package/dist/adapter-audit.js +14 -7
- package/dist/adapter-audit.js.map +1 -1
- package/dist/commands/test-gates.d.ts +7 -0
- package/dist/commands/test-gates.d.ts.map +1 -1
- package/dist/commands/test-gates.js +120 -13
- package/dist/commands/test-gates.js.map +1 -1
- package/dist/endpoint-compiler.d.ts +8 -0
- package/dist/endpoint-compiler.d.ts.map +1 -1
- package/dist/endpoint-compiler.js +41 -16
- package/dist/endpoint-compiler.js.map +1 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +7 -0
- package/dist/execution.js.map +1 -1
- package/dist/mapping.d.ts +4 -7
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +6 -8
- package/dist/mapping.js.map +1 -1
- package/dist/serial-expansion.d.ts +44 -0
- package/dist/serial-expansion.d.ts.map +1 -0
- package/dist/serial-expansion.js +118 -0
- package/dist/serial-expansion.js.map +1 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +16 -9
- package/dist/state.js.map +1 -1
- package/guides/CONNECT-YOUR-PROJECT.md +12 -12
- package/guides/QUICKSTART.md +7 -7
- package/guides/REFERENCE.md +143 -13
- package/package.json +11 -11
package/guides/REFERENCE.md
CHANGED
|
@@ -183,6 +183,30 @@ refuses to trust, so it executes the whole spec, drops every unselected
|
|
|
183
183
|
outcome and session (an unselected test never becomes evidence), and
|
|
184
184
|
says `also ran N other test(s) in the same file — not graded`.
|
|
185
185
|
|
|
186
|
+
##### Serial groups select whole (Playwright)
|
|
187
|
+
|
|
188
|
+
A serial journey cannot run in slices: a `test.describe.serial(...)`
|
|
189
|
+
describe — or a describe whose body calls
|
|
190
|
+
`test.describe.configure({ mode: 'serial' })`, including the file-level
|
|
191
|
+
form — chains its steps on shared state, so a mapped later step without
|
|
192
|
+
the group's own earlier steps fails by construction. When a selected
|
|
193
|
+
test belongs to a serial group, the run selects the WHOLE group, in
|
|
194
|
+
file order: the runner receives every step's location, the expected set
|
|
195
|
+
registers every step, and each step's own claims are graded like any
|
|
196
|
+
selected test's (a step that declares nothing contributes nothing). The
|
|
197
|
+
run names each expansion on its output and the report carries an
|
|
198
|
+
additive `serialExpansions` field:
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
scope: named (3 tests) — ...
|
|
202
|
+
selection: added 2 tests of serial group 'journey' (specs/journey.spec.js)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Detection is static — Playwright's own list mode never exposes a
|
|
206
|
+
suite's declared mode — and it reads exactly the three declaration
|
|
207
|
+
forms above. A describe that declares nothing serial is never expanded,
|
|
208
|
+
and an expansion never leaks beyond the selected test's own file.
|
|
209
|
+
|
|
186
210
|
#### What a named run grades, and its exit codes
|
|
187
211
|
|
|
188
212
|
A named run grades **only the selection**: the obligations its selected
|
|
@@ -326,6 +350,18 @@ their own config must repeat the value here — without it, Playwright's
|
|
|
326
350
|
default applies to every assertion that does not set an explicit timeout.
|
|
327
351
|
When the key is absent, nothing is emitted and Playwright's default stands.
|
|
328
352
|
|
|
353
|
+
Traces get the same treatment: `runtime.yml trace` takes one of
|
|
354
|
+
Playwright's trace modes (`off`, `on`, `retain-on-failure`,
|
|
355
|
+
`on-first-retry`, `on-all-retries`, `retain-on-first-failure`) and is
|
|
356
|
+
written as `use.trace` in the generated config a supervised Playwright
|
|
357
|
+
run executes under. The consumer config is never loaded, so an owner who
|
|
358
|
+
turned traces on in their own config must repeat the mode here — without
|
|
359
|
+
it the generated config keeps `trace: 'off'`, and `<state>/last-failures/`
|
|
360
|
+
never holds a `trace.zip` to diagnose a red supervised test from. When
|
|
361
|
+
the key is absent the default is unchanged, and a declared run's
|
|
362
|
+
`trace.zip` survives into `last-failures` with the other failure
|
|
363
|
+
artifacts. An unknown mode is a typed schema violation naming `trace`.
|
|
364
|
+
|
|
329
365
|
**Playwright only, and here is why.** A stall bound needs a stream of per-test
|
|
330
366
|
completions; today only the Playwright pack reads one. The pytest, Vitest,
|
|
331
367
|
Cypress and other supervisors keep their historical 30-minute whole-run
|
|
@@ -460,8 +496,15 @@ catalog, lists up to five of that file's real keys.
|
|
|
460
496
|
- An explicit kind may resolve `unknown` — and `observed-e2e` may refine an
|
|
461
497
|
inferred `browser-e2e` (same journey, witness-watched instead of
|
|
462
498
|
engine-driven) — but cannot override observed mocking or any other
|
|
463
|
-
strong code-signal inference
|
|
464
|
-
|
|
499
|
+
strong code-signal inference. In particular, `api-e2e` is not E2E evidence
|
|
500
|
+
for observed claims and cannot be reclassified as `observed-e2e`;
|
|
501
|
+
`tests mark` refuses such contradictions with both source locations.
|
|
502
|
+
- A test that Playwright lists but static discovery did not read cannot
|
|
503
|
+
carry an E2E claim: Gateforge blocks sidecar and native claims for that
|
|
504
|
+
row until code is readable. This is distinct from a scanned test whose
|
|
505
|
+
code signals are inconclusive; a declared kind may still resolve that
|
|
506
|
+
scanned row's `unknown`. Likely causes include an unresolved wrapper
|
|
507
|
+
import or a file extension outside configured source globs.
|
|
465
508
|
- Agents may edit the sidecar directly; both paths receive identical
|
|
466
509
|
validation. `mark` is idempotent: re-running an exact declaration writes
|
|
467
510
|
nothing and reports `no changes`.
|
|
@@ -603,7 +646,30 @@ read. A file that NO runner's selection claims keeps the configured runner
|
|
|
603
646
|
and stays a blocking row (`reconciliation-static-only`, carrying a
|
|
604
647
|
`no-runner-claims-file` weak signal that says so): ownership is never
|
|
605
648
|
invented.
|
|
606
|
-
`inventoryComplete` is judged over the CONFIGURED runner's unresolved rows
|
|
649
|
+
`inventoryComplete` is judged over the CONFIGURED runner's unresolved rows
|
|
650
|
+
(rows carrying the 0.13.9 runner-authority note below are informational,
|
|
651
|
+
never gaps).
|
|
652
|
+
|
|
653
|
+
### The runner's list is the authority on what executes (0.13.9)
|
|
654
|
+
|
|
655
|
+
Two reconciliation shapes read the runner's own enumeration as the
|
|
656
|
+
authority:
|
|
657
|
+
|
|
658
|
+
- **TypeScript extension substitution.** A relative import ending
|
|
659
|
+
`.js`/`.mjs`/`.cjs`/`.jsx` resolves to the TypeScript sibling of the
|
|
660
|
+
same stem whenever the literal file does not exist (`.js`→`.ts` then
|
|
661
|
+
`.tsx`, `.mjs`→`.mts`, `.cjs`→`.cts`, `.jsx`→`.tsx`) — TypeScript's
|
|
662
|
+
own ESM rule, and the one every runner loader applies. The literal
|
|
663
|
+
file wins whenever it exists.
|
|
664
|
+
- **The informational runner-authority note.** A static-only row whose
|
|
665
|
+
title is computed (`dynamic-title`, or a `<unresolved-title>`
|
|
666
|
+
placeholder) in a file the runner listed at least one instance for,
|
|
667
|
+
whose call sites the runner listed NOTHING at, carries the note
|
|
668
|
+
`call site never registered by the runner: conditional or unreached`:
|
|
669
|
+
it stays catalog data, plans nothing, demands no session, and never
|
|
670
|
+
makes the inventory incomplete. Files the runner listed nothing for
|
|
671
|
+
keep failing closed, and a resolved literal title the runner does not
|
|
672
|
+
list stays a blocking row.
|
|
607
673
|
|
|
608
674
|
## Advisory pytest diagnostics
|
|
609
675
|
|
|
@@ -1110,6 +1176,17 @@ else):
|
|
|
1110
1176
|
| `http:effect-verified`, `http:read-result-verified` | AVAILABLE (behavior-case channel) — graded across the approved required cases with witness-issued `behavior.case` records; needs a compiled `behaviorPolicy` requirement set |
|
|
1111
1177
|
| `auth:*`, `validation:*`, `task:*`, `webhook:*`, `workflow:*` | AVAILABLE (behavior-case channel) — same required-case aggregation over engine-controlled requests with independent state scopes. A repository that declares no case for the obligation stays blocking `missing`: the grader never falls back to transport evidence |
|
|
1112
1178
|
|
|
1179
|
+
For browser requests observed through the Playwright fixture, Chromium also
|
|
1180
|
+
checks the request's CDP script initiator. A request whose outermost async
|
|
1181
|
+
call-stack frame has no URL (for example, `page.evaluate` or an injected
|
|
1182
|
+
script) is retained as an observation but never satisfies transport
|
|
1183
|
+
evidence; when it is the only matching exchange, the verifier directs the
|
|
1184
|
+
owner to drive the operation through the UI. Requests without a script stack
|
|
1185
|
+
and requests whose outermost frame belongs to page code remain eligible.
|
|
1186
|
+
This initiator distinction is Chromium-only. Firefox and WebKit preserve
|
|
1187
|
+
their prior behavior and emit a diagnostic that the distinction is
|
|
1188
|
+
unavailable.
|
|
1189
|
+
|
|
1113
1190
|
|
|
1114
1191
|
A behavior case may declare a `signatureProfile` on its `request`
|
|
1115
1192
|
action: an algorithm plus bounded `;key=value` parameters
|
|
@@ -1225,7 +1302,28 @@ fixture (channel `observed`); after the tests, the referee sweeps only pages
|
|
|
1225
1302
|
without a clean observed record (channel `swept`). A clean test visit always
|
|
1226
1303
|
takes precedence over the sweep. Both channels use the same route, redirect,
|
|
1227
1304
|
crash, error-marker, and API-response grader. Browser API tampering in tests
|
|
1228
|
-
is refused as `PAGE_OBSERVATION_TAMPER_RISK`.
|
|
1305
|
+
is refused as `PAGE_OBSERVATION_TAMPER_RISK`. Three things are not
|
|
1306
|
+
tampers. A storage-only init script — `addInitScript` whose body only
|
|
1307
|
+
reads and writes `localStorage`/`sessionStorage` (`setItem`, `getItem`,
|
|
1308
|
+
`removeItem`, `clear`), keyed and valued by literals, its own
|
|
1309
|
+
parameters (one `addInitScript` argument per parameter), declared
|
|
1310
|
+
constants, and inert builtins (`JSON.stringify`, `String`,
|
|
1311
|
+
`Date.now()`, `new Date().toISOString()`), under `if`/`try`/`catch`
|
|
1312
|
+
guards, passed directly or as a reference to a locally declared
|
|
1313
|
+
function — mutates nothing the witness cannot verify from its
|
|
1314
|
+
independent observer. And the risk follows the test, not the file: a
|
|
1315
|
+
tamper inside an imported helper flags only the tests whose body (or
|
|
1316
|
+
registration fixture) provably reaches it; a tamper written in the
|
|
1317
|
+
spec, one that executes at import time, and any shape whose
|
|
1318
|
+
reachability cannot be proven flag the whole file as before. Finally,
|
|
1319
|
+
in Chromium, requests started by evaluated test code are refused at
|
|
1320
|
+
runtime, so `evaluate` itself (`page.evaluate`, `locator.evaluate`,
|
|
1321
|
+
`evaluateHandle`, `$eval`/`$$eval`) is no longer refused when reading
|
|
1322
|
+
the code — in projects the runner resolved to chromium. firefox and
|
|
1323
|
+
webkit projects keep the static flag (the runtime rule cannot see
|
|
1324
|
+
there), as does every project whose browser is undetermined. Route
|
|
1325
|
+
interception, function exposure, content replacement, CDP sessions,
|
|
1326
|
+
and non-storage-only init scripts refuse on every browser.
|
|
1229
1327
|
|
|
1230
1328
|
An API request counts as settled only when its response BODY finished
|
|
1231
1329
|
(Playwright `requestfinished`), never at the response headers: a failed or
|
|
@@ -1531,6 +1629,12 @@ can DISABLE delete for one exact resource; declaring semantics is the
|
|
|
1531
1629
|
other half of the answer, and it needs a pattern because one declaration
|
|
1532
1630
|
usually covers a whole model tree.
|
|
1533
1631
|
|
|
1632
|
+
The witness applies this exact-resource lifecycle result to its bound
|
|
1633
|
+
adapter: when `delete` is disabled, the adapter omits `deletion`; a
|
|
1634
|
+
declared `hard` or `archive` value is rejected as contradictory. A
|
|
1635
|
+
resource whose delete remains enabled still requires adapter deletion
|
|
1636
|
+
semantics.
|
|
1637
|
+
|
|
1534
1638
|
`deleteRules` are the answer for a RESOURCE — their `match` names that
|
|
1535
1639
|
resource's source file, so one declaration answers every DELETE route
|
|
1536
1640
|
linked to it. They are not the answer for a DELETE ROUTE THAT LINKS NO
|
|
@@ -1913,6 +2017,26 @@ the runner. A difference stops the run before tests start and names each
|
|
|
1913
2017
|
project, file, and title present in only one inventory. Static discovery
|
|
1914
2018
|
also warns when `process.env.GATEFORGE_*` controls test registration.
|
|
1915
2019
|
|
|
2020
|
+
For Playwright, static discovery follows bounded local ESM imports and
|
|
2021
|
+
CommonJS `require` wrappers back to the package root or its exported
|
|
2022
|
+
`/fixture` subpath. Proven bindings let the scanner retain test-code
|
|
2023
|
+
signals—such as browser fixtures—for kind inference before the static row
|
|
2024
|
+
is reconciled with the runner's listed identity. An npm alias is treated as
|
|
2025
|
+
the Gateforge package only when the root or nearest package manifest maps
|
|
2026
|
+
it to the exact package name, or the installed
|
|
2027
|
+
`node_modules/<alias>/package.json` names the Gateforge package. Without
|
|
2028
|
+
either proof, an external module is not assumed to export Playwright's
|
|
2029
|
+
`test`. Every file the Playwright runner lists is scanned, even outside the
|
|
2030
|
+
configured source globs, because the runner will execute it; configured
|
|
2031
|
+
exclusions still apply. A listed test the scan could not read stays
|
|
2032
|
+
runner-list-only and cannot carry an E2E claim (`TEST_KIND_UNKNOWN`).
|
|
2033
|
+
When the runner computes a test title from data, Gateforge joins the
|
|
2034
|
+
listed instance to the statically read call site only when its file and
|
|
2035
|
+
source line match. Static call-site facts then supply kind and tamper
|
|
2036
|
+
signals for every instance registered at that line. Resolvable titles
|
|
2037
|
+
continue to require title-path identity; a different literal title is
|
|
2038
|
+
never joined by line alone.
|
|
2039
|
+
|
|
1916
2040
|
### Provenance trust model (GF-23, audited 2026-08-31, three rounds)
|
|
1917
2041
|
|
|
1918
2042
|
`records.json` and `manifest.json` live in the suite-writable state
|
|
@@ -1982,6 +2106,13 @@ action changes a field outside that projection. `check` also reports
|
|
|
1982
2106
|
model updateable fields missing from a statically readable projection.
|
|
1983
2107
|
Adapters without this metadata keep their existing behavior.
|
|
1984
2108
|
|
|
2109
|
+
An adapter may omit `deletion` only when every resource bound to that
|
|
2110
|
+
adapter has delete disabled by its lifecycle classification. Declaring it
|
|
2111
|
+
there is still allowed (`hard` or `archive`); enabled-delete resources
|
|
2112
|
+
always require it. An adapter shared by resources with conflicting delete
|
|
2113
|
+
rules is refused. The witness resolves this against the resource-to-adapter
|
|
2114
|
+
bindings at startup.
|
|
2115
|
+
|
|
1985
2116
|
Presence alone, contradicted observations, missing pre-observations, or
|
|
1986
2117
|
absent deltas grade `invalid` — even when every provenance check passes.
|
|
1987
2118
|
|
|
@@ -2236,15 +2367,14 @@ const { test: baseTest, expect } = require('@gate-forge/pack-playwright/fixture'
|
|
|
2236
2367
|
import { test as baseTest, expect } from '@gate-forge/pack-playwright/fixture';
|
|
2237
2368
|
```
|
|
2238
2369
|
|
|
2239
|
-
The fixture module also exports `request` (next to `test`/`expect`)
|
|
2240
|
-
|
|
2241
|
-
`page.request`/`context.request
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
reported through the same unrouted-origin channel as the page.
|
|
2370
|
+
The fixture module also exports `request` (next to `test`/`expect`) for
|
|
2371
|
+
Playwright API requests. API calls made by test code—including the `request`
|
|
2372
|
+
fixture, `page.request`/`context.request`, and `request.newContext()`—go
|
|
2373
|
+
directly to the app and are never E2E evidence. Only traffic generated by
|
|
2374
|
+
the app's UI in the browser page can satisfy observed HTTP claims. Direct-call
|
|
2375
|
+
diagnostics cover the `request` fixture and `request.newContext()`; direct
|
|
2376
|
+
`page.request`/`context.request` calls are not credited and do not receive
|
|
2377
|
+
that specialized diagnostic.
|
|
2248
2378
|
|
|
2249
2379
|
Rebasing the shared base is not rewriting a journey: the journeys' own steps,
|
|
2250
2380
|
assertions and fixtures stay as they are, and only the `test` object they
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gate-forge/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.9",
|
|
4
4
|
"gateforgeCompatibility": {
|
|
5
5
|
"supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
|
|
6
6
|
},
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"test": "vitest run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@gate-forge/core": "^0.13.
|
|
37
|
-
"@gate-forge/http-contract": "^0.13.
|
|
38
|
-
"@gate-forge/pack-fastapi": "^0.13.
|
|
39
|
-
"@gate-forge/pack-alembic": "^0.13.
|
|
40
|
-
"@gate-forge/pack-http": "^0.13.
|
|
41
|
-
"@gate-forge/pack-react-router": "^0.13.
|
|
42
|
-
"@gate-forge/pack-playwright": "^0.13.
|
|
43
|
-
"@gate-forge/pack-sqlalchemy": "^0.13.
|
|
44
|
-
"@gate-forge/pack-task": "^0.13.
|
|
45
|
-
"@gate-forge/plugin-protocol": "^0.13.
|
|
36
|
+
"@gate-forge/core": "^0.13.9",
|
|
37
|
+
"@gate-forge/http-contract": "^0.13.9",
|
|
38
|
+
"@gate-forge/pack-fastapi": "^0.13.9",
|
|
39
|
+
"@gate-forge/pack-alembic": "^0.13.9",
|
|
40
|
+
"@gate-forge/pack-http": "^0.13.9",
|
|
41
|
+
"@gate-forge/pack-react-router": "^0.13.9",
|
|
42
|
+
"@gate-forge/pack-playwright": "^0.13.9",
|
|
43
|
+
"@gate-forge/pack-sqlalchemy": "^0.13.9",
|
|
44
|
+
"@gate-forge/pack-task": "^0.13.9",
|
|
45
|
+
"@gate-forge/plugin-protocol": "^0.13.9",
|
|
46
46
|
"picomatch": "^4.0.7",
|
|
47
47
|
"yaml": "^2.8.1"
|
|
48
48
|
},
|