@gate-forge/cli 0.7.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.
Files changed (296) hide show
  1. package/README.md +91 -704
  2. package/dist/adapter-audit.d.ts +208 -0
  3. package/dist/adapter-audit.d.ts.map +1 -0
  4. package/dist/adapter-audit.js +579 -0
  5. package/dist/adapter-audit.js.map +1 -0
  6. package/dist/adapter-scaffold.d.ts +91 -0
  7. package/dist/adapter-scaffold.d.ts.map +1 -0
  8. package/dist/adapter-scaffold.js +474 -0
  9. package/dist/adapter-scaffold.js.map +1 -0
  10. package/dist/adopted-baseline.d.ts +10 -0
  11. package/dist/adopted-baseline.d.ts.map +1 -1
  12. package/dist/adopted-baseline.js +18 -1
  13. package/dist/adopted-baseline.js.map +1 -1
  14. package/dist/args.d.ts +15 -0
  15. package/dist/args.d.ts.map +1 -1
  16. package/dist/args.js +61 -2
  17. package/dist/args.js.map +1 -1
  18. package/dist/behavior-setup.d.ts +239 -0
  19. package/dist/behavior-setup.d.ts.map +1 -0
  20. package/dist/behavior-setup.js +751 -0
  21. package/dist/behavior-setup.js.map +1 -0
  22. package/dist/broker.d.ts.map +1 -1
  23. package/dist/broker.js +28 -2
  24. package/dist/broker.js.map +1 -1
  25. package/dist/cache-exclusions.d.ts +45 -0
  26. package/dist/cache-exclusions.d.ts.map +1 -0
  27. package/dist/cache-exclusions.js +205 -0
  28. package/dist/cache-exclusions.js.map +1 -0
  29. package/dist/candidate-tree.d.ts +86 -14
  30. package/dist/candidate-tree.d.ts.map +1 -1
  31. package/dist/candidate-tree.js +236 -62
  32. package/dist/candidate-tree.js.map +1 -1
  33. package/dist/ci-witnessed-template.d.ts +43 -0
  34. package/dist/ci-witnessed-template.d.ts.map +1 -0
  35. package/dist/ci-witnessed-template.js +283 -0
  36. package/dist/ci-witnessed-template.js.map +1 -0
  37. package/dist/cli.d.ts +1 -1
  38. package/dist/cli.d.ts.map +1 -1
  39. package/dist/cli.js +31 -4
  40. package/dist/cli.js.map +1 -1
  41. package/dist/commands/adapters.d.ts +15 -0
  42. package/dist/commands/adapters.d.ts.map +1 -0
  43. package/dist/commands/adapters.js +355 -0
  44. package/dist/commands/adapters.js.map +1 -0
  45. package/dist/commands/adopt.d.ts +7 -0
  46. package/dist/commands/adopt.d.ts.map +1 -1
  47. package/dist/commands/adopt.js +44 -2
  48. package/dist/commands/adopt.js.map +1 -1
  49. package/dist/commands/baseline.d.ts.map +1 -1
  50. package/dist/commands/baseline.js +42 -1
  51. package/dist/commands/baseline.js.map +1 -1
  52. package/dist/commands/blocking.d.ts +105 -2
  53. package/dist/commands/blocking.d.ts.map +1 -1
  54. package/dist/commands/blocking.js +395 -53
  55. package/dist/commands/blocking.js.map +1 -1
  56. package/dist/commands/check.d.ts +36 -0
  57. package/dist/commands/check.d.ts.map +1 -1
  58. package/dist/commands/check.js +1068 -64
  59. package/dist/commands/check.js.map +1 -1
  60. package/dist/commands/classify.d.ts +2 -1
  61. package/dist/commands/classify.d.ts.map +1 -1
  62. package/dist/commands/classify.js +188 -5
  63. package/dist/commands/classify.js.map +1 -1
  64. package/dist/commands/enforce.d.ts +4 -4
  65. package/dist/commands/enforce.d.ts.map +1 -1
  66. package/dist/commands/enforce.js +41 -9
  67. package/dist/commands/enforce.js.map +1 -1
  68. package/dist/commands/enforcement.d.ts +13 -1
  69. package/dist/commands/enforcement.d.ts.map +1 -1
  70. package/dist/commands/enforcement.js +880 -33
  71. package/dist/commands/enforcement.js.map +1 -1
  72. package/dist/commands/explain.d.ts +1 -1
  73. package/dist/commands/explain.d.ts.map +1 -1
  74. package/dist/commands/explain.js +162 -3
  75. package/dist/commands/explain.js.map +1 -1
  76. package/dist/commands/history.d.ts +12 -0
  77. package/dist/commands/history.d.ts.map +1 -0
  78. package/dist/commands/history.js +45 -0
  79. package/dist/commands/history.js.map +1 -0
  80. package/dist/commands/init-presets.d.ts +155 -0
  81. package/dist/commands/init-presets.d.ts.map +1 -0
  82. package/dist/commands/init-presets.js +203 -0
  83. package/dist/commands/init-presets.js.map +1 -0
  84. package/dist/commands/init.d.ts +7 -12
  85. package/dist/commands/init.d.ts.map +1 -1
  86. package/dist/commands/init.js +987 -99
  87. package/dist/commands/init.js.map +1 -1
  88. package/dist/commands/keys.d.ts.map +1 -1
  89. package/dist/commands/keys.js +29 -13
  90. package/dist/commands/keys.js.map +1 -1
  91. package/dist/commands/next.d.ts.map +1 -1
  92. package/dist/commands/next.js +846 -19
  93. package/dist/commands/next.js.map +1 -1
  94. package/dist/commands/pre-commit.d.ts +25 -0
  95. package/dist/commands/pre-commit.d.ts.map +1 -1
  96. package/dist/commands/pre-commit.js +91 -6
  97. package/dist/commands/pre-commit.js.map +1 -1
  98. package/dist/commands/quarantine.d.ts +16 -0
  99. package/dist/commands/quarantine.d.ts.map +1 -0
  100. package/dist/commands/quarantine.js +213 -0
  101. package/dist/commands/quarantine.js.map +1 -0
  102. package/dist/commands/run.d.ts +39 -0
  103. package/dist/commands/run.d.ts.map +1 -0
  104. package/dist/commands/run.js +196 -0
  105. package/dist/commands/run.js.map +1 -0
  106. package/dist/commands/test-gates.d.ts +284 -2
  107. package/dist/commands/test-gates.d.ts.map +1 -1
  108. package/dist/commands/test-gates.js +3620 -187
  109. package/dist/commands/test-gates.js.map +1 -1
  110. package/dist/commands/tests.d.ts +1 -1
  111. package/dist/commands/tests.d.ts.map +1 -1
  112. package/dist/commands/tests.js +264 -29
  113. package/dist/commands/tests.js.map +1 -1
  114. package/dist/docs-exclusions.d.ts.map +1 -1
  115. package/dist/docs-exclusions.js +18 -3
  116. package/dist/docs-exclusions.js.map +1 -1
  117. package/dist/endpoint-compiler.d.ts.map +1 -1
  118. package/dist/endpoint-compiler.js +78 -9
  119. package/dist/endpoint-compiler.js.map +1 -1
  120. package/dist/engine-browser.d.ts +183 -0
  121. package/dist/engine-browser.d.ts.map +1 -0
  122. package/dist/engine-browser.js +381 -0
  123. package/dist/engine-browser.js.map +1 -0
  124. package/dist/engine-identity.d.ts +100 -0
  125. package/dist/engine-identity.d.ts.map +1 -0
  126. package/dist/engine-identity.js +182 -0
  127. package/dist/engine-identity.js.map +1 -0
  128. package/dist/evaluate.d.ts +105 -1
  129. package/dist/evaluate.d.ts.map +1 -1
  130. package/dist/evaluate.js +149 -18
  131. package/dist/evaluate.js.map +1 -1
  132. package/dist/execution.d.ts +253 -9
  133. package/dist/execution.d.ts.map +1 -1
  134. package/dist/execution.js +309 -12
  135. package/dist/execution.js.map +1 -1
  136. package/dist/gateforge-owned.d.ts +78 -0
  137. package/dist/gateforge-owned.d.ts.map +1 -0
  138. package/dist/gateforge-owned.js +254 -0
  139. package/dist/gateforge-owned.js.map +1 -0
  140. package/dist/git-hooks.d.ts +35 -0
  141. package/dist/git-hooks.d.ts.map +1 -1
  142. package/dist/git-hooks.js +140 -1
  143. package/dist/git-hooks.js.map +1 -1
  144. package/dist/git-ignored.d.ts +27 -0
  145. package/dist/git-ignored.d.ts.map +1 -0
  146. package/dist/git-ignored.js +102 -0
  147. package/dist/git-ignored.js.map +1 -0
  148. package/dist/git-objects.d.ts +60 -0
  149. package/dist/git-objects.d.ts.map +1 -0
  150. package/dist/git-objects.js +152 -0
  151. package/dist/git-objects.js.map +1 -0
  152. package/dist/glob.d.ts +33 -14
  153. package/dist/glob.d.ts.map +1 -1
  154. package/dist/glob.js +96 -5
  155. package/dist/glob.js.map +1 -1
  156. package/dist/history.d.ts +52 -0
  157. package/dist/history.d.ts.map +1 -0
  158. package/dist/history.js +116 -0
  159. package/dist/history.js.map +1 -0
  160. package/dist/host-load.d.ts +49 -0
  161. package/dist/host-load.d.ts.map +1 -0
  162. package/dist/host-load.js +78 -0
  163. package/dist/host-load.js.map +1 -0
  164. package/dist/index.d.ts +4 -1
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +2 -1
  167. package/dist/index.js.map +1 -1
  168. package/dist/input-snapshot.d.ts +63 -9
  169. package/dist/input-snapshot.d.ts.map +1 -1
  170. package/dist/input-snapshot.js +195 -17
  171. package/dist/input-snapshot.js.map +1 -1
  172. package/dist/io.d.ts +49 -0
  173. package/dist/io.d.ts.map +1 -1
  174. package/dist/io.js +22 -0
  175. package/dist/io.js.map +1 -1
  176. package/dist/mapping.d.ts +84 -1
  177. package/dist/mapping.d.ts.map +1 -1
  178. package/dist/mapping.js +276 -5
  179. package/dist/mapping.js.map +1 -1
  180. package/dist/native-freeze.d.ts +217 -0
  181. package/dist/native-freeze.d.ts.map +1 -0
  182. package/dist/native-freeze.js +332 -0
  183. package/dist/native-freeze.js.map +1 -0
  184. package/dist/pipeline.d.ts +67 -1
  185. package/dist/pipeline.d.ts.map +1 -1
  186. package/dist/pipeline.js +164 -6
  187. package/dist/pipeline.js.map +1 -1
  188. package/dist/planes-inference.d.ts +12 -5
  189. package/dist/planes-inference.d.ts.map +1 -1
  190. package/dist/planes-inference.js +13 -15
  191. package/dist/planes-inference.js.map +1 -1
  192. package/dist/playwright-browsers.d.ts +210 -0
  193. package/dist/playwright-browsers.d.ts.map +1 -0
  194. package/dist/playwright-browsers.js +364 -0
  195. package/dist/playwright-browsers.js.map +1 -0
  196. package/dist/plugins.d.ts +15 -5
  197. package/dist/plugins.d.ts.map +1 -1
  198. package/dist/plugins.js +59 -9
  199. package/dist/plugins.js.map +1 -1
  200. package/dist/progress.d.ts +148 -0
  201. package/dist/progress.d.ts.map +1 -0
  202. package/dist/progress.js +263 -0
  203. package/dist/progress.js.map +1 -0
  204. package/dist/providers.d.ts +26 -1
  205. package/dist/providers.d.ts.map +1 -1
  206. package/dist/providers.js +39 -0
  207. package/dist/providers.js.map +1 -1
  208. package/dist/receipts.d.ts +1 -0
  209. package/dist/receipts.d.ts.map +1 -1
  210. package/dist/receipts.js +35 -7
  211. package/dist/receipts.js.map +1 -1
  212. package/dist/repo-scan.d.ts +15 -1
  213. package/dist/repo-scan.d.ts.map +1 -1
  214. package/dist/repo-scan.js +329 -34
  215. package/dist/repo-scan.js.map +1 -1
  216. package/dist/reseal-chain.d.ts +184 -0
  217. package/dist/reseal-chain.d.ts.map +1 -0
  218. package/dist/reseal-chain.js +735 -0
  219. package/dist/reseal-chain.js.map +1 -0
  220. package/dist/reseal-evidence.d.ts +241 -0
  221. package/dist/reseal-evidence.d.ts.map +1 -0
  222. package/dist/reseal-evidence.js +319 -0
  223. package/dist/reseal-evidence.js.map +1 -0
  224. package/dist/reseal.d.ts +181 -0
  225. package/dist/reseal.d.ts.map +1 -0
  226. package/dist/reseal.js +1620 -0
  227. package/dist/reseal.js.map +1 -0
  228. package/dist/response-field-guidance.d.ts +82 -0
  229. package/dist/response-field-guidance.d.ts.map +1 -0
  230. package/dist/response-field-guidance.js +184 -0
  231. package/dist/response-field-guidance.js.map +1 -0
  232. package/dist/route-plane-proposals.d.ts +100 -0
  233. package/dist/route-plane-proposals.d.ts.map +1 -0
  234. package/dist/route-plane-proposals.js +213 -0
  235. package/dist/route-plane-proposals.js.map +1 -0
  236. package/dist/run-cache.d.ts +260 -0
  237. package/dist/run-cache.d.ts.map +1 -0
  238. package/dist/run-cache.js +771 -0
  239. package/dist/run-cache.js.map +1 -0
  240. package/dist/run-preflight.d.ts +77 -0
  241. package/dist/run-preflight.d.ts.map +1 -0
  242. package/dist/run-preflight.js +774 -0
  243. package/dist/run-preflight.js.map +1 -0
  244. package/dist/run-recipe.d.ts +107 -0
  245. package/dist/run-recipe.d.ts.map +1 -0
  246. package/dist/run-recipe.js +295 -0
  247. package/dist/run-recipe.js.map +1 -0
  248. package/dist/run-reliability.d.ts +126 -0
  249. package/dist/run-reliability.d.ts.map +1 -0
  250. package/dist/run-reliability.js +221 -0
  251. package/dist/run-reliability.js.map +1 -0
  252. package/dist/runtime.d.ts +15 -0
  253. package/dist/runtime.d.ts.map +1 -1
  254. package/dist/runtime.js +11 -1
  255. package/dist/runtime.js.map +1 -1
  256. package/dist/scope.d.ts +20 -0
  257. package/dist/scope.d.ts.map +1 -1
  258. package/dist/scope.js +26 -5
  259. package/dist/scope.js.map +1 -1
  260. package/dist/secret-guard.d.ts +36 -0
  261. package/dist/secret-guard.d.ts.map +1 -0
  262. package/dist/secret-guard.js +63 -0
  263. package/dist/secret-guard.js.map +1 -0
  264. package/dist/singleton-guidance.d.ts +82 -0
  265. package/dist/singleton-guidance.d.ts.map +1 -0
  266. package/dist/singleton-guidance.js +138 -0
  267. package/dist/singleton-guidance.js.map +1 -0
  268. package/dist/staged-candidate.d.ts +17 -0
  269. package/dist/staged-candidate.d.ts.map +1 -1
  270. package/dist/staged-candidate.js +50 -0
  271. package/dist/staged-candidate.js.map +1 -1
  272. package/dist/state-artifacts.d.ts +70 -0
  273. package/dist/state-artifacts.d.ts.map +1 -0
  274. package/dist/state-artifacts.js +215 -0
  275. package/dist/state-artifacts.js.map +1 -0
  276. package/dist/state.d.ts +170 -2
  277. package/dist/state.d.ts.map +1 -1
  278. package/dist/state.js +248 -8
  279. package/dist/state.js.map +1 -1
  280. package/dist/unmatched-routes.d.ts +60 -0
  281. package/dist/unmatched-routes.d.ts.map +1 -0
  282. package/dist/unmatched-routes.js +131 -0
  283. package/dist/unmatched-routes.js.map +1 -0
  284. package/dist/verifier-keys.d.ts +33 -2
  285. package/dist/verifier-keys.d.ts.map +1 -1
  286. package/dist/verifier-keys.js +95 -9
  287. package/dist/verifier-keys.js.map +1 -1
  288. package/guides/CONNECT-YOUR-PROJECT.md +425 -0
  289. package/guides/QUICKSTART.md +306 -26
  290. package/guides/REFERENCE.md +1710 -0
  291. package/guides/RUNNER-NEUTRAL-EVIDENCE.md +199 -0
  292. package/guides/TEST-ENVIRONMENT.md +1044 -6
  293. package/guides/UPGRADE-0.6-to-0.7.md +3 -3
  294. package/guides/UPGRADE-0.7-to-0.8.md +114 -0
  295. package/guides/UPGRADE-0.8-to-0.9.md +104 -0
  296. package/package.json +10 -9
@@ -0,0 +1,199 @@
1
+ # Runners other than Playwright
2
+
3
+ The witness is an HTTP proxy plus a DB/queue reader. It does not care who
4
+ sends the traffic, so the only runner-specific work is three jobs:
5
+
6
+ 1. **List** the tests before the run (the expected set is fixed first).
7
+ 2. **Tag** every request with the test identity (a per-test session proxy
8
+ origin, or a signed session header).
9
+ 3. **Read results** from a structured report (native JSON or JUnit XML) —
10
+ never from terminal colors.
11
+
12
+ Each runner below is a `RunnerAdapter` behind the same contract
13
+ (`@gate-forge/witness/adapter`) and is graded by the same conformance
14
+ suite: every planned test passes on the first attempt, a failure blocks, a
15
+ skip blocks, a runner-assisted retry blocks, an unplanned test blocks, a
16
+ zero-test run blocks, and a report row with no runner identity is
17
+ attributed to nothing. A runner's own "passed" is never authority.
18
+
19
+ Additions only: JSON keys, cause codes, exit codes, config keys and receipts
20
+ are frozen, and an existing Playwright project sees no change at all.
21
+
22
+ ## In-process test clients are refused
23
+
24
+ The rule behind all of it: a request that never crosses the session proxy
25
+ can never be witnessed. supertest handed the app instance, FastAPI
26
+ `TestClient`, or an in-process fetch therefore fails the run with a typed
27
+ message instead of passing quietly. Point the client at the app's base URL
28
+ under the supervised run and the same test becomes real evidence.
29
+
30
+ ## pytest + httpx
31
+
32
+ - **Where**: `@gate-forge/pack-playwright` — `discovery/pytest-runner-adapter.ts`
33
+ plus the pack's pytest plugin (`python/gateforge_pytest_plugin.py`).
34
+ - **Enumerate**: the configured suite argv with `--collect-only -q`. The
35
+ expected set is the collection result, before anything runs.
36
+ - **Tag**: the plugin opens a witness session per test and routes the
37
+ test's `httpx` client through that test's session proxy origin.
38
+ - **Read**: strict JUnit XML. A case without its file attribute is never
39
+ attributed to a test, and a duplicated case (a rerun) is reported as a
40
+ runner-assisted retry.
41
+ - **Use it**: configure the suite with `witnessed: true` and load the
42
+ plugin through `PYTHONPATH` (the adapter does this for you). Drive the
43
+ app over HTTP (`await client.post(f"{base_url}/...")`) — a
44
+ `TestClient(app)` call is refused.
45
+
46
+ ## Jest/Vitest + supertest
47
+
48
+ - **Where**: `@gate-forge/pack-playwright` — `discovery/vitest-runner-adapter.ts`,
49
+ the reporter at `src/vitest/reporter.ts`, the in-test helper exported as
50
+ `@gate-forge/pack-playwright/vitest`.
51
+ - **Enumerate**: the project's own `vitest list --run --json`, so the
52
+ expected set comes from the runner that will execute it.
53
+ - **Tag**: the pack's reporter spools the same lifecycle events the
54
+ Playwright reporter writes, and the in-test helper resolves the
55
+ supervisor session for the RUNNING test and rewrites supertest traffic
56
+ onto that session's proxy origin.
57
+ - **Read**: the jest-compatible JSON report, strictly. A row with no
58
+ file/title identity is never attributed, and the reporter's flags
59
+ document surfaces `test.retry` attempts (required retries are zero).
60
+ - **Use it**:
61
+ ```js
62
+ import request from 'supertest';
63
+ import { gateforgeSupertest } from '@gate-forge/pack-playwright/vitest';
64
+ const gate = gateforgeSupertest(request);
65
+
66
+ test('creates an account', async () => {
67
+ const api = await gate(process.env.GATEFORGE_APP_BASE_URL);
68
+ const response = await api.post('/api/accounts').send({ first_name: 'Grace' });
69
+ expect(response.status).toBe(201);
70
+ });
71
+ ```
72
+ `gate(app)` with the app itself (in-process supertest) is REFUSED with
73
+ `IN_PROCESS_CLIENT_REFUSED` — it would be a counterfeit green.
74
+
75
+ ## Cypress
76
+
77
+ - **Where**: `@gate-forge/pack-playwright` — `discovery/cypress-runner-adapter.ts`,
78
+ the plugin at `src/cypress/plugin.ts`, plus the support file the adapter
79
+ generates per run.
80
+ - **Enumerate**: Cypress cannot list tests without running them, so the
81
+ expected set is read from the spec SOURCES. A spec whose titles are not
82
+ static string literals enumerates as unavailable — the adapter refuses to
83
+ guess a half-set rather than run against an incomplete expectation.
84
+ - **Tag**: the adapter runs the project's own Cypress CLI with a generated
85
+ config that chains your config (`setupNodeEvents` included). The pack's
86
+ plugin registers lifecycle tasks; the generated support file resolves the
87
+ session for the running test and rewrites `cy.request` traffic at the app
88
+ origin onto that session's proxy. Traffic that does not go through it — a
89
+ raw browser `fetch`, a third-party origin — stays unattributed and is
90
+ credited to nothing.
91
+ - **Read**: mocha's own `after:run` results, sealed into a per-run report.
92
+ More than one attempt for a test is a runner-assisted retry and blocks.
93
+ - **Use it**: nothing to import. Run your specs as usual with
94
+ `cy.request` for app traffic; `cy.request` at the app origin is tagged
95
+ automatically under the supervised run. A CommonJS project config
96
+ (`cypress.config.js`/`.cjs`) is chained; an ESM/TypeScript config is
97
+ refused rather than silently replaced.
98
+
99
+ ## Running a non-Playwright runner
100
+
101
+ Set the runner in `.gateforge.yml` and the ordinary commands drive it:
102
+
103
+ ```yaml
104
+ runner: vitest # playwright (the default) | pytest | vitest | cypress
105
+ ```
106
+
107
+ - `gateforge init` — scans the repository and writes `runner:` into a NEW
108
+ config when it sees exactly one non-Playwright runner. An ambiguous
109
+ repository (Playwright plus something else, or several others) keeps the
110
+ default and tells you to set the key yourself. An existing config is never
111
+ rewritten.
112
+ - `gateforge enforcement doctor` — reports runner readiness without
113
+ launching anything: its `runner` check looks for the `vitest`/`cypress`
114
+ config file at the repository root and an installed package, for an
115
+ installed `playwright`, and for `pytest` a configured
116
+ `diagnostics.suites` entry plus a `pytest` executable on `PATH`. It is
117
+ diagnostic only: it exits 0 either way, and its `runner` line is the one
118
+ to read. (There is no `gateforge doctor` command — that name exits 2 with
119
+ `unknown command 'doctor'`.)
120
+ - `gateforge test-gates --changed` — runs the mapped selection under the
121
+ configured runner and seals the receipt.
122
+ - `gateforge check --changed --require-e2e` — the gate; `receipt-verified`
123
+ means the obligation was witnessed, not that the runner went green.
124
+
125
+ ### Per-runner setup
126
+
127
+ **pytest** — one suite under `diagnostics.suites`, and HTTP over the plugin's
128
+ client:
129
+
130
+ ```yaml
131
+ diagnostics:
132
+ suites:
133
+ - name: accounts
134
+ runner: pytest
135
+ cwd: .
136
+ argv: ['python', '-m', 'pytest']
137
+ testPaths: ['tests']
138
+ witnessed: true
139
+ ```
140
+
141
+ `witnessed: true` keeps the suite out of the advisory diagnostic window: the
142
+ adapter's supervised execution IS that suite, so a second pass would run it
143
+ twice. The plugin (loaded automatically through `PYTHONPATH`) provides the
144
+ `gateforge_http` fixture — an `httpx.Client` routed through the running
145
+ test's session proxy:
146
+
147
+ ```python
148
+ def test_creates_account(gateforge_http):
149
+ response = gateforge_http.post('/api/accounts', json={'first_name': 'Grace'})
150
+ assert response.status_code == 201
151
+ ```
152
+
153
+ `TestClient(app)` never reaches the witness and is refused.
154
+
155
+ **vitest** — route supertest through the helper:
156
+
157
+ ```js
158
+ import request from 'supertest';
159
+ import { gateforgeSupertest } from '@gate-forge/pack-playwright/vitest';
160
+ const gate = gateforgeSupertest(request);
161
+
162
+ test('creates an account', async () => {
163
+ const api = await gate(process.env.GATEFORGE_APP_BASE_URL);
164
+ expect((await api.post('/api/accounts').send({ first_name: 'Grace' })).status).toBe(201);
165
+ });
166
+ ```
167
+
168
+ `request(app)` — in-process supertest — is refused with
169
+ `IN_PROCESS_CLIENT_REFUSED`.
170
+
171
+ **cypress** — nothing to import. Keep a CommonJS project config
172
+ (`cypress.config.js`/`.cjs`); an ESM/TypeScript config is refused rather than
173
+ silently replaced. Send app traffic with `cy.request` at the app origin and it
174
+ is tagged for the running test. A raw browser `fetch` is not credited, because
175
+ it never crosses the session proxy. The adapter pins the run's screenshot,
176
+ video and download folders into the run state directory, so a failing test
177
+ cannot drop artifacts into your tree.
178
+
179
+ ### Mapping keys
180
+
181
+ In `.gateforge/test-map.yml` a non-Playwright test's `key` is
182
+ `<file>#<titlePath joined by '>'>` — the same identity the adapter reports:
183
+
184
+ ```yaml
185
+ tests:
186
+ - key: tests/accounts.test.ts#accounts>creates an account
187
+ selector:
188
+ runner: vitest
189
+ file: tests/accounts.test.ts
190
+ titlePath: [accounts, creates an account]
191
+ kind: observed-e2e
192
+ claims: [tenant.accounts:persistence:create]
193
+ reason: The test creates an account over HTTP and the witness confirms persistence.
194
+ ```
195
+
196
+ Selection granularity follows the runner: the FILE for vitest and Cypress
197
+ (one spec file executes, so a partial selection is a whole file), the pytest
198
+ NODE id for pytest. The verdict always comes from supervision over the
199
+ enumerated plan, never from the runner's exit code.