@gate-forge/cli 0.12.0 → 0.13.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.
- package/CHANGELOG.md +226 -0
- package/README.md +10 -1
- package/dist/adopted-baseline.d.ts.map +1 -1
- package/dist/adopted-baseline.js +13 -0
- package/dist/adopted-baseline.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +5 -3
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +338 -5
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/baseline.d.ts.map +1 -1
- package/dist/commands/baseline.js +60 -24
- package/dist/commands/baseline.js.map +1 -1
- package/dist/commands/explain.d.ts.map +1 -1
- package/dist/commands/explain.js +67 -2
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +57 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/next.d.ts.map +1 -1
- package/dist/commands/next.js +41 -4
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/test-gates.d.ts.map +1 -1
- package/dist/commands/test-gates.js +195 -8
- package/dist/commands/test-gates.js.map +1 -1
- package/dist/detector-trust.d.ts.map +1 -1
- package/dist/detector-trust.js +2 -0
- package/dist/detector-trust.js.map +1 -1
- package/dist/execution.d.ts +6 -5
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +16 -0
- package/dist/execution.js.map +1 -1
- package/dist/page-obligations.d.ts +21 -0
- package/dist/page-obligations.d.ts.map +1 -0
- package/dist/page-obligations.js +123 -0
- package/dist/page-obligations.js.map +1 -0
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +9 -0
- package/dist/pipeline.js.map +1 -1
- package/dist/route-plane-proposals.d.ts.map +1 -1
- package/dist/route-plane-proposals.js +1 -0
- package/dist/route-plane-proposals.js.map +1 -1
- package/guides/CONNECT-YOUR-PROJECT.md +41 -0
- package/guides/QUICKSTART.md +33 -7
- package/guides/REFERENCE.md +206 -3
- package/package.json +11 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-plane-proposals.js","sourceRoot":"","sources":["../src/route-plane-proposals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAwB,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAgC,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAE/D,qEAAqE;AACrE,MAAM,MAAM,GAA+B,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AA6B1E,4DAA4D;AAC5D,SAAS,OAAO,CAAC,UAA6C;IAC5D,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC;AACjE,CAAC;AAED,gFAAgF;AAChF,SAAS,WAAW,CAAC,MAAc;IACjC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAA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AAC,IAAI,CAAC,cAAc,CAAC;SACtD,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -421,6 +421,47 @@ When the origins disagree, the witness's zero-traffic note now names both —
|
|
|
421
421
|
the origin the page really requested and the one Gateforge routes — instead of
|
|
422
422
|
guessing at the fixture page alone.
|
|
423
423
|
|
|
424
|
+
### 6c. Let existing journeys prove pages
|
|
425
|
+
|
|
426
|
+
The React Router reader creates `page:loads` and `page:data-ok` promises from
|
|
427
|
+
the application's route declarations. Rebasing the shared `test` object in 6a
|
|
428
|
+
onto `@gate-forge/pack-playwright/fixture` is what lets those existing
|
|
429
|
+
journeys prove their page visits; keep their route assertions and test bodies.
|
|
430
|
+
The test channel (`observed`) is primary. After the tests, Gateforge's own
|
|
431
|
+
referee visits only page obligations without a clean test record (`swept`).
|
|
432
|
+
Both channels use the same grader. An audience with a `session:` file needs
|
|
433
|
+
one the suite does not consume: a rotating refresh token turns a consumed
|
|
434
|
+
session into `PAGE_AUDIENCE_SESSION_INVALID` sweep refusals — mint a
|
|
435
|
+
sweep-only session file.
|
|
436
|
+
|
|
437
|
+
Declare the router, login route, audience guard, error markers and seeded
|
|
438
|
+
values for dynamic paths in `.gateforge.yml`:
|
|
439
|
+
|
|
440
|
+
```yaml
|
|
441
|
+
pages:
|
|
442
|
+
router: react-router
|
|
443
|
+
audiences:
|
|
444
|
+
- name: tenant
|
|
445
|
+
loginRoute: /login
|
|
446
|
+
guard: ProtectedRoute
|
|
447
|
+
errorMarkers: ['Something went wrong']
|
|
448
|
+
params:
|
|
449
|
+
'/orders/:id': { id: 'seeded-order-id' }
|
|
450
|
+
exclude: []
|
|
451
|
+
sweep: true
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Use seeded IDs for `pages.params`; if one was not configured, Gateforge may
|
|
455
|
+
bind a unique engine-observed create ID only when it matches the route's
|
|
456
|
+
resource. Ambiguous or unmatched IDs produce `PAGE_PARAM_UNBOUND` and are
|
|
457
|
+
never guessed. Setting `pages.sweep: false` keeps gaps unproven instead of visiting
|
|
458
|
+
them. Tests and imported helpers must not mutate browser APIs to manufacture
|
|
459
|
+
page state: `page.evaluate`/`setContent`, `addInitScript`, `page.route`,
|
|
460
|
+
`context.route`, `route.fulfill`, and direct CDP sessions trigger
|
|
461
|
+
`PAGE_OBSERVATION_TAMPER_RISK`; remove those edits rather than treating the
|
|
462
|
+
page as proved. See [Pages](REFERENCE.md#pages) for the report and
|
|
463
|
+
`explain`/`next` diagnostics.
|
|
464
|
+
|
|
424
465
|
## 7. First run
|
|
425
466
|
|
|
426
467
|
```bash
|
package/guides/QUICKSTART.md
CHANGED
|
@@ -24,11 +24,11 @@ Example for a React frontend, FastAPI backend, and SQLAlchemy data layer:
|
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
26
|
npm i -D \
|
|
27
|
-
@gate-forge/cli@0.
|
|
28
|
-
@gate-forge/pack-playwright@0.
|
|
29
|
-
@gate-forge/pack-http@0.
|
|
30
|
-
@gate-forge/pack-fastapi@0.
|
|
31
|
-
@gate-forge/pack-sqlalchemy@0.
|
|
27
|
+
@gate-forge/cli@0.13.1 \
|
|
28
|
+
@gate-forge/pack-playwright@0.13.1 \
|
|
29
|
+
@gate-forge/pack-http@0.13.1 \
|
|
30
|
+
@gate-forge/pack-fastapi@0.13.1 \
|
|
31
|
+
@gate-forge/pack-sqlalchemy@0.13.1
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Use the project-local `gateforge` binary from your npm script or add `node_modules/.bin` to your shell `PATH`. If the scan recommends other packs, add only the ones your code uses, at the same version. A mismatched Gateforge package contract can stop the CLI with exit code 2 and `GATEFORGE_PACKAGE_INCOMPATIBLE`.
|
|
@@ -49,7 +49,7 @@ This installs every pack of the release; the scan still recommends the ones your
|
|
|
49
49
|
|
|
50
50
|
**You should see:** npm installs the packages without a Gateforge compatibility error.
|
|
51
51
|
|
|
52
|
-
**If not:** align every direct `@gate-forge/*` package to `0.
|
|
52
|
+
**If not:** align every direct `@gate-forge/*` package to `0.13.1`, then install again. Do not work around the compatibility error.
|
|
53
53
|
|
|
54
54
|
## 2. Pick a goal
|
|
55
55
|
|
|
@@ -216,6 +216,32 @@ gateforge tests mark \
|
|
|
216
216
|
|
|
217
217
|
**If not:** rerun discovery, copy the exact test key and obligation ID, and resolve any mapping contradiction. Do not use a declaration to silence a blocker.
|
|
218
218
|
|
|
219
|
+
### Frontend page promises
|
|
220
|
+
|
|
221
|
+
With the React Router reader configured, every detected page adds `page:loads`
|
|
222
|
+
and `page:data-ok` promises. Existing tests can prove a route by using
|
|
223
|
+
Gateforge's Playwright fixture; after the suite, the referee visits only pages
|
|
224
|
+
without a clean test record. Add seeded IDs for dynamic pages and keep the
|
|
225
|
+
sweep enabled:
|
|
226
|
+
|
|
227
|
+
```yaml
|
|
228
|
+
pages:
|
|
229
|
+
router: react-router
|
|
230
|
+
audiences:
|
|
231
|
+
- name: tenant
|
|
232
|
+
loginRoute: /login
|
|
233
|
+
guard: ProtectedRoute
|
|
234
|
+
params:
|
|
235
|
+
'/orders/:id': { id: 'seeded-order-id' }
|
|
236
|
+
sweep: true
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
An unbound parameter produces `PAGE_PARAM_UNBOUND` and stays unproven; no
|
|
240
|
+
identifier is guessed. `pages.sweep: false` leaves pages no test opens as
|
|
241
|
+
unproven. See [Pages in the reference](REFERENCE.md#pages) and
|
|
242
|
+
[Connect your project](CONNECT-YOUR-PROJECT.md) for fixture migration and
|
|
243
|
+
tamper restrictions.
|
|
244
|
+
|
|
219
245
|
### Write your rules down
|
|
220
246
|
|
|
221
247
|
Product statements the owner wants proved — "an invoice can only be
|
|
@@ -458,7 +484,7 @@ the registry. To gate a release that is not on the registry yet (a local
|
|
|
458
484
|
regenerate:
|
|
459
485
|
|
|
460
486
|
```sh
|
|
461
|
-
GATEFORGE_CI_ENGINE_SOURCE=vendor/gate-forge-cli-0.
|
|
487
|
+
GATEFORGE_CI_ENGINE_SOURCE=vendor/gate-forge-cli-0.13.1.tgz \
|
|
462
488
|
gateforge enforce --ci github
|
|
463
489
|
```
|
|
464
490
|
|
package/guides/REFERENCE.md
CHANGED
|
@@ -22,6 +22,7 @@ first commands; the guides cover the walks:
|
|
|
22
22
|
- [Enforcement](#enforcement)
|
|
23
23
|
- [Contract capabilities](#contract-capabilities)
|
|
24
24
|
- [Configuration](#configuration)
|
|
25
|
+
- [Pages](#pages)
|
|
25
26
|
- [Classification policy (`.gateforge/classification-policy.yml`)](#classification-policy-gateforgeclassification-policyyml)
|
|
26
27
|
- [Plugin invocation](#plugin-invocation)
|
|
27
28
|
- [Endpoint plane rules (the `planes:` section)](#endpoint-plane-rules-the-planes-section)
|
|
@@ -71,8 +72,8 @@ first commands; the guides cover the walks:
|
|
|
71
72
|
| `gateforge enforcement doctor [--json]` | Reports verified enforcement `level` (0–3), hook activation, wired CI templates, and read-only GitHub/GitLab branch-protection results; missing credentials or uncertain responses remain `not verified`. A local hook never counts as server protection. Its `engine:` line reports the install provenance npm's own metadata proves: a tarball/directory install (read from `node_modules/.package-lock.json`, or the manifest's `_resolved`) is named as such instead of claiming the registry, and an install with no readable metadata is reported as unproven rather than as an all-clear. The receipt's `engine.source` is receipt-bound and keeps its meaning. Diagnostic only: exit 0 whenever it runs. | 0/2 |
|
|
72
73
|
| `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 itself consumes `--env-file <path>` (and `--env-file-if-exists <path>`) anywhere in argv — it reads the file and exits 9 on a missing one, so the CLI would never run. The digest is the one the commit gate computes: the index is frozen and materialized exactly as `check --staged` does, and the entries are hashed by the same function. It refuses when a policy input is not fully staged, naming the files. Preview by default — the line it would write, nothing written. `--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 the file mode `0600`. A path inside the repository is refused: the pin must live outside the candidate, because a candidate-controlled file cannot approve policy. A symlink or a non-regular file is refused too (fail closed). | 0/2 |
|
|
73
74
|
| `gateforge enforce [--ci github\|gitlab]` | Add blocking wiring to an initialized repository. The provider defaults to GitLab unless GitHub is the only detected CI provider; the explicit flag selects GitHub Actions or GitLab CI. Appending to an EXISTING `.pre-commit-config.yaml` is announced as an action on one line, naming the file as the repository's own and printing the exact way back (`git restore -- .pre-commit-config.yaml` for a tracked file; for an untracked one, which has nothing to restore, the line says to delete the appended entry). The generated GitHub workflow installs `@gate-forge/cli@<version>` from the registry unless `GATEFORGE_CI_ENGINE_SOURCE` is set when the generator runs: it then installs that one npm specifier (a `.tgz` path, a directory, or any specifier) through the step environment, for a release that is not on the registry. Unset the variable and rerun for the registry install. | 0/2 |
|
|
74
|
-
| `gateforge adopt` | Adopt an EXISTING repository: run it once, after `init`, on a project that already has code and therefore already has findings. Records today's blocking findings (pin-#2 obligation fingerprints, blocking entries, and the classification-blocked resource identities) into `.gateforge/baselines/obligations.json`, sanctioned by a dated, count-annotated receipt `.gateforge/baselines/adoption.json` — without that receipt a baseline forgives nothing — then applies the blocking wiring through the same idempotent path as `init --blocking`. It is the ONE sanctioned bulk-add and only once per repository: a second `adopt` is a no-op success. The recorded set is shrink-only (`gateforge baseline update` shrinks it) and never forgives new work. With `enforcement.strictE2E: true`, a baselined E2E obligation is not proof and blocks with `ENFORCEMENT_UNTRUSTED` again as soon as a change touches it. `adopt --help` prints this contract. | 0/2 |
|
|
75
|
-
| `gateforge baseline update <fp...>` | Shrink the baseline to a strict subset (invariant 4). | 0/2 |
|
|
75
|
+
| `gateforge adopt` | Adopt an EXISTING repository: run it once, after `init`, on a project that already has code and therefore already has findings. Records today's blocking findings (pin-#2 obligation fingerprints, blocking entries, and the classification-blocked resource identities) into `.gateforge/baselines/obligations.json`, sanctioned by a dated, count-annotated receipt `.gateforge/baselines/adoption.json` — without that receipt a baseline forgives nothing — then applies the blocking wiring through the same idempotent path as `init --blocking`. It is the ONE sanctioned bulk-add and only once per repository: a second `adopt` is a no-op success. The recorded set is shrink-only (`gateforge baseline update` shrinks it) and never forgives new work. With `enforcement.strictE2E: true`, a baselined E2E obligation is not proof and blocks with `ENFORCEMENT_UNTRUSTED` again as soon as a change touches it. `adopt --help` prints this contract. `adopt --family pages [--confirm]` revises an ALREADY-adopted repository for the 0.13 pages rollout: preview by default (nothing written), `--confirm` records a dated, commit-referenced `families.pages` marker in the existing receipt with ONE atomic write — every page obligation discovered at that moment (proven pages included), with only the then-missing/unproven page fingerprints marked forgiven — and a page obligation the ORIGINAL receipt already indexed is recorded, never re-adopted; the baseline document is untouched, so no crash can expose unrecorded forgiveness. The marker is permanent: a repeat records nothing (new pages are new work to prove), the family debt shrinks via `baseline update --family-pages` while the marker is retained, and a page whose audience or data plane is unresolved refuses the migration. Because the receipt is part of the approved policy revision, a confirmed migration changes the trusted-policy digest — strict gates stay untrusted until the owner repins outside the candidate. A plain `adopt` on a repo with `pages:` configured records the family marker in the receipt it already writes with an EMPTY `forgiven` set — the page debt rides the baseline bulk-add under the ordinary shrink contract (one forgiveness store), so the family is then already adopted. | 0/2 |
|
|
76
|
+
| `gateforge baseline update <fp...>` | Shrink the baseline to a strict subset (invariant 4). `--classification-blocked <resourceId>...` shrinks the adopted classification layer the same way (keep-semantics; `=` keeps none). `--family-pages <fingerprint>...` shrinks the receipt's `pages` family `forgiven` list the same way (`--family-pages=` keeps none): the set is shrink-only, unknown fingerprints fail closed, and the family marker itself (dates, commit, every recorded page obligation) is retained. | 0/2 |
|
|
76
77
|
| `gateforge baseline diff <before> <after>` | Compare adopted obligations by ID without printing fingerprints. | 0/2 |
|
|
77
78
|
|
|
78
79
|
On a repo that already has Gateforge files, `init` reports only what THAT run did: it keeps an existing `.gateforge.yml` and says so instead of claiming to write a preset, and the `undo:` lines it prints name every path the run created (`rm -rf`) and every file it changed in place (`git restore --`, for an appended `.gitlab-ci.yml` include, an appended `.pre-commit-config.yaml` entry, or an added ignore rule) — so following them can never delete pre-existing config, baselines, waivers, hooks or CI files, and a run that changed nothing prints no undo line at all. A preset that wires no local hook says whether your existing commit hook and/or CI job still decide what blocks your commits.
|
|
@@ -809,6 +810,51 @@ change the owner re-approves, never something a candidate grants itself.
|
|
|
809
810
|
lenient default like every other configuration; declare `strict` in
|
|
810
811
|
`.gateforge.yml` to keep the 0.10.3 treatment.
|
|
811
812
|
|
|
813
|
+
### The pages family (adopting page debt into an already-adopted repo)
|
|
814
|
+
|
|
815
|
+
A repository that adopted BEFORE the 0.13 pages rollout has a receipt with
|
|
816
|
+
no pages family, so newly discovered page debt blocks. The one
|
|
817
|
+
owner-approved exception to the one-bulk-add invariant is a NAMED family
|
|
818
|
+
migration: `gateforge adopt --family pages` previews it (nothing
|
|
819
|
+
written), `gateforge adopt --family pages --confirm` records it. The
|
|
820
|
+
migration is valid ONLY for an already-adopted repository (it never
|
|
821
|
+
seeds a receipt), and it performs ONE atomic write to the EXISTING
|
|
822
|
+
`.gateforge/baselines/adoption.json`: a dated, commit-referenced
|
|
823
|
+
`families.pages` marker that records EVERY page obligation discovered at
|
|
824
|
+
that moment — proven pages included — with only the then-missing/unproven
|
|
825
|
+
page fingerprints marked `forgiven`. The baseline document is never
|
|
826
|
+
touched, so there is no two-file window in which the old receipt could
|
|
827
|
+
forgive fingerprints the new record has not sanctioned; the evaluator
|
|
828
|
+
forgives the family's `forgiven` set from the receipt alone.
|
|
829
|
+
|
|
830
|
+
The marker is permanent: a repeat records nothing, a page route
|
|
831
|
+
discovered after the migration is new work to prove (never re-adopted
|
|
832
|
+
debt), and a page that was already proven at migration time and breaks
|
|
833
|
+
later blocks — it was recorded, not forgiven. The same guard reads the
|
|
834
|
+
EXISTING receipt backwards: a page obligation id the original adoption
|
|
835
|
+
already indexed (an earlier snapshot's plain `adopt` that already knew
|
|
836
|
+
pages, with no family marker) is recorded in the marker but NEVER
|
|
837
|
+
re-adopted — proven there stays proven (a later break blocks), resolved
|
|
838
|
+
stays resolved (a shrink is not undone), and only page obligations the
|
|
839
|
+
original receipt never knew are sanctioned. A receipt that predates page
|
|
840
|
+
indexing carries no page ids, so the genuine first pages rollout is
|
|
841
|
+
unaffected. Family debt shrinks
|
|
842
|
+
through `gateforge baseline update --family-pages <fingerprint>...`
|
|
843
|
+
(`--family-pages=` keeps none) while the marker is retained. Only the
|
|
844
|
+
two page contracts (`page:loads`, `page:data-ok`) of `ui.page` resources
|
|
845
|
+
can enter the family — persistence contracts, classification debt and
|
|
846
|
+
business rules never do — and the migration refuses (exit 2, nothing
|
|
847
|
+
written) while any page's audience or data plane is unresolved, and on a
|
|
848
|
+
repository with no page routes at all. Because the receipt is part of
|
|
849
|
+
the approved policy revision, a confirmed migration changes the
|
|
850
|
+
trusted-policy digest: strict gates stay untrusted until the owner repins
|
|
851
|
+
outside the candidate (the same `git add` + `enforcement pin` flow as any
|
|
852
|
+
policy change). A plain `adopt` on a repository with `pages:` configured
|
|
853
|
+
records the family marker in the receipt it already writes with an EMPTY
|
|
854
|
+
`forgiven` set — the page debt itself rides the baseline bulk-add, so the
|
|
855
|
+
ordinary shrink-only `baseline update` contract governs it and there is
|
|
856
|
+
exactly one forgiveness store; the family is then already adopted.
|
|
857
|
+
|
|
812
858
|
### The owner answers and the generated wiring are owner-pinned
|
|
813
859
|
|
|
814
860
|
The owner-answers document and `.gateforge.yml` are owner-owned
|
|
@@ -819,7 +865,12 @@ bound them, so a candidate could narrow `clientScanRoots` (deleting
|
|
|
819
865
|
obligations) in the same commit and the pin still matched. Their bytes are now
|
|
820
866
|
inside the approved policy digest, and so are the generated `.gateforge/hooks/`
|
|
821
867
|
and `.gateforge/ci/` wiring, for the same reason: deleting the generated hook
|
|
822
|
-
is a policy-revision change, not a way back into adoption mode.
|
|
868
|
+
is a policy-revision change, not a way back into adoption mode. Since 0.13
|
|
869
|
+
the adoption receipt (`.gateforge/baselines/adoption.json`) is pinned too,
|
|
870
|
+
present-only: it carries the adopted family markers and each family's
|
|
871
|
+
`forgiven` fingerprints, which the evaluator forgives from the receipt alone —
|
|
872
|
+
a candidate that edits its own forgiveness cannot approve the edit. A
|
|
873
|
+
pre-adoption repository keeps a byte-identical digest.
|
|
823
874
|
|
|
824
875
|
**Upgrading:** a repository that ships a pack config or the generated gate
|
|
825
876
|
wiring re-pins ONCE, after upgrading —
|
|
@@ -1128,6 +1179,158 @@ Enforcement-relevant sections:
|
|
|
1128
1179
|
changing the list moves the approved revision. See "Developer and CI
|
|
1129
1180
|
tooling is owner-declared" above.
|
|
1130
1181
|
|
|
1182
|
+
## Pages
|
|
1183
|
+
|
|
1184
|
+
Each detected frontend route creates two page promises: `page:loads` and
|
|
1185
|
+
`page:data-ok`. Existing Playwright journeys prove them through the browser
|
|
1186
|
+
fixture (channel `observed`); after the tests, the referee sweeps only pages
|
|
1187
|
+
without a clean observed record (channel `swept`). A clean test visit always
|
|
1188
|
+
takes precedence over the sweep. Both channels use the same route, redirect,
|
|
1189
|
+
crash, error-marker, and API-response grader. Browser API tampering in tests
|
|
1190
|
+
is refused as `PAGE_OBSERVATION_TAMPER_RISK`.
|
|
1191
|
+
|
|
1192
|
+
An API request counts as settled only when its response BODY finished
|
|
1193
|
+
(Playwright `requestfinished`), never at the response headers: a failed or
|
|
1194
|
+
unfinished body refuses both page promises with `PAGE_API_UNSETTLED`.
|
|
1195
|
+
Before grading, each channel waits for in-flight app data requests
|
|
1196
|
+
(fetch/XHR by resource type, plus `/api/` paths) and a quiet window after
|
|
1197
|
+
the last activity, bounded by the shared engine budget — a 500 arriving a
|
|
1198
|
+
second late, or a 200 whose body dies mid-flight, is no longer a clean
|
|
1199
|
+
page. A request the app itself cancels (`net::ERR_ABORTED`) counts as
|
|
1200
|
+
settled only when the same method and URL completed in the same visit; any
|
|
1201
|
+
other failure, or an unretried cancel, refuses the page. Both channels now
|
|
1202
|
+
read completion from the browser's network events, so a response body the
|
|
1203
|
+
app never reads still counts once every declared byte (Content-Length)
|
|
1204
|
+
arrived; an unread body without a declared length stays unsettled. The
|
|
1205
|
+
observed channel keeps Playwright as its request ledger and adds the
|
|
1206
|
+
browser's network events only as a completion signal, correlated per
|
|
1207
|
+
method and URL — a request the network events did not observe is never
|
|
1208
|
+
upgraded. A failed page-observation flush never fails the app's own test:
|
|
1209
|
+
it is logged and the page proof stays missing, and the flush call's
|
|
1210
|
+
timeout derives from the shared engine budget.
|
|
1211
|
+
|
|
1212
|
+
On pages of an audience without a login (no `session:` in its
|
|
1213
|
+
`pages.audiences` declaration), an app data answer of exactly 401 counts as
|
|
1214
|
+
the expected not-logged-in answer and does not refuse `page:data-ok`; 403
|
|
1215
|
+
and every other error status still refuse, and on audiences with a login a
|
|
1216
|
+
401 still refuses. Like the rest of the route table, the flag is
|
|
1217
|
+
controller-held — derived from the audience declaration, registered with
|
|
1218
|
+
the witness, never supplied by the suite — so both proof channels grade it
|
|
1219
|
+
identically.
|
|
1220
|
+
|
|
1221
|
+
A page may legitimately keep a connection open forever: a long poll, a
|
|
1222
|
+
WebSocket, or a server-sent-events stream. Declare those path prefixes
|
|
1223
|
+
under `pages.liveChannels` (each starting with `/`) and both channels
|
|
1224
|
+
treat a same-origin request under a declared prefix — plus any WebSocket
|
|
1225
|
+
upgrade on the app host and any `text/event-stream` response, as protocol
|
|
1226
|
+
facts — as a LIVE CHANNEL: it never counts as app data evidence, never
|
|
1227
|
+
holds the visit's settle wait, and never refuses the page by itself; the
|
|
1228
|
+
visit payload lists what it saw under `liveChannels` (count + paths).
|
|
1229
|
+
Nothing is guessed from names or traffic: an undeclared long poll is still
|
|
1230
|
+
an unfinished app data request and refuses the page with
|
|
1231
|
+
`PAGE_API_UNSETTLED` once the settle budget expires. Like the rest of the
|
|
1232
|
+
page configuration, the prefixes are controller-held and registered with
|
|
1233
|
+
the witness, so both proof channels apply the same rule.
|
|
1234
|
+
|
|
1235
|
+
A rejected audience session stops that audience's sweep. When an audience
|
|
1236
|
+
WITH a session lands on one of its declared login routes on the FIRST
|
|
1237
|
+
visited page, that page is graded as today, and every remaining page of
|
|
1238
|
+
the same audience is refused WITHOUT visiting, with
|
|
1239
|
+
`PAGE_AUDIENCE_SESSION_INVALID` — the records still issue, and the sweep
|
|
1240
|
+
payload says each page was not visited and why. Session-less audiences are
|
|
1241
|
+
unaffected. The usual cause is a rotating refresh token: the suite's run
|
|
1242
|
+
consumed the session a storage-state file carried, so mint a session file
|
|
1243
|
+
the suite does not consume.
|
|
1244
|
+
|
|
1245
|
+
Per test, only a page's LATEST observation (`observationSequence`) counts.
|
|
1246
|
+
An early clean visit cannot hide a later refusal by the same test, and
|
|
1247
|
+
another passing test's latest clean visit still proves the page. A missing
|
|
1248
|
+
or malformed sequence never proves, and equal-sequence contradictions fail
|
|
1249
|
+
closed with `PAGE_OBSERVATION_CONFLICT`; the post-suite sweep chooses its
|
|
1250
|
+
gap visits with the same rule.
|
|
1251
|
+
|
|
1252
|
+
Page proof metadata is controller-held: the route table, login routes,
|
|
1253
|
+
error markers, trusted app origins, and static tamper risks are registered
|
|
1254
|
+
by the CLI with the witness on the verifier-authenticated expected-set
|
|
1255
|
+
registration, and `/sessions/page-observer` carries only the session
|
|
1256
|
+
credentials and the debugging port. A run without registered context
|
|
1257
|
+
issues no page proof, and a matched page whose final URL origin is not a
|
|
1258
|
+
trusted app origin is refused with `PAGE_APP_ORIGIN_MISMATCH`. The suite
|
|
1259
|
+
receives only the enablement flag `GATEFORGE_PAGE_OBSERVATION_ENABLED` —
|
|
1260
|
+
it can disable observation, never enable false proof.
|
|
1261
|
+
|
|
1262
|
+
Configure the reader and audience in `.gateforge.yml`:
|
|
1263
|
+
|
|
1264
|
+
```yaml
|
|
1265
|
+
pages:
|
|
1266
|
+
router: react-router
|
|
1267
|
+
audiences:
|
|
1268
|
+
- name: tenant
|
|
1269
|
+
loginRoute: /login
|
|
1270
|
+
guard: TenantGuard
|
|
1271
|
+
plane: tenant
|
|
1272
|
+
errorMarkers: ['Something went wrong']
|
|
1273
|
+
params:
|
|
1274
|
+
'/orders/:id': { id: 'seeded-order-id' }
|
|
1275
|
+
exclude: []
|
|
1276
|
+
sweep: true
|
|
1277
|
+
```
|
|
1278
|
+
|
|
1279
|
+
Each audience may declare its DATA plane explicitly: `plane: tenant |
|
|
1280
|
+
master | global` (employee→tenant, admin→master, public→global). A plane
|
|
1281
|
+
is the data the pages serve — it is not a user role, and an audience name
|
|
1282
|
+
is only a plane when it is exactly one of those three words; declare the
|
|
1283
|
+
conventional names (`tenant`, `master`, `global`) explicitly when you
|
|
1284
|
+
want to be exact, and every other audience name (a role like `employee`
|
|
1285
|
+
or `admin`) REQUIRES the explicit `plane:` key. An audience without a
|
|
1286
|
+
resolved plane leaves its pages classification-blocked, and
|
|
1287
|
+
`gateforge adopt --family pages` refuses to record while any page
|
|
1288
|
+
identity is undecided.
|
|
1289
|
+
|
|
1290
|
+
Page paths carry the FULL deployment prefix. A string-literal `basename`
|
|
1291
|
+
on `<BrowserRouter>`, `<HashRouter>`, or `<MemoryRouter>` — or in the
|
|
1292
|
+
`createBrowserRouter` / `createHashRouter` options object — is prefixed
|
|
1293
|
+
onto every page path discovered under that router in the same file, so a
|
|
1294
|
+
router opened with `basename="/app"` yields `/app/departments`, not
|
|
1295
|
+
`/departments`. A computed basename (`basename={...}`, a variable in the
|
|
1296
|
+
options) is never guessed: the pages under it are not emitted and each
|
|
1297
|
+
becomes `PAGE_ROUTE_UNRESOLVED` naming the `file:line`. Two different
|
|
1298
|
+
literal basenames in one project are ambiguous: every page still carries
|
|
1299
|
+
its own router's prefix, and an `AMBIGUOUS_BASENAME` finding lists every
|
|
1300
|
+
declaration for the owner to reconcile.
|
|
1301
|
+
|
|
1302
|
+
A prefix that lives OUTSIDE the code — a reverse proxy or sub-path host
|
|
1303
|
+
serving the app under a prefix — is the owner's `pages.basePath` setting.
|
|
1304
|
+
Declare it once and EVERY discovered page path (both routers, and manual
|
|
1305
|
+
`.gateforge/pages.yml` entries) is prefixed with it, after any router
|
|
1306
|
+
`basename`: `basePath: /shop` plus `basename="/app"` plus route `/x`
|
|
1307
|
+
gives `/shop/app/x`. The value must start with `/` and carry no trailing
|
|
1308
|
+
slash (`/` alone is the deployment root); anything else is a config
|
|
1309
|
+
validation error naming the rule. Page identity and every downstream
|
|
1310
|
+
check (visit URLs, final-URL-must-match-route grading) use the prefixed
|
|
1311
|
+
path end to end.
|
|
1312
|
+
|
|
1313
|
+
A relative route (`path="departments"`) with no parent route in its file
|
|
1314
|
+
AND no router root (`BrowserRouter`, `HashRouter`, `MemoryRouter`,
|
|
1315
|
+
`RouterProvider`, `createBrowserRouter`, `createHashRouter`) in the file
|
|
1316
|
+
cannot be placed: Gateforge refuses to guess which prefix the component
|
|
1317
|
+
is rendered under and emits `PAGE_ROUTE_UNRESOLVED` — `relative route
|
|
1318
|
+
'departments' in src/Pages.tsx:12 has no parent route in this file;
|
|
1319
|
+
Gateforge cannot tell which prefix it is rendered under (make it
|
|
1320
|
+
absolute, or wrap it under its parent route)` — instead of a silently
|
|
1321
|
+
wrong page. Relative children under a parent route in the same file keep
|
|
1322
|
+
joining normally.
|
|
1323
|
+
|
|
1324
|
+
`pages.params` supplies seeded IDs for dynamic routes. When no seed is
|
|
1325
|
+
configured, the referee can use a unique engine-observed create ID for the
|
|
1326
|
+
route's matching resource; ambiguous or unmatched IDs are never guessed, and
|
|
1327
|
+
produce `PAGE_PARAM_UNBOUND` with the page left unproven. `pages.sweep: false`
|
|
1328
|
+
disables referee visits, so an unopened page remains visible as unproven debt.
|
|
1329
|
+
The sealed `test-gates` JSON and text reports include a `pages` section with
|
|
1330
|
+
each page's route, proof channel, test/referee, status, and reason. Use
|
|
1331
|
+
`gateforge explain <page-obligation-id>` for that page's latest proof details;
|
|
1332
|
+
`gateforge next` names the visit, seed, or failure fix.
|
|
1333
|
+
|
|
1131
1334
|
## Owner answers (`.gateforge/classification-policy.yml`)
|
|
1132
1335
|
|
|
1133
1336
|
The repository-wide deterministic classification ANSWERS. `gateforge init`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gate-forge/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"gateforgeCompatibility": {
|
|
5
5
|
"supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
|
|
6
6
|
},
|
|
@@ -33,15 +33,16 @@
|
|
|
33
33
|
"test": "vitest run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@gate-forge/core": "^0.
|
|
37
|
-
"@gate-forge/http-contract": "^0.
|
|
38
|
-
"@gate-forge/pack-fastapi": "^0.
|
|
39
|
-
"@gate-forge/pack-alembic": "^0.
|
|
40
|
-
"@gate-forge/pack-http": "^0.
|
|
41
|
-
"@gate-forge/pack-
|
|
42
|
-
"@gate-forge/pack-
|
|
43
|
-
"@gate-forge/pack-
|
|
44
|
-
"@gate-forge/
|
|
36
|
+
"@gate-forge/core": "^0.13.1",
|
|
37
|
+
"@gate-forge/http-contract": "^0.13.1",
|
|
38
|
+
"@gate-forge/pack-fastapi": "^0.13.1",
|
|
39
|
+
"@gate-forge/pack-alembic": "^0.13.1",
|
|
40
|
+
"@gate-forge/pack-http": "^0.13.1",
|
|
41
|
+
"@gate-forge/pack-react-router": "^0.13.1",
|
|
42
|
+
"@gate-forge/pack-playwright": "^0.13.1",
|
|
43
|
+
"@gate-forge/pack-sqlalchemy": "^0.13.1",
|
|
44
|
+
"@gate-forge/pack-task": "^0.13.1",
|
|
45
|
+
"@gate-forge/plugin-protocol": "^0.13.1",
|
|
45
46
|
"picomatch": "^4.0.7",
|
|
46
47
|
"yaml": "^2.8.1"
|
|
47
48
|
},
|