@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,215 @@
1
+ /**
2
+ * The run-state artifacts the ENGINE generates, as paths relative to the
3
+ * state directory.
4
+ *
5
+ * `assertOutputDisjoint` refuses an `--out` that hides a declared input,
6
+ * because a declared input under `--out` is excluded from the evidence
7
+ * digest: the gate would then grade a candidate without the bytes it
8
+ * claims to have graded. That refusal is right and stays.
9
+ *
10
+ * It must, however, not fire on the engine's OWN output. A supervised run
11
+ * writes its synthesized runner config (`trusted.playwright.config.mjs`)
12
+ * into the state directory, and because `gateforge init` declares every
13
+ * `.mjs`/`.js`/`.ts`/`.py` file as a scan glob, that generated file became
14
+ * a declared input — so the documented next command after the first run
15
+ * (`gateforge check`, then `gateforge next`) exited 2 in the very
16
+ * repository it had just run in, until a user deleted the file by hand.
17
+ *
18
+ * So the rule is closed-world and fail-closed, not "everything under
19
+ * `--out` is fine":
20
+ * - a TRACKED file under `--out` still refuses (the committed-source
21
+ * branch of `assertOutputDisjoint`, unchanged, and it runs first);
22
+ * - any other file under `--out` still refuses, with byte-identical
23
+ * wording — a hand-written source file parked in the state directory is
24
+ * exactly the hole the refusal exists for, and no glob or directory
25
+ * name makes it safe;
26
+ * - only the artifacts listed below are exempt, so the exemption is a
27
+ * statement about what the engine writes, never about what a glob
28
+ * happens to match.
29
+ *
30
+ * The exemptions come in exactly two shapes, because the engine's own
31
+ * output names come in exactly two shapes:
32
+ *
33
+ * 1. {@link ENGINE_GENERATED_STATE_FILES} — a fixed name, compared against
34
+ * the path relative to the state directory when it is at the state
35
+ * root, and against the BASENAME anywhere below it (a runner adapter
36
+ * writes some of them inside its own per-run directory).
37
+ * 2. {@link ENGINE_GENERATED_STATE_SUBTREES} — a whole subtree the engine
38
+ * owns end to end, whose file names it mints rather than fixes (a
39
+ * `runId`, a service id, a cache key): the lifecycle spool, the
40
+ * runtime and history logs, the plugin caches, the runner's own
41
+ * artifacts, the diagnostics and re-seal trees.
42
+ *
43
+ * The Cypress run directory is deliberately NOT a subtree: besides its
44
+ * generated `report.json`, `support.cjs` and `gateforge.config.cjs` it
45
+ * holds `downloads/`, `screenshots/` and `videos/` — content the tested
46
+ * APPLICATION produced during the run, which is not the engine's output
47
+ * and must never be exempted by directory.
48
+ *
49
+ * The Playwright pack's generated names are imported from the pack
50
+ * itself, so a rename there cannot leave this list stale.
51
+ */
52
+ import { relative, resolve, sep } from 'node:path';
53
+ import { FREEZE_CONTROL_DIR, FREEZE_CONTROL_SPEC_FILE, FREEZE_REFUSAL_FILE, FREEZE_RELEASE_FILE, FREEZE_REQUEST_FILE, TRUSTED_CONFIG_FILE, TRUSTED_REPORTER_OPTIONS_FILE, } from '@gate-forge/pack-playwright';
54
+ /**
55
+ * Generated file names. A name at the state root matches the
56
+ * state-relative path; a name below a per-run directory matches the
57
+ * basename.
58
+ */
59
+ export const ENGINE_GENERATED_STATE_FILES = [
60
+ // CLI run state (cli/src/state.ts and the commands writing beside it).
61
+ 'behavior-catalog.json',
62
+ 'candidate-tree.json',
63
+ 'claim-injections.json',
64
+ 'claims.json',
65
+ 'classifications.json',
66
+ 'diagnostics.json',
67
+ 'env.json',
68
+ 'execution-result.json',
69
+ 'failures.json',
70
+ 'http-routes.json',
71
+ 'input-snapshot.json',
72
+ 'last-full-run.json',
73
+ 'manifest.json',
74
+ 'obligations.json',
75
+ 'receipt.json',
76
+ 'records.json',
77
+ 'report.json',
78
+ 'runner-outcomes.json',
79
+ 'run-record.json',
80
+ 'run-scope.json',
81
+ 'test-catalog.json',
82
+ 'twin-inventory.json',
83
+ 'twin-shapes.json',
84
+ 'witness-url.json',
85
+ // The supervised Playwright run's synthesized runner config
86
+ // (pack-playwright `synthesizeTrustedConfig`).
87
+ TRUSTED_CONFIG_FILE,
88
+ TRUSTED_REPORTER_OPTIONS_FILE,
89
+ // The global native preparation freeze's control documents
90
+ // (pack-playwright `discovery/prepare-barrier.ts`): the controller's
91
+ // request, the CLI's signed release and its refusal document. The
92
+ // controller SPEC is generated into a private per-run directory
93
+ // OUTSIDE the repository, so it is no longer written here; its name
94
+ // stays registered because a repository that still carries a copy
95
+ // from an earlier build must be owned by this boundary (an exempt
96
+ // output) rather than refused as an undeclared input — exactly the
97
+ // hole the synthesized runner config above already opened.
98
+ FREEZE_CONTROL_SPEC_FILE,
99
+ FREEZE_REFUSAL_FILE,
100
+ FREEZE_RELEASE_FILE,
101
+ FREEZE_REQUEST_FILE,
102
+ // The Cypress runner adapter's generated config, written into its own
103
+ // per-run directory (`cypress/<runId>/`).
104
+ 'gateforge.config.cjs',
105
+ 'support.cjs',
106
+ // The reporter/health-check artifacts the pytest runner adapter writes
107
+ // per suite and run (`diagnostics/<suite>.xml`, `pytest/<runId>/`).
108
+ 'report.xml',
109
+ ];
110
+ /**
111
+ * Generated subtrees the engine owns end to end. Every path below one of
112
+ * these is written by the engine or by the runner it supervises, under
113
+ * names the engine mints.
114
+ */
115
+ export const ENGINE_GENERATED_STATE_SUBTREES = [
116
+ 'cache',
117
+ 'diagnostics',
118
+ 'history',
119
+ // The freeze barrier's control directory (pack-playwright
120
+ // `FREEZE_CONTROL_DIR` = `native-freeze`): the controller's request
121
+ // document, the CLI's signed release and its refusal document — and,
122
+ // for a repository that still carries one from an earlier build, the
123
+ // generated controller spec. The engine owns every byte below here,
124
+ // so the subtree is the honest registration even though the fixed
125
+ // names above already cover today's files.
126
+ FREEZE_CONTROL_DIR,
127
+ 'playwright-artifacts',
128
+ 'pytest',
129
+ 'reseal-chain',
130
+ 'reseal-parent',
131
+ 'run-recipe',
132
+ 'runtime',
133
+ 'spool',
134
+ 'vitest',
135
+ ];
136
+ /**
137
+ * Whether one repo-relative posix path under the state directory is a
138
+ * path the ENGINE generated (and therefore an output, never an input).
139
+ *
140
+ * Args:
141
+ * stateRelativePath: posix path relative to the state directory (the
142
+ * repo-relative `--out` prefix already stripped).
143
+ *
144
+ * Returns:
145
+ * boolean: true for a generated artifact, false for anything else —
146
+ * including a path with an empty, `.` or `..` segment.
147
+ */
148
+ export function isEngineGeneratedStatePath(stateRelativePath) {
149
+ if (stateRelativePath.length === 0)
150
+ return false;
151
+ const segments = stateRelativePath.split('/');
152
+ if (segments.some((segment) => segment.length === 0 || segment === '.' || segment === '..')) {
153
+ return false;
154
+ }
155
+ if (ENGINE_GENERATED_STATE_FILES.includes(stateRelativePath))
156
+ return true;
157
+ if (ENGINE_GENERATED_STATE_FILES.includes(segments[segments.length - 1]))
158
+ return true;
159
+ return ENGINE_GENERATED_STATE_SUBTREES.includes(segments[0]);
160
+ }
161
+ /**
162
+ * Builds the static-discovery seed veto for the run's OWN generated
163
+ * state: a repo-relative file is hidden from catalog seeding when,
164
+ * and only when, it sits INSIDE the state directory this run actually
165
+ * resolved AND its state-relative path is an engine-generated
166
+ * artifact in the closed-world registry above.
167
+ *
168
+ * Why the seed needs it: the state directory holds real
169
+ * source-shaped files (`trusted.playwright.config.mjs`, and the freeze
170
+ * control documents an earlier build parked there), and `gateforge init`
171
+ * declares `.mjs`/`.js`/`.ts` scan globs — so after the first run those
172
+ * OUTPUT files were harvested back as tests the repository never
173
+ * declared, and the second run planned a case the runner cannot
174
+ * enumerate.
175
+ *
176
+ * What it deliberately does NOT do:
177
+ * - it is a SEED veto only. The native `--list` enumeration, import
178
+ * traversal, and every enumerated consumer case are untouched;
179
+ * - it never matches by basename alone, by title, or by a blanket
180
+ * `.gateforge` rule: a controller lookalike with the same file name
181
+ * anywhere else stays a candidate;
182
+ * - containment is segment-exact, so a sibling directory that merely
183
+ * shares a prefix (`.gateforge/test-gates-extra/…`) is never
184
+ * excluded;
185
+ * - a state directory that is the repository root itself, or outside
186
+ * it, excludes nothing at all (no prefix, no guess);
187
+ * - it says nothing about the input digest. A hand-written source
188
+ * file parked in the state directory is still refused by
189
+ * `assertOutputDisjoint` with byte-identical wording, and a TRACKED
190
+ * file there still refuses first; a veto here can never make a
191
+ * tracked file invisible to that refusal, because the veto is
192
+ * applied to the discovery walk, not to the declared-input check.
193
+ *
194
+ * Args:
195
+ * cwd: absolute repository root the discovery walk starts from.
196
+ * stateDir: absolute run-state directory the run resolved (the
197
+ * `--out` override when the command accepts one, else the
198
+ * default).
199
+ *
200
+ * Returns:
201
+ * (repoRelativePath: string) => boolean: true excludes the file
202
+ * from static candidate seeding.
203
+ */
204
+ export function engineGeneratedStateFileFilter(cwd, stateDir) {
205
+ // Same containment convention as the digest's state prefix
206
+ // (`input-snapshot.ts` `buildFileEntries`): the posix form of the
207
+ // RESOLVED state directory relative to the RESOLVED repo root, which
208
+ // is exactly the coordinate space the discovery walk reports.
209
+ const prefix = relative(resolve(cwd), resolve(stateDir)).split(sep).join('/');
210
+ if (prefix === '' || prefix === '..' || prefix.startsWith('../'))
211
+ return () => false;
212
+ const under = `${prefix}/`;
213
+ return (file) => file.startsWith(under) && isEngineGeneratedStatePath(file.slice(under.length));
214
+ }
215
+ //# sourceMappingURL=state-artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-artifacts.js","sourceRoot":"","sources":["../src/state-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC7D,uEAAuE;IACvE,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,aAAa;IACb,sBAAsB;IACtB,kBAAkB;IAClB,UAAU;IACV,uBAAuB;IACvB,eAAe;IACf,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,cAAc;IACd,aAAa;IACb,sBAAsB;IACtB,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,4DAA4D;IAC5D,+CAA+C;IAC/C,mBAAmB;IACnB,6BAA6B;IAC7B,2DAA2D;IAC3D,qEAAq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C,CAAC,CAAW,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,8BAA8B,CAC5C,GAAW,EACX,QAAgB;IAEhB,2DAA2D;IAC3D,kEAAkE;IAClE,qEAAqE;IACrE,8DAA8D;IAC9D,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9E,IAAI,MAAM,KAAK,EAAE,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC;IACrF,MAAM,KAAK,GAAG,GAAG,MAAM,GAAG,CAAC;IAC3B,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAClG,CAAC"}
package/dist/state.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { type HttpRouteCandidate, type Obligation, type ResourceGraph, type RunManifest } from '@gate-forge/core';
1
+ import { type HttpRouteCandidate, type JsonValue, type Obligation, type ResourceGraph, type RunManifest } from '@gate-forge/core';
2
2
  import type { InputSnapshot } from './input-snapshot.js';
3
+ import type { CandidateTreeEntry } from './candidate-tree.js';
3
4
  /** Default run-state directory, repo-root-relative. */
4
5
  export declare const DEFAULT_STATE_DIR = ".gateforge/test-gates";
5
6
  /** Resolves the run-state directory: override (absolute or relative) or default. */
@@ -64,9 +65,30 @@ export interface TestGatesEnv {
64
65
  GATEFORGE_OBLIGATIONS: string;
65
66
  /** Witness-service URL; null until G6 wires the loopback service. */
66
67
  GATEFORGE_WITNESS_URL: string | null;
68
+ /** Frontend build mode when exposed by standard build environment variables. */
69
+ frontendBuildMode?: string;
67
70
  }
68
71
  /** Reads an optional JSON array state file; absent → [], invalid → error. */
69
72
  export declare function readJsonArray(stateDir: string, name: string): unknown[];
73
+ /**
74
+ * Writes one JSON document into the state dir (creating it), or into
75
+ * a subdirectory of it when `name` carries one.
76
+ *
77
+ * The state dir is shared with the witness and later `check` runs, and a
78
+ * run's processes can be killed at any point (a container exiting ends
79
+ * everything in it). The document goes to a temporary file first and
80
+ * replaces the old one by rename, so a kill leaves the previous document
81
+ * or the new one, never a truncated file.
82
+ *
83
+ * Args:
84
+ * stateDir: absolute run-state directory.
85
+ * name: the document name, optionally inside a subdirectory.
86
+ * value: the document to write.
87
+ *
88
+ * Returns:
89
+ * void.
90
+ */
91
+ export declare function writeStateFile(stateDir: string, name: string, value: JsonValue): void;
70
92
  /** Persists the validated run manifest. */
71
93
  export declare function writeManifest(stateDir: string, manifest: RunManifest): void;
72
94
  /** Persists the input inventory for authenticated stale-input diagnosis. */
@@ -80,6 +102,36 @@ export declare function writeObligations(stateDir: string, obligations: readonly
80
102
  * from the graph on every run and never reads this file.
81
103
  */
82
104
  export declare function writeHttpRoutesView(stateDir: string, routes: readonly HttpRouteCandidate[]): void;
105
+ /**
106
+ * Persists the route inventory the twin-shape recorder resolves
107
+ * request paths against (E64).
108
+ *
109
+ * It is the engine's own compiled `http.endpoint` list, written ONLY
110
+ * when the owner configured `enforcement.twinPaths`: a repository
111
+ * without that key never grows this file, and its runs stay
112
+ * byte-identical. The witness reads it so a recorded shape names a
113
+ * route TEMPLATE (`/accounts/{}`) instead of a concrete id.
114
+ */
115
+ export declare function writeTwinInventory(path: string, templates: readonly string[]): void;
116
+ /**
117
+ * Persists the twin shapes this run observed (E64): per test, the
118
+ * logical key, whether the session was observation-only, and the
119
+ * request SHAPES it exercised.
120
+ *
121
+ * Shapes and logical keys only — never a URL, a body or a
122
+ * non-allowlisted query value — so the document is safe to read, diff
123
+ * and paste into a bug. It is diagnostic: no gate reads it, and a
124
+ * shape in it can satisfy nothing.
125
+ */
126
+ export declare function writeTwinShapes(stateDir: string, twins: readonly {
127
+ logicalKey: string;
128
+ observationOnly: boolean;
129
+ shapes: readonly {
130
+ method: string;
131
+ route: string;
132
+ query?: Record<string, string>;
133
+ }[];
134
+ }[]): void;
83
135
  /**
84
136
  * Persists the run's effective-classification view (plan phase 5) as a
85
137
  * derived artifact for the verifier side (e.g. the witness service's
@@ -88,7 +140,7 @@ export declare function writeHttpRoutesView(stateDir: string, routes: readonly H
88
140
  */
89
141
  export declare function writeClassificationsView(stateDir: string, view: Record<string, unknown>): void;
90
142
  /** Persists the ambient env record and returns it (fresh token unless adopted). */
91
- export declare function writeEnv(stateDir: string, manifest: RunManifest, witnessUrl: string | null, runToken?: string): TestGatesEnv;
143
+ export declare function writeEnv(stateDir: string, manifest: RunManifest, witnessUrl: string | null, runToken?: string, operatorEnv?: NodeJS.ProcessEnv): TestGatesEnv;
92
144
  /** Persists the canonical json-format run report. */
93
145
  export declare function writeReport(stateDir: string, report: string): void;
94
146
  /**
@@ -109,10 +161,126 @@ export declare function writeReport(stateDir: string, report: string): void;
109
161
  export declare function readStateDocument(stateDir: string, name: string): unknown | null;
110
162
  /** Persists the Phase 4 claim-injections document (derived run state). */
111
163
  export declare function writeClaimInjections(stateDir: string, injections: Record<string, string[]>): void;
164
+ /** Advisory timing data for the most recently completed full test run. */
165
+ export interface LastFullRunSummary {
166
+ /** Number of tests selected by that full run. */
167
+ testCount: number;
168
+ /** Wall-clock duration of the supervised test execution in milliseconds. */
169
+ durationMs: number;
170
+ }
171
+ /**
172
+ * Persists advisory cost data for a completed full test run.
173
+ *
174
+ * Args:
175
+ * stateDir: absolute run-state directory.
176
+ * summary: selected test count and measured execution duration.
177
+ *
178
+ * Returns:
179
+ * void.
180
+ */
181
+ export declare function writeLastFullRunSummary(stateDir: string, summary: LastFullRunSummary): void;
182
+ /**
183
+ * Reads advisory full-run cost data without letting it affect gate trust.
184
+ *
185
+ * Args:
186
+ * stateDir: absolute run-state directory.
187
+ *
188
+ * Returns:
189
+ * LastFullRunSummary | null: valid saved cost data, or null when missing
190
+ * or unusable.
191
+ */
192
+ export declare function readLastFullRunSummary(stateDir: string): LastFullRunSummary | null;
112
193
  /** Persists the sealed supervision execution result. */
113
194
  export declare function writeExecutionResult(stateDir: string, result: unknown): void;
114
195
  /** Persists the authenticated gate receipt. */
115
196
  export declare function writeGateReceipt(stateDir: string, receipt: unknown): void;
197
+ /**
198
+ * Persists the run record of a whole-suite run that sealed no receipt.
199
+ *
200
+ * Args:
201
+ * stateDir: absolute run-state directory.
202
+ * record: the authenticated run record.
203
+ *
204
+ * Returns:
205
+ * void.
206
+ */
207
+ export declare function writeRunRecord(stateDir: string, record: unknown): void;
208
+ /**
209
+ * Removes the retained run record. A gate receipt supersedes it (the
210
+ * receipt is the same evidence plus a verdict), so a sealed run never
211
+ * leaves a stale parent behind for the next one to re-seal from.
212
+ *
213
+ * Args:
214
+ * stateDir: absolute run-state directory.
215
+ *
216
+ * Returns:
217
+ * void.
218
+ */
219
+ export declare function clearRunRecord(stateDir: string): void;
220
+ /**
221
+ * Persists the run-scope view the in-runner reporter reads.
222
+ *
223
+ * A reporter that graded a named test list or a changed slice observed
224
+ * no repository-wide debt, and must say so instead of printing a
225
+ * repository verdict the CLI never asked for. The view is derived run
226
+ * state, written before the suite starts, and read by nothing the gate
227
+ * trusts.
228
+ *
229
+ * Args:
230
+ * stateDir: absolute run-state directory.
231
+ * scope: the scope this run actually grades.
232
+ *
233
+ * Returns:
234
+ * void.
235
+ */
236
+ export declare function writeRunScopeView(stateDir: string, scope: 'full' | 'changed' | 'named'): void;
237
+ /**
238
+ * Persists the Gateforge-owned failing-test diagnosis artifact.
239
+ *
240
+ * A failed witnessed test used to ship nothing but an ARIA snapshot:
241
+ * the runner's message and stack lived in the runner log, which the CI
242
+ * job keeps private precisely because it carries secrets. This file is
243
+ * the screened alternative — the first error line and a short
244
+ * `file:line` stack per failure, already passed through the credential
245
+ * guard, never a request or response body. It is written only when the
246
+ * progress stream is on, so a local run leaves the state directory
247
+ * exactly as it found it.
248
+ *
249
+ * Args:
250
+ * stateDir: absolute run-state directory.
251
+ * runId: the run that produced the failures.
252
+ * failures: the guarded failure records, in the order the run saw them.
253
+ *
254
+ * Returns:
255
+ * void.
256
+ */
257
+ export declare function writeTestFailures(stateDir: string, runId: string, failures: readonly {
258
+ logicalKey: string;
259
+ title: string;
260
+ message: string;
261
+ stackFrames: string[];
262
+ }[]): void;
263
+ /**
264
+ * Persists the entries included in the sealed candidate tree.
265
+ *
266
+ * Args:
267
+ * stateDir: absolute run-state directory.
268
+ * entries: sorted tree entries bound by the sealed receipt.
269
+ *
270
+ * Returns:
271
+ * void.
272
+ */
273
+ export declare function writeCandidateTreeEntries(stateDir: string, entries: readonly CandidateTreeEntry[]): void;
274
+ /**
275
+ * Reads the saved candidate-tree entries for mismatch diagnostics.
276
+ *
277
+ * Args:
278
+ * stateDir: absolute run-state directory.
279
+ *
280
+ * Returns:
281
+ * CandidateTreeEntry[] | null: validated entries, or null when absent or malformed.
282
+ */
283
+ export declare function readCandidateTreeEntries(stateDir: string): CandidateTreeEntry[] | null;
116
284
  /**
117
285
  * Removes the cached gate receipt (plan Phase 4 item 8 / E07): a
118
286
  * failing supervised run invalidates any cached success for its inputs —
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAiCA,OAAO,EAIL,KAAK,kBAAkB,EAEvB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AAEzD,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,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