@gate-forge/cli 0.9.1 → 0.10.1

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 (80) hide show
  1. package/CHANGELOG.md +343 -0
  2. package/README.md +3 -0
  3. package/dist/cache-exclusions.d.ts +20 -13
  4. package/dist/cache-exclusions.d.ts.map +1 -1
  5. package/dist/cache-exclusions.js +47 -33
  6. package/dist/cache-exclusions.js.map +1 -1
  7. package/dist/cli.d.ts +1 -1
  8. package/dist/cli.d.ts.map +1 -1
  9. package/dist/cli.js +11 -0
  10. package/dist/cli.js.map +1 -1
  11. package/dist/commands/check.d.ts.map +1 -1
  12. package/dist/commands/check.js +14 -14
  13. package/dist/commands/check.js.map +1 -1
  14. package/dist/commands/classify.d.ts +1 -0
  15. package/dist/commands/classify.d.ts.map +1 -1
  16. package/dist/commands/classify.js +230 -14
  17. package/dist/commands/classify.js.map +1 -1
  18. package/dist/commands/common.d.ts +6 -1
  19. package/dist/commands/common.d.ts.map +1 -1
  20. package/dist/commands/common.js +8 -1
  21. package/dist/commands/common.js.map +1 -1
  22. package/dist/commands/enforcement.d.ts +9 -1
  23. package/dist/commands/enforcement.d.ts.map +1 -1
  24. package/dist/commands/enforcement.js +306 -38
  25. package/dist/commands/enforcement.js.map +1 -1
  26. package/dist/commands/init.d.ts +20 -0
  27. package/dist/commands/init.d.ts.map +1 -1
  28. package/dist/commands/init.js +88 -56
  29. package/dist/commands/init.js.map +1 -1
  30. package/dist/commands/migrate.d.ts +14 -0
  31. package/dist/commands/migrate.d.ts.map +1 -0
  32. package/dist/commands/migrate.js +177 -0
  33. package/dist/commands/migrate.js.map +1 -0
  34. package/dist/commands/pre-commit.d.ts.map +1 -1
  35. package/dist/commands/pre-commit.js +8 -1
  36. package/dist/commands/pre-commit.js.map +1 -1
  37. package/dist/commands/tests.d.ts.map +1 -1
  38. package/dist/commands/tests.js +120 -40
  39. package/dist/commands/tests.js.map +1 -1
  40. package/dist/docs-exclusions.d.ts +32 -5
  41. package/dist/docs-exclusions.d.ts.map +1 -1
  42. package/dist/docs-exclusions.js +60 -26
  43. package/dist/docs-exclusions.js.map +1 -1
  44. package/dist/evidence-config-text.d.ts +57 -0
  45. package/dist/evidence-config-text.d.ts.map +1 -0
  46. package/dist/evidence-config-text.js +263 -0
  47. package/dist/evidence-config-text.js.map +1 -0
  48. package/dist/execution.d.ts +51 -8
  49. package/dist/execution.d.ts.map +1 -1
  50. package/dist/execution.js +61 -29
  51. package/dist/execution.js.map +1 -1
  52. package/dist/gateforge-owned.d.ts +1 -1
  53. package/dist/gateforge-owned.d.ts.map +1 -1
  54. package/dist/gateforge-owned.js +6 -9
  55. package/dist/gateforge-owned.js.map +1 -1
  56. package/dist/input-snapshot.d.ts.map +1 -1
  57. package/dist/input-snapshot.js +2 -6
  58. package/dist/input-snapshot.js.map +1 -1
  59. package/dist/legacy-exclusion-paths.d.ts +28 -0
  60. package/dist/legacy-exclusion-paths.d.ts.map +1 -0
  61. package/dist/legacy-exclusion-paths.js +48 -0
  62. package/dist/legacy-exclusion-paths.js.map +1 -0
  63. package/dist/pipeline.d.ts +8 -2
  64. package/dist/pipeline.d.ts.map +1 -1
  65. package/dist/pipeline.js +9 -8
  66. package/dist/pipeline.js.map +1 -1
  67. package/dist/repo-path.d.ts +3 -0
  68. package/dist/repo-path.d.ts.map +1 -0
  69. package/dist/repo-path.js +24 -0
  70. package/dist/repo-path.js.map +1 -0
  71. package/dist/staged-candidate.d.ts +36 -1
  72. package/dist/staged-candidate.d.ts.map +1 -1
  73. package/dist/staged-candidate.js +47 -0
  74. package/dist/staged-candidate.js.map +1 -1
  75. package/guides/CONNECT-YOUR-PROJECT.md +50 -1
  76. package/guides/QUICKSTART.md +43 -10
  77. package/guides/REFERENCE.md +206 -30
  78. package/guides/TEST-ENVIRONMENT.md +36 -0
  79. package/guides/UPGRADE-0.9-to-0.10.md +137 -0
  80. package/package.json +12 -10
package/CHANGELOG.md ADDED
@@ -0,0 +1,343 @@
1
+ # Changelog
2
+
3
+ ## 0.10.1
4
+
5
+ ### Fixed
6
+
7
+ - `gateforge enforcement pin`, `gateforge check --staged` and `gateforge enforcement doctor` compute ONE policy digest for the same repository again. Git cannot carry an empty directory, so a materialized staged checkout is missing the worktree's empty `.gateforge/adapters/` and `.gateforge/waivers/` — exactly what `gateforge init` leaves behind — while the trusted-digest entry list tells an EMPTY optional config directory (`(no .mjs adapters)`) from a MISSING one (`(missing adapters dir)`). Only `check --staged` mirrored that presence: pin wrote one digest, doctor's `approved-digest` row compared the pin against the same wrong value and reported `matches staged`, and `check --staged` computed a third and blocked `ENFORCEMENT_UNTRUSTED` on the freshly written pin, so re-pinning looped forever. The mirroring now lives in ONE helper that every surface digesting or snapshotting the staged checkout calls: `check --staged`, `stagedPolicyState` behind pin and doctor, and the pre-commit gate.
8
+ - `gateforge tests mark --test` and `gateforge tests explain --test` accept the documented reconciliation key `<file>#<titlePath joined by '>'` next to the catalog `logicalKey`. Only the `logicalKey` was matched, so a test that IS in the catalog was rejected with `not in the discovered catalog … run gateforge tests discover` — a message blaming the catalog for a key form the CLI never accepted. Both commands now resolve both forms through one resolver, the sidecar always stores the `logicalKey`, a key matching several runner projects is a usage error naming every matching `logicalKey`, and an unknown key names both accepted forms plus up to five real keys of the same file.
9
+ - `@gate-forge/cli` ships the repository `CHANGELOG.md` in its npm tarball. npm never ships a changelog on its own and a `files` whitelist can only name files inside the package, so a user updating from npm saw LICENSE, README, bin, dist and guides and no release notes at all. The copy is made at pack time and gitignored, so the root changelog stays the single source of truth rather than becoming a second file to keep in sync.
10
+
11
+ ## 0.10.0
12
+
13
+ ### Upgrading from 0.9.x
14
+
15
+ One configuration change: the evidence-exclusion declarations `.gateforge/docs-exclusions.yml` and `.gateforge/cache-exclusions.yml` are removed, and their lists now live in `.gateforge.yml` under `evidence.exclude.docs` and `evidence.exclude.cache`. While either old file is present EVERY command refuses, naming the file and `gateforge migrate` — there is no dual read, because silently ignoring a declaration would silently change what evidence identity means. Run `gateforge migrate`, read the preview, then `gateforge migrate --confirm`, re-approve the policy digest (`gateforge enforcement pin --pin-file <path> --confirm` writes it from the staged bytes), and commit `.gateforge.yml` on its own. Steps, what does not change, and the refusals you may hit: `packages/cli/guides/UPGRADE-0.9-to-0.10.md`.
16
+
17
+ ### Changed
18
+
19
+ - Evidence exclusions are declared in `.gateforge.yml` under `evidence.exclude` (`docs`: documentation folders; `cache`: exact Python bytecode paths) instead of two standalone declaration files. The key is deliberately NOT named after `project.paths.exclude`: that one is scan scope (what the detector reads), this one is evidence identity (what the gate stops binding). The loaders keep their signatures, every validation rule and refusal is unchanged, and `loadDocsExclusions` / `loadCacheExclusions` return exactly the lists they returned before the move. The key lives in `.gateforge.yml`, so it is inside the trusted policy digest exactly like the removed files were.
20
+ - The trusted-policy digest and the input snapshot no longer carry the two declaration files as separate entries. Their bytes are inside `.gateforge.yml`, which both already hashed, so the bytes an owner approval pins are the same bytes; the digest value changes once, when the declaration moves.
21
+ - `gateforge init --docs-exclude` / `--cache-exclude` (with `--confirm-doc-exclusions` / `--confirm-cache-exclusions` for a change to an existing list) now splice the declaration into `.gateforge.yml` as TEXT instead of writing a separate document, so a comments/key-order/quoting-preserving edit with the same discipline `classify delete` uses for `deleteRules`. The result is re-parsed against the pinned schema, and a document the release cannot read back is refused rather than written.
22
+ - A repository carrying a pre-0.10 exclusion declaration now fails closed with `found .gateforge/docs-exclusions.yml: since 0.10 evidence exclusions live in .gateforge.yml under evidence.exclude — run \`gateforge migrate\`` instead of silently dropping the list.
23
+
24
+ ### Added
25
+
26
+ - `gateforge migrate [--confirm]`: moves owner declarations out of their own files into `.gateforge.yml`. Preview by default (exact diff of `.gateforge.yml` plus the files that would be deleted, nothing written, exit 0); `--confirm` writes the `evidence.exclude` block as text, deletes the old files, and prints `policy inputs changed: re-pin the approved digest (gateforge enforcement doctor)`. Both old files are validated with the existing loader rules; an `evidence:` / `exclude:` / `docs` shape the writer cannot extend safely is refused by name and nothing is written. Idempotent: nothing to migrate prints `nothing to migrate` and exits 0. One step registry (detect + preview + apply), so later owner-file consolidations only add a step.
27
+ - Config key `evidence.exclude.docs` / `evidence.exclude.cache` in `.gateforge.yml`: strict objects, arrays of non-empty strings; unknown keys and empty strings fail the config load like every other key.
28
+ - `gateforge enforcement pin --pin-file <path> [--confirm]`: writes the owner-approved policy digest of the STAGED candidate into an env file OUTSIDE the repository. The flag is `--pin-file`, NOT `--env-file`: Node consumes `--env-file <path>` (and `--env-file-if-exists <path>`) out of argv itself, even after the script path — it reads the file and exits 9 on a missing one, so the CLI never runs. The digest is computed through the same frozen-index + isolated-checkout path `check --staged` gates on, so the pin can never approve a revision the commit gate never digests. It refuses a policy input that is not fully staged (naming the file), any path inside the repository (the pin must live outside the candidate — a candidate-controlled file cannot approve policy), and a symlink or non-regular file. Preview by default; `--confirm` replaces exactly the `GATEFORGE_APPROVED_POLICY_DIGEST=<hex>` line, drops a duplicate assignment, leaves every other line untouched, never prints another line of the file, and writes mode `0600`.
29
+ - `gateforge enforcement doctor` reports `policy-inputs-vs-HEAD`: the trusted-digest inputs whose STAGED bytes differ from HEAD, named one by one (`policy inputs changed since HEAD: .gateforge.yml, .gateforge/runtime.yml`). A whitespace-only edit counts — it moves the digest. The inputs come from the ONE function that yields the digest entries, and both revisions are compared by presence and bytes.
30
+ - `gateforge enforcement doctor` reports `approved-digest`: the provisioned pin compared with the STAGED digest, as `matches staged`, `does NOT match staged (changed inputs: …)` (or `no policy input changed in the staged index — the pin predates an already committed policy change`), or `absent`. Both new rows read the same staged entry list the digest is computed from, so a named input and the digest verdict cannot disagree.
31
+ - `gateforge enforcement doctor`'s `policy-inputs-staged` row no longer misses an unstaged policy input that is the FIRST changed path: the porcelain listing is read raw, because the trimmed `git status` output drops the leading status column of the first line.
32
+ - `packages/cli/guides/UPGRADE-0.9-to-0.10.md`.
33
+
34
+ ### Removed
35
+
36
+ - `.gateforge/docs-exclusions.yml` and `.gateforge/cache-exclusions.yml` as declaration sources (and their standalone trusted-digest and input-snapshot entries).
37
+
38
+ ### Fixed
39
+
40
+ - A tag that declares NO operation keeps its full weight on a transport obligation. `@crud(tenant.accounts)` names the resource and stops there; the route-method gate exists to stop `@crud(tenant.accounts:create)` answering a `GET` route, not to discard a tag that never named a verb. Such a tag is scored as explicit-tag evidence again (and can answer `new test needed: no`), where it had dropped to `unverified`.
41
+ - A transport (`http:request-observed` / `http:response-status-ok`) record no longer depends on the order the finalize walks a session's claims in. The witness now takes one snapshot of the session's watermark-filtered, deduplicated exchanges before the claim loop, so a `persistence:*` claim's single-use consumption of a shared exchange can no longer empty a transport record that follows it (a false "no HTTP exchange passed through this session's observation proxy" blaming the fixture page for a request that did traverse the proxy). Persistence-vs-persistence consumption is unchanged: one exchange still credits at most one persistence claim.
42
+ - `gateforge tests suggest` no longer ranks a candidate on a substring, and a tag's operation text is not prose. Resource tokens are matched WHOLE-WORD (title path words; file path segments split on `/ . _ -`), and a generated resource id contributes only its NAME: the plane (`tenant`), the transport (`http`), the method (`get`), route furniture (`api`, `v1`), the `param` marker that stands in for a `{route_param}` and the trailing id hash are structure, not names. A tag is a DECLARATION: only its resource part counts (`@crud(tenant.accounts:read)` names `accounts`, not `read`), and the tag text is stripped before the title is read as prose — so `@crud(tenant.accounts:create)` is no longer evidence for `tenant.http-get-api-v1-notifications-…`, and the `:read` in a tag never matches a `…/read` route segment. Weights, ordering, tie-breaks and the printed `why:` lines are unchanged; only false matches are gone.
43
+ - `gateforge tests suggest` now asks ELIGIBILITY before ranking. A row the runner never enumerated (`reconciliation: static-only`, e.g. a Vitest jsdom suite inside a Playwright-configured repository) is never offered as a test to mark — it can never produce the witnessed evidence a mark promises. And when every remaining candidate mocks the system under test, the obligation is not satisfiable by reuse: the report prints `new test needed: yes`, keeps listing the mocked rows as context, says why (`only mocked candidates`), and prints no `tests mark` next action for them.
44
+ - Mock detection no longer stops at the test body. A spec that calls `await page.route('**/api/v1/notifications*', …)` from a FILE-SCOPE helper every test invokes carried no mock signal at all, so `tests suggest` offered it as reusable proof of a request the app never served. Interception is now a file-level fact — any `<x>.route(…)` (`page.route`, `context.route`, …) or `route.fulfill(…)` anywhere in the spec — and it feeds the same `mock` signal for every test in that file. A folder segment named exactly `mocked`, `mock` or `mocks` gives the same signal by placement (a segment merely CONTAINING `mock`, such as `mockery`, is a helper folder and never does; nor does a FILE named `mock.spec.js`). Such rows are never offered as proof: when they are the only candidates, the obligation reports `new test needed: yes` and no `tests mark` next action.
45
+ - A Playwright config with a top-level `testMatch` and no `projects` array resolves to the runner's implicit project, whose resolved selection the project-graph reporter used to skip — leaving the catalog with no file scope at all, so every statically found file looked like this runner's own test. The implicit project's `testDir`/`testMatch`/`testIgnore` (and any `use.storageState`) are now recorded under the placeholder `-` the enumerated test ids already use; it adds no node to the dependency graph, because it is a selection to honor, not a plannable project.
46
+ - A candidate must now be DISTINCTIVE and of the right CHANNEL. An operation word (`read`, `get`, `list`, `create`, …) is never a resource token — `read tenant.accounts through UI` is evidence about no resource in particular — and one word is counted once, so a resource token that is also a route segment no longer scores twice (the stronger signal stands). A row whose only evidence is a `real/` folder, an operation word or a mock signal is not a candidate at all. And for an observed-e2e contract (`http:*`, `crud:*`, `persistence:*`) a `unit` suite is never offered: it drives no app and can never witness the claim. An obligation nothing distinctive matches now reports no candidate and `new test needed: yes` — previously it offered unrelated tests and a `tests mark` command that could never produce evidence.
47
+ - `tests suggest` (and `tests explain`) now answers the reuse question with THREE honest values instead of a boolean. `yes` means nothing can be reused: no candidate survived resolution, or every candidate mocks the system under test. `no` is a claim the run can PROVE — the `#1` candidate is an unmocked e2e row and more than one signal supports it (an explicit tag naming this resource, or a resource-token match together with a file that names the obligation's route). Everything between is `unverified`: a candidate exists, reuse may well be right, and a name in common is not proof the test drives that request. The text surface therefore prints `new test needed: unverified — check that a candidate really sends <METHOD> <route> before marking (gateforge explain <obligation>)` and offers that CHECK as the next action instead of a ready-made `tests mark` command. One boolean had to say both "nothing fits" and "this candidate fits", and the second case read as settled on a single shared word. `tests explain` now reads the SAME route evidence as `tests suggest`, so the two surfaces can no longer disagree about one test.
48
+ - `gateforge tests suggest` no longer answers `new test needed: no` from a tag that contradicts the route. `@crud(tenant.accounts:create)` declares that the test CREATES an account, which is no evidence that it reads `GET /api/v2/accounts` — yet it scored the full explicit-tag weight and told the owner to mark a create test as the proof of a read. For an `http:*` obligation the tag's declared operation must now FIT the route's method (`GET`/`HEAD` read, `POST` create, `PUT`/`PATCH` update, `DELETE` delete); a tag that does not fit scores nothing, and with no other evidence the row stops being a candidate and the verdict falls to `unverified`. A non-transport obligation has no route method to fit, so its tags are unchanged.
49
+ - **An existing CommonJS Playwright suite can now build on Gateforge's fixture — which is the difference between observed traffic and none.** `@gate-forge/pack-playwright/fixture` published no `require` condition and its runner binding carried two top-level awaits, so `require('@gate-forge/pack-playwright/fixture')` failed outright (`ERR_PACKAGE_PATH_NOT_EXPORTED`; with a `require` condition added it would fail `ERR_REQUIRE_ASYNC_MODULE` instead). Every suite written in CommonJS — the default shape of most Playwright suites — was therefore locked out of the Observe channel, and its tests could pass while every `observed-e2e` transport claim finalized with "no HTTP exchange passed through this session's observation proxy". Both top-level awaits are now synchronous loads of the same CommonJS `playwright/test` module the CLI uses, with the binding rules untouched (an already-loaded consumer module is still reused from the require cache, only engine-created runner children may load an unloaded one, and load/shape errors still propagate instead of falling back to a second copy), and `./fixture` publishes `require` beside `import` — both naming the same ESM entry, so `require(esm)` (Node >= 20.19 / >= 22.12) hands back one module, never two fixtures or two runners. A session that proxied nothing is also told the CAUSE now, not just the symptom: the note names that the test's `page` is not Gateforge's fixture page and points at the fixture entry. REFERENCE ("Agent loop") and CONNECT-YOUR-PROJECT (6a) state the requirement and the one-line rebase, and the "never rewrite existing journeys" rule keeps its meaning — changing which `test` object a shared fixture extends is not rewriting a journey.
50
+ - **A zero-traffic Observe note now names the origin the page really requested.** The note an `observed-e2e` transport (or persistence) claim gets when the session's proxy saw nothing blamed one thing — "this test's page is not Gateforge's fixture page" — while the most common real cause was an ORIGIN the note never mentioned: the tests load `http://localhost:13001` (their own base URL, not even forwarded because it was missing from `envAllowlist`) and `GATEFORGE_APP_BASE_URL` says `http://localhost:13101`, so the fixture rewrites nothing and the run passes with every claim missing. The fixture now reports the distinct same-host/loopback origins its page requested without routing them (bounded at five, third-party hosts ignored, fire-and-forget — a report can never fail or delay a test) through a session-authenticated witness endpoint that rides the same channel, authentication and lifecycle as `POST /sessions/identity`: witness memory, dropped with the session. The note then reads "this test's page requested 'http://localhost:13001', which the fixture did not route: it rewrites only GATEFORGE_APP_BASE_URL ('http://localhost:13101') … — set GATEFORGE_APP_BASE_URL to the origin your suite uses, or add your suite's base-URL variable to envAllowlist in runtime.yml so it reaches the test process". It is diagnostic text only: it mints no record, grades no verdict, and a claim that stayed missing stays missing. `TEST-ENVIRONMENT.md` and `CONNECT-YOUR-PROJECT.md` now state the rule the failure violates.
51
+
52
+ ### Added (adoption-round fixes)
53
+
54
+ - **Transport obligations can be proven through the Observe channel.** A starter policy creates `http:request-observed` / `http:response-status-ok` for every consumed endpoint, but until now the grader required a provenanced `ui.action` anchor only the engine browser mints — so an ordinary suite-driven test marked `observed-e2e` could never satisfy them, and `tests suggest` sent owners to mark tests that could not pass. When the engine-browser path finds nothing, a witnessed `http.observed` record stamped `channel: 'observe'` — carrying the exchanges the witness proxied for that test's own session, stamped only for claims the supervisor registered `observed-e2e`, deduplicated, capped at 500 with `truncated: true` — now grades each exchange through the SAME endpoint matcher the engine path uses (`http:response-status-ok` still needs a 2xx). Nothing is weakened: the engine path grades first and its verdict is final, an engine-found error (a different endpoint, a non-2xx response) is never masked by a matching observe record, admission requires BOTH witnessed trust and the observe stamp exactly as for persistence, and `http:frontend-request-observed` still grades blocking before any of this runs. Test attribution is suite-claimed on both channels; as the transport contracts have always stated, the witness proves it observed an exchange, never which test drove it.
55
+
56
+ - **Owner-declared delete semantics.** `.gateforge/classification-policy.yml` accepts `deleteRules: [{match: <source glob>, semantics: hard|archive, archiveFields?, reason}]`, matched against a resource's source file with the same glob engine `.gateforge/planes.json` uses. `archive` requires non-empty `archiveFields` (the owner-owned archived state the run grades removal against); `hard` must not carry one; unknown keys and two rules for the same pattern are refused. A matching rule contributes the same delete-semantics / archive-state evidence a detector would, so it can resolve `DELETE_SEMANTICS_UNRESOLVED` and nothing else — contradicting detector evidence still blocks, now naming the owner declaration, and the trace records `DELETE_SEMANTICS_OWNER_RULE(<match>)`. A resource outside every `match` is unchanged. This is the answer 186 unresolved resources had no way to give: `lifecycleRules` could only DISABLE delete, per exact resource.
57
+ - `gateforge classify delete <file|folder|glob> <hard|archive> [--archive-field <key=value>]... --reason "<why>" [--confirm]` writes those rules: a preview without `--confirm` (nothing is written, the exact diff and the policy-pin consequence are printed), the rule with it. Folder answers become `match: '<folder>/**'`. `archive` refuses without `--archive-field`; `hard` refuses the flag; an existing rule for the same source is reported, never shadowed. The rule is appended at TEXT level — the key at the end of the document when absent, a new `- match:` item at the end of the block when present — so every byte the owner wrote survives (comments, key order, flow sequences); a `deleteRules` this command cannot extend safely is refused by name. The resulting document is validated against the pinned schema before it is printed or written.
58
+ - `gateforge init` now names the install the config it just wrote expects: after the scaffold, ONE line lists every enabled bundled detector pack that `package.json` does not already declare, at the CLI's own version (`npm i -D @gate-forge/pack-sqlalchemy@<cli version> …`). Nothing is printed when they are all declared. npm is never run — the owner decides when the install happens. REFERENCE gains a classification-policy section (all owner keys, then `deleteRules`), and QUICKSTART explains the `DELETE_SEMANTICS_UNRESOLVED` answer next to the plane answer it follows.
59
+
60
+ ## 0.9.1
61
+
62
+ ### Fixed
63
+
64
+ - A `gateforge init` flag that contradicts the named `--preset` now exits 2 before any file is written, naming the decided thing and the conflicting flag — the preset is no longer silently dropped. A flag the preset already implies is a no-op and the preset applies; without `--preset`, flags behave exactly as before.
65
+ - `init` now exits 2 before writing anything when the run asks for a setting an existing `.gateforge.yml` already owns with a different value (a `--preset`'s strictness mode and `enforcement.strictE2E`, or the `--strict-e2e` / `--unmatched-routes` flags), one line per differing key: the current value, what you asked for, and the fact that `init` never rewrites an existing config — set the key in `.gateforge.yml` yourself. An absent key compares as its effective value, so only a real contradiction stops the run.
66
+ - The Alembic opt-in block now finds `alembic.ini` at the repository root OR in a first-level subdirectory (the common `backend/` monorepo layout was invisible before), resolves `%(here)s` in `script_location` to the ini's own directory, and prints every path relative to the repository root. Root-level behavior is unchanged; `node_modules`, `.git` and test directories are pruned, and a root ini wins.
67
+ - A Playwright config that declares no named project is now named as the problem it is: `tests discover` prints the diagnostic on stderr (discovery itself still succeeds and the catalog stays parseable), and `gateforge enforcement doctor` carries a failing `playwright-projects` row that names the config and the one-line fix — `add projects: [{ name: 'chromium' }]` — because test-gates join catalog rows to planned projects by name.
68
+ - A `.pre-commit-config.yaml` with no installed framework hook is no longer reported as a working commit gate: `init` says to run `pre-commit install` to activate the gate, and `enforcement doctor` reports the commit gate as NOT active (a failing hook row) with the same action.
69
+ - `gateforge adopt` now exits 2 before writing anything while any blocking entry is plane-unresolved, naming the count, up to three distinct source folders, and the exact answer (`gateforge classify plane <folder> <tenant|master|global> --confirm`). A plane answer changes a resource's identity, so debt adopted before the answer would not match the repository after it.
70
+ - An app, router, or route declared under a `test/` or `tests/` directory no longer enters the product route graph: such files are still parsed and still reported in `scannedPaths` (coverage evidence stays honest), but a fixture that declares `app = FastAPI()` plus `@app.get('/probe')` no longer publishes `/probe` as a product route, and a fixture path can no longer collide with a real one. A file merely named `test_...` is unaffected.
71
+ - `gateforge enforcement doctor` prints the full 64-hex trusted policy digest (text and `--json`) instead of a 12-hex prefix, and adds an `owner: pin this revision with GATEFORGE_APPROVED_POLICY_DIGEST=...` action line when the approved digest is absent or mismatched. The staged-gate no-pin `ENFORCEMENT_UNTRUSTED` block names `gateforge enforcement doctor` as where to read the value.
72
+ - The first commit that introduces `.gateforge/runtime.yml` with `prepare.reuse` no longer deadlocks: the staged-gate flows (`check --staged`, pre-commit) approve the requested reuse roots when the candidate's trusted policy digest equals the resolved owner-approved digest — `runtime.yml` is a policy input covered by that pin. Without a matching pin the block stays, with its action extended to name the pin route.
73
+ - When an attestation target never answers at all, the GF-13 mismatch text no longer blames a missing marker: it reports `target <baseUrl> is not reachable (<error>); start the app before the run (runtime.yml healthcheck)`, carrying the transport failure (error code/message, e.g. `ECONNREFUSED`). Still fail closed — both shapes stay mismatches; only the diagnostic is honest.
74
+ - `gateforge init --blocking` and `gateforge enforce` now insert the `gateforge-check` entry as the FIRST item of an existing `.pre-commit-config.yaml` `repos:` list (re-indented to the existing items' indentation), so a file-mutating hook can never run before the gate and invalidate its receipt — the guides and `enforcement doctor` require that position. A config with no block-style `repos:` list (absent, or flow style like `repos: []`) is appended as before, with a `note:` line telling the owner to move the entry to the top of `repos:` by hand. Appending to a config whose items sit at indent 0 previously produced invalid YAML; that case now parses.
75
+ - The approved-policy mismatch block now carries BOTH full 64-hex digests — `(candidate <digest>, approved <digest>)` — so an owner pinning the value `gateforge enforcement doctor` prints can see exactly which policy revision the candidate computed versus the approved one, instead of only the generic reason.
76
+ - `gateforge enforcement doctor` gains a `policy-inputs-staged` row: the commit gate digests the STAGED bytes of the trusted policy inputs while doctor's digest is computed from the working tree, so an unstaged policy edit or an untracked policy file now warns with the differing paths and the `git add` action (ok when the index matches the working tree; unknown when no usable Git inventory).
77
+ - A staged-candidate test-discovery failure (e.g. `playwright --list produced no readable reporter JSON ... Cannot find module '@playwright/test'`, exit 2 — the candidate checkout holds tracked files only, so its dependencies are absent) now appends one hint line when the runtime document declares no `prepare.reuse` roots: declare the dependency directories in `.gateforge/runtime.yml` (`prepare: { reuse: [node_modules] }`, see REFERENCE "Staged runtime"). `check --staged` and `pre-commit` both carry the hint; a declared reuse root suppresses it.
78
+ - The `.gitignore` engine-state block keeps a setup commit product-behavior-neutral on the staged gate too: `check --staged` and pre-commit now classify policy inputs against the base revision resolved in the user's repository (the isolated checkout's HEAD is the staged tree, not the base), so a setup commit that also carries the `.gitignore` block `init` appends no longer re-grades the adopted E2E debt as blocking under strictE2E. A `.gitignore` line outside the managed block still blocks (fail closed).
79
+ - `gateforge init` prints one note at the start of a run in a repository with commits when the install itself (package.json or a lockfile) is still uncommitted: commit the install on its own BEFORE the setup files — a setup commit that also changes dependencies is a product change and under strictE2E re-grades the adopted E2E debt as blocking. The note never refuses and never changes the exit code.
80
+ - `gateforge adopt` no longer downgrades the commit hook a strict `init` wired: `adopt` reads the gate args the generated hook already records (a `check --staged` hook after `init --preset strict`) and re-wires with exactly those args, instead of silently rewriting the hook to the changed-scoped default (`check --changed`) — which made the commit gate judge the working tree instead of the staged bytes. A repo with no generated hook keeps the default.
81
+ - A `PLANE_CONTRADICTION` that includes the mirrored operational `global` assertion — a `.gateforge/planes.json` rule covering a router file that also holds health/readiness probes — now explains itself: the detail says health/readiness probes are global on their own, names the router file to answer `global` for when none of its routes serves business data, and offers moving the probes to their own router file. The block stays `PLANE_CONTRADICTION`; every other behaviour is unchanged.
82
+ - A Vitest config that spreads Vitest's own defaults — `exclude: [...configDefaults.exclude, '**/tests/e2e/**']`, the idiom the Vitest docs recommend — is read as data again. The spread made the whole Vitest file selection unreadable, so every Vitest test file had no owning runner, became an unresolved catalog row, and kept `inventoryComplete` false, which alone prevents a receipt from ever being sealed. `...configDefaults.include/exclude`, a bare `configDefaults.exclude`, and `defaultInclude`/`defaultExclude` expand to Vitest's documented defaults — only when imported from `vitest/config` or `vitest` in the same file; any other spread still fails open as before.
83
+ - The setup guides (`QUICKSTART.md`, `CONNECT-YOUR-PROJECT.md`) open with one explicit order: commit the install first, then init → plane answers → adopt → `prepare.reuse` → stage every policy file → pin the digest last → commit only Gateforge's own files; product changes follow in their own commits. Plane definitions with examples, and how to answer infrastructure routes (health and readiness probes are already `global`).
84
+
85
+ ### Changed
86
+
87
+ - The release script publishes the workspace packages in root `package.json` workspaces order — dependencies first — and stops at the first failure, so a dependent (the CLI) is never published without its dependencies; re-running skips what is already on the registry. The tarball preflight reads npm 12's keyed-object `pack --json` output.
88
+
89
+ ## 0.9.0
90
+
91
+ ### Upgrading from 0.8.x
92
+
93
+ No configuration change is required and no new option is on by default. This release changes what the engine SEES on an existing repository, so counts and obligations can move in both directions after upgrading: run `gateforge discover` first, then `gateforge check`, and re-approve the policy digest if any Gateforge-owned setup file changed. Steps, what can appear or disappear and why, and the owner decisions this release asks for: `packages/cli/guides/UPGRADE-0.8-to-0.9.md`. Set every direct `@gate-forge/*` dependency (and every `overrides`/`resolutions` entry and `npm:@gate-forge/…` alias) to `0.9.0`, or npm stops with `EOVERRIDE`.
94
+
95
+ ### Gate correctness
96
+
97
+ - `check --staged` now reads the STAGED bytes for in-process packs. Several detectors resolved the repository root and their config documents when the module was imported, which the CLI does at startup — before `check` moves the process into the candidate checkout — so the pre-commit gate graded the working tree: a staged file whose unstaged copy was valid (or broken) produced the opposite verdict from the commit. Every in-process pack now resolves its root and its configuration documents at DISCOVER time, so the gate judges the bytes it is about to commit. The staged gate and a plain `check` on the same bytes now agree.
98
+ - Untracked-and-gitignored files leave the scan. A working copy that holds generated output — a Playwright report bundle, a local cache — was walked like committed code, and every call inside it became detector evidence: hundreds of `FRONTEND_CALL_TARGET_UNRESOLVED` entries on a dirty working copy that a clean clone of the same commit never produced. The scan now skips exactly what Git reports as untracked AND ignored, so a clean clone and a dirty working copy of the same commit describe the same repository. A TRACKED file matching an ignore pattern is still scanned (Git never reports a tracked path as `--others`, so that follows from Git's own semantics), a nested `.gitignore` counts, the operator's global excludes file does NOT (results must not depend on the machine), and outside a Git work tree nothing is skipped, so behaviour there is unchanged.
99
+ - The receipt identity does not move with it. The input snapshot still hashes a deliberate SUPERSET of what the scan reads, so a gitignored configured input still moves the receipt digest — the conservative direction, and the one `check --out` relies on when it refuses an output path that would hide a declared input. The two scopes are separate, named functions (`expandScanPaths` for detector input, `expandIncludePaths` for identity) so neither can narrow the other by accident. Every enumeration of detector input in one run — the pipeline, `init`'s table-source pass and the route-folder plane questions — now uses the same scan scope.
100
+ - Gateforge's OWN setup files are policy inputs. The config, policy, classification, behavior and runtime documents, the exclusion declarations, the mapping sidecar, the adapter/waiver/baseline/quarantine records, the generated gate wiring (hook script, CI job templates, `GATEFORGE.md`, the overlay-proof README, the engine reference) and your CI/pre-commit config *while they still carry Gateforge's managed block* are governed by the approved policy digest, not treated as unmapped product changes: they are never `CHANGE_UNMAPPED`, a change set containing only those files cannot change product behavior, and so the `init` → `adopt` → first commit path passes `check --changed` without `--no-verify`. Integrity is unchanged: they are inside the policy digest, a change to one needs your pin re-approved, and a mismatching pin still blocks. REMOVING the gate job from your CI config, or the entry from `.pre-commit-config.yaml`, is not a policy input and goes back to blocking.
101
+ - Adopted debt stays forgiven across a setup commit under `strictE2E`. The adopted baseline is a recorded, shrink-only statement of pre-existing debt, not a risk acceptance, so it survives the strict-E2E re-grade while a change set is provably product-behavior-neutral (Gateforge-owned policy inputs only). The forgiveness is granted only when the owner has pinned the policy revision governing those files; with no pin, reporting is unchanged (adopted debt is re-graded as blocking). An owner waiver is never forgiveness here.
102
+ - `CHANGE_UNMAPPED` names the step that can actually attribute the file. It used to print `gateforge explain .gateforge/behavior.yml` for a file `explain` answers "no discovered resource matches" — a loop that could never end. The remediation now names the attribution step and what to do with the answer.
103
+
104
+ ### Adoption on an existing repository
105
+
106
+ - `gateforge init` on a repository that already has code says so and names the way through the debt it will report on day one: `gateforge adopt` records today's findings as forgiven, shrink-only, and still blocks an adopted E2E obligation under `strictE2E` as soon as a change touches it. A fresh, empty project never sees that block. `adopt --help` now documents the baseline, its shrink-only property and the strict-E2E re-entry, and the README command table lists the command.
107
+ - `init` adds Gateforge's own engine state to `.gitignore` (`.gateforge/test-gates/` — the run catalog, plugin caches, receipts and history the engine regenerates on every run). Without it the first `git add -A` stages the run cache and the gate then blocks on its own files. The file is created when absent, appended to when present (your own lines are preserved), and a second run reports it as already ignored instead of appending again. The same run prints the `undo:` line for it.
108
+ - `init`'s `undo:` line is complete and truthful. It names every path the run created (`rm -rf`) and every file the run changed in place (`git restore --`: an appended `.gitlab-ci.yml` include, an appended `.pre-commit-config.yaml` entry, an added ignore rule), so following it can never delete pre-existing config, baselines, waivers, hooks or CI files. A run that changed nothing prints no undo line at all.
109
+ - `init` reports only what THAT run did. It keeps an existing `.gateforge.yml` and says so instead of first claiming to write a preset and then reporting it as untouched; the CI and provider lines name the server that actually exists (a GitLab-only repository is no longer told to configure GitHub branch protection), and a preset that wires no local hook says whether your existing commit hook and/or CI job still decides what blocks your commits. The doctor reads a framework-managed pre-commit hook the same way `init` does, so the two no longer contradict each other.
110
+ - `init` quotes evidence from application code. Hidden dot-folders (agent tooling, tool caches, leftover working directories) are not scanned, and a file inside an `archive/`, `vendor/`, `generated/`, `fixtures/`-style directory is quoted only when no application file carries the same signal. The generated `.gateforge.yml` carries the matching default excludes, so the detectors make the same choice.
111
+ - `init` asks ONE plane question per ROUTE FOLDER. It used to propose planes for MODEL directories only, so on a repository with many endpoints every discovered endpoint stayed `PLANE_UNRESOLVED` and every endpoint obligation and adapter waited on hand-edited JSON. A non-interactive run still proposes nothing and writes nothing for routes: it names each folder and prints the exact `gateforge classify plane` command. A linked model's plane may appear in the question as a HINT and is never applied — an `accounts` route can serve master data — and the hint is withheld whenever it would be a guess (an unresolved linked model, or two models that disagree).
112
+ - `gateforge classify plane` accepts a FOLDER or glob, not only one file, with the same owner review (`--reason`, `--confirm`). Route files arrive in folders; the per-file-only command meant hand-editing `planes.json`.
113
+ - Whole-folder documentation exclusion accepts data files. `--docs-exclude docs` used to be refused because the folder held `.json`, `.yaml`, `.csv` and `.html` files. An owner-declared documentation folder may now hold those five formats beside Markdown, reStructuredText, plain text, PDF and static raster images. Refusal is still by NAME first: `package.json`, `tsconfig.json`, `.pre-commit-config.yaml`, `.gitlab-ci.yml`, `pnpm-workspace.yaml`, `composer.json`, any `*.config.*` file and lockfiles stay refused inside an excluded folder, and MDX, WASM, SVG and unknown formats fail closed. HTML is accepted only as content of a declared folder; elsewhere it keeps full evidence identity. The format allowlist does not prove that an allowed file cannot affect behavior — the owner assertion and its reduced guarantee still apply, and the receipt/report already name the excluded folders.
114
+ - `--docs-exclude-file <path>` is the same assertion in a second spelling (one folder per line; blank lines and `#` comments ignored). Both spellings combine into one deduplicated list, and the interactive prompt now says the flag exists, so a long list does not have to be typed into one prompt.
115
+ - `init --behavior` works. `behavior` / `--no-behavior` were missing from the boolean-flag table, so `--behavior` demanded a value and swallowed the next argument. Both are registered as boolean flags now.
116
+ - `next` orders the work by business weight, so the first item is no longer a throwaway demo route. Routes linked to models and routes the frontend consumes rank first; every weight is additive and printed as a `why:` line, so the order explains itself.
117
+
118
+ ### Endpoints & frontend calls
119
+
120
+ - Constant and annotated FastAPI prefixes are folded. `router: APIRouter = APIRouter(prefix="/api/v1")` is indexed exactly like the unannotated form (it used to be ignored, and every route behind it was published at the router's own prefix with no typed outcome), and a prefix that is a module-level string constant — on the router or on `include_router` — is provable from the source, so the route keeps its real path. An f-string, an attribute or a call is genuinely computed: the router yields `FASTAPI_PREFIX_UNRESOLVED` and no route is emitted, which is the honest answer rather than a prefix-less path no app serves.
121
+ - `FASTAPI_ROUTER_UNMOUNTED` is a new blocking code. A router that no scanned `include_router` targets is served by no scanned app; its routes keep their standalone emission and one typed entry names the router, its file and every declared route, so "the prefix was not applied" is never the answer when the real one is "nothing mounts this router". It is reported only when the scanned set shows an application and has no unresolvable include.
122
+ - A router built by an unmodeled expression (`router = build_router()`, a subscript, an attribute) reports `FASTAPI_PREFIX_UNRESOLVED` naming the variable, never as prefix-less paths.
123
+ - `HTTP_METHOD_DYNAMIC` is a new blocking code, and the method of a `fetch(url, options)` call is read from a bounded request-options model instead of defaulting to `GET` when the options were not inline. An inline object resolves with last-writer-wins (a spread and the override after it both participate), a module-scope constant is read; a method that cannot be resolved is `HTTP_METHOD_DYNAMIC`, never a fabricated `GET`. This removes false `FRONTEND_ROUTE_UNWIRED` findings where the real route existed under another verb.
124
+ - An `api.<verb>()` call counts as a route registration only in a file that imports a server framework (express/fastify/hono). That is also how an axios instance, a Playwright request context or an api-client module spells its calls, and reading those as routes minted server routes out of test and client call sites.
125
+ - An endpoint's location is its SERVER ROUTE, not a frontend call site that happens to mention the path.
126
+ - `ENDPOINT_RESOURCE_CANDIDATE_UNMATCHED` is a new code. A by-id route whose path-derived resource name names NO discovered business resource used to be silent, which made a real route look absent from the inventory (`GET /api/v1/reports/logs/{}`, served by a table named `report_logs`). The entry names the endpoint, the derived name, and up to three near matches among the discovered resources (a discovered name whose last `_`-segment equals the candidate or its singular/plural variant), sorted. They are CANDIDATES for the owner and are never linked: linkage still requires an exact name match plus a schema-symbol or handler-name corroboration fact. A route that links, or one with nothing near it (the entry then carries no match list), is unaffected — as is a collection route, where no adapter read is at stake.
127
+ - **The owner decides whether unmatched by-id routes block.** `endpoints.unmatchedRoutes: block | warn` in `.gateforge.yml` grades the entry above. ABSENT — an existing repository that upgraded — keeps them **advisory**: they stay in the report under the same code, `check --changed` does not block on them, and `check` and `next` print a banner at the TOP naming the count, the first three examples with their near matches, and the exact key that turns blocking on. `warn` is the same once the owner has said so, without the "you have not chosen" sentence. `block` is today's strict behavior. On a large existing repository the strict default added 89 blocking entries and blocked every commit, so the honest default for a repository that never chose is to report loudly and block nothing. `gateforge init` asks the question once in a terminal, writes `warn` plus the exact setting on a headless run, and takes `--unmatched-routes block|warn`.
128
+
129
+ ### Resource graph & planes
130
+
131
+ - Models declared in test directories no longer enter the resource graph. A pytest module that re-declares a table on its own `Base` to build rows (next to the application's real model) used to enter as a second business resource; the real table then collided with its own fixture, stayed plane-unresolved, and blocked with no honest answer. Files under a `test/` or `tests/` directory segment are still parsed and still reported in `scannedPaths` — the coverage evidence stays honest — but they contribute no resource, unresolved entry, signal or duplicate finding. This is the same rule `init` already applied when it refused to infer a business plane for a fixture table, now applied to the graph.
132
+ - The per-tenant singleton tag is minted only on an EXACT configured scope. `singletonPerTenant` was tagged when ANY unique constraint merely CONTAINED a tenant-scope column, so a table whose `tenant_id` means something else in its own domain was reported as "exactly one row per tenant exists" and its create as provable only on a fresh tenant — false, and blocking on a claim that was never true. A table is tagged only when its plane evidence is `tenant` AND one declared UNIQUE constraint or UNIQUE INDEX is written over tenancy-scope columns and nothing else. The declarative `tenancy.scopeColumns` list still replaces the default column list, so a repository whose scope column is not one of the defaults is recognized.
133
+ - Route-folder plane proposals scan exactly what the pipeline scans (the gitignore rule above applies to them too): a route file inside a gitignored untracked folder produces no proposal, because no folder the owner could act on hides in generated output.
134
+
135
+ ### Adapter scaffold
136
+
137
+ - The scaffold names the route that exists and the real blocker. `adapters scaffold` reported "no GET route serves one accounts entity" for routes that discover had already linked, because the route view skipped every plane-unresolved endpoint; the refusal now names the existing route and what is missing ("its plane is unanswered — answer the plane first"), and names routes blocked by an unanswered plane instead of staying silent.
138
+ - List-only adapters are generated. The kit has always accepted `listPath` alone and resolves the member from the collection, but the scaffold refused every resource without a by-id route; a resource with a complete collection and no by-id route now gets a list-only adapter (list path, collection key, paging) and the header says so.
139
+ - Guesses are not written. A route reached only by NAME matching is never taken as a by-id read, and a route with a literal segment between the resource segment and `{id}` is never taken as a by-id read — that shape is a lookup by some other key, and a wrong read path produces an adapter that fails closed against the real server. Each becomes a "needs you" entry with its reason instead.
140
+ - A scaffolded path taken from a router no app mounts is marked in the file's own header and the owner is asked to confirm it.
141
+
142
+ ### Test catalog & suggestions
143
+
144
+ - `tests suggest` is RANKED and CAPPED. Candidates used to be listed alphabetically by file — hundreds per obligation, the obvious test buried at #159 of 311 even when its title carried the obligation's own `@crud(...)` tag. Candidates are now scored by the evidence the catalog row carries (explicit tag, resource token in title or file, the obligation's operation word, a route segment from the run's route inventory, an unmocked `real/` folder, minus a mock signal), every weight is printed as a `why:` line, ties break on the logical key, and the text surface prints the top five and says how many it hid. `--json` carries every candidate with its `rank` and `score`.
145
+ - `tests suggest --json` narrows `candidates[].overlaps` — a **non-additive** JSON change. The field listed every obligation that merely had the test among its CANDIDATES; on a real repository that was 237,936 entries for a handful of suggestions. It now lists only the obligations that DECLARE the test (native declaration or the `test-map.yml` sidecar), which is what an overlap means. Consumers reading `candidates[].overlaps` must be re-checked: the field is narrower, not merely re-ordered.
146
+ - One instruction, not two. When an existing test fits, the next action is to mark THAT test `observed-e2e` and run it under the witness; the overlay instruction ("write a new test in `tests/e2e/gateforge/`") belongs to `newTestNeeded: true`. A suggestion block no longer tells you to write a new overlay test and, in the same breath, to reuse the test it just listed.
147
+ - `already declared for: …` is printed only when a declaration exists (a `test-map.yml` entry or an `@gateforge` annotation). An inferred or prior-run binding is a suggestion, never a declaration.
148
+ - `check` shows declared-but-unwitnessed mappings: `mapped to: <test keys> (not yet witnessed)` for every obligation whose test ids are declared but whose records were not consulted. In the TEXT report the next action names the command that collects the evidence instead of the generic "write a test" advice; `--format json` keeps the cause's own generic next action and instead carries `declaredTests` and `mappingState: "declared" | "declared-not-witnessed"`. Only DECLARED ids appear there.
149
+ - Tests are attributed to the runner that owns them. The static scan is seeded from Gateforge's include globs, so test-shaped calls anywhere in the repository became catalog rows; each runner's OWN file selection is now read as data and decides the row's runner — Playwright from the enumeration's project-graph reporter (`testDir`, `testMatch`, `testIgnore`), Vitest from `vitest.config.*`/`vite.config.*` read with the TypeScript AST only. With `globals: true`, a bare `describe`/`it` is a registration the runner owns, not an alias gap. Every selection is FAIL-OPEN and says so (an unreadable pattern selects everything, as before, and the summary line states which selection could not be read); a file no runner claims keeps the configured runner and stays a blocking row — ownership is never invented.
150
+ - Stale roadmap text is gone from shipped output ("execution and evidence sealing land in Phase 4" shipped long ago), and a declaration is reported as "declared in test-map.yml" without guessing who made it.
151
+
152
+ ### Release hygiene
153
+
154
+ - No Python bytecode in a published tarball. 0.8.0 reached npm carrying `__pycache__/*.pyc` in four packages because a manual `npm publish` ran from a tree whose detectors had executed. Every manifest that ships a `python` directory now ends its `files` list with `!**/__pycache__`, `!**/*.pyc` and `!**/*.pyo`, and `scripts/release-publish.sh` refuses the WHOLE release — before publishing anything — when `npm pack --dry-run --json --workspaces` still names one, printing the package and the path. Publish from the tag workflow (`v0.9.0`) or from the verified `.tgz` files (`npm run pack:check` prints the lists).
155
+ - The test suite no longer reads the developer's verifier keyring: keys are isolated per run, so a local suite result does not depend on the machine it ran on.
156
+
157
+ ### Fixed
158
+
159
+ - A `persistence:read` whose observe binding declares `collection` no longer stops proving once the list outgrows 16 KB. The witness parsed the first 16,384 bytes of the response it proxied, so a bigger list named no complete row and the claim stayed `EVIDENCE_NOT_COLLECTED` with no receipt sealed — a failure that grew every run as the app's own data grew (in the session that motivated this release, a users list at 18,526 bytes over 107 rows took acceptance from 70/70 to 69/70, and the same list had been under the cap one release earlier). Such a read is now parsed from its OWN bounded copy — up to 1 MiB and up to 10,000 rows — so a real app's normal data size can no longer make a passing test unprovable. Nothing else moved: the 16 KB response tap is byte-identical, so the body digest and the create-attribution log read exactly what they always did; only the declared `idKey` is read, exactly as before; and the record payload is unchanged, so every record and receipt already sealed re-verifies. A body or a page past the new bounds is refused, never partially read, with a note naming the bound and the measured size.
160
+
161
+ ## 0.8.0
162
+
163
+ ### Upgrading from 0.7.x
164
+
165
+ No configuration change is needed and every new option is off by default, except that `test-gates` under `CI=true` now prints a progress stream on stderr (`run.progress: off` restores the 0.7 output). Run one new witnessed run after upgrading: a receipt sealed by 0.7.x is refused with `EVIDENCE_STALE` because the new engine derives the gate inputs again; `gateforge test-gates --changed` re-seals it, and the owner-approved policy digest stays the same. Steps, behavior changes and the option table: `packages/cli/guides/UPGRADE-0.7-to-0.8.md`. If `package.json` also pins `@gate-forge/*` in `overrides`/`resolutions` or through an `npm:@gate-forge/…` alias, set those entries to `0.8.0` by hand before installing; otherwise npm stops with `EOVERRIDE` (see the guide).
166
+
167
+ Passing local runs keep their previous output. A failed local run with progress off now reports up to three failed tests and their first error line. On Linux, the doctor and run preflight also probe installed Chromium-family executables; a missing system library is a runner failure with an `install-deps` command, not a successful readiness check.
168
+
169
+ ### Added
170
+ - A Playwright run whose planned projects are named now executes against ONE globally prepared candidate. A `setup` project's saved session used to exist 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, so what was missing was anywhere to admit genuine generated output, and a guarantee that no INDEPENDENT body starts before ALL preparation. The prerequisite closure now runs first — each stage genuinely executed, with its own outcome retained as a witnessed prerequisite — the candidate is taken once in between (the generated controller is a dependency of every body project, so the runner's own topological scheduler orders it), and every body executes against those frozen bytes. No body starts until a SIGNED release opens the barrier: the Ed25519 private key exists only in the CLI process's memory and is never written to disk, the controller receives the public key and verifies the release against the run, the invocation, the nonce, the prepared tree and the sha256 of its own spec bytes, and a refusal document is failure-only (it can end the controller's wait sooner, never admit a body). 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 for the run; the engine's own run artifacts are written to the excluded run-state directory and are not candidate files. Unnamed or empty projects take no part, a non-Playwright runner never enters this path, and an operator-set whole-run session state bypasses it exactly as before. The controller is generated as plain ESM JavaScript under a `.mjs` name, so its module kind comes from the file itself and a repository whose root `package.json` is CommonJS, declares `"type": "module"`, or nests its specs in their own module package runs the same freeze unchanged; before this a CommonJS root had the controller `require`d, which turned its ESM imports into `require()` of a `file:` URL and failed the run with zero outcomes. A project's environment keeps the runner's original semantics: a dependency's produced environment is still unioned into its dependents, and the controller projects the trusted baseline back inside its own worker, so a prerequisite's assignment reaches exactly the projects that depend on it. `check --require-e2e` and the broker grade the same candidate the run sealed. This is a checked, signed boundary inside the run, not a sandbox — ordinary local files are not OS-immutable and stay writable by your own user.
171
+ - `enforcement.reseal` now derives the READERS of a changed session state. A path a project declares as its `use.storageState` is classified from the sealed runner config's own bytes: when it changes and is eligible generated output (untracked in both sealed commits, outside the run's input snapshot, an ordinary file in the candidate, not a removal), the re-seal demands every test that reads it — the declaring project's tests, the projects ordered after it, closed over file importers — and a changed state this run can name no consumer for is refused rather than carried. The path stays in the signed `changedPaths`; it never becomes a disregarded runtime file and never invents a receipt key. The precedence is the point: an `enforcement.resealRuntimeFiles` glob is a claim about bytes, while a sealed `storageState` declaration is a claim about who READS them, so a glob can no longer swallow a nominated state (an input-bound one now refuses instead of passing), and when the sealed declarations cannot be computed at all no raw non-test path may be disregarded, because that refusal is the only thing that reports the doubt. A path the sealed config never names is still disregarded exactly as before, which is what an ordinary runner cache relies on.
172
+ - The existing runtime document's `envAllowlist` now supplies explicitly named operator values to supervised tests and wired enumeration. Native helpers can use their service URLs without inheriting the whole environment. Engine wiring and process-loader controls are refused; absent lists forward nothing new. A supervised `test-gates` run refuses such a reserved control with a usage error before the harness, the pipeline, or native test enumeration starts, so the refusal lands ahead of any candidate-controlled configuration; every other allowlisted name is granted exactly as before.
173
+ - Optional COLLECTION read binding for a suite-driven browser test whose UI reads a LIST. The observe read binding now takes `{method: 'GET', path, collection: {rowsKey?, idKey}}` (omit `rowsKey` when the response root is the row array): the witness parses only the declared `idKey` out of only the declared rows of only the 2xx response it proxied itself, resolves the returned ids against the adapter snapshot it took when the session opened, and reads one of them through the adapter exactly as a by-id read is graded. Without it a read binds `{id}` from the path exactly as before, and a collection may only be declared on a read + `GET` whose path carries no `{id}` — every other shape is refused when the adapter loads, never inferred from a response body. A metadata-only body, a count, an empty page, a duplicate id, a row with no id, a non-JSON or an oversized response, and a row created after the session opened all leave the obligation blocking with a typed note. The response is parsed ONLY on a route a claimed read actually declares, so no other route's body is parsed or retained. Two resources one session claims may share a route only by declaring the SAME shape: when they disagree the witness parses that body for NEITHER, and the note names both competing declarations, so one resource's rows can never be read under another resource's `rowsKey`/`idKey`; with an identical shape the route is read once and that one response still credits exactly one claim.
174
+ - The witness's adapter loader no longer DROPS a declared `volatileFields` list. `validateAdapter` accepted the declaration (unique non-empty field names) and the grader, the kit and the report already honoured it, but the loader never copied it onto the registry entry, so every witnessed persistence record shipped without it and a server-rewritten field failed the exact-value echo as `EVIDENCE_VALUE_MISMATCH` however the adapter declared it. The declaration now survives admission, an undeclared key still blocks as before, and a present-but-malformed list is refused at load.
175
+ - A Playwright project that declares `use.storageState` now gets that session. A supervised run never loads the consumer's config — it runs a synthesized one, because that config is arbitrary code in the runner's main process — so the standard auth pattern stopped at that boundary: the `setup` project signed in and saved `playwright/.auth/user.json`, the dependent project that reads the file was handed nothing, and every assertion on a signed-in page failed inside an otherwise green run. The engine-owned project-graph reporter now carries the RESOLVED state path as data next to the dependency edges (`schemaVersion` 2, adopted all-or-nothing: a document a reader does not understand is absent, never half-read, because half a graph orders projects wrongly and half a state set authenticates the wrong ones; both project-keyed maps are null-prototype, since a project NAME is candidate data and `__proto__` is a legal one), and the run plan hands each project its own. The setup project keeps running with no session — a stale file from an earlier run cannot make it start signed in and skip the sign-in it exists to perform — and it still runs first, so the file exists before the project that reads it. A relative path resolves against the runner's working directory, the same directory the setup test writes it from, and the file need not exist before the run. A declared state is honored only when it names a file INSIDE the repository: containment is checked on the real filesystem from the nearest existing ancestor, so a path that escapes directly, one that escapes through a symlink, a link that leads nowhere, a URL and an empty value all stop the run before anything is spawned and name the project, the value and the fix — because a silently dropped state is a logged-out run that still reports green. An operator-provided `GATEFORGE_SESSION_STATE` keeps its whole-run precedence over every project declaration, exactly as before: the declarations it outranks are not read, not checked and not embedded, and no other per-project `use` option is honored.
176
+ - Run options travel with the run context, so a repository that starts its OWN witness gets timing chaos and twin path coverage with nothing configured on the witness side. Both features were only reachable through the spawn environment of a witness `test-gates` starts, so against `--witness-url` `--chaos` refused outright (`--chaos needs the witness this run spawns`) and an external witness answered `enabled: false` to the twin query — a comparison that silently compared nothing. The supervisor-authenticated `POST /run-context` now carries an additive, optional `options` object (`chaos: { seed, maxDelayMs, reorder }` and/or `twinShapes: { queryKeys, inventory }` — the inventory travels as its route TEMPLATES, never a path), the witness applies it for this run (its shared observation proxy reads the chaos plan lazily, so a plan bound after start-up still takes effect), and the binding answers with an additive `applied` echo. Absent `options` the request body and every byte of behavior are unchanged; a witness STARTED with the same feature keeps working exactly as before, and a binding that disagrees with how the witness was started is refused rather than silently resolved. `gateforge test-gates --chaos <seed> --result-only` is now accepted with `--witness-url`, and `enforcement.twinPaths` works against an external witness.
177
+
178
+ - Frontend-read / response-model gap advisory. `@gate-forge/pack-http` now reports `responseReads` on each frontend-call fact — the fields that call site reads off its own response (`.data.<field>`, `.data['<field>']`, destructuring of the awaited result or of its payload, followed by name inside the enclosing function, same file, never inferred across files; a `let` holder, a computed key and a JavaScript member are never reads) — and `@gate-forge/pack-fastapi` reports `responseModelFields` on each server-route fact: the wire names its response model answers to, field names plus declared aliases plus provably inherited fields, from the decorator's `response_model=` or else the handler's return annotation with FastAPI's own containers unwrapped. `gateforge check` cross-checks the two over the existing endpoint join and emits ONE non-blocking `RESPONSE_FIELD_MISSING_FROM_MODEL` advisory per field a joined endpoint's model does not declare, naming the endpoint, the field, the frontend file:line and the names the model does declare; a field counts as present under its own name, under the other case style (`due_date` ≡ `dueDate`), or under a declared alias. Nothing blocks and no exit code changes. A model the AST pass cannot compute (an alias generator, an unresolvable base, a `dict`, a union, no annotation), a call that resolves to no route, a repository without both packs and a malformed fact all produce nothing at all, so a report that has no gap is byte-identical to before.
179
+ - Per-session adapter identity. A test that must read inside the tenant it just created registers that tenant's login for ITS OWN session: the new session-authenticated `POST /sessions/identity` (`sessionId`, `sessionToken`, `seat`, `values` keyed by the same witness env var names the adapter seat declares) stores the credential in witness MEMORY, keyed by that session id, and kit adapters resolve the seat by `ctx.sessionId` before the process-global witness environment seat (so a cookie logged in as one session is never served to another session's read). A registration changes only WHO the engine reads as — the engine still performs every read, a wrong tenant makes the row unfound (fail closed), a foreign or ended session is refused (403/409), and the credential reaches no record, no run state, no log and no report. Exposed as `evidence.registerSessionIdentity({seat, values})` on the frozen Playwright fixture surface and `WitnessClient.registerSessionIdentity(...)`; the trust argument is written out in `packages/cli/guides/TEST-ENVIRONMENT.md`. Without a registration every read is byte-identical to before.
180
+ - Per-tenant singleton facts and the obligation they hide. `@gate-forge/pack-sqlalchemy` now reports every declared UNIQUE constraint, unique INDEX and column-level `unique=True` as the additive `uniqueConstraints` table attribute (absent when there is none; a computed column expression is never guessed), and tags a table `singletonPerTenant` (constraint, tenant column, columns) when its plane evidence says `tenant` AND one of those constraints includes a recognized tenant-scope column. `gateforge check` turns each tagged resource that owes a `persistence:create` into ONE non-blocking `RESOURCE_SINGLETON_PER_TENANT` advisory naming the constraint, the tenant column and the fact that the create can only be witnessed on a fresh tenant. Nothing blocks on it, and a repo without the tag is byte-identical. The matching per-session adapter identity lands with the same plan item: `POST /sessions/identity` registers a seat credential for one open session only, and kit adapters resolve it by `ctx.sessionId` before the process-global witness environment seat (credentials stay in witness memory — never in records, state, logs or reports).
181
+ - Owner-declared tenant scope columns. `.gateforge.yml` gains an optional `tenancy.scopeColumns` list naming the columns that carry the tenant scope in THIS repository; `@gate-forge/pack-sqlalchemy` uses it INSTEAD of its fixed `TENANT_SCOPE_COLUMNS` list when minting `singletonPerTenant`, so a per-tenant singleton table scoped by `contractor_id` (unique `(contractor_id, ledger_id, kind)`) is recognized instead of silently missed. The declaration replaces rather than extends the default list, lives inside the trusted policy digest, and a malformed block fails closed. Absent (no file, no block, no list) is byte-identical to before, and the pack validates its own block only — an unrelated config problem still belongs to the CLI.
182
+ - Engine-owned queue observer: `.gateforge.yml` gains an optional `queueObserver` block (kind, connection, per-task-resource queue bindings, sampling interval, settle bound), parsed by ONE core schema the CLI and the witness both use. When it is configured the WITNESS opens the channel (built-in BullMQ implementation, or an operator module whose default export is a `(spec) => QueueChannel` factory), and an `engine-task` `deliver` case runs end to end: the engine produces the delivery (stamping the identity, the idempotency key and the attempt bound the case declares), polls the queue until every job settles, and seals that read as `queueObservation`. `attempts` rules now grade from it — terminal outcome, the declared attempt bound (with an optional `minAttempts` floor), and an optional `recoveredFromStall` claim proved by the engine's own timeline. Everything unexpected fails closed: an unknown backend state, an unbounded field, an over-long timeline or an undeclared queue blocks the case. WITHOUT the block the `task` namespace reports **unavailable** (every `task:*` contract fails closed with `VERIFIER_UNSUPPORTED`), the witness is handed no observer configuration at all (its spawn environment is byte-identical), and every `engine-task` case blocks with a naming diagnostic. Engine-level end-to-end suite (`packages/cli/test/task-queue-behavior-e2e.test.ts`, real CLI + real witness + real BullMQ app + real Redis, pass and fail variant per contract) and an example application under `example/task-bullmq/` that loses a worker process mid-job. The engine-owned observer is also what makes the `task` behavior pack OFFERABLE: `gateforge init` and `gateforge next` name it exactly like every other behavior pack (namespace, the file its needle was read from, and the `gateforge init --behavior-packs task` flag) ONLY when `.gateforge.yml` declares the block AND the repository shows the queue machinery or a discovered `task.resource`, because without the engine reading the queue every `task:*` case fails closed — a repository without an observer is byte-identical to one with no background work at all.
183
+ - Phase 4 setup UX: behavior cases are now installable by following what Gateforge prints. `gateforge init` reads the repository and names the behavior packs it finds (webhook / workflow / auth / validation — detected from the code that decides a signature, an authorization outcome, a state transition, or a request schema). A non-interactive run enables NOTHING and prints the exact `gateforge init --behavior-packs <pack>` for each pack it found; a terminal asks per pack. `--behavior-packs <pack,...>` enables the named packs, `--behavior` every detected one, `--no-behavior` keeps the run silent. The enabled packs' scaffold is written to `.gateforge/behavior.yml` as one commented example case each (a scaffold is never approval) and, for an existing `.gateforge.yml`, the exact `behaviorPolicy: .gateforge/behavior.yml` line to add is printed. An existing behavior document is never overwritten. `gateforge next` prints the whole remaining setup for a discovered route that has no approved case: the complete `endpoints:` entry (real resource id, method and path, the repository's own adapter-backed effect scope, its declared fixture recipe and the row a delivery records), the proof test that asks the ENGINE to drive each case, the `.gateforge/test-map.yml` entries with the exact compiled case ids, and the gate command. A fact the repository has not declared (no adapter-backed entity, no recipe, no declared created row) is printed as that fact, never as a block that could not pass. A repository that shows no behavior pack, and a `next` with no behavior obligation, are byte-identical to before. The `task` namespace joins those four under one gate: its example case is a `deliver` action on the `engine-task` channel with an `attempts` state rule, declared under `resources:` (a task resource is not a route), and the pack is offered only when a `queueObserver` makes those cases gradable. `gateforge next` prints the per-tenant singleton guidance (`singletonPerTenantGuidanceLines`, the same sentence `check` renders as an advisory) and, when it applies, the task-pack offer after the next action; both keys are omitted from `--json` and no line is printed for a repository with neither.
184
+ - `http.endpoint.requireObservation`, one additive option in the pinned policies document (`.gateforge/policies.yml`), makes an untested new route visible. Today a `consumed: true` endpoint policy owes `http:request-observed` / `http:response-status-ok` only for routes the frontend statically consumes, so a brand-new route no UI calls owes nothing and `check` exits 0. `options: { 'http.endpoint.requireObservation': all }` widens that one matcher to every discovered route: an unmapped one blocks with the existing `TEST_MAPPING_MISSING` cause and the existing overlay next action, naming the route. Existing routes are not re-litigated — `gateforge adopt` forgives them through the adopted baseline, so only NEW debt blocks. The option is absent-or-`consumed` by default and a document without it produces byte-identical output (locked by a golden report), it never widens a `consumed: false` policy, a policy that does not name the `http.endpoint` kind, or a table, it adds no contract, cause code or exit code, and it lives inside the trusted policy digest, so an agent cannot widen or narrow the scope by itself. `gateforge init` documents it in the policies template, and `gateforge next` names it on the one item it explains (an unmapped obligation on an unconsumed route) and nowhere else.
185
+ - `enforcement.twinPaths: advisory | block` (with `enforcement.twinQueryKeys`) makes a run say whether a raw test and its witnessed twin actually covered the same request path. The reported bug was GREEN: two tests shared a helper whose parameter defaults sent them down different paths (`?tab=all` in one, `?tab=open` in the other), so "green three times" proved nothing about the path the witnessed twin covered and nothing in the run said so. The witness proxy now records a request SHAPE per test session — a method, a route template and the values of the query keys the owner allowlists, never a URL, a body or a non-allowlisted value — and a run that finds a linked pair disagreeing reports `TWIN_PATH_DIVERGENT`, naming both tests and the exact differing value. The pair is linked by `twinOf` in `.gateforge/test-map.yml` or by the title convention (`X [witnessed]` next to `X raw`), and the raw twin's session is marked OBSERVATION-ONLY engine-side: every submission from it is refused with 403, so it can issue no record, no attestation and satisfy nothing. Additive and off by default — with `twinPaths` absent, or set with no pair linked, nothing is wired, no state file is written and the report is byte-identical. The comparison joins on the runner's registered IDENTITY (project, file, title path) rather than a runner-assigned test id, because a supervised run drives its own trusted config and the ids it runs tests under are not the ids the repository's config enumerates.
186
+ - `gateforge test-gates --chaos <seed>` makes rare response-order races show up ON PURPOSE, reproducibly. The witness observation proxy already sits on the request path of every witnessed test, so with a seed it releases each proxied app response on a seeded schedule: a delay in `[0, maxDelayMs]`, and — for requests sharing a route key inside one test session — the option of releasing a LATER response before an earlier one. Only timing moves: bytes, status, headers and evidence semantics are untouched. The schedule is a pure function of (seed, session identity, route key, k), so the same seed replays it exactly, and the run records it (`chaos: { seed, maxDelayMs, reorder, schedule }` in the report and in the sealed execution result) with `timing chaos: seed <n> (max delay <ms> ms, reorder on|off) — replay with --chaos <n>` as the text line. The recorded route key is method + pathname with the query stripped, so no credential can reach a report. `--chaos` is accepted only with `--result-only` and only against the witness the run spawns: a run whose timing was perturbed on purpose finds races, it never seals a receipt and never writes the run record. `run.chaos: { maxDelayMs, reorder }` only TUNES the bounds (default 400 ms, reorder on) and never switches chaos on — without the flag every byte of a run, report and execution result is unchanged.
187
+ - `gateforge test-gates` now BINDS the compiled behavior catalog to the witness it spawned (supervisor-authenticated `POST /runs/behavior-catalog`, immediately after the run-context bind): the catalog, the case assignments each test may execute (from `.gateforge/test-map.yml` `caseIds`, keyed by the supervisor-registered test identity), the complete `http.endpoint` route inventory in the `{}` shape grammar, and the engine-bundle authority-profile digest. A repository with no `behaviorPolicy` makes no call and its run is byte-identical; a refused registration fails the run with one plain line instead of leaving every behavior obligation silently unprovable. A CLI-spawned witness also loads the operator-provided trusted fixture/actor provider from `GATEFORGE_FIXTURE_PROVIDER` (a `fixture-provider.mjs`, or the directory holding it), so strong cases can mint fixtures and actor credentials engine-side; without it they still block fail-closed. The `webhook` engine-level end-to-end is now GREEN through the real CLI (valid signature accepted and recorded, forged signature rejected with the log unchanged, replay still one row, receipt sealed).
188
+ - Engine-level end-to-end suites for the `workflow` and `auth` namespaces (`packages/cli/test/workflow-behavior-e2e.test.ts`, `packages/cli/test/auth-behavior-e2e.test.ts`): the real CLI over a fresh fixture repository, the packs' own `example/workflow` and `example/auth` servers behind the loopback attestation proxy, the witness `test-gates` spawns itself, and post-suite verdict evaluation through `check --require-e2e`. Each namespace ships a pass and a fail variant, and the fail variant is the SAME example server with one documented defect patched into the copy the engine scans (the workflow transition guards removed, the auth tenant equality check removed) — so what the suites prove is that a rejected illegal write and a refused cross-tenant write are reachable `satisfied` with the engine-read snapshot unchanged, and that an application which accepts either one blocks with `BEHAVIOR_EFFECT_MISMATCH` and a non-zero exit. Both rejection cases ride on an engine-driven positive control (a legal transition; the tenant's own refund), so "unchanged" can never be satisfied by an application that simply never moves anything, and both suites read the sealed before/after snapshots themselves to show what the engine saw.
189
+
190
+ - `example/behavior` ships the pieces a fresh copy needs to drive its cases: an approved fixture/actor provider (`fixtures/fixture-provider.mjs`), an `x-gateforge-env-fingerprint` marker on the reference app (GF-13 attestation), a `snapshotScope` on the reviewed adapter (the witness deliberately refuses the candidate GET transport there, so the scope is read by the adapter's own engine-side fetch), and a `.gitignore` for the generated `.gateforge/test-gates/` run state that used to be committed and made every run refuse to start.
191
+ - Declared signature profiles for `engine-http` behavior cases (plan 2026-09-25 Phase 1). `signatureProfile` now takes an algorithm plus bounded `;key=value` parameters — `header`, `timestampHeader`, `toleranceMs`, `attemptHeader`, `attempt`, `forgery` — parsed by ONE grammar (`parseBehaviorSignatureProfile` in core) that the config schema and the witness request driver both use, so a typo is a config error and an unknown parameter never becomes a silent default. The secret still comes only from the trusted lease, the signature still covers the exact bytes on the wire, and a `forgery` is performed by the engine (one flipped digest nibble), never by the suite. A lease subject `signatureTimestampMs` lets a case declare a stale stamp, which the driver refuses when it falls outside the declared `toleranceMs`; over-limit bodies still never leave the driver. A bare `hmac-sha256` is byte-for-byte the previous behavior. Proven against the pack's own `example/webhook` receiver: a valid signature is accepted and the delivery log gains exactly one row, a forged signature is rejected 401 with the log unchanged, and a replay still leaves one row.
192
+ - `example/webhook/server.js` exports its `start` function for harnesses that own their own delivery-log state, and applies the side effect to THAT state (it previously wrote to the process-global log, so a harness-owned state never saw its own rows). It also serves a read-only `GET /delivery-log` listing.
193
+ - An engine-level end-to-end suite for the `webhook` namespace (`packages/cli/test/webhook-behavior-e2e.test.ts`): the real CLI over a fresh fixture repository, the pack's own `example/webhook` receiver behind the loopback attestation proxy, the witness `test-gates` spawns itself, and post-suite verdict evaluation. It compiles three owner-declared required cases (valid signature, forged signature, replay) and pins the CURRENT state honestly: the grader reaches all three webhook obligations and each one is `missing` with `BEHAVIOR_CASE_MISSING`, because no supervisor path binds the compiled behavior catalog to the witness, so the run's own failure artifact reads `no behavior catalog is bound to this run`. The example receiver gains a read-only `GET /delivery-log` listing so a reviewed adapter can witness the delivery log as a scope.
194
+ - The Status text in `README.md` and the capability table in `packages/cli/README.md` now match the code: `auth:*`, `validation:*`, `task:*`, `webhook:*` and `workflow:*` are registered semantic verifiers that grade across the approved required cases through the witness-issued `behavior.case` channel (they were still documented as fail-closed namespaces with no verifier). A repository that declares no case for such an obligation still blocks `missing` — the grader never falls back to transport evidence — so only the stale documentation changed, no verdict, cause code or exit code.
195
+
196
+ - Adapter kit `@gate-forge/witness/adapter-kit`: `defineHttpAdapter(config)` builds a contract-valid evidence adapter from a reviewed config (read/list paths, wrapper keys, projected fields, paging, a witness-side login seat). Paging is bounded and fails closed with `result truncated` instead of returning a partial list; a redirect-only read path fails closed naming its `Location`; credentials come only from named witness environment variables. Adapters without `volatileFields` behave exactly as before.
197
+ - `gateforge adapters check --probe` reads a kit adapter through the adapter's OWN seat (its login, cookie or bearer, one re-login on 401, GET-only) instead of an unauthenticated GET, so a collection only a logged-in session can read probes as `ok` rather than a 401 that blamed correct credentials. A seat whose witness environment variables are missing is reported as `the seat '<name>' needs <ENV_A>, <ENV_B> in the environment — not probed` (names only, never values); a rejected login names the login POST status. An adapter without `auth` is probed exactly as before.
198
+ - An adapter may DECLARE the fields the server computes itself (`volatileFields`). The witness stamps the declaration onto the persistence record, the exact-value echo skips exactly those keys, and the run reports every skip as a non-blocking `ADAPTER_VOLATILE_FIELD_SKIPPED` advisory. An undeclared key still fails the echo as before.
199
+ - A declared volatile skip is disclosed on the OBSERVE channel too. A suite-driven browser that writes through the session proxy produces ONE `persistence.observed` record carrying both the witness-observed request fields and the adapter's independent read, with no `ui.action` anchor anywhere. The exact-value echo already skipped the adapter's declared server-computed keys there, but the run only ever reported the skip when a `ui.action` anchor was present, so a satisfied obligation stayed silent about the one field it did not echo-check. The skip reader now takes the entered keys from that record's own observed request fields when the evidence carries no anchor, and the same non-blocking `ADAPTER_VOLATILE_FIELD_SKIPPED` advisory names the skipped field(s) — field NAMES only, never an entered or persisted value, and only for keys the request actually carried. A `ui.action` anchor's declared input still takes precedence wherever one exists, the browser channel is byte-identical, an adapter that declares nothing still reports nothing, and no cause code, verdict, receipt field, advisory text or exit code changes.
200
+ - `gateforge adapters scaffold [--dry-run]` writes one reviewable starting-point adapter per business resource that has none, from the compiled graph and the route inventory. It never overwrites, marks every guess in the file's own header, and prints a "needs you" list with the reason for everything it refuses to guess. `gateforge adapters check [--probe --base-url URL] [--probe-id ID]` loads and validates every adapter with the same contract validator the witness uses, reports the resources that still have none, and with `--probe` issues one read-only GET per adapter (ok / absent / auth / fingerprint mismatch / failed). `gateforge enforcement doctor` carries the same audit as one summary line.
201
+ - `CONNECT-YOUR-PROJECT.md`: the full zero-to-first-green-commit guide (stacks, `init`, test environment, runner, adapters, test map, first run, hooks/CI, single-test re-check, and the top ten problems the first integration hit), linked from the README and the quickstart.
202
+ - `gateforge enforce --ci gitlab|github --witnessed` writes a WITNESSED CI job template next to the static one (`.gateforge/ci/gitlab-witnessed.yml`, `.github/workflows/gateforge-witnessed.yml`): the lane that actually seals a receipt in CI. The job installs the pinned CLI, creates a private job-scoped workspace and stack/image names derived from the CI job id, forwards the merge-request base sha into the environment both supervised commands run in, runs `gateforge run -- --changed --scope full` so the app's own recipe owns the services, reads the verdict out of `report.json`, and uploads the report, receipt, execution result and the secret-screened `failures.json` as artifacts. The run prints straight into the job log, so the progress stream shows each test as it finishes. It never echoes a secret variable, and neither the recipe log nor the suite's raw output (which passes through the run and can carry the app's own secrets) is ever written to a file or uploaded. Templates are plain reviewable YAML, written only when absent; without the flag every generated file is byte-identical to what it always was.
203
+ - `gateforge run` performs a whole local witnessed proof in one command: a strict doctor preflight, the app's own optional recipe, the supervised `test-gates` with the user's flags, `check --require-e2e`, and the recipe's teardown — always last, after a failure too. It adds no authority: it only sequences commands the user could run, every verdict still comes from the same engine, one plain line per step carries its duration, and the exit code is the first failing step's own code (2 usage/config/recipe, 1 preflight or gate, the command's code for a recipe step, 124 on a step timeout). Recipe output is written to `.gateforge/test-gates/run-recipe/<step>-log.txt` and never to the console, because a recipe command may print secrets.
204
+ - An optional app recipe in `.gateforge/runtime.yml`: `prepare`, `reset`, `seed`, `services_up`, `healthcheck` and `services_down` steps, each an argv command list with its own `timeoutSeconds` and bounded `retries`, plus `env_files` (paths only — an inline `NAME=value` is a schema error, and the loaded values are never printed). The document is the same one the witnessed pre-commit staged runtime uses, extended additively; without it `gateforge run` starts and stops nothing and behaves exactly as before. An unknown key, a malformed step, or a missing env file is a plain exit-2 error — a half-understood recipe never runs.
205
+ - `gateforge enforcement doctor` reports a new read-only `run` section: verifier key location, the owner-approved policy pin (present and matching), the configured runner binary and its version, the configured interpreter paths, python bytecode safety, target reachability (only when a base URL is configured), the recipe healthcheck (only when a recipe exists), host load (advisory, never failing) and candidate-tree readiness — one PASS/WARN/FAIL line each with the exact fix command. The doctor stays report-only and exits 0 as before; `gateforge enforcement doctor --strict-preflight` exits 1 at the first failing precondition. The report gains only the additive `run` key.
206
+ - `GATEFORGE_CI_ENGINE_SOURCE` declares where the generated GitHub Actions workflow installs the engine from (a `.tgz` path, a directory, or any npm specifier), for a release that is not on the registry. Unset (the default), the generated workflow is byte-identical to before and installs `@gate-forge/cli@<version>` from the registry; set, the same workflow installs that one specifier through the step environment and records it in its header, and a value npm would read as a flag is refused with exit 2. The GitLab template is unchanged: it installs the repository's own declared `@gate-forge/cli` dependency.
207
+ - Optional owner-chosen gate strictness: `mode: strict|changed|warn` in `.gateforge.yml`. A missing key is `strict`, which is exactly today's behavior. `changed` blocks only on debt this change touches (the full debt is still reported); `warn` evaluates and reports everything and exits 0 with an additive `wouldBlock`. Exit code 2 (config/usage) is never softened, and the active mode is printed in every report and surfaced by `gateforge enforcement doctor`.
208
+ - `gateforge quarantine <testKey> --owner --approver --reason --expires` writes an owner-approved, always-expiring (max 14 days) flaky-test quarantine. A quarantined test leaves the required set, its outcomes and evidence are never used for any claim (an obligation only it covered stays `missing`), and it never blocks. An expired quarantine is ignored and blocks with `QUARANTINE_EXPIRED`. Quarantine files are part of the pinned trusted policy, so an agent-authored quarantine is a policy change that blocks until the owner repins.
209
+ - Goal-based `gateforge init`: one question (light / normal / strict) or `--preset light|normal|strict` maps a goal to the exact settings it writes and prints them, plus the `undo:` command. `gateforge init --explain-presets` prints the same mapping and writes nothing. With no terminal and no `--preset` (an AI agent or CI), init writes `light` only (`mode: warn`, no hooks) and prints that a human must choose; it never guesses `normal` or `strict`. A preset never writes a waiver, an adopted baseline or a plane rule, and an existing `.gateforge.yml` is never rewritten.
210
+ - The supervised spool drain exposes its own persistence-intent forward progress (`whenIntentsForwarded(count)`): it resolves once the witness has answered that many drained intents, so a caller can wait for the server-side probe to have run instead of guessing a number of poll ticks. It is the drain's own fact — the supervised suite only appends to the spool and can neither observe nor assert it — and it fails closed (rejects) rather than resolving on an unproven assumption.
211
+ - `gateforge test-gates --test <selector> --result-only` runs hand-picked tests witnessed, in seconds, instead of a whole suite. `--test` is repeatable and is accepted ONLY with `--result-only`: a hand-picked list never seals a receipt. A selector is a logical key or a unique substring of one, resolved against the planned rows (never raw runner output); an unknown or ambiguous selector exits 2 with the candidate keys listed. The named run uses the additive `named-selection` selection mode, so it can never collide with a full or scoped seal, and adds `selectors: [{ selector, logicalKeys }]` to the report. It works for every runner through the shared adapter contract.
212
+ - Opt-in `enforcement.reseal: true` lets `test-gates --changed --scope changed` re-seal after a test-only change: Gateforge diffs the two sealed trees itself, classifies every changed path from the runner's catalog and the repository import graph, re-runs only the tests the change can affect (importers of a changed file included) and carries the parent's outcomes. Eligible paths are test files and test helpers only; app code, a deleted file, a setup or dependency-stage test, or an unresolvable import falls back to the plain changed-scope run with one plain reason line. A complete whole-suite run that failed a test seals no receipt and leaves `.gateforge/test-gates/run-record.json` instead — a MAC'd, verdict-free run record the same path re-seals from when every test that did not pass is inside the affected set and passes now. The chain is bounded at 5 consecutive re-seals, and `check --require-e2e` and `broker commit` recompute every hop (parent authentication, tree diff, classification, affected set, carried rest) with their own keyring. Off by default in every mode; `enforcement.reseal: true` enables it in any mode, `strict` included. When the path is on and the run state holds a parent document it cannot re-seal from, the run says so in one plain line naming the first binding that failed — `test-gates: the previous run cannot be re-sealed from: its sealed tree is not the tree of commit 9c8a3b7 (uncommitted changes were tested) → changed-scope run` — instead of silently taking the changed-scope path. The parent is bound to the commit the parent DOCUMENT names, which must exist in the checkout and be an ancestor of HEAD — no CI variable is involved, and `CI_MERGE_REQUEST_DIFF_BASE_SHA`/`GITHUB_BASE_REF` are ignored, so a CI run must persist `.gateforge/test-gates/` between pipelines (a cache keyed by branch); with a cold cache there is no parent and the run is the ordinary run. With the path off, or with no parent document at all, the output is unchanged byte for byte.
213
+ - `enforcement.resealRuntimeFiles` lets the owner declare the runtime state the run itself rewrites inside the repository (a witnessed login stage's storage state, a runner cache) as repo-root-relative globs, so a re-seal is not blocked forever by gitignored bytes that differ between every pair of sealed candidate trees. A matching changed path is disregarded only when **neither** sealed commit tracks it — a committed path is source, whatever the glob reads, so a declaration can never hide a source change. The run prints one plain line (`test-gates: re-seal disregards 2 declared runtime file(s): …`), the re-sealed receipt keeps the real `changedPaths` and adds `resealDisregarded`, and `check --require-e2e` and the broker recompute that exact list from the same globs or reject the receipt as `EVIDENCE_STALE`. Absent by default: a repository that declares nothing is byte-identical, and it refused with `app file changed: e2e/.auth/contractor.json → changed-scope run` until the key was added.
214
+ - A dynamic import with a **literal** specifier is now an ordinary import edge instead of a refusal: `import('./x.mjs')`, `import("./x.mjs")`, `` import(`./x.mjs`) ``, `require('./x')`, `importlib.import_module('x')` and `__import__('x')` resolve like a static import, so the file that loads the module re-runs with every importer of what it loads. A **computed** specifier — a variable, a concatenation, a template with `${…}` — still refuses the re-seal, and a call with anything but a single literal argument is treated as computed (fail closed). Before this, one tracked file with `import('./master_session.mjs')` refused EVERY re-seal in the repository with `unresolvable import: … computed specifier`.
215
+ - A re-seal now re-runs a runner project's DEPENDENCY stage when a test that depends on it changes. The standard auth pattern — a `setup` project owning `*.setup.ts` with the browser project depending on it — runs the setup tests before the dependent ones, so a change to one dependent spec re-executes the setup project too; the re-seal's affected set now names that stage, so the run's plan and the affected set `check --require-e2e` and the broker recompute agree. Before this, the run sealed a receipt and the very next `check` refused it with `re-sealed receipt re-ran tests outside the recomputed affected set (e2e/auth.setup.ts)` — the re-seal was unusable for every consumer using a setup project. Only files a declared `dependencies` project owns are added (resolved from that project's own `testMatch`); a setup-named file with no such edge is still carried, a CHANGED setup or dependency-stage test still refuses the re-seal with `setup test changed: …`, and an unresolvable dependency declaration still fails the change set closed.
216
+
217
+ - A secret-free CI progress stream (`gateforge test-gates --progress stderr|file:<path>|off`, and the additive `run.progress` config key). It prints the start line with the registered expected-set size, one line per finished test with exact `N/M` counters and the test's catalog title, an alive line every genuinely quiet minute, and the finish line before grading. It is built from witness-side facts only — counters, identities, catalog titles, outcomes — and NEVER from runner output, so it is secret-free by construction; a failing test's first error line is matched against credential shapes and replaced whole. `auto` is stderr under `CI=true` and off everywhere else, so a local run's bytes are unchanged, and the stream is written only when it is on. It decides nothing: it is not evidence, no gate reads it, and a write failure warns once and is then ignored.
218
+ - A failing witnessed test ships a Gateforge-owned diagnosis instead of a browser snapshot: `.gateforge/test-gates/failures.json` carries each failure's logical key, its guarded error message and up to five `file:line` stack frames. No request or response body is ever included, and a planted credential in an error message reaches neither the stream nor the artifact.
219
+ - `execution.repositoryDebt` gained `baselined`, `newlyBlocking` and `notGradedBlocking` beside the frozen `blocking` total (which stays exactly as computed: repository blocking verdicts + repository findings), and the text summary now reads `repository debt: N known (baselined), M new blocking / …`. All of them come from ONE definition over the graded verdicts, so the text and the JSON can never disagree, and `M` is exactly what this run's exit code blocks on: a full run's whole surface, a changed- or named-scope run's own slice. Debt outside a slice run is reported with its own words (`not graded by this changed-scope run: K blocking obligation(s) — …`), never counted as new.
220
+ - `gateforge test-gates --help` documents `--progress`, and the run's scope is published to the in-runner reporter as `run-scope.json` (derived run state, read by nothing the gate trusts).
221
+ - Candidate-tree ingestion hashes and stores its objects in process instead of spawning `git hash-object` per file and `git mktree` per directory level. The tree id for the same bytes is unchanged, every object is still an ordinary loose object in the same authority store (so `git diff-tree`/`git cat-file` on the candidate tree are unaffected), the same files are hashed (gitignored ones and `node_modules` included — a swapped package still voids the receipt), and every fail-closed rule and message is unchanged. Ingestion now costs two git processes in total, whatever the workspace size.
222
+
223
+ ### Changed
224
+
225
+ - A named or changed-scope run's in-runner reporter no longer prints a repository verdict it cannot own: it says `GATEFORGE GATE: SELECTION (N satisfied, 0 blocking; repository verdict not graded here)` instead of `NOT PASSED` over debt the run never observed, which contradicted the CLI exit code printed seconds later. A selection whose own claim is unsatisfied still prints `FAIL`; a whole-repository run is unchanged.
226
+ - One run can no longer show two different repository-debt counts. The in-suite Playwright reporter graded claims only, so its `N known (baselined) / M new blocking` split was a guess beside the gate's: a real run printed `412 known (baselined), 87 new blocking` from the reporter and `396 known (baselined), 0 new blocking` from the CLI for the same 519 obligations, while the CLI's own JSON said `blocking: 96` beside `newlyBlocking: 0`. The reporter now prints `repository debt: graded by gateforge after the run` and `run-summary.json` carries only its legacy keys (`obligations`, `unclaimed`, `blocking`), and the gate's `newlyBlocking` is the count it blocks on instead of the total minus the baselined count. The `debt-baseline.json` run-state view is gone: a baseline id list is not the gate's grading, so nothing derived a split from it.
227
+ - A changed- or named-scope run no longer reports repository debt it does not block on as `new blocking`: a real run exited 0 on three selected tests while the repository carried 96 `missing` obligations, and the line would have said `96 new blocking`. `newlyBlocking` is now exactly the count the run's exit code blocks on, and the untouched debt is named in its own line (`not graded by this changed-scope run: 96 blocking obligation(s) — this run never observed them; a full run grades them`). A full-scope run's numbers, and the frozen `blocking` total of every run, are unchanged.
228
+ - `tests discover` never narrows several Playwright configs silently: when a repo holds more than one, the runner line now names every config it found, the one enumeration ran, why that one, and the ones NOT inventoried (their test cases are missing from the catalog). The chosen config, the invocation and every field are unchanged.
229
+ - `enforcement doctor` no longer calls a tarball install the registry: its `engine:` line now reads npm's own install metadata (the owning `node_modules/.package-lock.json`, else the manifest's `_resolved`/`_from`) and says `from node_modules (tarball or directory install: file:… — not the published registry release, so CI installing @gate-forge/cli@<version> would NOT run this code)`, or `… (registry or tarball install — no install metadata found, so the provenance is unproven)` when there is none. A real registry install and a local checkout print exactly the lines they printed before. The receipt-bound `engine.source` keeps its meaning, so no receipt changes meaning and no receipt validity changes.
230
+ - Editing the repository's own `.pre-commit-config.yaml` is now announced as an action: `init --blocking`/`enforce` print one line naming the file as yours and the exact way back — `undo: git restore -- .pre-commit-config.yaml` for a tracked file, and (for an untracked one, which has nothing to restore) the line says to delete the appended entry instead of printing a command that would fail. The doctor's `hook-mutation` warning is now actionable in the order the owner meets it: it names those hooks as the repository's own and says to run `gateforge init --blocking` (or `enforce`) first, then move `gateforge-check` to the FIRST entry, instead of telling someone to reorder a hook they do not have yet. No file, exit code, or check id changes.
231
+ - The first real `next` on a FastAPI repository explains its owner question before asking it: one plain line says the route has no data plane, that no detector can read the answer from the code, and what each answer does (`tenant` / `master` / `global` → run only that `classify plane` command; a route no real user calls → the owner-only internal rule). The question itself, every printed command, the cause vocabulary and the exit code are unchanged; the `guidance` array gains that one line, before the question.
232
+ - Reports gained additive fields only, and only when they apply: `strictness` (non-strict modes) and `quarantine` (non-empty population). SARIF output stays machine-parseable JSON.
233
+ - `gateforge adapters scaffold` generates adapters that match a hand-written one far more often: a per-parent sub-collection (`/contracts/{contractId}/invoices`) is never sold as the complete collection (and never as a by-id read), route naming matches across `_`/`-` per whole path segment, `deletion` follows the graph's own soft-delete signal (a soft-delete-looking column raises a "needs you" line instead of a silent hard delete), and `fields` projects every column the graph declares for the table — the SQLAlchemy detector now reports `columnNames` — minus the primary key and credential-shaped columns, which the file header names.
234
+ - The adapter scaffold never projects a primary key as a business field, whichever layer declared it (the classification or the table's own `primaryKeyColumns`), and its header omits the `excluded:` clause when nothing was excluded.
235
+
236
+ ### Fixed
237
+ - A repeat run no longer plans a test out of the engine's own run state. Static discovery seeds candidates from the configured globs, and the engine writes source-shaped files into the state directory, so a generated config or controller spec was harvested back as a test the runner cannot enumerate. A seed is dropped only inside the state directory the run actually resolved, and only for registered engine artifacts. Native enumeration, import traversal and the tracked/hand-written-file refusal under `--out` are unchanged.
238
+ - The engine's generated preparation-freeze controller spec is now written to a private temporary directory outside the repository and removed when the run ends. Before, it was written under the state directory, so a Playwright config that collects from the repository root (no `testDir`) listed it as one of the project's own tests: the wired and scrubbed `--list` disagreed and the run refused before executing anything, and a plain `npx playwright test` in that repository would pick the file up too. The controller's handshake documents stay in the state directory.
239
+ - A supervised Playwright run now executes from the directory of the config it uses — the way the project's own suite runs, and the directory enumeration already read it from. A nested project's relative paths therefore land where the project writes them: a `setup` project saves `playwright/.auth/user.json` inside the project and the dependent project reads exactly that file, instead of both resolving against a directory the suite never runs in — where the artifact was an input the run then saw change, and the run refused to seal. A declared relative `use.storageState` resolves from that directory while containment stays the WHOLE repository: a `../shared/user.json` that lands back inside is accepted, and an empty value, a URL, a lexical or symlinked escape and a dangling link still stop the run before anything is spawned. Reported files and test identities stay repository-relative (the reporter receives the repository root as trusted constructor data), so catalog keys, expected-set admission and session bindings are unchanged for a root-level config and for a nested one, and a relative `GATEFORGE_SESSION_STATE` keeps its repository-root meaning. No new option, exclusion or alias; a root-level config behaves exactly as before.
240
+ - Playwright `observed-e2e` mappings now enable the session observation proxy without requiring chaos or twin options. The proxy binds and advertises the app's trusted loopback hostname, preserving the fixture's same-host guard. After the supervisor drains all sessions, the CLI copies the final witness ledger so records issued after the reporter's early copy are graded.
241
+ - The auth and validation examples report the actual bound port when the child is asked for port 0 — `--port 0` for the auth example, `PORT=0` for the validation example — and both E2E fixtures let the child bind 0 itself instead of probing a port, releasing it, and rebinding the same one.
242
+ - The timing-chaos replay fixture starts both tab requests in one browser turn. Separate Playwright actionability waits could let the first response settle before the second request started, so replay exercised a different overlap despite the same seeded plan. The assertion, seed bounds and production scheduler are unchanged.
243
+ - Corroborated plural collection routes now link to singular models (`/items/{id}` → `item`) without inventing a resource name. Both the exact and one-trailing-`s` forms are considered together, so ambiguity and missing corroboration still block. An owner-declared DELETE capability now reaches the linked model's delete-semantics classification; contradictory assertions and missing archive-state evidence remain fail closed.
244
+ - The Playwright evidence fixture binds to the same consumer runner as enumeration and supervised execution, including a separately installed subdirectory runner. Importing the pack in the trusted CLI does not load candidate runner code; only the runner child resolves it. A broken selected runner reports its own error rather than silently falling back. Repositories without their own runner retain the pack's pinned fallback.
245
+ - `enforcement doctor` and run preflight separately check the engine's pinned Chromium, not just the consumer's runner. The new `engine-browser` check names the engine's own install CLI and sets `PLAYWRIGHT_SKIP_BROWSER_GC=1`, so installing its revision does not remove the consumer's browsers. It performs no downloads itself. A Playwright runner conservatively requires this browser; other runners require it only for an explicit `engine-browser` behavior case. `PLAYWRIGHT_BROWSERS_PATH` is now forwarded explicitly to the witness.
246
+ - Test-only re-sealing includes the unchanged Playwright dependency tests that the supervised run re-executes. Dependency projects are read from the selected runner's sealed config, including nested configs and relative `testDir` paths; another runner's root config cannot override them. Changed or unresolvable setup stages still require a normal run.
247
+ - A colocated application entry point or import cycle does not count as a test-helper importer merely because it shares a directory with tests. Every transitive importer must also lead to a cataloged test; otherwise re-sealing is refused.
248
+ - An installed browser build that this machine cannot start is now a failure, not a green light. A clean `node:20` container ran `npx playwright install chromium`, `gateforge enforcement doctor` reported every pinned build installed, and every supervised test then died with `browserType.launch: Target page, context or browser has been closed` — a Debian image has no browser system libraries, the dynamic loader fails before the browser's `main`, and the only diagnostic in existence was a line inside the truncated browser log. On Linux the readiness check now launches each INSTALLED chromium-family build's own executable with `--version` (no shell, a bounded deadline, capped output), and the doctor's `runner` line and the run preflight both report `the browser build '<cache>/chromium-<revision>' is installed but cannot start on this machine: <the loader's own line>; fix: run \`npx playwright install-deps chromium\` in '<the config's directory>' (installs the browser's system libraries; needs root or sudo)`. A run therefore stops at preflight with the same exit 1 a missing build already used, instead of failing every test for an hour. Nothing is claimed off Linux, for a non-chromium build, or for a build with no executable file, and a healthy machine's line is byte-identical to before.
249
+ - A local red run now says why it is red. The progress stream is off unless `CI` is set or `--progress` asks for it, and `failures.json` is written only when it is on, so `gateforge test-gates --changed` on a laptop printed `selected tests: 0 passed, 10 failed` and not one word of cause. The text report now names up to three failing tests with their first error line and, when more exist, one line counting the rest and naming the command that prints every failure as it happens (`… 7 more — run with \`--progress stderr\` to print every failure as it happens`). The lines are built from the same credential-screened records the stream itself prints, never from runner output; they are offered only when the stream is off, `failures.json` is still written only when it is on, the json and SARIF documents keep exactly the keys they had, and a green run's output is byte-identical.
250
+ - A Playwright `setup` dependency project now runs in the order the consumer's config asked for. The synthesized trusted config carried project names as identity only, so the `dependencies` edge the consumer declared was dropped: the dependent project's test ran BEFORE the setup test that produces the artifact it reads, and a `--scope changed` or `--test` plan that selected only a dependent test left the setup project out entirely — so the test ran with no artifact (and Playwright refuses outright to load a config whose `dependencies` names a project the config does not define). The enumeration now captures each project's `dependencies` from the RUNNER's own resolved config, through an engine-owned reporter that runs beside the json one (`playwright --list --reporter=json,<engine reporter>`; the json reporter's `config.projects[]` does not carry the edge in any released Playwright, and reading the consumer config file would mean trusting candidate code), records NAMES ONLY, and `gateforge tests discover` prints the graph it resolved. A narrowed plan is closed over those edges transitively — the added rows are registered in the expected set, scoped per project and counted in the `scope:` line — and the synthesized config emits `dependencies`, filtered to the projects it actually defines. A single-project config and a config with no dependencies emit no `dependencies` key and stay byte-identical; no JSON key, cause code, exit code or receipt changed.
251
+ - A Playwright `setup` dependency project no longer makes the gate run the suite once per project and lose the evidence. The documented auth pattern — `{ name: 'setup', testMatch: /.*\.setup\.ts/ }` plus a dependent project — is correct consumer code, but the trusted config the supervisor synthesizes carried project names as identity only and collected every selected file under EVERY project through one global `testMatch`. The run then executed each spec file once per project: identities the registered expected set never bound were refused a session (`session open refused: test '…' is not in the registered expected set`), so those executions produced NO evidence at all, and the progress counter ran past its own total (`✓ 87/67`). The supervisor now scopes files PER PROJECT from the plan it already fixed before the run (`plannedProjectScopes` in the CLI, `projectScopes` through `SupervisedRunOptions` into the synthesized config), because project identity is the join key the whole pipeline speaks — catalog rows, the registered expected set, session opens, and the execution trace. On the FastAPI full-stack template this cuts a 124-execution run to the 62 the enumeration registered. The fail-closed rule is unchanged: a test outside the plan still cannot mint a session. A config with no project scoping synthesizes byte-identically to before.
252
+ - The missing-receipt block no longer contradicts itself. `gateforge check --require-e2e` on a repository with no gate receipt correctly named the command that runs the suite — and then appended `Run \`gateforge discover --json\`` to the same line, because the block carried the generic prose next action instead of a copyable command, so the read-only fallback was substituted and the last thing the line said was a no-op. The absent branch now carries `gateforge test-gates --changed` exactly as the stale branch already did; a cause-specific copyable command is never followed by the generic fallback. No cause code, exit code or JSON key changed, and a repository whose receipt loads is byte-identical.
253
+ - The example's first-run guide now names the one install its own promise left out. `example/README.md` promises that "one command runs the whole witnessed proof on a fresh copy", and on a machine whose browser cache is empty that command failed every test with `browserType.launch: Executable doesn't exist` — the browsers are a Playwright download, not an npm one, and `npm run gate` does not fetch them. The README now says, next to `npm run gate`, to run `npx playwright install chromium` once per machine in `behavior/`, and that `gateforge enforcement doctor` prints that exact command in that exact directory when they are missing. Documentation only.
254
+ - `QUICKSTART.md` step 6 now says what an existing key ring looks like. The command names the ring, its active key ID and `gateforge key rotate --confirm` and exits `2` without changing it; the guide said nothing, so a correct machine read the refusal as a failed step. It now states that the ring is left untouched, that nothing is to be done while that key is active, and that the exit code stays `2` for this release. Documentation only.
255
+ - A `FASTAPI_PREFIX_UNRESOLVED` block is now keyed on its REASON, not on its cause code. The code covers two unrelated findings and the computed-prefix advice was printed for both: on the canonical FastAPI full-stack template, after the computed prefix was made literal, `next` returned the same code with a different reason — `include_router target 'router' in backend/app/api/main.py cannot be resolved in the scanned set`, a mount whose target router the scanner cannot follow — and told the user to "give the mount a literal string prefix" for a mount that carries no prefix at all. It also asserted that nothing can close the finding, while one documented file does: writing `.gateforge/fastapi.json` as `{ "importRoots": ["backend"] }` resolves the whole mount and every route then carries its real prefix, with no application edit. Verified against the real python detector on the template's own mount shape (`backend/app/main.py` → `app.api.main.api_router` → `app.api.routes.<module>.router`), pinned by the new `pack-fastapi/test/template-mount.test.ts`. An unfollowable target now gets its own paragraph and its own `do:`, naming the `importRoots` entry with the directory derived from the finding's own file (and a placeholder, never an invented directory, when it cannot be derived); an ambiguous target names the conflicting roots; an include cycle says only that it must be broken. A computed prefix keeps its literal-prefix answer unchanged, cause codes, exit codes and JSON keys are untouched, and a repository whose findings are all computed prefixes prints exactly what it printed before.
256
+ - An upgraded engine no longer refuses with a command that cannot help. A repository that installs a new Gateforge and runs its strict check against a receipt the previous release sealed was refused correctly (fail closed, exit 1) but both blocking lines ended in `gateforge discover --json` — a read-only dump that changes nothing — while the one command that fixes it is a re-seal. The stale-receipt line and the missing-attestation-envelope line now both end in `Run \`gateforge test-gates --changed\``, with no doubled period. The receipt records the engine version that sealed it, so when that version differs from the running one the refusal says so in one plain leading line (`require-e2e: this receipt was sealed by Gateforge 0.7.1 and this engine is 0.8.0; a new engine derives the gate inputs again, so the run must be sealed again. Run \`gateforge test-gates --changed\`. [EVIDENCE_STALE]`) instead of leaving the reader to infer the cause from a digest mismatch. Cause codes, exit codes, report keys and every other entry's command are unchanged, and a run where nothing is stale prints exactly what it printed before. Every rejected evidence attestation (inputs changed since the run, another invocation, a tampered or malformed envelope) names the same re-seal.
257
+ - A `gateforge next` block on a resource the classifier blocked definitionally is answerable. It was exactly three lines — `next: <id>`, `why: resource '<id>' has no effective classification (the classifier blocked it definitionally)`, `do: gateforge classify --json` — and `classify --json` writes nothing, so the documented loop (run the printed command, run `next` again) printed the identical block forever; the resource's real blocks (`ADAPTER_MISSING`, `DELETE_SEMANTICS_UNRESOLVED`) were named nowhere, although `gateforge explain <id>` shows all of them. The block now names each block that actually holds the resource together with the state-changing command that clears it (`gateforge adapters scaffold` for a missing adapter, the `.gateforge/endpoints.json` capability declaration for delete semantics, a rule in `.gateforge/planes.json` for an unresolved plane), its `do:` is one of those commands instead of the read-only dump, and it prints the `gateforge explain <id>` line that resolves to the same blocks. A block code with no known command is never given an invented one. `classify plane` also names what its refusal already implied: a conflicting rule now prints its `match`, its current plane, and the `plane` key to change, so a wrong plane answer the product itself suggested can be undone from the output. `--json` gains the additive `classifierBlockGuidance` key, absent for every other finding; cause codes, exit codes, config keys and every other block are unchanged.
258
+ - The file-content blocks `gateforge next` prints are fenced blocks again, not a bare marker. Every snippet a block asked the reader to paste (the `.gateforge/endpoints.json` capability rule, the `.gateforge/behavior.yml` entries, the proof spec, the test-map entries, and now the `.gateforge/fastapi.json` import roots) was delimited by two literal `[CODE]` lines — not a template placeholder, but fence text a user copies, whose meaning was inferable and never stated. Each is now a normal fenced block with its language named (`json`, `yaml`, `js`), which is how the rest of the product delimits a block. The `[CODE]` marker that once followed a runnable `classify plane` command is still absent. Only the presentation changed: the pasted bytes are identical, and the two test parsers that read those blocks were pointed at the new fence with no assertion touched.
259
+ - `gateforge next` no longer prints a command a user cannot paste. Every candidate `classify plane` command was followed by a bare, never-substituted `[CODE]` line, and the quickstart tells the reader to copy commands out of this output, so a shell fed that block ran `[CODE]` as a command. The marker is gone from the command block. The `gateforge init --planes` prerequisite is printed only while `.gateforge/planes.json` does not exist: it once claimed "run this once" above every route block, including after the file was there and every plane command had succeeded.
260
+ - The supervised Playwright child now reads the browser cache the readiness check verified. A real install with `PLAYWRIGHT_BROWSERS_PATH` pointed at a populated cache produced `enforcement doctor` → `[OK] runner: … every browser build this runner pins … is installed under '<that cache>'` and then failed EVERY test of the first supervised run with `Executable doesn't exist at $HOME/.cache/ms-playwright/chromium_headless_shell-<revision>/…`: the doctor resolves the cache through that variable, but the child was spawned with an allowlist-only environment that did not carry it, so it fell back to the default cache under `HOME` — a directory nobody had ever checked. `PLAYWRIGHT_BROWSERS_PATH` is now part of the runner-child system allowlist (an operator-chosen directory, never a secret, the same class as `HOME`/`TMPDIR`), so the doctor and the run can no longer disagree about the cache. Only Playwright's own variable was added: the witnessed pytest and Vitest/Cypress session children already inherit the ambient environment minus every `GATEFORGE_*` name, so they were never affected. Signing material and every parent-side run-state path stay refused, and no other name crosses. `TEST-ENVIRONMENT.md` now says that a cache you point this variable at is the cache the run uses.
261
+ - The gate no longer refuses to run in a repository whose first supervised run has already happened. The supervised Playwright run writes its synthesized runner config into the run-state directory (`--out`, default `.gateforge/test-gates/`), and since `gateforge init` declares every `.mjs`/`.js`/`.ts`/`.py` file as a scan glob, that generated file became a declared input — so the documented next command (`gateforge check`, then `gateforge next`) exited 2 with `refusing to run: --out '…' overlaps declared source/configuration inputs (.gateforge/test-gates/trusted.playwright.config.mjs)` until a user deleted the file by hand. The overlap refusal itself is unchanged and still fail-closed: a TRACKED file under `--out` refuses (same wording as before), and so does any file there the ENGINE did not generate. Only the engine's own artifacts are exempt, through one closed list (`cli/src/state-artifacts.ts`: the CLI run-state names plus the runner adapters' generated config and their per-run output subtrees), so the exemption is a statement about what the engine writes, never about what a glob happens to match. The digest of a repository whose state directory holds only generated files is unchanged.
262
+ - A `FASTAPI_PREFIX_UNRESOLVED` block is no longer a dead end. On the canonical FastAPI full-stack template it ended the whole `gateforge next` loop with `do: gateforge discover --json` — a read-only dump, so the documented agent loop printed the identical block forever, and (unlike `ENDPOINT_SEMANTICS_UNRESOLVED`) the cause carried no guidance at all. `next` now prints why it blocks (the mount's prefix is an expression, so no route under it can be read statically, and a guessed path would describe routes the app does not serve) and the one fix that closes it: write the prefix as a literal string at the mount site the finding names (`app.include_router(router, prefix="/api/v1")`) and run `next` again. Nothing that does not work for this finding is printed — a `.gateforge/endpoints.json` capability rule has no detected route to select on, `gateforge waive` has no obligation to bind (`waive: no obligation resolves for …`, exit 2), and `.gateforge/fastapi.json`'s `importRoots` governs absolute imports, not a computed prefix (all three verified against the real in-process pack, and the literal fix pinned by the pack's own real-detector test). A declaration key for computed prefixes is NOT introduced here; it is reported to the pack owner as a proposal. `--json` gains the additive `fastapiPrefixGuidance` array and keeps every existing key; a repository without this finding prints nothing new.
263
+ - `gateforge key create --confirm` on an existing key ring now says what is already there instead of a bare "refusing to overwrite". The quickstart step runs on a machine that may already hold a ring (a second project, a re-run of the guide), and the refusal named neither the active key nor the way forward, while the very next command (`enforcement doctor`) reported that same key as active and resolving — so a correct machine contradicted the documented expectation and a user read "refusing" as a failure. The message now names the ring's path, its active key ID (never the secret), that nothing needs doing while that key is active, and `gateforge key rotate --confirm` as the command for a new key. The exit code is unchanged, and a file that is not a readable key ring keeps the plain refusal — naming a rotation for an unknown file would be advice nobody could follow.
264
+ - An `ENDPOINT_SEMANTICS_UNRESOLVED` block is now answerable from the output alone. It used to end in `do: gateforge discover --json` — a read-only dump that changes nothing, so the documented agent loop (run the printed command, run `next` again) repeated the identical block forever on any repository whose handlers delegate to a service layer. `gateforge next` now prints the owner-authored `.gateforge/endpoints.json` rule for THAT endpoint (its own method and canonical path as the selectors, the two owner-chosen fields marked, their allowed values named — `crud-archive`/`crud-delete` on a DELETE, the closed compiler vocabulary otherwise), plus the `gateforge explain` command that proves the declaration applied. The snippet is the product's own schema, so a rule filled in from it parses and resolves the block; a rule left with a placeholder capability still fails closed at startup (exit 2) with the allowed values. `--json` gains the additive `endpointSemanticsGuidance` array and keeps its existing fields, and a repository with no unresolved endpoint prints nothing new.
265
+ - The documented verifier-key ceremony now creates the key ring the product actually reads. `QUICKSTART` step 6 (and the same block in `TEST-ENVIRONMENT.md` and `UPGRADE-0.6-to-0.7.md`) told a user to create `$HOME/.config/gateforge/keys.json` and export `GATEFORGE_WITNESS_VERIFIER_KEY_FILE` for it, while `gateforge key create` with no `--file` writes `${XDG_CONFIG_HOME:-$HOME/.config}/gateforge/verifier-keyring.json` and every later command — including `enforcement doctor`'s `verifier-key` check — reads that path. On any machine with a non-default `XDG_CONFIG_HOME` (most CI images) the documented command therefore produced a ring nothing read, and a second `key create` was needed that no guide mentioned. All three guides now run `gateforge key create --confirm` alone, say which file that creates, and say that `--file` is for a ring that really lives elsewhere (with the matching export). The CLI README names the same default path.
266
+ - The example app's "Gateforge first run" now says how to install Gateforge. It started at `gateforge init` and the only install instruction anywhere in the example tree was an error string inside `behavior/scripts/gate.mjs` — so a user of the reference app had to guess both that a CLI install comes first and which packages the app needs. The section now installs the CLI, the Playwright pack and the HTTP pack (the two packs its own configs load, pinned to one release, with the `GATEFORGE_PACKAGE_INCOMPATIBLE` consequence named), and — for a release that is not on the registry yet — the one command that installs the WHOLE pre-publish tarball set (`npm i -D ./gate-forge-*.tgz`), because installing a subset is exactly what leaves npm fetching a missing package from the registry. It ends by naming the project-local binary (`node_modules/.bin` on `PATH`, or `npx`).
267
+ - The check and test-gates reports now print the engine provenance the enforcement doctor prints, so one install no longer produces two contradictory claims. A tarball or directory install lands in `node_modules` exactly like a registry release, so the doctor was fixed to name the truth while the reports kept claiming `engine: 0.7.1 from registry` for the very same repository — and the false claim is the one a consumer's CI reads. The report renderer takes an optional `engineLine` used by the TEXT format only, computed from the same npm install metadata the doctor's line is; the receipt-bound `engine.source` is unchanged (a receipt is only valid for the engine that sealed it) and the json and SARIF documents keep `engine` verbatim.
268
+ - The run's scope line now calls the expected set what it is. A full-scope run opened with `scope: full (62 mapped tests)` in a repository that has no test map at all and no obligation to mark — the number is the discovered CATALOG the run plans to execute, not a count of declarations, so the one number a user reads to check whether their `tests mark` took effect told them they had mapped 62 tests when they had mapped none. The line reads `planned tests` (the same word the runner's own selector diagnostics already use); its shape, the `--scope changed` advice and the rest of the line are unchanged.
269
+ - A `plugins[].version` that does not match the detector now names the field, both versions and the fix, instead of only the contract it broke. Adding a pack the documented way — by hand-editing `.gateforge.yml` — and copying a sibling entry's `version:` made every command exit 2 with `signal contract violated`, a line that named neither the field to edit, nor the value the pack's detector actually declares, nor how to obtain it (the pack's npm version and its detector version are different numbers, which is the whole trap). The boundary message now carries the remedy — `set version: '<declared>' on the '<id>' entry in .gateforge.yml, or run \`gateforge init --plugins <id>\` to write the pin the installed pack declares` — and a signal claiming a different detector ID (which no version edit can repair) says so instead. The exit code is unchanged, and `CONNECT-YOUR-PROJECT.md` now shows one complete, correct `plugins:` entry with the rule.
270
+ - `gateforge init` now recognises a SQLModel table whose base is declared through another class, so the canonical FastAPI template stops being read as a repository with no data layer. The scan's needle required `SQLModel` written literally in the class head, so `class UserBase(SQLModel)` + `class User(UserBase, table=True)` — the layout the template itself ships — produced no `sqlalchemy` signal at all: `init` recommended `pack-fastapi, pack-http` and never `pack-sqlalchemy`, the one pack whose proof channel that persistence layer needs, and the run it wrote had nothing to grade a model against. The scan now resolves the base chain: a `table=True` class whose base reaches SQLModel through classes the same module declares, or through a name imported from a module that declares a SQLModel class, is a model, and the printed reason quotes the class head it found (`class User(UserBase, table=True)` in `backend/app/models.py`). A chain that never reaches SQLModel is never promoted.
271
+ - `enforcement doctor` and the run preflight no longer call a browser cache ready when the browser builds the run would launch are not in it. A supervised run launches the CONSUMER's Playwright — the package that resolves next to its own config, usually a different release from the hoisted one — and each release pins its own browser revisions in the `browsers.json` of the package it launches. Both surfaces only counted cache ENTRIES, so on a machine where another project had already installed a different Playwright they reported `[OK] runner: playwright installed; browsers installed (N entries)` and the first witnessed run then failed EVERY test with `Executable doesn't exist at .../chromium_headless_shell-<revision>/…`. The `runner` line of both surfaces now resolves the runner exactly as the run does (`@playwright/test` first), reads its own registry, and checks the builds the config's projects would launch (each named `browserName`, chromium plus its headless shell by default, skipped when the config turns headless off). A missing build is a `fail` naming the exact `npx playwright install <browsers>` and the directory that must run it (the one holding the config, so a sub-project's own install is fixed in place); all builds present keeps the historical wording plus the verified build names; a runner that ships no readable registry keeps its exact previous line. `TEST-ENVIRONMENT.md` gains the matching checklist rule.
272
+ - The response-field advisory no longer accuses the two shapes that are not model reads (after a run on a real FastAPI + React app produced only false positives). (1) Error-envelope reads: a branch that opens on the call's own envelope is read for its POLARITY and only its failure arm is dropped, because the body a failure branch reads (`res.data?.detail`) is the server's error envelope, never the success model. `if (res.ok)`, `if (res.ok === true)`, `if (res.status >= 400)`, `> 399`, `!== 200`, `!== 201`, `< 400`, `=== 200`, `<= 299` and their negations decide which arm runs, so the SUCCESS arm keeps its reads — `if (res.ok) setItems(res.data.items)` is the most common success path and is exactly where a dropped field hides — and a read after an early-return guard is still reported when the success model dropped the field. A compound condition (`!res.ok || res.status >= 500`), a comparison the pass cannot read (`>= Math.min(400, limit)`) and a `statusText` test are undecidable, so both arms are dropped. A ternary is the same guard as an `if` (`res.ok ? res.data.items : res.data?.detail` keeps the success arm); a ternary on anything else is not a guard, so both of its arms are ordinary reads. Independently, `@gate-forge/pack-fastapi` now always declares `detail` among a route's wire names, because FastAPI's own error body is `{"detail": …}`, so even a stray `detail` read outside a guard is never flagged. (2) Fallback chains: a read that is one operand of a `||` / `??` chain now carries that chain's index, and the check judges the chain as the ONE decision it is — `res.data?.invoice_id || res.data?.invoice?.id` is silent when the model declares `invoice_id`, because `invoice` is its defensive fallback; a chain in which no operand is declared is still reported whole. Nothing about the advisory's blocking behavior, its exit code or the byte-identity of a repository with no gap changed.
273
+ - A run can no longer be sealed against a witness that perturbs its timing, and a witness too old for run options can no longer pass for one that honored them. A NORMAL run against an external witness that was itself started with `GATEFORGE_CHAOS_SEED` was silently accepted, so a perturbed run could produce a receipt nobody could replay; it is now refused before any test runs (exit 2, one line naming the variable to unset). A witness that does not echo the options it was given is refused for `--chaos` (it would apply no schedule while reporting as if it had) and prints one plain line for twin coverage (it recorded no shapes while reporting twins that agreed). A normal run against a witness with no chaos plan — including one too old to have the schedule route, which answers 404 — is byte-identical to before: no chaos label, no extra output, the same exit code.
274
+ - A test-only re-seal now survives the runs a pipeline does in between. The parent's evidence was read out of the LIVE run state when the re-seal decided, so the first thing that rewrote `manifest.json` — a consumer's materialization pre-step, which drops the witness attestation envelope while leaving `receipt.json`, `run-record.json`, `records.json` and `claims.json` in place — took the envelope away and the re-seal refused with `its evidence carries no witness attestation envelope → changed-scope run`, exactly where the path matters most. The run that seals a receipt or writes a run record now retains its own records, claims and witness envelope in `.gateforge/test-gates/reseal-parent/`, atomically, replaced by the next run that seals a document there and cleared with the document it belongs to; the re-seal authenticates that copy (run id, input digest, `evidenceAttestationDigest` and the MAC under the consumer's keyring) and never falls back to the live documents, so a missing or tampered copy refuses with the same plain line. The copy is written only with `enforcement.reseal: true`, so a repository without the opt-in is byte-identical; no released key, code, exit code or receipt field changed.
275
+
276
+ - `gateforge run -- --changed --scope changed` no longer fails its own final step. The run sealed a receipt for the changed slice, then closed with a whole-repository `check --require-e2e`, which demanded evidence for every obligation the slice never meant to cover. A scoped run is now checked at the scope it sealed (`check --changed --require-e2e`, and the step line says so); every other run is checked whole, as before.
277
+ - `gateforge run -- … --witness-url <url>` no longer breaks its own run in the preflight. With an external witness the target base URL is that witness's observation proxy, which counts every exchange and refuses the run-context binding once it has seen one; the preflight's reachability probe went through it, so `test-gates` then failed with `refused run-context binding (HTTP 409)`. With `--witness-url` the target line now reads `not probed` (the witness attests the target itself); every other run probes exactly as before.
278
+ - `gateforge run` no longer refuses a repository whose Playwright is installed next to its config in a sub-directory (an `e2e/` project with its own `node_modules`, nothing at the root). The strict preflight looked only from the repository root upward, so it failed `runner: playwright is not installed` on a project whose supervised runs worked, and `gateforge run` stopped before the suite. The preflight and the doctor's Playwright line now resolve the runner where the supervised run does: next to the Playwright config first (`@playwright/test` before `playwright`), then from the root. A repository with a root install reads exactly as before.
279
+ - `example/workflow/server.js` now answers every request. A path it does not route used to fall out of the handler with the connection still open, so any liveness probe hung instead of getting an answer — and the witness's startup attestation (`GET /` must present the environment fingerprint) timed out and failed the whole run with `adapter target presents no 'x-gateforge-env-fingerprint' marker`. Unrouted requests are now `404 {"error":"not found"}`, like the `example/auth` and `example/webhook` servers already were. Every routed path, status and body is unchanged.
280
+ - A test-only re-seal now carries the parent's WITNESS EVIDENCE, not only its outcomes: the parent run's records and claims are retained (bound to the parent run's attestation, authenticated with the run's own keyring) and graded as the union with the re-run's own evidence, so an obligation only a carried test proved stays `satisfied` and `check --changed --require-e2e` exits 0 after the re-seal. Attribution is by the witness-issued test id, so a re-run test's parent record never survives; the receipt binds the union in the additive `carriedEvidenceDigest`, and `check --require-e2e` and the broker recompute the union from the retained documents and fail closed (`EVIDENCE_STALE`) when the state evidence is anything else. Before this, every re-sealed run graded what only a carried test had proved as `missing` and the next check failed on evidence the parent run had actually witnessed.
281
+ - Consecutive test-only re-seals now work end to end: a re-seal is itself a whole-suite proof (it names the parent it carried from and seals a `coveredObligationFingerprints` list covering the repository), so it can parent the next one. The run state retains the chain hop by hop in `.gateforge/test-gates/reseal-chain/` — each hop's parent receipt, that parent's execution result, the catalog the classification used, and the witness-issued records, claims and attestations of every contributing run — and a test no hop re-ran keeps its original proof. Three defects are fixed with it: the parent evidence was written over hop 1 and then shifted into hop 2 paired with the wrong document, so a second hop's envelope named a different run; a run that sealed no receipt left the chain behind, describing the parents of a receipt that was no longer there; and the carried count double-counted a test an inner hop had re-ran while the deeper runs' records were never authenticated, so the untouched spec graded `missing` on evidence three runs had witnessed. `check --require-e2e` and `broker commit` now walk the whole chain, authenticate every contributing run's envelope with their own keyring, and check the chain's carried total once against the receipt of record (`re-sealed receipt claims N carried test(s) but its chain holds M carried outcome(s)`). Before this, the second consecutive re-seal left `check --changed --require-e2e` failing on the untouched spec, or refused outright.
282
+ - `pack-sqlalchemy` now sees SQLModel models: `class Item(SQLModel, table=True)` — and the split-base style `class User(UserBase, table=True)` over a shared `SQLModel` base — becomes a `sqlalchemy.table` resource named by SQLModel's own rule (the lowercased class name, new `tablenameProvenance` value `sqlmodel-class-name`), with its `Field(primary_key=True)`/`Field(foreign_key="…")` facts read as columns. The `SQLModel` root is recognized by import provenance (including aliases) and the same denylist vetoes the declarative rules use, and a `Field` call counts only when the file imports it from `sqlmodel`. A SQLModel class WITHOUT `table=True` (or with `table=False`) is not a table and is invisible in every channel, instead of claiming a name derived at runtime. Everything else about declarative detection, the unresolved codes, and the exit codes is unchanged.
283
+ - `--scope changed` in a merge-request CI pipeline with no base commit no longer falls back to the local staged diff (zero changed files, and a failure an hour later on debt nobody changed). `test-gates --scope changed` and `check --changed` refuse in seconds with exit 2 and the fix; an explicitly configured provider, a pipeline that is not a merge request, a present base commit, and every local run are unchanged.
284
+ - A run killed at the wrong moment (a CI container exiting while the witness shuts down) no longer leaves an empty `manifest.json`. The witness and the CLI write every run-state document to a temporary file and replace the old one by rename, so a later `check` sees the previous document or the new one, never a truncated file that fails closed with `no evidence attestation envelope found`.
285
+ - A consumer's Playwright config that prints at load time (a `dotenv`/`dotenvx` banner, a stray `console.log`) no longer breaks native test enumeration with "produced unparseable output". The JSON reporter's report is now read from the reporter's own output file — a channel stdout noise cannot corrupt — and is never guessed out of the child's output stream. When a run genuinely produces no readable report, the error says so and shows the runner's own output, instead of blaming the first stdout line.
286
+ - The pack's own pinned `playwright` no longer outranks the consumer's `@playwright/test`, so enumerating a project whose runner version differs from the pack's pin works instead of dying with the two-versions-of-@playwright/test conflict. The consumer's runner CLI is resolved from the config file's directory upward (nearest install first, `@playwright/test` before the bare `playwright` pin), and the pack's pin is the fallback. When a real version conflict survives that, the reported cause names BOTH versions and says what it is, instead of a "missing test dependency" that nothing is missing for.
287
+ - A checked-in symlink whose target does not exist yet (a link into a virtualenv the project has not bootstrapped) no longer makes `next` and `check` exit 2. The link is captured exactly the way git records it — a `dangling-symlink` entry bound to its link text alone, never followed and never read — so the run continues and one plain `note:` line names the link and its target. The entry still moves the evidence digest: retargeting the link, or the target appearing after the bootstrap, changes its identity and its type. A symlink that escapes the repository and a submodule still fail closed exactly as before.
288
+ - A checked-in symlink whose target is a DIRECTORY (the same virtualenv-skill shape, once the project's own bootstrap has run) no longer makes `next` and `check` exit 2 either. Such a link is captured the way a dangling one is — a `directory-symlink` entry bound to its link text alone, never walking the target, which can be an entire virtualenv — and one plain `note:` line names the link and says no action is needed; a dangling link's line now carries its fix as `do:` text. The entry moves the evidence digest when the link is retargeted and when the target becomes a regular file. A link escaping the repository, a link to a fifo/socket/device, and a submodule still fail closed exactly as before.
289
+ - Every `gateforge next` action is runnable as printed. The plane-classification guidance for an endpoint with no resolved plane prints `gateforge init --planes` FIRST, because the `classify plane` command below it exits 2 without the owner-reviewed `.gateforge/planes.json`; the single printed action could therefore never succeed. `init --planes` now honors an explicit `--planes` on a repository the language scan does not read as Python (it used to be a silent no-op there, which is exactly where the guidance is printed), and it writes the reviewed file even when no rule can be inferred — a file with zero rules declares no plane, which is what the classifier already assumes while the file is absent. Inference still never guesses, and an existing reviewed file is still left untouched.
290
+ - `init --plugins` on an already-initialized repository now does what the tip printed by every `init` promised: it ADDS the requested bundled detectors to `.gateforge.yml`. The merge is additive — an entry that is already there keeps the owner's own version pin, transport and module, nothing is ever removed, and every other key, comment and edit in the file is preserved. The merged document is checked against the pinned config schema before anything is written, and the run prints exactly which detectors it added. A config with no `plugins:` list to add to is refused with the shape to write by hand, never silently ignored.
291
+ - A non-blocking mode no longer prints a bare `exit code: 1` while the process exits 0. The text report's own exit-code line always carries the strict result, so when a mode softens it, the line is now labelled `would exit 1 in blocking mode` — the same fact, named as what it is — and a CI log or an agent reading the report can no longer read it as the process's code. `strict` mode keeps the exact line it always printed, the JSON document is unchanged (it already carried `strictness`), and every exit code is unchanged.
292
+ - The static test scanner no longer reports a false `EISDIR` parse error against a consumer's own source when a file and a directory share a name (`src/client/` next to `src/client.gen.ts`, imported as `./client`). Specifiers now resolve the way node/TS resolve them — a regular file first, then a directory's `index.*` — and a path that is not a regular file is never read as one, so such a repository no longer flips to an incomplete inventory.
293
+ - `gateforge init` recommends the detector packs the repository actually shows evidence for. A SQLModel table model (`class Item(SQLModel, table=True)`, the canonical FastAPI-template model style the declarative-base needles never matched) and a generated API client (a generator banner or generated-client runtime import in a js/ts file, or a shared `axios.create` instance) now produce the `sqlalchemy` and `http-clients` signals that recommend `pack-sqlalchemy` and `pack-http`. Evidence is read from file text only — a directory merely named `client` justifies nothing. Every recommended pack is printed with one `why:` line naming the concrete file evidence behind it, and a pack in the list only because of the language default says so.
294
+ - A headless `gateforge init` (an agent or CI) states its goal choice ONCE. The written preset and the flag that changes it now travel on one line — `no terminal: writing the light preset (report everything, block nothing) — a human must choose the goal: re-run with --preset <light|normal|strict> …` — and the closing summary no longer restates the same choice twenty lines later in different words. What the run wrote (`mode:`, hooks, `undo:`) is still reported, an existing `.gateforge.yml` still gets the "kept your own config" wording on that one line, and the goal table and an owner-chosen preset are unchanged.
295
+ - The files `gateforge init` scaffolds now point only at files a consumer install actually has. The overlay README's fixture shape was `example/e2e/accounts-crud-journey.spec.js` — a path inside the Gateforge monorepo, shipped to nobody, so the one scaffolded file that explains how to write a proof test pointed at nothing. `@gate-forge/pack-playwright` now ships `examples/overlay-proof.spec.js`: a complete, runnable proof test with a full surface descriptor and the witnessed `evidence.ui.*` → `visible.confirm` → `http.observe` → `persistence.verify` → `finalize` sequence, and the scaffold names it at its installed path. The two setup guides `GATEFORGE.md` names are given the same treatment (`node_modules/@gate-forge/cli/guides/…`, the layout the CLI package ships). A test now resolves both scaffolds' named paths against the real packed tarball layouts (`npm pack --dry-run --json`), so a path that stops shipping breaks the suite instead of a first run.
296
+ - The shipped docs name only commands and flags that exist. `gateforge init --help` now lists the negative forms the parser has always honored — `--no-blocking`, `--no-pre-commit`, `--no-planes` (alongside the existing `--no-ci`) — so the `--no-blocking` in `example/README.md` is a documented flag rather than a mystery that merely exits 0, and the CLI README's `init` row lists the same set. `guides/RUNNER-NEUTRAL-EVIDENCE.md` no longer tells a reader to run `gateforge doctor` (no such command; it exits 2 with `unknown command 'doctor'`): it names `gateforge enforcement doctor`, whose `runner` check really does report what the guide claimed — the `vitest`/`cypress` config file and installed package, an installed `playwright`, or a configured `diagnostics.suites` entry plus `pytest` on `PATH` — and states that it is diagnostic-only (exit 0 either way). `example/README.md` gained a "Where the witnessed run lives" section: the root project is the static-`check` demo (with the exact `check --require-e2e` no-receipt line), the witnessed project is `behavior/`, and its `tests discover` / `tests suggest` / `test-gates --changed` commands are given with their observed output — including that the run does not seal a receipt in a fresh copy today and prints a `gateforge explain <test>` line per failing test.
297
+ - Route attribution in the behavior grader no longer fails on a host's own parameter spelling. The compiled route inventory carries each endpoint's path in the framework's grammar (Express `:id`, FastAPI/Next `{id}`), but the grader's positional matcher only understood the engine's own `{}` slot, so a witnessed `POST /admin/accounts/acc-3` never resolved against the declared `POST /admin/accounts/:id` and every effect proof for such a route came back `invalid` with `BEHAVIOR_BINDING_MISMATCH` — a silently unprovable route, not a fail-closed one. `pathMatchesShape` now treats `{}`, `:name` and `{name}` as the same single-segment slot (still positional, still case-sensitive, never zero or many segments, `{*}` still trailing-only), which is the same normalization the witness-side route registration already performed. Literal, wildcard and ambiguity behavior is unchanged.
298
+ - `example/behavior` now gates green on a fresh copy with ONE command: `npm run gate` picks a free loopback port, creates a runtime verifier key ring outside the repository (mode 0600, in the OS temp dir, contents never printed), starts the reference app, runs `tests discover` + `test-gates --changed` + `check --require-e2e`, stops the app, removes the key ring, and exits with the check's status. This closes the last setup gap in the example: a supervised `test-gates` run never loads the consumer Playwright config, so its `webServer` never started the app and the app, the fingerprint, the fixture provider and the verifier key all had to be wired by hand.
299
+ - The behavior reference app declares and proves every route it exposes, so a fresh copy reaches `10 obligation(s) — 10 satisfied` and a sealed receipt instead of 20 blocking entries. The seven read routes are declared as `http:read-result-verified` cases that each drive their OWN route (the engine re-resolves every observed path against the declared endpoint, so a case that reads a different route is correctly rejected), not as dispositions or waivers. Its read handlers now name the resource they serve (`accountsListApiHandler`, `importAccountsCreateHandler`, …), which is the handler-name evidence the endpoint compiler requires before it will link a route to a business resource — name coincidence alone never links, so the previous names blocked with `ENDPOINT_RESOURCE_LINK_UNRESOLVED`. The engine-side fixture provider is excluded from the product scan scope in both `.gateforge.yml` and `classification-policy.yml`: its HTTP calls provision fixture subjects, and classifying them as product frontend reported the engine's own traffic as unresolved application call sites.
300
+ - Witnessed observe evidence no longer goes ambiguous when two tests create the same resource at the same time (parallel test files/workers are the normal case). A create is now attributed to the entity its OWN proxied response named, verified against the witness's after-list, so concurrent observed creates each resolve their own entity. A new entity that no observed response names — a writer outside the observation proxy — still makes the creation ambiguous and the obligation stays blocking; the unobserved-writer case is unchanged and fail-closed.
301
+ - A vitest project's second test of a file no longer waits for the runner's main process to report the first one. The end of a test now reaches the drain from the worker that ran it — in the same order as that worker's own begin — which releases that worker's session slot; the runner's own end still seals the session with the observed outcome, and only the runner ever states a verdict. A release credits nothing: submissions and the session proxy stop at the release, an outcome that never arrives leaves the session outcome-less (it grades not-passed), two different outcomes for one test are a lifecycle conflict, and an outcome with no begin still fails closed.
302
+ - A `--scope changed` run no longer blocks on affected obligations the run's own grading forgives through the adopted baseline: they are reported in one line (`N affected obligation(s) have no declared mapping and are forgiven by the adopted baseline; they stay uncovered by this slice`) and stay inside the sealed covered set, so `check --require-e2e` still demands what the full path grades. An obligation the baseline never adopted still blocks (shrink-only, fail closed), and strict E2E forgives nothing, so its behavior is unchanged. Before this, a repository that had adopted its unmapped obligations could not run a changed slice at all: the same debt the full run forgave blocked the narrow one with `EVIDENCE_SCOPE_INCOMPLETE`.
303
+ - Every re-seal refusal line now ends in what actually happens next: `→ changed-scope run`. The re-seal path is attempted only under `--scope changed`, so a refusal always falls through to the ordinary changed-scope run (a `scope: changed` receipt), never a full run. Before this, each refusal claimed `→ full run` while the run continued through the plain changed-scope path.
304
+ - The re-seal import scan no longer refuses on things that load nothing: a source file with non-ASCII text is read in full (object sizes are bytes, and the batch is now cut by bytes, not characters — before, the next file's header leaked into it and it "did not parse"), a local re-export `export { x };` is not an import, and a computed Python import only matters when a Python file changed (and a computed JS/TS import only when a non-Python file changed), because imports never cross that boundary. A real computed specifier in the changed file's language family still refuses, and a missing or truncated object in the batch now refuses instead of reading as an empty file.
305
+ - A static discovery row can no longer come from a file Git ignores. With the frontend of the FastAPI full-stack template built, `gateforge tests discover` planned 67 rows while Playwright enumerated 62: five came from `test(`-shaped methods inside the minified, git-IGNORED bundle in `backend/app/frontend/assets/`. The runner can never enumerate a test in a build output, so each of those rows sealed as a permanent `unenumeratedReason` gap and the run could not reach `inventoryComplete` even with every real test passing. Static candidates inside a Git work tree are now filtered through Git's own ignore rules in one batched query, so the same command plans 62 rows and reports `inventoryComplete=true`. A TRACKED file that matches an ignore pattern is still scanned and still fails closed as an unresolved row, and an untracked but NOT-ignored spec is still planned (a new spec must reach the plan before it is committed). Outside a work tree — plain fixture directories, or git unavailable — every candidate is kept exactly as before, and native `playwright --list` rows are untouched.
306
+
307
+ ## 0.7.1
308
+
309
+ ### Added
310
+
311
+ - Docs: quickstart, test-environment and upgrade guides ship inside @gate-forge/cli.
312
+ - Build: workspaces build in dependency order, so a clean clone builds and publishes.
313
+
314
+ ## 0.7.0
315
+
316
+ ### Added
317
+
318
+ - Added existing-test discovery, suggestions, declarations, and the `gateforge tests surface-doctor` diagnostic.
319
+ - Added `gateforge key create|import-env|rotate|retire` for external verifier-key rings.
320
+ - Added `gateforge test-gates --changed --scope changed --result-only`; external-witness runs require a separate non-authoritative `--out` and never touch receipts.
321
+
322
+ ### Changed
323
+
324
+ - `check` combines `.gateforge/test-map.yml` with optional `claimInventory` from a receipt authenticated for current inputs; `claims.json` alone does not declare claims.
325
+ - Docs exclusions use exact repo-relative folders via `gateforge init --docs-exclude`; a matching external `GATEFORGE_APPROVED_POLICY_DIGEST` is required, and recognized manifest/lockfile basenames remain protected.
326
+ - Trusted Playwright configuration maps `appBaseUrl` to `use.baseURL` and `storageState` to `use.storageState`.
327
+ - The Playwright package guard checks the supervised protocol contract and returns exit 2 with `GATEFORGE_PACKAGE_INCOMPATIBLE` on mismatch.
328
+ - `init --blocking` installs and verifies an active pre-commit hook and writes CI gate wiring.
329
+
330
+ ### Fixed
331
+
332
+ - A linked raw/witnessed twin pair that ran but could not be compared is no longer silent. When one side sent no request through the witness — most often a raw twin written as a plain Playwright test, which opens no witness session — the run prints `test-gates: twin pair not compared: the raw test '…' sent no request through the witness` and how to make it observable (run the raw twin with the Gateforge test fixture), instead of reporting no divergence as if the twins agreed.
333
+ - A flag given three or more times keeps every value. `test-gates --test a --test b --test c` used to fuse the first values into one comma-joined selector (`'a,b'`), so naming three or more tests always failed with `TEST_SELECTOR_UNKNOWN`; the same applied to every other repeatable flag.
334
+ - Installing `@gate-forge/witness` no longer pulls in `bullmq` and `ioredis`, and loading it no longer needs them. The queue observer imported them at load time, so every witnessed run of a project without them (every project without a queue) died at start with `Cannot find package 'bullmq'`. They are now optional peers, loaded only when `.gateforge.yml` declares `queueObserver: { kind: bullmq }`; a project that declares it without them fails closed with the install command.
335
+ - The shipped `example/` project checks clean again with its new `webhook/` sub-project: that sub-project's engine-side modules (its evidence adapter, gate script and fixture provider) are excluded from the frontend call scan, like `behavior/`'s.
336
+ - The twin title convention now links the way pairs are usually written: `X [witnessed]: <what it proves>` next to `X raw: <what it does>`. Before, only an exact `X raw` (or a bare `X`) title linked, so a suite that labels both sides and then describes each one got no twin comparison at all and had to spell every pair out with `twinOf`. An exact `X raw` still wins; two described raw tests under one label link nothing (the owner names that pair with `twinOf`).
337
+ - A test-only re-seal now carries the evidence of natively claimed tests. Their records are stamped with the id the runner gave the test while it ran, which is not the enumerated catalog id when the trusted config lives in another directory, so the carry matched none of them: the re-sealed receipt said `carriedEvidence: true` while it carried no parent record, and `check --require-e2e` reported every carried test's obligations `missing` (it never passed wrongly). The execution result's outcomes now keep the runner's own id in the additive `runnerTestId`, and the carry uses it next to the logical key and the catalog id. A re-run test's parent records still never survive.
338
+ - Witness startup waits for the reported proxy URL before proceeding.
339
+ - Fixed a shared-distribution witness spool race between concurrent runs.
340
+
341
+ ## 0.6.3 and older
342
+
343
+ Earlier release history is available in the repository's git tags.