@gate-forge/cli 0.7.0 → 0.8.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 (254) hide show
  1. package/README.md +511 -51
  2. package/dist/adapter-audit.d.ts +154 -0
  3. package/dist/adapter-audit.d.ts.map +1 -0
  4. package/dist/adapter-audit.js +531 -0
  5. package/dist/adapter-audit.js.map +1 -0
  6. package/dist/adapter-scaffold.d.ts +66 -0
  7. package/dist/adapter-scaffold.d.ts.map +1 -0
  8. package/dist/adapter-scaffold.js +353 -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 +59 -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 +738 -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 +284 -0
  44. package/dist/commands/adapters.js.map +1 -0
  45. package/dist/commands/adopt.d.ts.map +1 -1
  46. package/dist/commands/adopt.js +9 -1
  47. package/dist/commands/adopt.js.map +1 -1
  48. package/dist/commands/baseline.d.ts.map +1 -1
  49. package/dist/commands/baseline.js +42 -1
  50. package/dist/commands/baseline.js.map +1 -1
  51. package/dist/commands/blocking.d.ts +81 -2
  52. package/dist/commands/blocking.d.ts.map +1 -1
  53. package/dist/commands/blocking.js +336 -53
  54. package/dist/commands/blocking.js.map +1 -1
  55. package/dist/commands/check.d.ts +36 -0
  56. package/dist/commands/check.d.ts.map +1 -1
  57. package/dist/commands/check.js +1008 -62
  58. package/dist/commands/check.js.map +1 -1
  59. package/dist/commands/classify.d.ts +2 -1
  60. package/dist/commands/classify.d.ts.map +1 -1
  61. package/dist/commands/classify.js +143 -5
  62. package/dist/commands/classify.js.map +1 -1
  63. package/dist/commands/enforce.d.ts +4 -4
  64. package/dist/commands/enforce.d.ts.map +1 -1
  65. package/dist/commands/enforce.js +41 -9
  66. package/dist/commands/enforce.js.map +1 -1
  67. package/dist/commands/enforcement.d.ts +13 -1
  68. package/dist/commands/enforcement.d.ts.map +1 -1
  69. package/dist/commands/enforcement.js +800 -30
  70. package/dist/commands/enforcement.js.map +1 -1
  71. package/dist/commands/history.d.ts +12 -0
  72. package/dist/commands/history.d.ts.map +1 -0
  73. package/dist/commands/history.js +45 -0
  74. package/dist/commands/history.js.map +1 -0
  75. package/dist/commands/init-presets.d.ts +148 -0
  76. package/dist/commands/init-presets.d.ts.map +1 -0
  77. package/dist/commands/init-presets.js +194 -0
  78. package/dist/commands/init-presets.js.map +1 -0
  79. package/dist/commands/init.d.ts +7 -12
  80. package/dist/commands/init.d.ts.map +1 -1
  81. package/dist/commands/init.js +610 -69
  82. package/dist/commands/init.js.map +1 -1
  83. package/dist/commands/keys.d.ts.map +1 -1
  84. package/dist/commands/keys.js +29 -13
  85. package/dist/commands/keys.js.map +1 -1
  86. package/dist/commands/next.d.ts.map +1 -1
  87. package/dist/commands/next.js +744 -15
  88. package/dist/commands/next.js.map +1 -1
  89. package/dist/commands/pre-commit.d.ts +25 -0
  90. package/dist/commands/pre-commit.d.ts.map +1 -1
  91. package/dist/commands/pre-commit.js +91 -6
  92. package/dist/commands/pre-commit.js.map +1 -1
  93. package/dist/commands/quarantine.d.ts +16 -0
  94. package/dist/commands/quarantine.d.ts.map +1 -0
  95. package/dist/commands/quarantine.js +213 -0
  96. package/dist/commands/quarantine.js.map +1 -0
  97. package/dist/commands/run.d.ts +39 -0
  98. package/dist/commands/run.d.ts.map +1 -0
  99. package/dist/commands/run.js +196 -0
  100. package/dist/commands/run.js.map +1 -0
  101. package/dist/commands/test-gates.d.ts +284 -2
  102. package/dist/commands/test-gates.d.ts.map +1 -1
  103. package/dist/commands/test-gates.js +3619 -186
  104. package/dist/commands/test-gates.js.map +1 -1
  105. package/dist/commands/tests.d.ts +1 -1
  106. package/dist/commands/tests.d.ts.map +1 -1
  107. package/dist/commands/tests.js +225 -22
  108. package/dist/commands/tests.js.map +1 -1
  109. package/dist/endpoint-compiler.d.ts.map +1 -1
  110. package/dist/endpoint-compiler.js +29 -8
  111. package/dist/endpoint-compiler.js.map +1 -1
  112. package/dist/engine-browser.d.ts +183 -0
  113. package/dist/engine-browser.d.ts.map +1 -0
  114. package/dist/engine-browser.js +381 -0
  115. package/dist/engine-browser.js.map +1 -0
  116. package/dist/engine-identity.d.ts +100 -0
  117. package/dist/engine-identity.d.ts.map +1 -0
  118. package/dist/engine-identity.js +182 -0
  119. package/dist/engine-identity.js.map +1 -0
  120. package/dist/evaluate.d.ts +89 -0
  121. package/dist/evaluate.d.ts.map +1 -1
  122. package/dist/evaluate.js +137 -16
  123. package/dist/evaluate.js.map +1 -1
  124. package/dist/execution.d.ts +253 -9
  125. package/dist/execution.d.ts.map +1 -1
  126. package/dist/execution.js +309 -12
  127. package/dist/execution.js.map +1 -1
  128. package/dist/git-hooks.d.ts +17 -0
  129. package/dist/git-hooks.d.ts.map +1 -1
  130. package/dist/git-hooks.js +119 -0
  131. package/dist/git-hooks.js.map +1 -1
  132. package/dist/git-objects.d.ts +60 -0
  133. package/dist/git-objects.d.ts.map +1 -0
  134. package/dist/git-objects.js +152 -0
  135. package/dist/git-objects.js.map +1 -0
  136. package/dist/history.d.ts +52 -0
  137. package/dist/history.d.ts.map +1 -0
  138. package/dist/history.js +116 -0
  139. package/dist/history.js.map +1 -0
  140. package/dist/host-load.d.ts +49 -0
  141. package/dist/host-load.d.ts.map +1 -0
  142. package/dist/host-load.js +78 -0
  143. package/dist/host-load.js.map +1 -0
  144. package/dist/input-snapshot.d.ts +63 -9
  145. package/dist/input-snapshot.d.ts.map +1 -1
  146. package/dist/input-snapshot.js +195 -17
  147. package/dist/input-snapshot.js.map +1 -1
  148. package/dist/io.d.ts +36 -0
  149. package/dist/io.d.ts.map +1 -1
  150. package/dist/io.js +21 -0
  151. package/dist/io.js.map +1 -1
  152. package/dist/mapping.d.ts +84 -1
  153. package/dist/mapping.d.ts.map +1 -1
  154. package/dist/mapping.js +276 -5
  155. package/dist/mapping.js.map +1 -1
  156. package/dist/native-freeze.d.ts +217 -0
  157. package/dist/native-freeze.d.ts.map +1 -0
  158. package/dist/native-freeze.js +332 -0
  159. package/dist/native-freeze.js.map +1 -0
  160. package/dist/pipeline.d.ts +52 -1
  161. package/dist/pipeline.d.ts.map +1 -1
  162. package/dist/pipeline.js +141 -3
  163. package/dist/pipeline.js.map +1 -1
  164. package/dist/playwright-browsers.d.ts +210 -0
  165. package/dist/playwright-browsers.d.ts.map +1 -0
  166. package/dist/playwright-browsers.js +364 -0
  167. package/dist/playwright-browsers.js.map +1 -0
  168. package/dist/plugins.d.ts +15 -5
  169. package/dist/plugins.d.ts.map +1 -1
  170. package/dist/plugins.js +59 -9
  171. package/dist/plugins.js.map +1 -1
  172. package/dist/progress.d.ts +148 -0
  173. package/dist/progress.d.ts.map +1 -0
  174. package/dist/progress.js +263 -0
  175. package/dist/progress.js.map +1 -0
  176. package/dist/providers.d.ts +26 -1
  177. package/dist/providers.d.ts.map +1 -1
  178. package/dist/providers.js +39 -0
  179. package/dist/providers.js.map +1 -1
  180. package/dist/receipts.d.ts +1 -0
  181. package/dist/receipts.d.ts.map +1 -1
  182. package/dist/receipts.js +35 -7
  183. package/dist/receipts.js.map +1 -1
  184. package/dist/repo-scan.d.ts +8 -1
  185. package/dist/repo-scan.d.ts.map +1 -1
  186. package/dist/repo-scan.js +221 -27
  187. package/dist/repo-scan.js.map +1 -1
  188. package/dist/reseal-chain.d.ts +184 -0
  189. package/dist/reseal-chain.d.ts.map +1 -0
  190. package/dist/reseal-chain.js +735 -0
  191. package/dist/reseal-chain.js.map +1 -0
  192. package/dist/reseal-evidence.d.ts +241 -0
  193. package/dist/reseal-evidence.d.ts.map +1 -0
  194. package/dist/reseal-evidence.js +319 -0
  195. package/dist/reseal-evidence.js.map +1 -0
  196. package/dist/reseal.d.ts +181 -0
  197. package/dist/reseal.d.ts.map +1 -0
  198. package/dist/reseal.js +1620 -0
  199. package/dist/reseal.js.map +1 -0
  200. package/dist/response-field-guidance.d.ts +82 -0
  201. package/dist/response-field-guidance.d.ts.map +1 -0
  202. package/dist/response-field-guidance.js +184 -0
  203. package/dist/response-field-guidance.js.map +1 -0
  204. package/dist/run-cache.d.ts +260 -0
  205. package/dist/run-cache.d.ts.map +1 -0
  206. package/dist/run-cache.js +771 -0
  207. package/dist/run-cache.js.map +1 -0
  208. package/dist/run-preflight.d.ts +77 -0
  209. package/dist/run-preflight.d.ts.map +1 -0
  210. package/dist/run-preflight.js +774 -0
  211. package/dist/run-preflight.js.map +1 -0
  212. package/dist/run-recipe.d.ts +107 -0
  213. package/dist/run-recipe.d.ts.map +1 -0
  214. package/dist/run-recipe.js +295 -0
  215. package/dist/run-recipe.js.map +1 -0
  216. package/dist/run-reliability.d.ts +126 -0
  217. package/dist/run-reliability.d.ts.map +1 -0
  218. package/dist/run-reliability.js +221 -0
  219. package/dist/run-reliability.js.map +1 -0
  220. package/dist/runtime.d.ts +15 -0
  221. package/dist/runtime.d.ts.map +1 -1
  222. package/dist/runtime.js +11 -1
  223. package/dist/runtime.js.map +1 -1
  224. package/dist/secret-guard.d.ts +36 -0
  225. package/dist/secret-guard.d.ts.map +1 -0
  226. package/dist/secret-guard.js +63 -0
  227. package/dist/secret-guard.js.map +1 -0
  228. package/dist/singleton-guidance.d.ts +73 -0
  229. package/dist/singleton-guidance.d.ts.map +1 -0
  230. package/dist/singleton-guidance.js +118 -0
  231. package/dist/singleton-guidance.js.map +1 -0
  232. package/dist/staged-candidate.d.ts +17 -0
  233. package/dist/staged-candidate.d.ts.map +1 -1
  234. package/dist/staged-candidate.js +50 -0
  235. package/dist/staged-candidate.js.map +1 -1
  236. package/dist/state-artifacts.d.ts +70 -0
  237. package/dist/state-artifacts.d.ts.map +1 -0
  238. package/dist/state-artifacts.js +215 -0
  239. package/dist/state-artifacts.js.map +1 -0
  240. package/dist/state.d.ts +170 -2
  241. package/dist/state.d.ts.map +1 -1
  242. package/dist/state.js +248 -8
  243. package/dist/state.js.map +1 -1
  244. package/dist/verifier-keys.d.ts +33 -2
  245. package/dist/verifier-keys.d.ts.map +1 -1
  246. package/dist/verifier-keys.js +95 -9
  247. package/dist/verifier-keys.js.map +1 -1
  248. package/guides/CONNECT-YOUR-PROJECT.md +367 -0
  249. package/guides/QUICKSTART.md +404 -0
  250. package/guides/RUNNER-NEUTRAL-EVIDENCE.md +199 -0
  251. package/guides/TEST-ENVIRONMENT.md +1226 -0
  252. package/guides/UPGRADE-0.6-to-0.7.md +65 -0
  253. package/guides/UPGRADE-0.7-to-0.8.md +114 -0
  254. package/package.json +12 -10
@@ -0,0 +1,65 @@
1
+ # Upgrade from 0.6 to 0.7
2
+
3
+ ## Upgrade steps
4
+
5
+ 1. Set every direct `@gate-forge/*` dependency to `0.7.1`. Update any wrapper script, CI image, or install command that pins an older CLI version. The CLI checks the supervised Playwright contract; an incompatible package set exits 2 with `GATEFORGE_PACKAGE_INCOMPATIBLE`.
6
+
7
+ Example package set:
8
+
9
+ ```sh
10
+ npm i -D \
11
+ @gate-forge/cli@0.7.1 \
12
+ @gate-forge/pack-playwright@0.7.1 \
13
+ @gate-forge/pack-http@0.7.1 \
14
+ @gate-forge/pack-fastapi@0.7.1 \
15
+ @gate-forge/pack-sqlalchemy@0.7.1
16
+ ```
17
+
18
+ 2. Install the updated lockfile:
19
+
20
+ ```sh
21
+ npm install
22
+ ```
23
+
24
+ 3. Keep the verifier key in a protected environment variable or an external key ring. For example, create a current-user-owned key ring outside the repository and state directory:
25
+
26
+ ```sh
27
+ gateforge key create --confirm
28
+ ```
29
+
30
+ With no `--file` the CLI creates the ring at `"${XDG_CONFIG_HOME:-$HOME/.config}/gateforge/verifier-keyring.json"` (owner-only, mode `0600`) and reads that path on every later command; keep `--file <path>` plus a `GATEFORGE_WITNESS_VERIFIER_KEY_FILE` export only when the ring really lives elsewhere.
31
+
32
+ 4. Run the suite under Gateforge after upgrading:
33
+
34
+ ```sh
35
+ gateforge test-gates --changed
36
+ ```
37
+
38
+ This supervised run records the current claim inventory in its authenticated receipt. A leftover `claims.json` is not a declaration source. Keep annotation-only claims in `.gateforge/test-map.yml` when hooks or CI must see them before a suite runs.
39
+
40
+ 5. Check the same candidate bytes:
41
+
42
+ ```sh
43
+ gateforge check --changed --require-e2e
44
+ ```
45
+
46
+ If you edit an input after the witnessed run, run the suite again before checking.
47
+
48
+ ## Behavior changes in 0.7.0
49
+
50
+ - **Claim inventory:** `check` no longer trusts a leftover `claims.json`. Annotations are collected for the current supervised run and authenticated in its receipt. A tracked `.gateforge/test-map.yml` makes claims available to a static check without running or listing the suite.
51
+ - **External key ring:** `gateforge key create`, `import-env`, `rotate`, and `retire` manage keys outside the repository. The key file must be a regular file owned by the current user, mode `0600` or stricter, and outside run state. CI may instead provide the protected key environment variable.
52
+ - **Documentation exclusions:** Input hashing includes files by default. An explicit docs-only exclusion is written to `.gateforge/docs-exclusions.yml` and stays inactive until its policy digest is approved in protected CI settings. For example, `gateforge init --docs-exclude docs,handbook` selects folders; review the generated policy before enabling it.
53
+ - **Result-only runs:** `gateforge test-gates --changed --scope changed --result-only` reports a changed slice and repository debt but has no gate authority and does not create, replace, or clear a receipt.
54
+ - **External-witness result-only:** The same result-only mode accepts `--witness-url`, `--out`, and `--run-token`. Use a dedicated state directory separate from `.gateforge/test-gates`; an external-witness result does not become an authoritative receipt.
55
+ - **Surface diagnostic:** `gateforge tests surface-doctor` lists Playwright tests that need a UI surface descriptor.
56
+ - **Runner context:** The supervised Playwright runner passes the configured app base URL and `GATEFORGE_SESSION_STATE` as trusted `baseURL` and `storageState` settings.
57
+
58
+ ## If something breaks
59
+
60
+ | If you see | Do this |
61
+ |---|---|
62
+ | `GATEFORGE_PACKAGE_INCOMPATIBLE` | Align direct Gateforge packages to `0.7.1`, update wrapper pins, then run `npm install`. |
63
+ | `EVIDENCE_STALE` or `RUN_INCOMPLETE` | Run `gateforge test-gates --changed` on the exact candidate, then check again. |
64
+ | A missing or stale test mapping | Run `gateforge tests discover`, then inspect `gateforge tests suggest`; declare a valid existing test in `.gateforge/test-map.yml`. |
65
+ | Tests are missing a UI surface | Run `gateforge tests surface-doctor` and add the required descriptor. |
@@ -0,0 +1,114 @@
1
+ # Upgrade from 0.7 to 0.8
2
+
3
+ 0.8.0 needs no configuration change. Every new option is off until you write it (the one exception, CI progress lines on stderr, is listed below), and a repository with no new keys gates with the same rules. The one step every repository must take is a new witnessed run: a receipt sealed by 0.7.x is not accepted by 0.8.0.
4
+
5
+ ## Upgrade steps
6
+
7
+ 1. Set every direct `@gate-forge/*` dependency to `0.8.0` and update any wrapper script, CI image, or install command that pins an older CLI version:
8
+
9
+ ```sh
10
+ npm i -D \
11
+ @gate-forge/cli@0.8.0 \
12
+ @gate-forge/pack-playwright@0.8.0 \
13
+ @gate-forge/pack-http@0.8.0 \
14
+ @gate-forge/pack-fastapi@0.8.0 \
15
+ @gate-forge/pack-sqlalchemy@0.8.0
16
+ ```
17
+
18
+ Keep the packs you already use; the list above is an example. The CLI now also installs two new packages as its own dependencies: `@gate-forge/witness` and `@gate-forge/pack-alembic`. Installing from tarballs instead of the registry: install every `.tgz` of the release in one command (`npm i -D ./gate-forge-*.tgz`).
19
+
20
+ **If your `package.json` pins Gateforge anywhere else**, change those entries by hand first: every `@gate-forge/*` version in an `overrides` (npm) or `resolutions` (yarn) block, and every alias such as `"@gateforge/pack-playwright": "npm:@gate-forge/pack-playwright@0.7.0"`, must say `0.8.0`. Then run `npm install`. With an override still at `0.7.0`, the `npm i -D` command above stops with `EOVERRIDE` and changes nothing. Example:
21
+
22
+ ```json
23
+ "devDependencies": {
24
+ "@gate-forge/cli": "0.8.0",
25
+ "@gateforge/pack-playwright": "npm:@gate-forge/pack-playwright@0.8.0"
26
+ },
27
+ "overrides": {
28
+ "@gate-forge/core": "0.8.0",
29
+ "@gate-forge/pack-playwright": "0.8.0"
30
+ }
31
+ ```
32
+
33
+ You do not need to add the two new packages to `overrides`; the CLI brings them at `0.8.0`.
34
+
35
+ 2. Check the setup:
36
+
37
+ ```sh
38
+ gateforge enforcement doctor
39
+ ```
40
+
41
+ The doctor has a new `run` section (verifier key, the owner-approved policy pin, the runner and its browser builds, interpreter paths, target reachability, host load). It still exits 0; each FAIL line names its fix. `gateforge enforcement doctor --strict-preflight` exits 1 at the first failing precondition.
42
+
43
+ 3. Seal a new run with 0.8.0:
44
+
45
+ ```sh
46
+ gateforge test-gates --changed
47
+ ```
48
+
49
+ A receipt sealed by 0.7.x is refused by `check --require-e2e` with `EVIDENCE_STALE`: the new engine derives the gate inputs again, so the old run is not this run. This is expected and fail-closed; nothing else needs to change. The owner-approved policy digest does not change with the upgrade, so a protected `GATEFORGE_APPROVED_POLICY_DIGEST` stays valid.
50
+
51
+ 4. Check the same candidate bytes:
52
+
53
+ ```sh
54
+ gateforge check --changed --require-e2e
55
+ ```
56
+
57
+ ## What changes for an existing repository
58
+
59
+ - **CI progress on stderr:** under `CI=true`, `test-gates` now prints a secret-screened progress stream on stderr (start line, one line per finished test, an alive line each quiet minute). Set `run.progress: off` in `.gateforge.yml` to disable that stream. Passing local runs are unchanged; when a local run fails with the stream off, its text report now names up to three failed tests with their first error line and tells you how to stream any remaining failures.
60
+ - **Merge-request CI without a base commit:** `--scope changed` and `check --changed` in a merge-request pipeline that provides no base commit now refuse in seconds with exit 2 and the fix, instead of silently using the local staged diff. Pipelines that are not merge requests, a present base commit, an explicit provider and every local run are unchanged.
61
+ - **Selection reports:** the in-runner reporter of a changed- or named-scope run prints `GATEFORGE GATE: SELECTION (…; repository verdict not graded here)` instead of a repository verdict it did not grade. Debt the run did not observe is named on its own line, never as `new blocking`.
62
+ - **Browser readiness:** the doctor and the run preflight check the browser builds your own `@playwright/test` pins. Missing builds name `npx playwright install <browser>` and the directory to run it in. On Linux, installed Chromium-family executables are also probed with `--version`; a launch failure names its first stderr line and `npx playwright install-deps <browser>` (requires root or sudo). On a fresh Linux container, install both in one step with `npx playwright install --with-deps chromium`.
63
+ - **Engine-owned browser readiness:** the doctor and the run preflight also carry a new `engine-browser` line, separate from `runner`. `runner` reports the browser YOUR tests launch; `engine-browser` reports the one the ENGINE drives for every `evidence.ui.action` / `visible.confirm` / `persistence.verify` receipt and every `engine-browser` behavior case — the Chromium `@gate-forge/pack-playwright` pins, which is usually a different release from yours. A FAIL names that release's pinned builds and the exact command to install them: the engine's own `cli.js` by absolute path (not `npx playwright install`, which resolves YOUR release and installs the revision your cache already holds), with `PLAYWRIGHT_SKIP_BROWSER_GC=1` so the install cannot delete your own builds from a shared cache. The line demands a browser only from a repository that opens one — a Playwright runner, or a behavior policy declaring an `engine-browser` case; a pytest or API-only repository reads `engine browser not required`. No config key is added and no existing check id or wording changes.
64
+ - **Reports** gain additive fields only (`strictness`, `quarantine`, `run`, `engine` provenance in text reports). Existing JSON keys, cause codes and exit codes are unchanged.
65
+ - **Queue observation** needs `bullmq` and `ioredis` only when you configure `queueObserver`; they are optional peers of `@gate-forge/witness`.
66
+ - **Declared test-service environment:** names your runtime document already lists in `envAllowlist` now reach the supervised tests and the wired test enumeration; no other variable does, and the values come only from your environment. Engine `GATEFORGE_*` names and process-loader controls (`NODE_OPTIONS`, `NODE_PATH`, `LD_*`, `DYLD_*`, `PYTHONPATH`, `PYTHONHOME`, `BASH_ENV`, `ENV`) are refused even when listed, naming the entry. The document is part of the trusted policy digest, so adding a name is an owner approval. No list forwards nothing new, and you do not need to add the key: see `TEST-ENVIRONMENT.md`, "Declare test-service environment variables".
67
+ - **A Playwright project that declares `use.storageState` now gets that session.** A supervised run uses a synthesized config, never yours, so until now a `setup` project's saved state was silently omitted and every authenticated journey ran logged out. The declared path is handed to that project alone and must stay inside the repository: containment is checked on the real filesystem from the nearest existing ancestor, so a file your setup test creates during the run is fine, while a path that escapes directly or through a symlink, a dangling link, a URL and an empty value stop the run and name the project, the value and the fix. A relative path resolves against the runner's working directory — the directory of the config the run uses, which is the repository root for a root-level config and the project's own directory for a nested one, so a nested `setup` project saves the file where its dependent project reads it; containment stays the whole repository either way. The setup project keeps no state of its own; the files and test identities a run reports stay repository-relative whatever the config's directory is; an operator-set `GATEFORGE_SESSION_STATE` still outranks every project declaration, a relative value still means the repository root, and the declarations it outranks are not read. If you already set that variable, nothing changes for you: see `TEST-ENVIRONMENT.md`, "Or let a setup project save its own state".
68
+ - **A Playwright run whose planned projects are named now freezes ONE prepared candidate between preparation and bodies.** In 0.7.x a `setup` project's saved session existed only in the working tree, so the candidate was frozen before native setup, and a run then correctly refused to seal when genuine setup changed the counted session-state bytes, even if every test passed. Declared native dependencies already ordered each setup ahead of its own dependent body; what was missing was anywhere to admit genuine generated output, and a guarantee that no INDEPENDENT body starts before ALL preparation. Preparation stages now run first, each genuinely executed with its own outcome retained as a witnessed prerequisite, the candidate is taken once, and every body executes against it once the freeze releases. Between the pre-run baseline and the prepared candidate, only an untracked, non-input, non-excluded, physically contained regular file that a project declares as its `storageState` may differ — additions and modifications only, never a removal, a symlink or any other change to a candidate file — while source, trusted policy and the input digest stay frozen; the engine's own run artifacts live in the excluded run-state directory and are not candidate files. The release that opens the barrier is signed with a key that exists only in the CLI process's memory. Nothing to configure and nothing new to declare: unnamed or empty projects take no part, a non-Playwright runner never enters the path, an operator-set whole-run session state bypasses it exactly as before, the same freeze applies whether your root `package.json` is CommonJS, declares `"type": "module"`, or your specs live in a nested module directory, and a project's environment still receives its own dependency chain's assignments. It is a checked boundary inside the run, not a sandbox: ordinary local files stay writable by your own user. See `TEST-ENVIRONMENT.md`, "One prepared candidate for the whole native run".
69
+ - **Reads from a rendered list:** a `read` may name its entities in the response rows instead of the path, with the new `collection: { rowsKey?, idKey }` shape in the new-options table below. The shape is declared, never inferred, and it is opt-in: without it a read binds `{id}` from the path exactly as in 0.7.x. See `CONNECT-YOUR-PROJECT.md`.
70
+ - **Declared volatile fields are honored:** an adapter that already declared `volatileFields` had the list accepted and then dropped before the run, so a field the server rewrites failed the exact-value echo as `EVIDENCE_VALUE_MISMATCH`. The declaration now survives admission, so those keys are skipped by the echo and named in the report. An undeclared key still blocks, a malformed list is refused at load, and an adapter that declares nothing is unchanged.
71
+
72
+ ## New options (all off by default)
73
+
74
+ | Option | Where | Default |
75
+ |---|---|---|
76
+ | `mode: strict \| changed \| warn` | `.gateforge.yml` | absent = `strict` (0.7 behavior) |
77
+ | `gateforge quarantine <testKey> …` | owner command | no quarantine |
78
+ | `enforcement.reseal: true`, `enforcement.resealRuntimeFiles` | `.gateforge.yml` | off: a test-only change runs the changed scope as before |
79
+ | `enforcement.twinPaths: advisory \| block`, `enforcement.twinQueryKeys` | `.gateforge.yml` | off |
80
+ | `http.endpoint.requireObservation` | `.gateforge/policies.yml` | off |
81
+ | `run.progress` / `--progress stderr\|file:<path>\|off` | `.gateforge.yml` / flag | `auto`: stderr under `CI=true`, off locally |
82
+ | `tenancy.scopeColumns` | `.gateforge.yml` | none |
83
+ | `queueObserver` | `.gateforge.yml` | none; `task:*` cases stay fail-closed |
84
+ | `.gateforge/runtime.yml` recipe for `gateforge run` | file | none; `gateforge run` works without it |
85
+ | `test-gates --test <selector> --result-only`, `--chaos <seed>` | flags | not used |
86
+ | `enforce --ci gitlab\|github --witnessed` | command | static CI job only |
87
+ | `collection: { rowsKey?, idKey }` on an adapter `read` | evidence adapter | absent: a read binds `{id}` from the path |
88
+
89
+ ## Existing keys that changed meaning
90
+
91
+ No repository has to write any of them. A key you have not declared behaves
92
+ exactly as in 0.7.x; a key you already declared gets the effect below.
93
+
94
+ | Key | Where | Absent (unchanged) |
95
+ |---|---|---|
96
+ | `envAllowlist` | `.gateforge/runtime.yml` | no extra variable reaches tests or enumeration |
97
+ | `volatileFields` | evidence adapter | no key is exempt from the exact-value echo |
98
+
99
+ ## If something breaks
100
+
101
+ | If you see | Do this |
102
+ |---|---|
103
+ | `EVIDENCE_STALE` after upgrading | Run `gateforge test-gates --changed`, then check again. |
104
+ | `GATEFORGE_PACKAGE_INCOMPATIBLE` | Align every direct Gateforge package to `0.8.0`, update wrapper pins, then run `npm install`. |
105
+ | `npm error code EOVERRIDE` (`Override for @gate-forge/… conflicts with direct dependency`) | Set every `@gate-forge/*` entry in `overrides`/`resolutions` and every `npm:@gate-forge/…` alias to `0.8.0` by hand, then run `npm install` (step 1). |
106
+ | `E404` for `@gate-forge/witness` or `@gate-forge/pack-alembic` during a tarball install | Install every tarball of the release in one command. |
107
+ | A doctor `runner` FAIL naming browser builds | Run the printed `npx playwright install …` in the printed directory. |
108
+ | A doctor `runner` FAIL saying an installed browser cannot start | Run the printed `npx playwright install-deps …` command with root or sudo available, then run the doctor again. |
109
+ | A doctor `engine-browser` FAIL naming the engine's pinned builds | Run the printed command verbatim. Do not substitute `npx playwright install` — it installs YOUR Playwright release, not the engine's, and leaves the engine browser just as broken. Keep `PLAYWRIGHT_SKIP_BROWSER_GC=1` in the command so your own cached builds are not garbage-collected. |
110
+ | A run stops naming a project, its `storageState` value and the fix | The declared path must stay inside the repository; the file itself need not exist yet, your setup test may create it during the run. A relative value resolves from the directory of the config the run uses — the repository root, or your project's own directory when the config is nested — while the repository stays the boundary. Fix the path, not the timing — never point it outside the repository or inline the cookies. |
111
+ | Exit 2 on `--scope changed` in a merge-request pipeline | Provide the base commit (for example a deeper clone) or configure the change provider explicitly, as the message says. |
112
+ | `runtime envAllowlist cannot grant '…' to test code` | Remove that entry. Engine `GATEFORGE_*` names and process-loader controls are never forwarded to test code, listed or not; the run refuses before any test starts. |
113
+ | `observe.read.collection requires method 'GET'`, or `must not be declared on a path carrying '{id}'` | The collection shape belongs on a `read` + `GET` whose path carries no `{id}`. A by-id read keeps its own shape; move the declaration to the read that actually renders the list. |
114
+ | `EVIDENCE_VALUE_MISMATCH` on a field the server rewrites on its own | Declare that field in the adapter's `volatileFields`. The declaration is now honored end to end; it is never inferred from the response. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gate-forge/cli",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "gateforgeCompatibility": {
5
5
  "supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
6
6
  },
@@ -21,7 +21,8 @@
21
21
  },
22
22
  "files": [
23
23
  "bin",
24
- "dist"
24
+ "dist",
25
+ "guides"
25
26
  ],
26
27
  "scripts": {
27
28
  "build": "tsc -p tsconfig.build.json",
@@ -30,14 +31,15 @@
30
31
  "test": "vitest run"
31
32
  },
32
33
  "dependencies": {
33
- "@gate-forge/core": "^0.7.0",
34
- "@gate-forge/http-contract": "^0.7.0",
35
- "@gate-forge/pack-fastapi": "^0.7.0",
36
- "@gate-forge/pack-http": "^0.7.0",
37
- "@gate-forge/pack-playwright": "^0.7.0",
38
- "@gate-forge/pack-sqlalchemy": "^0.7.0",
39
- "@gate-forge/pack-task": "^0.7.0",
40
- "@gate-forge/plugin-protocol": "^0.7.0",
34
+ "@gate-forge/core": "^0.8.0",
35
+ "@gate-forge/http-contract": "^0.8.0",
36
+ "@gate-forge/pack-fastapi": "^0.8.0",
37
+ "@gate-forge/pack-alembic": "^0.8.0",
38
+ "@gate-forge/pack-http": "^0.8.0",
39
+ "@gate-forge/pack-playwright": "^0.8.0",
40
+ "@gate-forge/pack-sqlalchemy": "^0.8.0",
41
+ "@gate-forge/pack-task": "^0.8.0",
42
+ "@gate-forge/plugin-protocol": "^0.8.0",
41
43
  "picomatch": "^4.0.7",
42
44
  "yaml": "^2.8.1"
43
45
  },