@gate-forge/cli 0.10.3 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +2 -0
  3. package/dist/commands/adopt.d.ts +1 -1
  4. package/dist/commands/adopt.d.ts.map +1 -1
  5. package/dist/commands/adopt.js +5 -2
  6. package/dist/commands/adopt.js.map +1 -1
  7. package/dist/commands/check.d.ts.map +1 -1
  8. package/dist/commands/check.js +95 -23
  9. package/dist/commands/check.js.map +1 -1
  10. package/dist/commands/classify.d.ts.map +1 -1
  11. package/dist/commands/classify.js +24 -11
  12. package/dist/commands/classify.js.map +1 -1
  13. package/dist/commands/init.d.ts +14 -14
  14. package/dist/commands/init.d.ts.map +1 -1
  15. package/dist/commands/init.js +120 -80
  16. package/dist/commands/init.js.map +1 -1
  17. package/dist/commands/migrate-moved-documents.d.ts +44 -0
  18. package/dist/commands/migrate-moved-documents.d.ts.map +1 -0
  19. package/dist/commands/migrate-moved-documents.js +333 -0
  20. package/dist/commands/migrate-moved-documents.js.map +1 -0
  21. package/dist/commands/migrate.d.ts.map +1 -1
  22. package/dist/commands/migrate.js +98 -75
  23. package/dist/commands/migrate.js.map +1 -1
  24. package/dist/commands/next.d.ts.map +1 -1
  25. package/dist/commands/next.js +50 -17
  26. package/dist/commands/next.js.map +1 -1
  27. package/dist/docs-exclusions.js +1 -2
  28. package/dist/docs-exclusions.js.map +1 -1
  29. package/dist/endpoint-compiler.d.ts +82 -9
  30. package/dist/endpoint-compiler.d.ts.map +1 -1
  31. package/dist/endpoint-compiler.js +86 -41
  32. package/dist/endpoint-compiler.js.map +1 -1
  33. package/dist/endpoint-config.d.ts +32 -13
  34. package/dist/endpoint-config.d.ts.map +1 -1
  35. package/dist/endpoint-config.js +37 -27
  36. package/dist/endpoint-config.js.map +1 -1
  37. package/dist/execution.d.ts.map +1 -1
  38. package/dist/execution.js +6 -8
  39. package/dist/execution.js.map +1 -1
  40. package/dist/gateforge-owned.d.ts.map +1 -1
  41. package/dist/gateforge-owned.js +2 -6
  42. package/dist/gateforge-owned.js.map +1 -1
  43. package/dist/index.d.ts +2 -1
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +2 -1
  46. package/dist/index.js.map +1 -1
  47. package/dist/input-snapshot.d.ts +0 -2
  48. package/dist/input-snapshot.d.ts.map +1 -1
  49. package/dist/input-snapshot.js +9 -6
  50. package/dist/input-snapshot.js.map +1 -1
  51. package/dist/moved-owner-documents.d.ts +51 -0
  52. package/dist/moved-owner-documents.d.ts.map +1 -0
  53. package/dist/moved-owner-documents.js +92 -0
  54. package/dist/moved-owner-documents.js.map +1 -0
  55. package/dist/owner-answers.d.ts +31 -0
  56. package/dist/owner-answers.d.ts.map +1 -0
  57. package/dist/owner-answers.js +56 -0
  58. package/dist/owner-answers.js.map +1 -0
  59. package/dist/pipeline.d.ts +0 -2
  60. package/dist/pipeline.d.ts.map +1 -1
  61. package/dist/pipeline.js +34 -41
  62. package/dist/pipeline.js.map +1 -1
  63. package/dist/planes-inference.d.ts +3 -2
  64. package/dist/planes-inference.d.ts.map +1 -1
  65. package/dist/planes-inference.js +3 -2
  66. package/dist/planes-inference.js.map +1 -1
  67. package/dist/plugins.d.ts +25 -3
  68. package/dist/plugins.d.ts.map +1 -1
  69. package/dist/plugins.js +23 -7
  70. package/dist/plugins.js.map +1 -1
  71. package/dist/route-plane-proposals.d.ts +6 -3
  72. package/dist/route-plane-proposals.d.ts.map +1 -1
  73. package/dist/route-plane-proposals.js +26 -7
  74. package/dist/route-plane-proposals.js.map +1 -1
  75. package/dist/run-cache.d.ts +8 -2
  76. package/dist/run-cache.d.ts.map +1 -1
  77. package/dist/run-cache.js +9 -3
  78. package/dist/run-cache.js.map +1 -1
  79. package/dist/scope.d.ts.map +1 -1
  80. package/dist/scope.js +1 -3
  81. package/dist/scope.js.map +1 -1
  82. package/dist/yaml-section.d.ts +49 -0
  83. package/dist/yaml-section.d.ts.map +1 -0
  84. package/dist/yaml-section.js +443 -0
  85. package/dist/yaml-section.js.map +1 -0
  86. package/dist/yaml.d.ts +10 -0
  87. package/dist/yaml.d.ts.map +1 -0
  88. package/dist/yaml.js +35 -0
  89. package/dist/yaml.js.map +1 -0
  90. package/guides/CONNECT-YOUR-PROJECT.md +1 -1
  91. package/guides/QUICKSTART.md +13 -8
  92. package/guides/REFERENCE.md +140 -24
  93. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,6 +1,30 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## 0.11.0
5
+
6
+ ### Changed
7
+
8
+ - **One owner answer per fact: four owner-answer files become sections of two documents.** 0.11.0 consolidates what a repository declares. `.gateforge/planes.json` and `.gateforge/endpoints.json` become the `planes:` and `endpoints:` SECTIONS of `.gateforge/classification-policy.yml`; `.gateforge/http-clients.json` and `.gateforge/fastapi.json` become `.gateforge.yml` `scan.httpClients` and `scan.fastapi`; and the four scanner settings (`scanRoots`, `coverage`, `declarations`, `volatileFields`) leave the answers document for a REQUIRED `scan:` section in `.gateforge.yml`. There is NO dual read: a repository that still carries one of the old files is refused BY NAME, with the command that moves it and the file's new home, because silently ignoring the file would silently drop the owner's declaration and quietly change what the engine may conclude. The answers document is an owner-authored review artifact whose comments and reasons ARE the review record, so every write into it is a TEXT-level splice that takes the section's span from the PARSER — a comment at column zero inside the section, a `#` on the key's own line and a trailing comment block after it all survive, and the comment above a key that moves travels with it to its new home. `scan:` is REQUIRED rather than defaulted: these settings decide what a closed-world proof may claim, so a repository that has not answered them fails the config load (exit 2) instead of silently getting the weaker today's-default behaviour.
9
+ - **Upgrading:** `gateforge migrate` previews by default (prints the exact diff, writes nothing) and applies with `--confirm`, one step per moved file. It reads the config LENIENTLY — a repository that needs migrating has no `scan:` yet, which the strict loader refused with "expected object, received undefined" and no next step — and that lenient read exists for this command alone. Every old value is validated by the SAME reader that will read it after the move, BEFORE anything is written, and the composed `scan:` must satisfy the schema a run validates, so a migration can never leave a repository that cannot load. Then re-approve the policy digest once (`gateforge enforcement pin --pin-file <path> --confirm`): the bytes moved between documents are still owner-pinned, so the digest moves exactly once, at the re-pin. A repository that declares none of the moved settings keeps a byte-identical digest.
10
+ - The four pre-0.11 paths are no longer pinned as policy inputs: they do not exist, and the answers they held live in two documents the digest already binds. The generated gate wiring is pinned exactly as before.
11
+
12
+ ### Fixed
13
+
14
+ - **`crud-delete` and `crud-archive` are valid again, and a DELETE with no positive evidence stays blocked.** 0.11.0's first draft removed both from `ENDPOINT_CAPABILITIES` on the theory that the hard-vs-archive answer lives once, in the owner's `deleteRules`. That was a capability REMOVAL, not a move, and it broke real repositories twice over. A `deleteRule`'s `match` glob names a RESOURCE's source file, so a DELETE route that links no business resource — a link-row teardown, a draft discard — cannot be expressed there at all; a declared `crud-delete`/`crud-archive` is the only channel that can, with or without a model, and its removal also made an existing `.gateforge/endpoints.json` unmigratable (`migrate` validates every old value through the reader that will read it after the move, and refused `invalid endpoints config: rules[0].capability must be one of: …` before writing anything — measured on a repository carrying 22 `crud-delete` and 7 `crud-archive` declarations). The capability is restored, and with it 0.10.4's `DELETE_DECLARED` precedence: the declared answer wins, the model/`deleteRules` evidence channel serves the undeclared case, and the declaration still feeds the linked model's classifier. The same draft also resolved a DELETE 0.10.4 left blocked — it ran the archive/hard evidence branch for every DELETE rather than only for one linked to a resource, so a route whose handler merely CONTAINED `archive` or `purge` stopped being `ENDPOINT_SEMANTICS_UNRESOLVED` and silently became `crud-archive`/`crud-delete` (measured: 2 242 blocking entries under 0.10.4, 2 241 under the draft, the difference being exactly one such route). That branch requires a linkage again, so a substring in a handler name is not evidence about a model that is not there. `deleteRules` are consulted for a LINKED resource only, which is what they key on.
15
+
16
+ - **A blocking entry no longer says there is nothing to prove.** The one footer a diff-scoped report ends with answers "what must this change still prove, and which command settles it?". On a commit that upgrades one dependency and changes nothing else — `package.json` and the lockfile, the two gate-defining inputs — no discovered resource's source is in the change set, so the debt `gateforge adopt` recorded is forgiven and the count of newly-unproven obligations is zero; the commit is blocked all the same, because the receipt the previous run sealed was sealed against the OLD manifest bytes and its evidence-context `inputDigest` no longer matches the current input snapshot. The entry read `this change adds 0 unproven obligations: <none>. Run \`gateforge test-gates --changed\`. [NEW_DEBT]`: a blocking entry whose entire text claimed there was nothing to prove, next to a command that settles a problem it never described. It now names the cause it is actually reporting — `this change adds no NEW unproven obligations; this commit is refused for another reason: evidence-context: …` — and the same re-seal command, and a run that is neither owing nor refused prints no remedy line at all instead of advice to fix a commit that is already committable. WHAT blocks is unchanged (same entries, same exit codes) and the JSON `newDebt` document still reports the honest zero; only the sentence changed. Upgrading the engine itself invalidates a receipt the same way: upgrade first, re-seal with `gateforge test-gates --changed`, then commit both together (REFERENCE, "Upgrading Gateforge or dependencies").
17
+
18
+ ## 0.10.4
19
+
20
+ ### Added
21
+
22
+ - **`enforcement.adoptedDebt: lenient | strict` — the owner-pinned setting for how ADOPTED debt is treated under `strictE2E` after the adoption commit.** Default `lenient`; the key may be absent. Under `lenient` the adopted baseline keeps its forgiveness on any change set that carries no product behaviour — every changed file is a policy input, a gate-defining input (manifest and lockfile included), a catalog test file, test infrastructure, a runtime-declared input, declared `testTooling` or documentation, and NO discovered resource's source is in it — and such a commit demands receipt coverage of the obligations it newly claims, the same slice an adoption commit demands. The pin requirement is unchanged (`evaluateApprovedPolicy(...).status === 'enforced'`, or nothing is forgiven), a newly claimed or newly arising obligation is still graded on its own evidence, an owner WAIVER is still re-graded, and one discovered resource's source in the change set denies the neutrality in either value. The key lives in `.gateforge.yml`, so its bytes are inside the approved policy digest: flipping it is a policy-revision change the owner re-approves, never something a candidate grants itself.
23
+
24
+ ### Changed
25
+
26
+ - **The default behaviour after adoption is now lenient.** Measured on a real repository running 0.10.3: once the adoption commit landed, the first commit that added tests, the mapping sidecar and runner configuration — no product code at all — expanded the evaluation to every obligation, and under `strictE2E` every adopted `verdict:missing` obligation was re-graded blocking (`strict E2E mode: baselined: adopted as forgiven (was missing) …`), so that commit had to prove ALL the debt `gateforge adopt` had just recorded — which no scoped run can do. Such a commit is now committable: the adopted debt stays reported as forgiven debt. Declare `enforcement.adoptedDebt: strict` to keep the 0.10.3 behaviour exactly, in which case only an ADOPTION COMMIT (the one-shot condition computed from the base revision) keeps the forgiveness and every later commit re-grades adopted debt blocking. `gateforge init --preset strict` writes no key, so a preset install gets the lenient default like every other configuration.
27
+
4
28
  ## 0.10.3
5
29
 
6
30
  ### Fixed
@@ -8,8 +32,14 @@
8
32
  - **The docs-only slice seals in a repository that ADOPTED debt.** The seal guard also required the RAW policy blocking list to be empty, and that list is the pre-baseline view: in any repository that ran `gateforge adopt` it holds the adopted classification, finding, unclassified and unresolved entries forever (measured on the repository that motivated this: 1 660 entries), so the 0.10.2 exemption could never engage outside the template fixture, whose adopted debt was missing OBLIGATIONS — none of which are blocking entries. `test-gates --changed --scope changed` refused a `docs/**.md` commit with `--scope changed produced no runnable slice` and the next `check --staged` with the stale-attestation finding, exactly as before that fix. The condition is gone, and it was the only guard term that read a pre-baseline list: a docs-only change cannot change a policy entry, and `check` grades those entries against the adopted baseline on every commit. Nothing else about the receipt moves — it still covers no obligation, one non-docs file in the change keeps today's refusal, and a repository with no adopted debt takes the identical path.
9
33
  - **A receipt carried forward no longer reads the raw policy list either.** The same raw term gated the carry-forward over sealed candidate trees, so in an adopted repository the path could never run at all: the parent receipt was verified, the tree difference was proved to lie inside the evaluated paths, and the run still fell through to `--scope changed produced no runnable slice`. What that term has to mean is "no NEW policy debt", and the raw list cannot express it — it is never empty after adoption. It now reads the ADOPTED-baseline view through the same split `applyBaseline` grades with (`splitBlockingByBaseline`, extracted so the guard and the grading cannot disagree): an entry the adoption receipt forgives — by whole-entry fingerprint or by the classification layer's resource identity — is forgiven here too, and an entry adoption never recorded still refuses the carry-forward. Nothing else about the seal moved: the parent receipt must still verify, the two sealed trees must still differ only inside the evaluated paths, and every changed file must still have been scanned.
10
34
 
35
+ ### Fixed
36
+
37
+ - **`gateforge migrate` could not add a scanner section to a partially-migrated repository.** The writer that splices a section into an existing document rendered the WHOLE key chain whenever the parent already existed, so writing `scan.httpClients` into a `.gateforge.yml` that already declared a `scan:` block produced `scan.scan.httpClients` — and then refused its own output with "would not read back as the declared value", leaving the file un-migrated and the command unusable. Only the levels the document does not already declare are rendered now, so the leaf lands inside the existing parent. The failure was fail-closed (no bytes written, nothing corrupted), but the migration it belongs to — the one command a 0.10.x repository is told to run — could not complete.
38
+ - The input snapshot no longer lists the four pre-0.11 owner-answer paths at all. They were pinned as explicit absences for as long as they were inputs; with nothing reading them, a snapshot that named them kept a dead path alive inside every digest. The two documents their answers moved into are already snapshot inputs, so no run loses a bound it had.
39
+
11
40
  ## 0.10.2
12
41
 
42
+
13
43
  ### Changed
14
44
 
15
45
  - **The whole-run cap is now the operator's, and a STALL bound is ours.** `DEFAULT_RUN_TIMEOUT_MS = 30 min` was a bound nobody declared, and it killed a real 1 101-test suite that needs two hours. By default there is no whole-run cap at all: one applies only from `runtime.yml executionTimeoutSeconds` or `--run-timeout-min` (the precedence from the fix below is unchanged). What remains is a stall bound — no test has FINISHED for `runtime.yml stallTimeoutSeconds` (new key, default 15 minutes) and the run is killed and fails closed with `stalled: no test finished for 15 min (last finished: <title>, <k>/<n>)`. It rides the per-test completion signal the `--progress` stream already consumes, so there is one signal in a run, not two. The pytest/vitest/cypress runner adapters publish no per-test signal and keep a whole-run bound; the constant says so where it is declared.
package/README.md CHANGED
@@ -4,6 +4,8 @@ The gateforge command-line interface: initialize a project, discover
4
4
  resources and classification signals, inspect automatic decisions, reuse a
5
5
  repository's existing tests, evaluate obligations, run the supervised E2E
6
6
  gate, enforce the exact staged candidate, and maintain baselines.
7
+ **0.11.0:** one owner answer per fact. The four owner-answer FILES become SECTIONS of the two documents that already exist: `.gateforge/planes.json` and `.gateforge/endpoints.json` are now the `planes:` and `endpoints:` sections of `.gateforge/classification-policy.yml`, `.gateforge/http-clients.json` and `.gateforge/fastapi.json` are `.gateforge.yml` `scan.httpClients` and `scan.fastapi`, and the four scanner settings moved out of the answers document into a REQUIRED `scan:` block. There is no dual read — a repository still carrying one of the old files is refused BY NAME, with the command that moves it and its new home. `gateforge migrate` previews by default and applies with `--confirm`, one step per moved document, splicing at TEXT level so every comment survives, and validating every old value with the reader that will read it after the move. The hard-vs-archive answer keeps BOTH channels because they answer different questions: a declared `crud-delete`/`crud-archive` in the `endpoints:` section needs no linked model at all — a DELETE route that links no resource (a link-row teardown, a draft discard) cannot be expressed in `deleteRules`, whose globs name a resource's source file — while `deleteRules` answer for every route of one resource in a single line, and a DELETE with neither stays `ENDPOINT_SEMANTICS_UNRESOLVED` rather than being resolved by a word in a handler name. A diff-scoped report's `[NEW_DEBT]` entry no longer blocks a commit while saying there is nothing to prove — with no newly-unproven obligations it now names the cause it is actually reporting (a sealed receipt whose evidence-context `inputDigest` the change invalidated, typically) and the re-seal command. Upgrading: upgrade first, re-seal, commit both together.
8
+ **0.10.4:** `enforcement.adoptedDebt` (default `lenient`) decides how ADOPTED debt is treated under `strictE2E` after the adoption commit. With `lenient`, a change set that carries no product behaviour at all — tests, the mapping sidecar, runner configuration, no discovered resource's source — keeps the adopted baseline's forgiveness and is demanded only the coverage of the obligations it newly claims, so the first test-adding commit after `gateforge adopt` commits through the hook instead of re-grading every adopted obligation blocking. `strict` keeps the 0.10.3 behaviour exactly. Both values still require the owner pin to be enforced, still grade a newly claimed obligation on its own evidence, and still re-grade the moment a product source is in the change; the key lives in `.gateforge.yml`, so it is inside the approved policy digest.
7
9
  **0.10.3:** the two receipt paths that read the RAW policy blocking list now read the ADOPTED baseline instead, so both engage in a repository that ran `gateforge adopt` — a `docs/**.md` commit re-seals its zero-record receipt, and a receipt carried forward over sealed candidate trees is carried. Neither ever seals over NEW debt: an entry the adoption receipt forgives (by whole-entry fingerprint or by the classification layer's resource identity) is forgiven in the guard through the same split the grader uses, and an entry adoption never recorded still refuses the path. Nothing else about either receipt moved.
8
10
  **0.10.2:** the whole-run cap is the operator's (`runtime.yml executionTimeoutSeconds` or `--run-timeout-min`; by default there is none) and only a STALL bound is ours (`stallTimeoutSeconds`, default 15 min). The commit that WIRES the gate is committable: adoption mode is computed from the base revision — no flag, no config key — so the first adoption commit proves only the obligations it newly claims and the adopted baseline survives the strict-E2E re-grade. The pack configs (`.gateforge/planes.json`, `endpoints.json`, `http-clients.json`, `fastapi.json`) and the generated `.gateforge/hooks/` + `.gateforge/ci/` wiring are owner-pinned, and a run, a `check --staged` and an `enforcement pin` now agree on ONE input identity for the same repository. Upgrading a repository that ships a pack config or the generated wiring: re-pin once.
9
11
  **0.10.1:** `enforcement pin`, `check --staged` and `enforcement doctor` now agree on ONE policy digest for the same repository — a repository whose `.gateforge/adapters/` and `.gateforge/waivers/` are empty but untracked (exactly what `gateforge init` leaves behind) no longer makes a freshly written pin fail `check --staged` with `ENFORCEMENT_UNTRUSTED`, and re-pinning converges instead of looping. `tests mark --test` and `tests explain --test` accept the documented `<file>#<titlePath joined by '>'` reconciliation key next to the catalog `logicalKey`, so a key copied out of a report resolves instead of being reported as absent from the catalog. The npm tarball now ships this [CHANGELOG.md](CHANGELOG.md), so the release notes are readable from the installed package.
@@ -6,7 +6,7 @@ export declare const ADOPT_USAGE = "usage: gateforge adopt";
6
6
  * long, and the one case where an adopted obligation still blocks —
7
7
  * existed only in the source file.
8
8
  */
9
- export declare const ADOPT_HELP = "usage: gateforge adopt\n\nAdopts an EXISTING repository: run it once, after `gateforge init`, on a\nproject that already has code and therefore already has findings.\n\n what it records \u2014 the currently-blocking findings: unsatisfied\n obligation fingerprints (pin #2) plus every blocking entry, and, as a\n second layer, the classification-blocked resource identities. They go\n into .gateforge/baselines/obligations.json, sanctioned by a dated,\n count-annotated receipt (.gateforge/baselines/adoption.json). Without\n that receipt a baseline forgives nothing.\n\n shrink-only \u2014 the recorded set never grows on its own. It is the one\n sanctioned bulk-add this engine performs, and only once per repository:\n a second `adopt` is a no-op success. Resolve debt and shrink it with\n `gateforge baseline update`; new (never-adopted) work is never\n baselined and keeps blocking (`check` exits 1).\n\n strictE2E \u2014 with `enforcement.strictE2E: true` a baselined E2E\n obligation is NOT proof. It blocks with ENFORCEMENT_UNTRUSTED again\n as soon as a change touches it; adoption forgives today's state, not\n the next edit.\n\n wiring \u2014 after recording, it applies the blocking wiring (pre-commit\n hook block + CI template) through the same idempotent path as\n `gateforge init --blocking`.\n\n plane-ordered \u2014 adoption refuses (exit 2, nothing written) while\n any blocking entry is plane-unresolved: a plane answer changes\n the resource's identity, so debt adopted before the answer\n would not match after it. Answer the planes first\n (`gateforge classify plane <folder> <tenant|master|global> --confirm`).\n\nExit codes: 0 adopted (or an idempotent no-op), 2 config/usage or a plane-unresolved resource (R1-9).";
9
+ export declare const ADOPT_HELP = "usage: gateforge adopt\n\nAdopts an EXISTING repository: run it once, after `gateforge init`, on a\nproject that already has code and therefore already has findings.\n\n what it records \u2014 the currently-blocking findings: unsatisfied\n obligation fingerprints (pin #2) plus every blocking entry, and, as a\n second layer, the classification-blocked resource identities. They go\n into .gateforge/baselines/obligations.json, sanctioned by a dated,\n count-annotated receipt (.gateforge/baselines/adoption.json). Without\n that receipt a baseline forgives nothing.\n\n shrink-only \u2014 the recorded set never grows on its own. It is the one\n sanctioned bulk-add this engine performs, and only once per repository:\n a second `adopt` is a no-op success. Resolve debt and shrink it with\n `gateforge baseline update`; new (never-adopted) work is never\n baselined and keeps blocking (`check` exits 1).\n\n strictE2E \u2014 with `enforcement.strictE2E: true` a baselined E2E\n obligation is NOT proof. It blocks with ENFORCEMENT_UNTRUSTED again\n as soon as a change touches what it proves. A change set that carries\n no product behaviour at all \u2014 tests, the mapping sidecar, runner\n configuration \u2014 keeps the adopted debt forgiven under the default\n `enforcement.adoptedDebt: lenient`; declare `strict` to re-grade it\n on every commit after this one.\n\n wiring \u2014 after recording, it applies the blocking wiring (pre-commit\n hook block + CI template) through the same idempotent path as\n `gateforge init --blocking`.\n\n plane-ordered \u2014 adoption refuses (exit 2, nothing written) while\n any blocking entry is plane-unresolved: a plane answer changes\n the resource's identity, so debt adopted before the answer\n would not match after it. Answer the planes first\n (`gateforge classify plane <folder> <tenant|master|global> --confirm`).\n\nExit codes: 0 adopted (or an idempotent no-op), 2 config/usage or a plane-unresolved resource (R1-9).";
10
10
  /**
11
11
  * Runs the adopt subcommand.
12
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAYnC,eAAO,MAAM,WAAW,2BAA2B,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,suDAiC+E,CAAC;AAWvG;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAkLnF"}
1
+ {"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAYnC,eAAO,MAAM,WAAW,2BAA2B,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,k9DAoC+E,CAAC;AAWvG;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAkLnF"}
@@ -78,8 +78,11 @@ project that already has code and therefore already has findings.
78
78
 
79
79
  strictE2E — with \`enforcement.strictE2E: true\` a baselined E2E
80
80
  obligation is NOT proof. It blocks with ENFORCEMENT_UNTRUSTED again
81
- as soon as a change touches it; adoption forgives today's state, not
82
- the next edit.
81
+ as soon as a change touches what it proves. A change set that carries
82
+ no product behaviour at all — tests, the mapping sidecar, runner
83
+ configuration — keeps the adopted debt forgiven under the default
84
+ \`enforcement.adoptedDebt: lenient\`; declare \`strict\` to re-grade it
85
+ on every commit after this one.
83
86
 
84
87
  wiring — after recording, it applies the blocking wiring (pre-commit
85
88
  hook block + CI template) through the same idempotent path as
@@ -1 +1 @@
1
- {"version":3,"file":"adopt.js","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sGAiC8D,CAAC;AAEvG,oEAAoE;AACpE,SAAS,SAAS,CAAC,IAAiC;IAClD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EA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EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA4CnF;AAqWD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAEgE,CAAC;AAEnG;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMhE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,GAAG,OAAO,CAE9E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,GACf,MAAM,CAeR;AAsCD;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoxCrF"}
@@ -1328,16 +1328,51 @@ export async function runCheckGate(io, options) {
1328
1328
  // exactly the same `evaluateApprovedPolicy(...).status === 'enforced'`
1329
1329
  // condition. One product source in the change set denies the neutrality,
1330
1330
  // so the strict re-grade returns. Nothing else moves.
1331
+ //
1332
+ // 0.10.4 (`enforcement.adoptedDebt`, the OWNER-PINNED setting for how
1333
+ // adopted debt is treated under strict E2E AFTER the adoption commit):
1334
+ // `lenient` — the ABSENT default — drops the `adoptionCommit` term from
1335
+ // the neutrality branch, so the forgiveness survives on ANY diff-scoped
1336
+ // change set with no product source: a later commit that only adds tests,
1337
+ // the mapping sidecar or runner configuration no longer has to re-prove
1338
+ // debt `gateforge adopt` already recorded, which is what 0.10.3 demanded
1339
+ // of the first test-adding commit of every repository. `strict` keeps
1340
+ // the 0.10.3 condition byte for byte (an adoption commit or
1341
+ // policy-inputs-only, plus the enforced pin). The pin requirement is
1342
+ // UNCHANGED in both values, a newly claimed obligation is still graded
1343
+ // on its own evidence (the forgiveness covers adopted-baseline entries
1344
+ // only), and one discovered resource's source in the change set denies
1345
+ // the neutrality in either value. `init --preset strict` writes no key,
1346
+ // so a preset install gets the lenient default like every other.
1347
+ const adoptedDebtLenient = config.enforcement?.adoptedDebt !== 'strict';
1348
+ const ownerPinEnforced = evaluateApprovedPolicy(docsApprovalResolution ??
1349
+ resolveApprovedPolicyDigest({
1350
+ flag: options.approvedPolicyDigest,
1351
+ env: io.env,
1352
+ candidateCwd: io.cwd,
1353
+ candidateConfig: config,
1354
+ }), docsApprovalDigest ?? trustedPolicyDigestForConfig(io.cwd, config), config.enforcement?.strictE2E === true || hasOwnerExclusions).status === 'enforced';
1331
1355
  const adoptedBaselineSurvivesStrictE2E = diffScoped &&
1332
1356
  (scopeDecision.policyInputsOnly ||
1333
- (adoptionCommit && scopeDecision.productBehaviorNeutral)) &&
1334
- evaluateApprovedPolicy(docsApprovalResolution ??
1335
- resolveApprovedPolicyDigest({
1336
- flag: options.approvedPolicyDigest,
1337
- env: io.env,
1338
- candidateCwd: io.cwd,
1339
- candidateConfig: config,
1340
- }), docsApprovalDigest ?? trustedPolicyDigestForConfig(io.cwd, config), config.enforcement?.strictE2E === true || hasOwnerExclusions).status === 'enforced';
1357
+ ((adoptionCommit || adoptedDebtLenient) && scopeDecision.productBehaviorNeutral)) &&
1358
+ ownerPinEnforced;
1359
+ // 0.10.4: the same slice as a RECEIPT-COVERAGE fact. Forgiveness alone
1360
+ // would not unblock the commit it exists for: a tests/test-map/runner-
1361
+ // config change expands the evaluation to every obligation, so the
1362
+ // scoped receipt is refused with `EVIDENCE_SCOPE_INCOMPLETE` over the
1363
+ // adopted debt BEFORE any verdict is graded. Under strict E2E with the
1364
+ // lenient default such a change set therefore demands exactly what
1365
+ // adoption mode demands of the wiring commit — coverage of the
1366
+ // obligations it newly claims — while every untouched obligation stays
1367
+ // unproven, named debt. Narrowed to the lenient value, to strict E2E
1368
+ // (a non-strict run keeps today's requirement byte for byte) and to an
1369
+ // ENFORCED pin (same trust bar as the forgiveness above), so `strict`
1370
+ // and an unpinned candidate keep 0.10.3 exactly.
1371
+ const adoptedDebtCoverageSlice = config.enforcement?.strictE2E === true &&
1372
+ adoptedDebtLenient &&
1373
+ diffScoped &&
1374
+ scopeDecision.productBehaviorNeutral &&
1375
+ ownerPinEnforced;
1341
1376
  // Static annotations are compared with generated sidecar entries. The
1342
1377
  // advisory is deliberately separate from blockers for this warning-only
1343
1378
  // release period; only the tracked sidecar and a verified receipt bind
@@ -1561,8 +1596,15 @@ export async function runCheckGate(io, options) {
1561
1596
  // mismatch, a receipt bound to another candidate tree, a
1562
1597
  // `CHANGE_UNMAPPED` file and an uncovered newly claimed obligation are
1563
1598
  // all refused exactly as before.
1599
+ // ADOPTED DEBT (0.10.4, `adoptedDebtCoverageSlice` above): the same
1600
+ // treatment a product-behaviour-neutral change set gets after the
1601
+ // adoption commit — coverage of what it newly claims, never of the
1602
+ // adopted debt the change cannot have affected.
1564
1603
  //
1565
- const coverageChangedFiles = diffScoped && (scopeDecision.mode === 'changed' || adoptionCommit) ? scopeDecision.changedFiles : null;
1604
+ const coverageChangedFiles = diffScoped &&
1605
+ (scopeDecision.mode === 'changed' || adoptionCommit || adoptedDebtCoverageSlice)
1606
+ ? scopeDecision.changedFiles
1607
+ : null;
1566
1608
  const requiredCoverage = () => {
1567
1609
  const sources = sourcesByResourceId(pipeline.graph, pipeline.behaviorCatalog);
1568
1610
  return pipeline.policy.obligations
@@ -1859,20 +1901,6 @@ export async function runCheckGate(io, options) {
1859
1901
  if (banner.length > 0)
1860
1902
  report = `${banner.join('\n')}\n${report}`;
1861
1903
  }
1862
- if (newDebt !== null) {
1863
- if (format === 'json') {
1864
- const document = JSON.parse(report);
1865
- report = canonicalJson({ ...document, newDebt: { count: newDebt.length, obligationIds: newDebt } });
1866
- }
1867
- else if (format === 'text') {
1868
- const debtLine = humanMessage({
1869
- detail: `this change adds ${String(newDebt.length)} unproven obligations: ${newDebt.join(', ') || '<none>'}`,
1870
- type: 'new-debt',
1871
- nextAction: 'gateforge test-gates --changed',
1872
- });
1873
- report = `${report}\n${debtLine}`;
1874
- }
1875
- }
1876
1904
  if (options.timing === true) {
1877
1905
  // Per-step wall-clock timings: additive
1878
1906
  // observability behind `--timing`, never an input to any verdict.
@@ -1937,6 +1965,50 @@ export async function runCheckGate(io, options) {
1937
1965
  }
1938
1966
  : {}),
1939
1967
  });
1968
+ // The one footer that answers "what must THIS change still prove, and
1969
+ // which command settles it?". It sits after `decideStrictness` because
1970
+ // it must know whether the run blocks at all: with nothing newly
1971
+ // unproven, a blocking run is blocked for a reason that has nothing to
1972
+ // do with new debt, and the footer used to say so by reporting `0
1973
+ // unproven obligations: <none>` — a blocking entry whose whole text
1974
+ // claimed there was nothing to prove, next to a command that settles a
1975
+ // problem it never described (measured: a commit that upgrades one
1976
+ // dependency and changes nothing else, whose sealed receipt went stale
1977
+ // with the manifest bytes and was refused `evidence-context`). Nothing
1978
+ // about WHAT blocks changes here: only the sentence that names it.
1979
+ if (newDebt !== null) {
1980
+ if (format === 'json') {
1981
+ const document = JSON.parse(report);
1982
+ report = canonicalJson({ ...document, newDebt: { count: newDebt.length, obligationIds: newDebt } });
1983
+ }
1984
+ else if (format === 'text') {
1985
+ // The evidence-context entries are the ones an owner acts on by
1986
+ // re-sealing, so they are named first and on their own; the rest
1987
+ // follow, in report order, never dropped.
1988
+ const causes = evaluatedBlocking.filter((entry) => entry.detail.startsWith('evidence-context:'));
1989
+ const named = (causes.length > 0 ? causes : evaluatedBlocking)
1990
+ .map((entry) => entry.detail)
1991
+ .join('; ');
1992
+ const debtLine = newDebt.length > 0
1993
+ ? humanMessage({
1994
+ detail: `this change adds ${String(newDebt.length)} unproven obligations: ${newDebt.join(', ')}`,
1995
+ type: 'new-debt',
1996
+ nextAction: 'gateforge test-gates --changed',
1997
+ })
1998
+ : decision.exitCode === 0 || named === ''
1999
+ ? // Nothing is owed and nothing is refused: there is no
2000
+ // remedy to print, and a command here would be advice to
2001
+ // fix a commit that is already committable.
2002
+ ''
2003
+ : humanMessage({
2004
+ detail: `this change adds no NEW unproven obligations; this commit is refused for another reason: ${named}`,
2005
+ type: 'new-debt',
2006
+ nextAction: 'gateforge test-gates --changed',
2007
+ });
2008
+ if (debtLine !== '')
2009
+ report = `${report}\n${debtLine}`;
2010
+ }
2011
+ }
1940
2012
  if (decision.wouldBlock && decision.exitCode !== decision.strictExitCode) {
1941
2013
  // The softened decision is announced on stderr too: a CI log that
1942
2014
  // only keeps stdout must not read as "nothing was wrong".