@gate-forge/pack-playwright 0.7.1 → 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 (202) hide show
  1. package/README.md +31 -0
  2. package/dist/constants.d.ts +13 -140
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +13 -148
  5. package/dist/constants.js.map +1 -1
  6. package/dist/cypress/plugin.d.ts +53 -0
  7. package/dist/cypress/plugin.d.ts.map +1 -0
  8. package/dist/cypress/plugin.js +369 -0
  9. package/dist/cypress/plugin.js.map +1 -0
  10. package/dist/cypress/spec-scan.d.ts +39 -0
  11. package/dist/cypress/spec-scan.d.ts.map +1 -0
  12. package/dist/cypress/spec-scan.js +301 -0
  13. package/dist/cypress/spec-scan.js.map +1 -0
  14. package/dist/diagnosis.d.ts +39 -0
  15. package/dist/diagnosis.d.ts.map +1 -0
  16. package/dist/diagnosis.js +63 -0
  17. package/dist/diagnosis.js.map +1 -0
  18. package/dist/discovery/adapter-projection.d.ts +13 -0
  19. package/dist/discovery/adapter-projection.d.ts.map +1 -0
  20. package/dist/discovery/adapter-projection.js +84 -0
  21. package/dist/discovery/adapter-projection.js.map +1 -0
  22. package/dist/discovery/config-locations.d.ts +5 -0
  23. package/dist/discovery/config-locations.d.ts.map +1 -0
  24. package/dist/discovery/config-locations.js +19 -0
  25. package/dist/discovery/config-locations.js.map +1 -0
  26. package/dist/discovery/cypress-runner-adapter.d.ts +112 -0
  27. package/dist/discovery/cypress-runner-adapter.d.ts.map +1 -0
  28. package/dist/discovery/cypress-runner-adapter.js +501 -0
  29. package/dist/discovery/cypress-runner-adapter.js.map +1 -0
  30. package/dist/discovery/discover.d.ts +53 -1
  31. package/dist/discovery/discover.d.ts.map +1 -1
  32. package/dist/discovery/discover.js +100 -3
  33. package/dist/discovery/discover.js.map +1 -1
  34. package/dist/discovery/git-ignore.d.ts +13 -0
  35. package/dist/discovery/git-ignore.d.ts.map +1 -0
  36. package/dist/discovery/git-ignore.js +62 -0
  37. package/dist/discovery/git-ignore.js.map +1 -0
  38. package/dist/discovery/index.d.ts +9 -0
  39. package/dist/discovery/index.d.ts.map +1 -1
  40. package/dist/discovery/index.js +9 -0
  41. package/dist/discovery/index.js.map +1 -1
  42. package/dist/discovery/playwright-runner-adapter.d.ts +108 -0
  43. package/dist/discovery/playwright-runner-adapter.d.ts.map +1 -0
  44. package/dist/discovery/playwright-runner-adapter.js +185 -0
  45. package/dist/discovery/playwright-runner-adapter.js.map +1 -0
  46. package/dist/discovery/prepare-barrier.d.ts +522 -0
  47. package/dist/discovery/prepare-barrier.d.ts.map +1 -0
  48. package/dist/discovery/prepare-barrier.js +739 -0
  49. package/dist/discovery/prepare-barrier.js.map +1 -0
  50. package/dist/discovery/pytest-adapter.d.ts.map +1 -1
  51. package/dist/discovery/pytest-adapter.js +6 -2
  52. package/dist/discovery/pytest-adapter.js.map +1 -1
  53. package/dist/discovery/pytest-runner-adapter.d.ts +124 -0
  54. package/dist/discovery/pytest-runner-adapter.d.ts.map +1 -0
  55. package/dist/discovery/pytest-runner-adapter.js +454 -0
  56. package/dist/discovery/pytest-runner-adapter.js.map +1 -0
  57. package/dist/discovery/reconcile.d.ts +80 -11
  58. package/dist/discovery/reconcile.d.ts.map +1 -1
  59. package/dist/discovery/reconcile.js +395 -78
  60. package/dist/discovery/reconcile.js.map +1 -1
  61. package/dist/discovery/runner-env.d.ts +88 -2
  62. package/dist/discovery/runner-env.d.ts.map +1 -1
  63. package/dist/discovery/runner-env.js +142 -4
  64. package/dist/discovery/runner-env.js.map +1 -1
  65. package/dist/discovery/static-discovery.d.ts +38 -3
  66. package/dist/discovery/static-discovery.d.ts.map +1 -1
  67. package/dist/discovery/static-discovery.js +454 -15
  68. package/dist/discovery/static-discovery.js.map +1 -1
  69. package/dist/discovery/supervised-run.d.ts +199 -10
  70. package/dist/discovery/supervised-run.d.ts.map +1 -1
  71. package/dist/discovery/supervised-run.js +350 -39
  72. package/dist/discovery/supervised-run.js.map +1 -1
  73. package/dist/discovery/trusted-config.d.ts +180 -6
  74. package/dist/discovery/trusted-config.d.ts.map +1 -1
  75. package/dist/discovery/trusted-config.js +279 -10
  76. package/dist/discovery/trusted-config.js.map +1 -1
  77. package/dist/discovery/vitest-runner-adapter.d.ts +172 -0
  78. package/dist/discovery/vitest-runner-adapter.d.ts.map +1 -0
  79. package/dist/discovery/vitest-runner-adapter.js +607 -0
  80. package/dist/discovery/vitest-runner-adapter.js.map +1 -0
  81. package/dist/fixture/consumer-runner.d.ts +4 -0
  82. package/dist/fixture/consumer-runner.d.ts.map +1 -0
  83. package/dist/fixture/consumer-runner.js +38 -0
  84. package/dist/fixture/consumer-runner.js.map +1 -0
  85. package/dist/fixture/evidence.d.ts +27 -0
  86. package/dist/fixture/evidence.d.ts.map +1 -1
  87. package/dist/fixture/evidence.js +12 -0
  88. package/dist/fixture/evidence.js.map +1 -1
  89. package/dist/fixture/fixture.d.ts +2 -1
  90. package/dist/fixture/fixture.d.ts.map +1 -1
  91. package/dist/fixture/fixture.js +1 -17
  92. package/dist/fixture/fixture.js.map +1 -1
  93. package/dist/fixture/witness-client.d.ts +6 -174
  94. package/dist/fixture/witness-client.d.ts.map +1 -1
  95. package/dist/fixture/witness-client.js +6 -267
  96. package/dist/fixture/witness-client.js.map +1 -1
  97. package/dist/index.d.ts +9 -6
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +5 -4
  100. package/dist/index.js.map +1 -1
  101. package/dist/json.d.ts +6 -12
  102. package/dist/json.d.ts.map +1 -1
  103. package/dist/json.js +6 -17
  104. package/dist/json.js.map +1 -1
  105. package/dist/reporter/project-graph-reporter.d.ts +92 -0
  106. package/dist/reporter/project-graph-reporter.d.ts.map +1 -0
  107. package/dist/reporter/project-graph-reporter.js +92 -0
  108. package/dist/reporter/project-graph-reporter.js.map +1 -0
  109. package/dist/reporter/reporter.cjs.map +1 -1
  110. package/dist/reporter/reporter.d.ts +93 -4
  111. package/dist/reporter/reporter.d.ts.map +1 -1
  112. package/dist/reporter/reporter.js +174 -18
  113. package/dist/reporter/reporter.js.map +1 -1
  114. package/dist/runner-claims.d.ts +13 -0
  115. package/dist/runner-claims.d.ts.map +1 -0
  116. package/dist/runner-claims.js +46 -0
  117. package/dist/runner-claims.js.map +1 -0
  118. package/dist/runner-resolution.d.ts +3 -0
  119. package/dist/runner-resolution.d.ts.map +1 -0
  120. package/dist/runner-resolution.js +14 -0
  121. package/dist/runner-resolution.js.map +1 -0
  122. package/dist/supervisor/client.d.ts +23 -1
  123. package/dist/supervisor/client.d.ts.map +1 -1
  124. package/dist/supervisor/client.js +49 -0
  125. package/dist/supervisor/client.js.map +1 -1
  126. package/dist/supervisor/drain.d.ts +65 -0
  127. package/dist/supervisor/drain.d.ts.map +1 -1
  128. package/dist/supervisor/drain.js +353 -9
  129. package/dist/supervisor/drain.js.map +1 -1
  130. package/dist/supervisor/index.d.ts +7 -3
  131. package/dist/supervisor/index.d.ts.map +1 -1
  132. package/dist/supervisor/index.js +7 -3
  133. package/dist/supervisor/index.js.map +1 -1
  134. package/dist/supervisor/spool.d.ts +65 -2
  135. package/dist/supervisor/spool.d.ts.map +1 -1
  136. package/dist/supervisor/spool.js +47 -0
  137. package/dist/supervisor/spool.js.map +1 -1
  138. package/dist/surface.d.ts +6 -207
  139. package/dist/surface.d.ts.map +1 -1
  140. package/dist/surface.js +6 -264
  141. package/dist/surface.js.map +1 -1
  142. package/dist/vitest/index.d.ts +23 -0
  143. package/dist/vitest/index.d.ts.map +1 -0
  144. package/dist/vitest/index.js +356 -0
  145. package/dist/vitest/index.js.map +1 -0
  146. package/dist/vitest/reporter.d.ts +83 -0
  147. package/dist/vitest/reporter.d.ts.map +1 -0
  148. package/dist/vitest/reporter.js +211 -0
  149. package/dist/vitest/reporter.js.map +1 -0
  150. package/dist/vitest/worker-slot.d.ts +36 -0
  151. package/dist/vitest/worker-slot.d.ts.map +1 -0
  152. package/dist/vitest/worker-slot.js +51 -0
  153. package/dist/vitest/worker-slot.js.map +1 -0
  154. package/dist/witness/adapter-registry.d.ts +6 -50
  155. package/dist/witness/adapter-registry.d.ts.map +1 -1
  156. package/dist/witness/adapter-registry.js +6 -257
  157. package/dist/witness/adapter-registry.js.map +1 -1
  158. package/dist/witness/behavior-request.d.ts +6 -76
  159. package/dist/witness/behavior-request.d.ts.map +1 -1
  160. package/dist/witness/behavior-request.js +6 -273
  161. package/dist/witness/behavior-request.js.map +1 -1
  162. package/dist/witness/behavior.d.ts +6 -48
  163. package/dist/witness/behavior.d.ts.map +1 -1
  164. package/dist/witness/behavior.js +6 -114
  165. package/dist/witness/behavior.js.map +1 -1
  166. package/dist/witness/bin.d.ts +6 -17
  167. package/dist/witness/bin.d.ts.map +1 -1
  168. package/dist/witness/bin.js +6 -168
  169. package/dist/witness/bin.js.map +1 -1
  170. package/dist/witness/browser.d.ts +14 -206
  171. package/dist/witness/browser.d.ts.map +1 -1
  172. package/dist/witness/browser.js +15 -654
  173. package/dist/witness/browser.js.map +1 -1
  174. package/dist/witness/classifications.d.ts +6 -38
  175. package/dist/witness/classifications.d.ts.map +1 -1
  176. package/dist/witness/classifications.js +6 -83
  177. package/dist/witness/classifications.js.map +1 -1
  178. package/dist/witness/env-attestation.d.ts +6 -94
  179. package/dist/witness/env-attestation.d.ts.map +1 -1
  180. package/dist/witness/env-attestation.js +6 -198
  181. package/dist/witness/env-attestation.js.map +1 -1
  182. package/dist/witness/fixture-provider.d.ts +6 -82
  183. package/dist/witness/fixture-provider.d.ts.map +1 -1
  184. package/dist/witness/fixture-provider.js +6 -105
  185. package/dist/witness/fixture-provider.js.map +1 -1
  186. package/dist/witness/loopback-pins.d.ts +6 -75
  187. package/dist/witness/loopback-pins.d.ts.map +1 -1
  188. package/dist/witness/loopback-pins.js +6 -240
  189. package/dist/witness/loopback-pins.js.map +1 -1
  190. package/dist/witness/server.d.ts +8 -26
  191. package/dist/witness/server.d.ts.map +1 -1
  192. package/dist/witness/server.js +24 -3761
  193. package/dist/witness/server.js.map +1 -1
  194. package/dist/witness/types.d.ts +6 -882
  195. package/dist/witness/types.d.ts.map +1 -1
  196. package/dist/witness/types.js +9 -1
  197. package/dist/witness/types.js.map +1 -1
  198. package/examples/overlay-proof.spec.js +75 -0
  199. package/package.json +8 -2
  200. package/python/__pycache__/gateforge_persistence_intents.cpython-312.pyc +0 -0
  201. package/python/__pycache__/gateforge_persistence_intents.cpython-314.pyc +0 -0
  202. package/python/gateforge_pytest_plugin.py +462 -0
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Writing witnessed journeys
2
+
3
+ A witnessed journey must exercise the real application behavior and verify the result that users depend on. A passing test declaration is not proof: only a valid receipt proves a run, and an adopted baseline forgives previously accepted debt.
4
+
5
+ ## Start from a complete example
6
+
7
+ `examples/overlay-proof.spec.js` (in this package, so `node_modules/@gate-forge/pack-playwright/examples/overlay-proof.spec.js` in your repo) is a complete overlay proof test: a surface descriptor for a small list/create/edit/archive app, the `gateforge` annotation, and the witnessed `evidence.ui.*` / `visible.confirm` / `http.observe` / `persistence.verify` / `finalize` sequence. Copy it, change the selectors, and the fixture calls stay the same.
8
+
9
+ ## Keep each journey isolated
10
+
11
+ - Create distinct records and tenant context for every test. Do not reuse a per-tenant singleton across tests; shared state can hide cross-tenant leaks and make outcomes depend on test order.
12
+ - Give test data unique identifiers, and clean it up through the same supported application path the test is checking.
13
+ - Keep setup independent of Gateforge environment variables so discovery can register the same tests in local and CI runs.
14
+
15
+ ## Observe mutation results without hanging
16
+
17
+ - Read a mutation response body only when the application returns one. Calling `.json()` on an intentionally empty response waits forever; assert the status and then query the resulting state through the application’s normal read path.
18
+ - Check both the submitted value and the persisted value on the same record. A successful HTTP status or click alone does not prove the update happened.
19
+ - Prefer a specific response or visible application condition over fixed sleeps and transient loading text.
20
+
21
+ ## Prefer real behavior over mocks
22
+
23
+ - Use the real server and persistence path when the journey claims a user-facing behavior. A `page.route()` stub can prove client handling, but it cannot show that the server stored the right value or enforced tenant boundaries.
24
+ - Keep mock-only tests, but do not treat them as evidence for the real application surface.
25
+ - When multiple journeys cover the same obligation, state why each one is needed; avoid copy-pasted tests that compete for shared data.
26
+
27
+ Run the configured suite with `gateforge test-gates --changed`. For a selected non-authoritative slice, use `gateforge test-gates --changed --scope changed --result-only`; this reports selected results without creating or changing a receipt.
28
+
29
+ ## Install the browsers before the first witnessed run
30
+
31
+ `npx playwright install chromium`, from the directory that holds your Playwright config. On a Linux machine without the browser's system libraries — a container, a CI image, WSL — install those too in the same command: `npx playwright install --with-deps chromium` (it needs root or sudo). `gateforge enforcement doctor` names the case: a missing build names the install, and a build that is installed but cannot start names the loader's own line and the `npx playwright install-deps chromium` that fixes it.
@@ -1,146 +1,19 @@
1
1
  /**
2
- * Shared constants of the Playwright evidence pack (pin #7, plan §5.3).
2
+ * Compatibility re-export: `constants` now lives in the runner-neutral
3
+ * `@gate-forge/witness` package (plan 2026-09-25 phase 1).
3
4
  *
4
- * These names are the wire contract between the fixture (test process),
5
- * the reporter (runner process), and the witness service (engine
6
- * process). They are also the documented env surface of `gateforge
7
- * test-gates` (packages/cli/README.md "test-gates protocol") — the CLI
8
- * already exports GATEFORGE_RUN_ID / GATEFORGE_RUN_TOKEN /
9
- * GATEFORGE_STATE_DIR / GATEFORGE_OBLIGATIONS / GATEFORGE_WITNESS_URL;
10
- * the pack augments the target/attestation/adapter surface below.
5
+ * The move is physical, not behavioural: this module forwards every
6
+ * export unchanged so `@gate-forge/pack-playwright`'s published import
7
+ * paths — which consumers pin — keep resolving to the same values.
11
8
  */
12
- /** Claim annotation type: `{type: 'gateforge', description: '<obligation id>'}`. */
13
- export declare const CLAIM_ANNOTATION_TYPE = "gateforge";
14
- /** Per-run auth header on every witness call (pin #7). */
15
- export declare const RUN_HEADER = "x-gateforge-run";
9
+ export * from '@gate-forge/witness/constants';
16
10
  /**
17
- * Verifier auth header on the witness attestation surface
18
- * (`GET /ledger-attestation` and the manifest MAC). Carries the
19
- * verifier key — a secret the orchestrator shares with the witness and
20
- * the evaluating CLI but NEVER with the tested suite (the suite's run
21
- * token authorizes evidence submission; it must not authorize
22
- * attestation, or a hostile suite could certify its own fabrications).
11
+ * Non-secret runner-child context: the absolute directory holding the
12
+ * consumer's Playwright config, handed to the supervised runner so the
13
+ * evidence fixture can bind to the SAME consumer runner the enumeration
14
+ * and the supervised execution use (see fixture/consumer-runner.ts).
15
+ * A path, never a secret; unset is normal (a repository that relies on the
16
+ * pack's own pinned runner).
23
17
  */
24
- export declare const VERIFIER_HEADER = "x-gateforge-verifier";
25
- /** Marker header the SUT (or its attestation proxy) must present. */
26
- export declare const ENV_FINGERPRINT_HEADER = "x-gateforge-env-fingerprint";
27
- /** Marker header the SUT (or its attestation proxy) may present. */
28
- export declare const ATTESTATION_SCOPE_HEADER = "x-gateforge-attestation-scope";
29
- /** Evidence kinds the witness /records endpoint accepts (plan §5.3). */
30
- export declare const UI_ACTION_KIND = "ui.action";
31
- export declare const UI_VISIBLE_RESULT_KIND = "ui.visible-result";
32
- export declare const PERSISTENCE_KIND = "persistence.entity";
33
- /**
34
- * Observe-channel persistence kind (Phase 2): issued ONLY by the
35
- * witness's observe finalize (engine-side proxy capture + adapter
36
- * read) — never suite-submittable (`/records` rejects it like every
37
- * persistence kind) and never engine-driven.
38
- */
39
- export declare const OBSERVED_KIND = "persistence.observed";
40
- export declare const KNOWN_RECORD_KINDS: readonly string[];
41
- /** Persistence kinds are ONLY issued by the witness (engine-side adapter reads). */
42
- export declare const KNOWN_PERSISTENCE_KINDS: readonly string[];
43
- /** Env the CLI test-gates suite already receives (documented contract). */
44
- export declare const ENV_RUN_ID = "GATEFORGE_RUN_ID";
45
- export declare const ENV_RUN_TOKEN = "GATEFORGE_RUN_TOKEN";
46
- export declare const ENV_STATE_DIR = "GATEFORGE_STATE_DIR";
47
- export declare const ENV_OBLIGATIONS = "GATEFORGE_OBLIGATIONS";
48
- export declare const ENV_WITNESS_URL = "GATEFORGE_WITNESS_URL";
49
- /** Pack-extended env surface (documented in this package's README). */
50
- export declare const ENV_APP_BASE_URL = "GATEFORGE_APP_BASE_URL";
51
- export declare const ENV_TARGET_BASE_URL = "GATEFORGE_TARGET_BASE_URL";
52
- export declare const ENV_TARGET_FINGERPRINT = "GATEFORGE_TARGET_FINGERPRINT";
53
- export declare const ENV_ADAPTERS_DIR = "GATEFORGE_ADAPTERS_DIR";
54
- export declare const ENV_CLASSIFICATIONS = "GATEFORGE_CLASSIFICATIONS";
55
- export declare const ENV_ADAPTER_BASE_URL = "GATEFORGE_ADAPTER_BASE_URL";
56
- /** Observation proxy target (loopback base URL the proxy forwards to). */
57
- export declare const ENV_PROXY_TARGET = "GATEFORGE_PROXY_TARGET";
58
- /**
59
- * Observation-proxy mount prefix (e.g. `/api`): the browser-facing path
60
- * prefix a frontend dev proxy adds before backend routes. The proxy
61
- * strips it before forwarding and before recording observations, so
62
- * records match backend-derived obligation identities.
63
- */
64
- export declare const ENV_MOUNT_PATH = "GATEFORGE_MOUNT_PATH";
65
- /**
66
- * Verifier key for the witness attestation surface. Environment ONLY —
67
- * never argv (a process's cmdline is world-readable via /proc), and
68
- * never exported to the tested suite. Same variable the orchestrating
69
- * CLI reads (`gateforge test-gates`).
70
- */
71
- export declare const ENV_WITNESS_VERIFIER_KEY = "GATEFORGE_WITNESS_VERIFIER_KEY";
72
- /** Opt-in reporter exit-code semantics (standalone runs only). */
73
- export declare const ENV_REPORTER_FAIL_RUN = "GATEFORGE_REPORTER_FAIL_RUN";
74
- /**
75
- * Absolute path of the runner-outcomes document the gateforge reporter
76
- * writes for trusted runner supervision (plan Phase 4 item 4, ADR 0005
77
- * D2): per-instance outcomes, attempts, expected failures, and the
78
- * run-level fixture/teardown outcome. Set by the supervised adapter
79
- * (`test-gates --changed`); when absent the reporter writes nothing —
80
- * supervision then fails closed on the missing outcomes file.
81
- */
82
- export declare const ENV_OUTCOMES_FILE = "GATEFORGE_OUTCOMES_FILE";
83
- /**
84
- * Run-state file (written by the orchestrating CLI) carrying the mapped
85
- * obligation claims for sidecar/native-mapped tests, keyed by
86
- * `<file>#<titlePath.join('>')>` (the reconciliation key). The reporter
87
- * carries these claims on the session-open path (Phase 4 claim
88
- * injection) so their evidence lands on the right claims; native
89
- * annotations keep working unchanged.
90
- */
91
- export declare const CLAIM_INJECTIONS_FILE = "claim-injections.json";
92
- /** Run-state file carrying the sealed supervision execution result. */
93
- export declare const EXECUTION_RESULT_FILE = "execution-result.json";
94
- /**
95
- * Run-state spool directory (enforcement-review fix 3): the runner-side
96
- * reporter writes test lifecycle events (testBegin/testEnd with outcome)
97
- * as NUL-safe JSON lines under `<stateDir>/spool/<runId>/`; the trusted
98
- * CLI drains them and performs the witness supervisor calls (session
99
- * open/close) with credentials that exist ONLY in the CLI process. The
100
- * runner child holds no supervisor rights.
101
- */
102
- export declare const SPOOL_DIR_NAME = "spool";
103
- /** The spool's event file (JSON lines; consumed by the CLI drain loop). */
104
- export declare const SPOOL_EVENTS_FILE = "events.jsonl";
105
- /**
106
- * The spool's persistence-claim-intent file (JSON lines; same NUL-safe
107
- * line protocol as `events.jsonl`): the supervised (UNTRUSTED) test
108
- * process reports claim INTENTS here — {entity, operation, phase, intent,
109
- * key, claimId, testId, sequence}. The suite can only write intents; it
110
- * can NEVER stamp evidence. The trusted CLI's spool drain forwards each
111
- * intent to the witness over the verifier-key supervisor surface, where
112
- * the resource's adapter SERVER PROBE runs (witness-side) and — only
113
- * then — a witnessed `persistence.entity` record stamped
114
- * `channel: 'server'` may be issued.
115
- */
116
- export declare const SPOOL_INTENTS_FILE = "persistence-intents.jsonl";
117
- /**
118
- * Payload discriminant the witness stamps on server-probed persistence
119
- * records (core's verdict engine keys the server-witnessed channel off
120
- * this + {@link SERVER_E2E_TEST_KIND}).
121
- */
122
- export declare const SERVER_CHANNEL = "server";
123
- /** The mapping kind that unlocks the server-witnessed channel. */
124
- export declare const SERVER_E2E_TEST_KIND = "server-e2e";
125
- /**
126
- * Payload discriminant the witness stamps on observe-finalized
127
- * persistence records (Observe channel, Phase 2: core's verdict engine
128
- * keys the observe branch off this channel on `persistence.observed`
129
- * records).
130
- */
131
- export declare const OBSERVE_CHANNEL = "observe";
132
- /** The mapping kind that unlocks the Observe channel. */
133
- export declare const OBSERVED_E2E_TEST_KIND = "observed-e2e";
134
- /** Run-state file carrying the authenticated gate receipt. */
135
- export declare const GATE_RECEIPT_FILE = "receipt.json";
136
- /** Run-state diagnostics report (plan §3.5; never witness evidence). */
137
- export declare const DIAGNOSTICS_REPORT_FILE = "diagnostics.json";
138
- /** Witness file inside the state dir carrying the spawned URL. */
139
- export declare const WITNESS_URL_FILE = "witness-url.json";
140
- /** Default per-witness-call timeout (pin #7: 5s). */
141
- export declare const DEFAULT_REQUEST_TIMEOUT_MS = 5000;
142
- /** The loopback hostname the witness, proxy, and fixture servers bind. */
143
- export declare const LOOPBACK_HOSTNAME = "127.0.0.1";
144
- /** Loopback-equivalent hostnames the witness accepts as attestation subjects. */
145
- export declare const LOOPBACK_HOSTS: Record<string, true>;
18
+ export declare const ENV_PLAYWRIGHT_CONFIG_DIR = "GATEFORGE_PLAYWRIGHT_CONFIG_DIR";
146
19
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAEjD,0DAA0D;AAC1D,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AAEpE,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AAExE,wEAAwE;AACxE,eAAO,MAAM,cAAc,cAAc,CAAC;AAC1C,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAC1D,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD;;;;;GAKG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IG;AACH,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAE1D,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,qDAAqD;AACrD,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAE7C,iFAAiF;AACjF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAK/C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,+BAA+B,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,oCAAoC,CAAC"}
package/dist/constants.js CHANGED
@@ -1,154 +1,19 @@
1
1
  /**
2
- * Shared constants of the Playwright evidence pack (pin #7, plan §5.3).
2
+ * Compatibility re-export: `constants` now lives in the runner-neutral
3
+ * `@gate-forge/witness` package (plan 2026-09-25 phase 1).
3
4
  *
4
- * These names are the wire contract between the fixture (test process),
5
- * the reporter (runner process), and the witness service (engine
6
- * process). They are also the documented env surface of `gateforge
7
- * test-gates` (packages/cli/README.md "test-gates protocol") — the CLI
8
- * already exports GATEFORGE_RUN_ID / GATEFORGE_RUN_TOKEN /
9
- * GATEFORGE_STATE_DIR / GATEFORGE_OBLIGATIONS / GATEFORGE_WITNESS_URL;
10
- * the pack augments the target/attestation/adapter surface below.
5
+ * The move is physical, not behavioural: this module forwards every
6
+ * export unchanged so `@gate-forge/pack-playwright`'s published import
7
+ * paths — which consumers pin — keep resolving to the same values.
11
8
  */
12
- /** Claim annotation type: `{type: 'gateforge', description: '<obligation id>'}`. */
13
- export const CLAIM_ANNOTATION_TYPE = 'gateforge';
14
- /** Per-run auth header on every witness call (pin #7). */
15
- export const RUN_HEADER = 'x-gateforge-run';
9
+ export * from '@gate-forge/witness/constants';
16
10
  /**
17
- * Verifier auth header on the witness attestation surface
18
- * (`GET /ledger-attestation` and the manifest MAC). Carries the
19
- * verifier key — a secret the orchestrator shares with the witness and
20
- * the evaluating CLI but NEVER with the tested suite (the suite's run
21
- * token authorizes evidence submission; it must not authorize
22
- * attestation, or a hostile suite could certify its own fabrications).
11
+ * Non-secret runner-child context: the absolute directory holding the
12
+ * consumer's Playwright config, handed to the supervised runner so the
13
+ * evidence fixture can bind to the SAME consumer runner the enumeration
14
+ * and the supervised execution use (see fixture/consumer-runner.ts).
15
+ * A path, never a secret; unset is normal (a repository that relies on the
16
+ * pack's own pinned runner).
23
17
  */
24
- export const VERIFIER_HEADER = 'x-gateforge-verifier';
25
- /** Marker header the SUT (or its attestation proxy) must present. */
26
- export const ENV_FINGERPRINT_HEADER = 'x-gateforge-env-fingerprint';
27
- /** Marker header the SUT (or its attestation proxy) may present. */
28
- export const ATTESTATION_SCOPE_HEADER = 'x-gateforge-attestation-scope';
29
- /** Evidence kinds the witness /records endpoint accepts (plan §5.3). */
30
- export const UI_ACTION_KIND = 'ui.action';
31
- export const UI_VISIBLE_RESULT_KIND = 'ui.visible-result';
32
- export const PERSISTENCE_KIND = 'persistence.entity';
33
- /**
34
- * Observe-channel persistence kind (Phase 2): issued ONLY by the
35
- * witness's observe finalize (engine-side proxy capture + adapter
36
- * read) — never suite-submittable (`/records` rejects it like every
37
- * persistence kind) and never engine-driven.
38
- */
39
- export const OBSERVED_KIND = 'persistence.observed';
40
- export const KNOWN_RECORD_KINDS = [
41
- UI_ACTION_KIND,
42
- UI_VISIBLE_RESULT_KIND,
43
- ];
44
- /** Persistence kinds are ONLY issued by the witness (engine-side adapter reads). */
45
- export const KNOWN_PERSISTENCE_KINDS = [PERSISTENCE_KIND, OBSERVED_KIND];
46
- /** Env the CLI test-gates suite already receives (documented contract). */
47
- export const ENV_RUN_ID = 'GATEFORGE_RUN_ID';
48
- export const ENV_RUN_TOKEN = 'GATEFORGE_RUN_TOKEN';
49
- export const ENV_STATE_DIR = 'GATEFORGE_STATE_DIR';
50
- export const ENV_OBLIGATIONS = 'GATEFORGE_OBLIGATIONS';
51
- export const ENV_WITNESS_URL = 'GATEFORGE_WITNESS_URL';
52
- /** Pack-extended env surface (documented in this package's README). */
53
- export const ENV_APP_BASE_URL = 'GATEFORGE_APP_BASE_URL';
54
- export const ENV_TARGET_BASE_URL = 'GATEFORGE_TARGET_BASE_URL';
55
- export const ENV_TARGET_FINGERPRINT = 'GATEFORGE_TARGET_FINGERPRINT';
56
- export const ENV_ADAPTERS_DIR = 'GATEFORGE_ADAPTERS_DIR';
57
- export const ENV_CLASSIFICATIONS = 'GATEFORGE_CLASSIFICATIONS';
58
- export const ENV_ADAPTER_BASE_URL = 'GATEFORGE_ADAPTER_BASE_URL';
59
- /** Observation proxy target (loopback base URL the proxy forwards to). */
60
- export const ENV_PROXY_TARGET = 'GATEFORGE_PROXY_TARGET';
61
- /**
62
- * Observation-proxy mount prefix (e.g. `/api`): the browser-facing path
63
- * prefix a frontend dev proxy adds before backend routes. The proxy
64
- * strips it before forwarding and before recording observations, so
65
- * records match backend-derived obligation identities.
66
- */
67
- export const ENV_MOUNT_PATH = 'GATEFORGE_MOUNT_PATH';
68
- /**
69
- * Verifier key for the witness attestation surface. Environment ONLY —
70
- * never argv (a process's cmdline is world-readable via /proc), and
71
- * never exported to the tested suite. Same variable the orchestrating
72
- * CLI reads (`gateforge test-gates`).
73
- */
74
- export const ENV_WITNESS_VERIFIER_KEY = 'GATEFORGE_WITNESS_VERIFIER_KEY';
75
- /** Opt-in reporter exit-code semantics (standalone runs only). */
76
- export const ENV_REPORTER_FAIL_RUN = 'GATEFORGE_REPORTER_FAIL_RUN';
77
- /**
78
- * Absolute path of the runner-outcomes document the gateforge reporter
79
- * writes for trusted runner supervision (plan Phase 4 item 4, ADR 0005
80
- * D2): per-instance outcomes, attempts, expected failures, and the
81
- * run-level fixture/teardown outcome. Set by the supervised adapter
82
- * (`test-gates --changed`); when absent the reporter writes nothing —
83
- * supervision then fails closed on the missing outcomes file.
84
- */
85
- export const ENV_OUTCOMES_FILE = 'GATEFORGE_OUTCOMES_FILE';
86
- /**
87
- * Run-state file (written by the orchestrating CLI) carrying the mapped
88
- * obligation claims for sidecar/native-mapped tests, keyed by
89
- * `<file>#<titlePath.join('>')>` (the reconciliation key). The reporter
90
- * carries these claims on the session-open path (Phase 4 claim
91
- * injection) so their evidence lands on the right claims; native
92
- * annotations keep working unchanged.
93
- */
94
- export const CLAIM_INJECTIONS_FILE = 'claim-injections.json';
95
- /** Run-state file carrying the sealed supervision execution result. */
96
- export const EXECUTION_RESULT_FILE = 'execution-result.json';
97
- /**
98
- * Run-state spool directory (enforcement-review fix 3): the runner-side
99
- * reporter writes test lifecycle events (testBegin/testEnd with outcome)
100
- * as NUL-safe JSON lines under `<stateDir>/spool/<runId>/`; the trusted
101
- * CLI drains them and performs the witness supervisor calls (session
102
- * open/close) with credentials that exist ONLY in the CLI process. The
103
- * runner child holds no supervisor rights.
104
- */
105
- export const SPOOL_DIR_NAME = 'spool';
106
- /** The spool's event file (JSON lines; consumed by the CLI drain loop). */
107
- export const SPOOL_EVENTS_FILE = 'events.jsonl';
108
- /**
109
- * The spool's persistence-claim-intent file (JSON lines; same NUL-safe
110
- * line protocol as `events.jsonl`): the supervised (UNTRUSTED) test
111
- * process reports claim INTENTS here — {entity, operation, phase, intent,
112
- * key, claimId, testId, sequence}. The suite can only write intents; it
113
- * can NEVER stamp evidence. The trusted CLI's spool drain forwards each
114
- * intent to the witness over the verifier-key supervisor surface, where
115
- * the resource's adapter SERVER PROBE runs (witness-side) and — only
116
- * then — a witnessed `persistence.entity` record stamped
117
- * `channel: 'server'` may be issued.
118
- */
119
- export const SPOOL_INTENTS_FILE = 'persistence-intents.jsonl';
120
- /**
121
- * Payload discriminant the witness stamps on server-probed persistence
122
- * records (core's verdict engine keys the server-witnessed channel off
123
- * this + {@link SERVER_E2E_TEST_KIND}).
124
- */
125
- export const SERVER_CHANNEL = 'server';
126
- /** The mapping kind that unlocks the server-witnessed channel. */
127
- export const SERVER_E2E_TEST_KIND = 'server-e2e';
128
- /**
129
- * Payload discriminant the witness stamps on observe-finalized
130
- * persistence records (Observe channel, Phase 2: core's verdict engine
131
- * keys the observe branch off this channel on `persistence.observed`
132
- * records).
133
- */
134
- export const OBSERVE_CHANNEL = 'observe';
135
- /** The mapping kind that unlocks the Observe channel. */
136
- export const OBSERVED_E2E_TEST_KIND = 'observed-e2e';
137
- /** Run-state file carrying the authenticated gate receipt. */
138
- export const GATE_RECEIPT_FILE = 'receipt.json';
139
- /** Run-state diagnostics report (plan §3.5; never witness evidence). */
140
- export const DIAGNOSTICS_REPORT_FILE = 'diagnostics.json';
141
- /** Witness file inside the state dir carrying the spawned URL. */
142
- export const WITNESS_URL_FILE = 'witness-url.json';
143
- /** Default per-witness-call timeout (pin #7: 5s). */
144
- export const DEFAULT_REQUEST_TIMEOUT_MS = 5000;
145
- /** The loopback hostname the witness, proxy, and fixture servers bind. */
146
- export const LOOPBACK_HOSTNAME = '127.0.0.1';
147
- /** Loopback-equivalent hostnames the witness accepts as attestation subjects. */
148
- export const LOOPBACK_HOSTS = {
149
- localhost: true,
150
- '[::1]': true,
151
- '::1': true,
152
- '127.0.0.1': true,
153
- };
18
+ export const ENV_PLAYWRIGHT_CONFIG_DIR = 'GATEFORGE_PLAYWRIGHT_CONFIG_DIR';
154
19
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,oFAAoF;AAC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M,gBAAgB,GAAG,kBAAkB,CAAC;AAEnD,qDAAqD;AACrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE/C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE7C,iFAAiF;AACjF,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;CAClB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,+BAA+B,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,iCAAiC,CAAC"}
@@ -0,0 +1,53 @@
1
+ /** The session credential the browser receives for one test. */
2
+ export interface CypressSessionCredential {
3
+ readonly sessionId: string;
4
+ readonly sessionToken: string;
5
+ readonly proxyUrl: string | null;
6
+ }
7
+ /** The report document `parseResults` reads. */
8
+ export interface CypressRunReport {
9
+ readonly schemaVersion: 1;
10
+ readonly retriesDetected: boolean;
11
+ readonly specs: Array<{
12
+ readonly file: string;
13
+ readonly tests: Array<{
14
+ readonly titlePath: string[];
15
+ readonly state: string;
16
+ readonly attempts: number;
17
+ }>;
18
+ }>;
19
+ }
20
+ /** The Cypress `on` registration surface this plugin uses. */
21
+ interface PluginRegistrar {
22
+ (event: 'task', handlers: Record<string, (payload: unknown) => unknown>): void;
23
+ (event: 'after:run', handler: (results: unknown) => void | Promise<void>): void;
24
+ }
25
+ /**
26
+ * Registers the gateforge Cypress tasks and the run report writer.
27
+ *
28
+ * Args:
29
+ * on: Cypress's `setupNodeEvents(on, config)` registrar.
30
+ *
31
+ * Returns:
32
+ * void
33
+ */
34
+ export declare function registerGateforgeCypressPlugin(on: PluginRegistrar): void;
35
+ /**
36
+ * The generated Cypress support file: the in-browser half of the
37
+ * channel. It opens each test's session through the plugin task, and
38
+ * rewrites `cy.request` traffic addressed at the app origin onto that
39
+ * session's proxy origin, so every exchange is attributed to the test
40
+ * that issued it. Traffic addressed anywhere else (a raw browser
41
+ * `fetch` to the app, a third-party origin) is left ALONE and therefore
42
+ * stays unattributed — the witness credits it to nothing.
43
+ *
44
+ * Args:
45
+ * projectSupportFile: the project's own support file (required first,
46
+ * so its hooks and commands keep working), or null.
47
+ *
48
+ * Returns:
49
+ * string: CommonJS support-file source.
50
+ */
51
+ export declare function cypressSupportSource(projectSupportFile: string | null): string;
52
+ export {};
53
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/cypress/plugin.ts"],"names":[],"mappings":"AAmHA,gEAAgE;AAChE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;YACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;YAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;SAC3B,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,8DAA8D;AAC9D,UAAU,eAAe;IACvB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,EA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