@gate-forge/cli 0.10.0 → 0.10.2
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 +371 -0
- package/README.md +2 -0
- package/dist/adoption-mode.d.ts +37 -0
- package/dist/adoption-mode.d.ts.map +1 -0
- package/dist/adoption-mode.js +101 -0
- package/dist/adoption-mode.js.map +1 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +199 -29
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/enforcement.d.ts +19 -0
- package/dist/commands/enforcement.d.ts.map +1 -1
- package/dist/commands/enforcement.js +80 -4
- package/dist/commands/enforcement.js.map +1 -1
- package/dist/commands/explain.js +3 -1
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/pre-commit.d.ts.map +1 -1
- package/dist/commands/pre-commit.js +9 -1
- package/dist/commands/pre-commit.js.map +1 -1
- package/dist/commands/test-gates.d.ts +12 -1
- package/dist/commands/test-gates.d.ts.map +1 -1
- package/dist/commands/test-gates.js +267 -9
- package/dist/commands/test-gates.js.map +1 -1
- package/dist/commands/tests.js +74 -17
- package/dist/commands/tests.js.map +1 -1
- package/dist/execution.d.ts +26 -2
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +80 -2
- package/dist/execution.js.map +1 -1
- package/dist/input-snapshot.d.ts.map +1 -1
- package/dist/input-snapshot.js +20 -1
- package/dist/input-snapshot.js.map +1 -1
- package/dist/pipeline.d.ts +8 -2
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +9 -8
- package/dist/pipeline.js.map +1 -1
- package/dist/repo-path.d.ts +3 -0
- package/dist/repo-path.d.ts.map +1 -0
- package/dist/repo-path.js +24 -0
- package/dist/repo-path.js.map +1 -0
- package/dist/runtime.d.ts +29 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +39 -0
- package/dist/runtime.js.map +1 -1
- package/dist/scope.d.ts +81 -0
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js +101 -2
- package/dist/scope.js.map +1 -1
- package/dist/staged-candidate.d.ts +48 -1
- package/dist/staged-candidate.d.ts.map +1 -1
- package/dist/staged-candidate.js +74 -6
- package/dist/staged-candidate.js.map +1 -1
- package/dist/test-infrastructure.d.ts +32 -0
- package/dist/test-infrastructure.d.ts.map +1 -0
- package/dist/test-infrastructure.js +125 -0
- package/dist/test-infrastructure.js.map +1 -0
- package/guides/QUICKSTART.md +20 -7
- package/guides/REFERENCE.md +188 -2
- package/guides/TEST-ENVIRONMENT.md +3 -1
- package/package.json +12 -10
package/guides/REFERENCE.md
CHANGED
|
@@ -55,9 +55,9 @@ first commands; the guides cover the walks:
|
|
|
55
55
|
| `gateforge explain <resourceId\|path> [--json]` | Show one resource's detector signals, classification rules, decision fingerprint, typed blocks, and generated obligations. A repo-relative PATH is also a target: when no resource matches it, the command prints what the file is and what governs it (Gateforge policy input, declared gate input, owner-declared documentation folder, known source of a resource, or an unclassified change) with the steps that attribute it — this is the answer an unmapped `CHANGE_UNMAPPED` file needs. An unknown target stays unknown (exit 1). | 0/1/2 |
|
|
56
56
|
| `gateforge tests discover [--json] [--pytest]` | Inventory existing tests into the derived run-state catalog: static analysis reconciled with native Playwright enumeration (`--list`). Unresolved wrappers, parse errors, and inventory gaps are DATA (never an empty catalog — failed native enumeration is exit 2). `--pytest` additionally collects the configured diagnostic suites' node ids (`--collect-only`). Playwright enumeration runs ONE config (a repo-root config wins; otherwise the alphabetically first config one directory deep), and when the repo holds more than one the runner line names every config, the one used, why, and the ones NOT inventoried. `inventoryComplete=false` means a reconciliation gap (an enumerated-vs-static mismatch, an unresolved case, or a not-inventoried extra config), not a partial success. | 0/2 |
|
|
57
57
|
| `gateforge tests suggest [--changed] [--json]` | Resolve mappings for the run's obligations and produce reuse-ordered existing-test candidates with typed causes (`TEST_MAPPING_MISSING` / `TEST_KIND_UNKNOWN` / `TEST_MAPPING_AMBIGUOUS` / `TEST_MAPPING_STALE`). Candidates are RANKED by the evidence their catalog row carries (explicit tag, resource token in title/file, operation word, route segment, unmocked folder, minus mocks) with the matching reason printed as `why:`; the text surface prints the top five and names how many it hid, `--json` carries every candidate with its `rank` and `score`. The reuse verdict `newTestNeeded` has THREE honest values: `no` (the `#1` candidate is an unmocked e2e row more than one signal supports), `yes` (no candidate survived resolution, or every candidate mocks the system under test) and `unverified` (a candidate exists but one signal carries it — confirm the request with `gateforge explain <obligation>` before marking). The next action follows it: MARK the candidate and run it under the witness when the verdict is `no`, write the overlay when it is `yes`. When Playwright reports load errors and enumerates no tests, report one `TEST_INVENTORY_INCOMPLETE` with the error count and first error instead of stale-mapping fan-out; the action is to install the missing dependency and rerun Gateforge. An inspection surface, NOT a gate: exit 0 even with blocking problems. | 0/2 |
|
|
58
|
-
| `gateforge tests mark --test <key> --kind <kind> [--category <c>]... --obligation <id>... --reason "<text>"` | Declare an existing test in `.gateforge/test-map.yml` (see the test-reuse workflow below). Validates against the CURRENT catalog and obligation registry, writes atomically and idempotently, prints the exact diff. Never edits test files, never adds waivers, refuses contradictions. | 0/2 |
|
|
58
|
+
| `gateforge tests mark --test <key> --kind <kind> [--category <c>]... --obligation <id>... --reason "<text>"` | Declare an existing test in `.gateforge/test-map.yml` (see the test-reuse workflow below). `--test` accepts EITHER documented key form: the catalog `logicalKey` (`playwright:chromium:e2e/accounts.spec.ts:Accounts>deletes an account`) or the reconciliation key `<file>#<titlePath joined by '>'` (`e2e/accounts.spec.ts#Accounts>deletes an account`). The sidecar always stores the `logicalKey`. Validates against the CURRENT catalog and obligation registry, writes atomically and idempotently, prints the exact diff. Never edits test files, never adds waivers, refuses contradictions. | 0/2 |
|
|
59
59
|
| `gateforge tests sync [--json]` | AST-only scan of test annotations; updates generated `source: annotation` entries in `.gateforge/test-map.yml` and leaves handwritten entries unchanged. Reports unresolved helpers with source locations; does not run tests. | 0/1/2 |
|
|
60
|
-
| `gateforge tests explain --test <key> [--json]` | Per-test report: requirements, existing-test identity, mapping origin, honest execution status, next action, and the same three-state reuse verdict `New test needed` (`no` / `yes` / `unverified`) `tests suggest` prints — built from the SAME route evidence, so the two surfaces never disagree about one test. | 0/2 (unknown key → 2) |
|
|
60
|
+
| `gateforge tests explain --test <key> [--json]` | Per-test report: requirements, existing-test identity, mapping origin, honest execution status, next action, and the same three-state reuse verdict `New test needed` (`no` / `yes` / `unverified`) `tests suggest` prints — built from the SAME route evidence, so the two surfaces never disagree about one test. `--test` takes the same two key forms as `tests mark` (see above). | 0/2 (unknown or ambiguous key → 2) |
|
|
61
61
|
| `gateforge tests diagnose [--suite <name>] [--json]` | Run the configured pytest diagnostic suites once per suite, isolated (own process, `GATEFORGE_*` stripped, finite timeout). Advisory: exit 0 completed run (≥1 pass, no unexpected failures), 1 test failures, 2 unavailable/incomplete (collection error, timeout, missing interpreter, interruption, zero tests, or only skipped/xfail). Never E2E proof. | 0/1/2 |
|
|
62
62
|
| `gateforge obligations [--json]` | Evaluate policies against the automatically classified graph and dump obligations, blocking entries, and claim assessments. | 0/1/2 |
|
|
63
63
|
| `gateforge check [--changed] [--staged] [--candidate-commit <sha>] [--require-e2e] [--timing] [--no-cache] [--format text\|json\|sarif]` | The full gate: discover → classify → obligations → claims → verdicts → report. `--timing` appends per-step wall-clock timings (detectors, test collection, TS scan, planning, total) — an additive report key in json and one line in text, never an input to any verdict. Detector and pytest-collection results are cached under the excluded run-state dir. Detector keys include plugin config, executable module/script bytes, Python import environment, inputs, interpreter packages, and Gateforge engine version; pytest keys include all Python/config file bytes, collector argv/environment, interpreter identity, and engine version. Unchanged successful pytest collections reuse their node ids; any changed Python byte recollects. Any uncertainty runs fresh. The report carries additive `cache: {hits, misses}` counts. `--no-cache` (or `GATEFORGE_NO_CACHE=1`, or a CI environment) disables cache reads and writes. | 0 clean/waived, 1 unresolved, 2 config/usage error |
|
|
@@ -298,6 +298,32 @@ Contract highlights:
|
|
|
298
298
|
needs installed dependencies blocks honestly instead of silently reusing
|
|
299
299
|
the worktree's environment.
|
|
300
300
|
|
|
301
|
+
### Whole-run budget and the stall bound
|
|
302
|
+
|
|
303
|
+
By default there is NO whole-run cap. The engine used to kill any supervised
|
|
304
|
+
run at 30 minutes of wall clock — a bound nobody declared, and it killed a real
|
|
305
|
+
1 101-test Playwright suite that needs two hours while every test was still
|
|
306
|
+
passing. A whole-run budget applies only when the operator declares one:
|
|
307
|
+
|
|
308
|
+
- `runtime.yml executionTimeoutSeconds` — the owner's own budget, honoured by
|
|
309
|
+
the command it is written for (`check --staged` and `test-gates`);
|
|
310
|
+
- `--run-timeout-min <n>` — the flag still wins over the document.
|
|
311
|
+
|
|
312
|
+
What the engine keeps is a STALL bound: if no test has FINISHED for
|
|
313
|
+
`runtime.yml stallTimeoutSeconds` (new key, 1–3600, default 15 minutes) the run
|
|
314
|
+
is killed and fails closed with
|
|
315
|
+
`stalled: no test finished for 15 min (last finished: <title>, <k>/<n>)`. It
|
|
316
|
+
rides the same per-test completion signal the `--progress` stream already
|
|
317
|
+
consumes, so a run carries one completion signal, not two. A suite that keeps
|
|
318
|
+
finishing tests is never killed, however long it takes.
|
|
319
|
+
|
|
320
|
+
**Playwright only, and here is why.** A stall bound needs a stream of per-test
|
|
321
|
+
completions; today only the Playwright pack reads one. The pytest, Vitest,
|
|
322
|
+
Cypress and other supervisors keep their historical 30-minute whole-run
|
|
323
|
+
default until they can report completions the same way — on those runners an
|
|
324
|
+
over-long run still dies at 30 minutes, and `executionTimeoutSeconds` (or
|
|
325
|
+
`--run-timeout-min`) is how you raise it.
|
|
326
|
+
|
|
301
327
|
## Harness and run history
|
|
302
328
|
|
|
303
329
|
The optional `.gateforge.yml` `harness` section declares `up`, `reset`,
|
|
@@ -380,6 +406,32 @@ tests:
|
|
|
380
406
|
reason: Existing journey deletes the selected account.
|
|
381
407
|
```
|
|
382
408
|
|
|
409
|
+
`--test` accepts EITHER of the two key forms the surfaces hand you, and
|
|
410
|
+
both name the same test. The catalog `logicalKey` is what `tests discover`,
|
|
411
|
+
`tests suggest` and `check` print:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
gateforge tests mark --test 'playwright:chromium:e2e/accounts.spec.ts:Accounts>deletes an account' …
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
The reconciliation key `<file>#<titlePath joined by '>'` — the form
|
|
418
|
+
REFERENCE uses for sidecar bindings and the one the runner's own test
|
|
419
|
+
events carry — resolves to the same catalog row, so a key copied out of a
|
|
420
|
+
report works without a lookup step:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
gateforge tests mark --test 'e2e/accounts.spec.ts#Accounts>deletes an account' …
|
|
424
|
+
gateforge tests explain --test 'e2e/accounts.spec.ts#Accounts>deletes an account'
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
The sidecar always stores the `logicalKey` (as above), so a mapping's
|
|
428
|
+
identity never depends on which form was typed. When the same file and
|
|
429
|
+
title run under SEVERAL runner projects, the reconciliation key matches
|
|
430
|
+
more than one catalog row and the error names every matching
|
|
431
|
+
`logicalKey` — only that form tells the projects apart. An unknown key
|
|
432
|
+
names both accepted forms and, when the file part does exist in the
|
|
433
|
+
catalog, lists up to five of that file's real keys.
|
|
434
|
+
|
|
383
435
|
`--kind` is one of `browser-e2e`, `observed-e2e`, `api-e2e`, `unit`, `integration`,
|
|
384
436
|
`component`, `unknown`. A declaration is INTENT, never proof:
|
|
385
437
|
|
|
@@ -617,6 +669,44 @@ check:
|
|
|
617
669
|
policy digest, so a weakened candidate fails closed until a separate
|
|
618
670
|
trusted update is accepted.
|
|
619
671
|
|
|
672
|
+
**A change that is only `docs/**.md` is the engine's own.** No obligation
|
|
673
|
+
can arise from a Markdown file, so a commit whose WHOLE changed set is
|
|
674
|
+
`docs/**.md` is exempt from the unclassified-change handling — never
|
|
675
|
+
candidate-configurable, and denied the moment one non-docs file joins the
|
|
676
|
+
commit (a mixed change keeps the docs files as unknown changes, exactly as
|
|
677
|
+
before). Since no obligation arises from it, the slice has nothing to prove,
|
|
678
|
+
and `test-gates --changed --scope changed` seals a receipt for the current
|
|
679
|
+
candidate with ZERO records: `scope: changed`, an empty covered set, and a
|
|
680
|
+
`docs-only-slice` execution result naming an expected set that is empty by
|
|
681
|
+
decision. It is bound to the same input digest, candidate tree and trusted
|
|
682
|
+
policy digest as any other receipt, so `check --staged` finds a current one.
|
|
683
|
+
It proves nothing — the commit gate recomputes the docs-only decision from
|
|
684
|
+
its own changed set rather than believing the receipt's claim, the empty
|
|
685
|
+
covered set satisfies no obligation, and the next product change has a
|
|
686
|
+
different input digest and needs its own run. This is separate from
|
|
687
|
+
`--docs-exclude` below, which is an owner assertion about input hashing and
|
|
688
|
+
is never required or implied by it.
|
|
689
|
+
|
|
690
|
+
**Developer and CI tooling is owner-declared.** A `scripts/e2e/run.sh`
|
|
691
|
+
only `package.json` scripts name, or a custom reporter the runner
|
|
692
|
+
configuration NAMES but no test imports, is test infrastructure by
|
|
693
|
+
different evidence — the import graph roots at the runner configurations
|
|
694
|
+
too, so a `reporter`, `globalSetup`, `globalTeardown`, project
|
|
695
|
+
`storageState` or `require.resolve('./…')` path that resolves to an
|
|
696
|
+
existing file is attributable, together with its own import closure. What
|
|
697
|
+
NOBODY names, the owner declares: `project.paths.testTooling` in
|
|
698
|
+
`.gateforge.yml` takes a list of globs, and a changed file matching one is
|
|
699
|
+
attributed `test-tooling:<file>`. The pass is deliberately weak — it
|
|
700
|
+
EXPANDS the evaluation scope exactly like test infrastructure (so a change
|
|
701
|
+
to declared tooling is never proven by a slice of the suite) and it is
|
|
702
|
+
NEVER `CHANGE_UNMAPPED`. It cannot hide product code: a discovered
|
|
703
|
+
resource's own source keeps its own treatment, and a glob that matches
|
|
704
|
+
one is a config error — `gateforge check` exits 2 and
|
|
705
|
+
`gateforge enforcement doctor` fails a `test-tooling` row, both naming the
|
|
706
|
+
file and the glob. The key lives in `.gateforge.yml`, so it is inside the
|
|
707
|
+
approved policy digest: widening the list needs your pin re-approved.
|
|
708
|
+
Absent means today's behaviour, byte for byte, digests included.
|
|
709
|
+
|
|
620
710
|
**Gateforge's own files are policy inputs.** The config, the policy,
|
|
621
711
|
classification, behavior and runtime documents, the exclusion declarations,
|
|
622
712
|
the mapping sidecar, the adapter/waiver/baseline/quarantine records, the
|
|
@@ -637,6 +727,94 @@ config, manifests, ignore controls, documentation you did not exclude) keeps
|
|
|
637
727
|
today's treatment, including the scope expansion that makes a policy change
|
|
638
728
|
re-check the whole repository.
|
|
639
729
|
|
|
730
|
+
### Adoption mode: the first commit that wires the gate
|
|
731
|
+
|
|
732
|
+
The commit that introduces the gate always touches gate-defining inputs — the
|
|
733
|
+
manifest, `.gateforge.yml`, the runner configuration, the mapping sidecar and
|
|
734
|
+
the specs — so the evaluation expands to EVERY obligation in the repository,
|
|
735
|
+
while the only affordable proof of a large repository is
|
|
736
|
+
`test-gates --changed --scope changed`. Before 0.10.2 the hook refused that
|
|
737
|
+
receipt as a scope mismatch, so the first commit of every adopting repository
|
|
738
|
+
had to be committed with `--no-verify`.
|
|
739
|
+
|
|
740
|
+
A commit is judged in **adoption mode** when, and only when:
|
|
741
|
+
|
|
742
|
+
1. HEAD has NO gate — no `enforcement` block in its `.gateforge.yml`, and no
|
|
743
|
+
generated `.gateforge/hooks/gateforge-check.mjs`; and
|
|
744
|
+
2. the candidate DOES wire one (it introduces `.gateforge/hooks/` /
|
|
745
|
+
`.gateforge/ci/` wiring, or turns `enforcement` on); and
|
|
746
|
+
3. the candidate's trusted policy digest matches your owner-approved pin.
|
|
747
|
+
|
|
748
|
+
Condition 1 is monotone and one-shot: once a gate exists at HEAD it can never
|
|
749
|
+
hold again, so no later commit can re-enter adoption mode. The mode is
|
|
750
|
+
COMPUTED from the base revision — there is no flag, no config key and no
|
|
751
|
+
environment variable a candidate could set.
|
|
752
|
+
|
|
753
|
+
What it changes:
|
|
754
|
+
|
|
755
|
+
- **Which obligations must be proven.** A sealed `--scope changed` receipt for
|
|
756
|
+
the SAME staged candidate tree is accepted; only the obligations whose
|
|
757
|
+
source files this change set touches must be inside the receipt's
|
|
758
|
+
`coveredFingerprints`. Every obligation the commit does not touch stays
|
|
759
|
+
unproven debt, recorded by `gateforge adopt` and still named in the report.
|
|
760
|
+
- **Adopted debt survives the strict-E2E re-grade** when the change set is
|
|
761
|
+
product-behaviour-neutral — every changed file is a policy input, a
|
|
762
|
+
gate-defining input, a catalog test file, test infrastructure, a
|
|
763
|
+
runtime-declared input or `docs/**.md`, and NO discovered resource's source
|
|
764
|
+
is in it — and your pin is enforced. One changed product source in the same
|
|
765
|
+
commit denies it, and the debt is re-graded blocking exactly as before. (An
|
|
766
|
+
owner WAIVER is never forgiveness: strict E2E re-grades it either way.)
|
|
767
|
+
|
|
768
|
+
What is still refused in adoption mode, unchanged: a policy-input pin
|
|
769
|
+
mismatch; a sealed receipt that does not cover the staged bytes (see
|
|
770
|
+
"The candidate tree a sealed receipt is bound to" below); a
|
|
771
|
+
`CHANGE_UNMAPPED` file; an obligation the change newly claims with no
|
|
772
|
+
mapping or no sealed evidence; and any commit after the first one. Adoption
|
|
773
|
+
mode moves WHICH obligations must be proven, never WHO may approve the
|
|
774
|
+
policy.
|
|
775
|
+
|
|
776
|
+
### The pack configs and the generated wiring are owner-pinned
|
|
777
|
+
|
|
778
|
+
`.gateforge/planes.json`, `.gateforge/endpoints.json`,
|
|
779
|
+
`.gateforge/http-clients.json` and `.gateforge/fastapi.json` are owner-owned
|
|
780
|
+
policy inputs: they are classified as such, so they are never unmapped product
|
|
781
|
+
changes and never expand the evaluation scope — but that exemption is only
|
|
782
|
+
honest while your approved digest binds their bytes. Before 0.10.2 nothing
|
|
783
|
+
bound them, so a candidate could narrow `clientScanRoots` (deleting
|
|
784
|
+
obligations) in the same commit and the pin still matched. Their bytes are now
|
|
785
|
+
inside the approved policy digest, and so are the generated `.gateforge/hooks/`
|
|
786
|
+
and `.gateforge/ci/` wiring, for the same reason: deleting the generated hook
|
|
787
|
+
is a policy-revision change, not a way back into adoption mode.
|
|
788
|
+
|
|
789
|
+
**Upgrading:** a repository that ships a pack config or the generated gate
|
|
790
|
+
wiring re-pins ONCE, after upgrading —
|
|
791
|
+
`git add -A .gateforge .gateforge.yml && gateforge enforcement pin --pin-file
|
|
792
|
+
<path outside the repository> --confirm`. A repository with NO pack config
|
|
793
|
+
keeps a byte-identical digest: an absent config adds no digest entry and no
|
|
794
|
+
absence marker.
|
|
795
|
+
|
|
796
|
+
### The candidate tree a sealed receipt is bound to
|
|
797
|
+
|
|
798
|
+
A candidate tree is the raw-ingested workspace a run tested, so it also
|
|
799
|
+
carries that workspace's untracked and gitignored bytes — `node_modules/`, a
|
|
800
|
+
blob report, a Playwright storage state. `check --staged` therefore binds a
|
|
801
|
+
sealed receipt by CONTAINMENT, not by string equality: the receipt is
|
|
802
|
+
accepted when the sealed candidate tree carries every path of the frozen
|
|
803
|
+
index tree with the SAME mode and blob, and refused when a single staged
|
|
804
|
+
byte is missing or differs. Two shapes therefore work, and neither is a
|
|
805
|
+
weakened commitment:
|
|
806
|
+
|
|
807
|
+
- a receipt sealed INSIDE a staged checkout (`gateforge pre-commit`), whose
|
|
808
|
+
candidate tree is the prepared checkout itself;
|
|
809
|
+
- a receipt sealed in the WORKSPACE (`gateforge test-gates --changed`)
|
|
810
|
+
while every tracked byte is staged — its candidate tree is a superset of
|
|
811
|
+
the index tree, and the input digest (which must still equal the digest
|
|
812
|
+
the checkout computes) pins the rest.
|
|
813
|
+
|
|
814
|
+
An unreadable receipt, an unreadable tree listing, or any difference falls
|
|
815
|
+
back to the previous, stricter test: the receipt's candidate tree id must
|
|
816
|
+
equal the frozen index tree.
|
|
817
|
+
|
|
640
818
|
**Receipts (the strict saved-state gate).** `check --require-e2e` accepts
|
|
641
819
|
only an authenticated gate receipt sealed by a COMPLETE supervised run for
|
|
642
820
|
the current input digest and trusted policy digest:
|
|
@@ -903,6 +1081,14 @@ Enforcement-relevant sections:
|
|
|
903
1081
|
`playwright` (the default when the key is absent), `pytest`, `vitest` or
|
|
904
1082
|
`cypress`. `check`, `next`, `tests`, `test-gates`, `doctor` and `init`
|
|
905
1083
|
all follow it. See `guides/RUNNER-NEUTRAL-EVIDENCE.md`.
|
|
1084
|
+
- `project.paths.testTooling:` — globs the owner asserts are test/developer
|
|
1085
|
+
tooling (`scripts/e2e/**`, `tools/dev/**`). A changed file matching one is
|
|
1086
|
+
attributed `test-tooling:<file>`: scope-expanding exactly like test
|
|
1087
|
+
infrastructure and never `CHANGE_UNMAPPED`, and never a pass over a
|
|
1088
|
+
discovered resource's own source — a glob that matches one is a config
|
|
1089
|
+
error (`check` exits 2). Optional; inside the trusted policy digest, so
|
|
1090
|
+
changing the list moves the approved revision. See "Developer and CI
|
|
1091
|
+
tooling is owner-declared" above.
|
|
906
1092
|
|
|
907
1093
|
## Classification policy (`.gateforge/classification-policy.yml`)
|
|
908
1094
|
|
|
@@ -504,7 +504,9 @@ Two details in that command are load-bearing. It names the engine's OWN `cli.js`
|
|
|
504
504
|
gateforge test-gates --changed --scope changed --result-only
|
|
505
505
|
```
|
|
506
506
|
|
|
507
|
-
For an authoritative slice, run `gateforge test-gates --changed --scope changed` without `--result-only`. `gateforge test-gates --changed` alone runs the full relevant mapped suite. Then
|
|
507
|
+
For an authoritative slice, run `gateforge test-gates --changed --scope changed` without `--result-only`. `gateforge test-gates --changed` alone runs the full relevant mapped suite. Then verify the COMMIT with the command the generated hook runs: `gateforge check --staged --require-e2e`. It grades the exact staged bytes, and it accepts the scoped receipt when the receipt covers the obligations this commit newly claims.
|
|
508
|
+
|
|
509
|
+
**The first commit that wires the gate.** A repository with no gate at HEAD is judged in **adoption mode**: `check --staged` demands proof of the obligations THIS commit newly claims instead of every obligation in the repository, so a `--scope changed` receipt for the same staged candidate is accepted and the adoption commit is committable without a bypass. Nothing else moves — an unmapped changed file still blocks, a policy-input pin mismatch still blocks, a receipt bound to another candidate tree is still refused, and every obligation the commit does not touch stays unproven debt that `gateforge adopt` baselines. The mode is computed from HEAD, never configured: there is no flag and no config key, and once a gate exists at HEAD it can never apply again. Outside adoption mode a commit that touches a gate-defining input (`package.json`, a lockfile, `.gateforge.yml`, a runner config) expands the evaluation to every obligation and a scoped receipt is refused with `EVIDENCE_SCOPE_INCOMPLETE` — the behaviour every commit after adoption keeps.
|
|
508
510
|
|
|
509
511
|
A changed file can affect obligations that have no test at all. Those
|
|
510
512
|
still block the slice, one blocker each, with the reason:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gate-forge/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"gateforgeCompatibility": {
|
|
5
5
|
"supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
|
|
6
6
|
},
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
+
"CHANGELOG.md",
|
|
23
24
|
"bin",
|
|
24
25
|
"dist",
|
|
25
26
|
"guides"
|
|
@@ -28,18 +29,19 @@
|
|
|
28
29
|
"build": "tsc -p tsconfig.build.json",
|
|
29
30
|
"prebuild": "npm run build -w @gate-forge/core && npm run build -w @gate-forge/plugin-protocol",
|
|
30
31
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
32
|
+
"prepack": "node ../../scripts/copy-changelog.mjs",
|
|
31
33
|
"test": "vitest run"
|
|
32
34
|
},
|
|
33
35
|
"dependencies": {
|
|
34
|
-
"@gate-forge/core": "^0.10.
|
|
35
|
-
"@gate-forge/http-contract": "^0.10.
|
|
36
|
-
"@gate-forge/pack-fastapi": "^0.10.
|
|
37
|
-
"@gate-forge/pack-alembic": "^0.10.
|
|
38
|
-
"@gate-forge/pack-http": "^0.10.
|
|
39
|
-
"@gate-forge/pack-playwright": "^0.10.
|
|
40
|
-
"@gate-forge/pack-sqlalchemy": "^0.10.
|
|
41
|
-
"@gate-forge/pack-task": "^0.10.
|
|
42
|
-
"@gate-forge/plugin-protocol": "^0.10.
|
|
36
|
+
"@gate-forge/core": "^0.10.2",
|
|
37
|
+
"@gate-forge/http-contract": "^0.10.2",
|
|
38
|
+
"@gate-forge/pack-fastapi": "^0.10.2",
|
|
39
|
+
"@gate-forge/pack-alembic": "^0.10.2",
|
|
40
|
+
"@gate-forge/pack-http": "^0.10.2",
|
|
41
|
+
"@gate-forge/pack-playwright": "^0.10.2",
|
|
42
|
+
"@gate-forge/pack-sqlalchemy": "^0.10.2",
|
|
43
|
+
"@gate-forge/pack-task": "^0.10.2",
|
|
44
|
+
"@gate-forge/plugin-protocol": "^0.10.2",
|
|
43
45
|
"picomatch": "^4.0.7",
|
|
44
46
|
"yaml": "^2.8.1"
|
|
45
47
|
},
|