@gate-forge/cli 0.9.0 → 0.10.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/README.md +12 -5
  2. package/dist/cache-exclusions.d.ts +20 -13
  3. package/dist/cache-exclusions.d.ts.map +1 -1
  4. package/dist/cache-exclusions.js +47 -33
  5. package/dist/cache-exclusions.js.map +1 -1
  6. package/dist/cli.d.ts +1 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +11 -0
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/adopt.d.ts +3 -2
  11. package/dist/commands/adopt.d.ts.map +1 -1
  12. package/dist/commands/adopt.js +38 -5
  13. package/dist/commands/adopt.js.map +1 -1
  14. package/dist/commands/blocking.d.ts +20 -1
  15. package/dist/commands/blocking.d.ts.map +1 -1
  16. package/dist/commands/blocking.js +105 -10
  17. package/dist/commands/blocking.js.map +1 -1
  18. package/dist/commands/check.d.ts +34 -0
  19. package/dist/commands/check.d.ts.map +1 -1
  20. package/dist/commands/check.js +93 -7
  21. package/dist/commands/check.js.map +1 -1
  22. package/dist/commands/classify.d.ts +1 -0
  23. package/dist/commands/classify.d.ts.map +1 -1
  24. package/dist/commands/classify.js +230 -14
  25. package/dist/commands/classify.js.map +1 -1
  26. package/dist/commands/common.d.ts +6 -1
  27. package/dist/commands/common.d.ts.map +1 -1
  28. package/dist/commands/common.js +8 -1
  29. package/dist/commands/common.js.map +1 -1
  30. package/dist/commands/enforcement.d.ts +9 -1
  31. package/dist/commands/enforcement.d.ts.map +1 -1
  32. package/dist/commands/enforcement.js +448 -13
  33. package/dist/commands/enforcement.js.map +1 -1
  34. package/dist/commands/init.d.ts +20 -0
  35. package/dist/commands/init.d.ts.map +1 -1
  36. package/dist/commands/init.js +296 -93
  37. package/dist/commands/init.js.map +1 -1
  38. package/dist/commands/migrate.d.ts +14 -0
  39. package/dist/commands/migrate.d.ts.map +1 -0
  40. package/dist/commands/migrate.js +177 -0
  41. package/dist/commands/migrate.js.map +1 -0
  42. package/dist/commands/next.d.ts.map +1 -1
  43. package/dist/commands/next.js +7 -2
  44. package/dist/commands/next.js.map +1 -1
  45. package/dist/commands/pre-commit.d.ts.map +1 -1
  46. package/dist/commands/pre-commit.js +62 -19
  47. package/dist/commands/pre-commit.js.map +1 -1
  48. package/dist/commands/tests.d.ts.map +1 -1
  49. package/dist/commands/tests.js +54 -24
  50. package/dist/commands/tests.js.map +1 -1
  51. package/dist/docs-exclusions.d.ts +32 -5
  52. package/dist/docs-exclusions.d.ts.map +1 -1
  53. package/dist/docs-exclusions.js +60 -26
  54. package/dist/docs-exclusions.js.map +1 -1
  55. package/dist/evidence-config-text.d.ts +57 -0
  56. package/dist/evidence-config-text.d.ts.map +1 -0
  57. package/dist/evidence-config-text.js +263 -0
  58. package/dist/evidence-config-text.js.map +1 -0
  59. package/dist/execution.d.ts +51 -8
  60. package/dist/execution.d.ts.map +1 -1
  61. package/dist/execution.js +61 -29
  62. package/dist/execution.js.map +1 -1
  63. package/dist/gateforge-owned.d.ts +30 -5
  64. package/dist/gateforge-owned.d.ts.map +1 -1
  65. package/dist/gateforge-owned.js +136 -18
  66. package/dist/gateforge-owned.js.map +1 -1
  67. package/dist/git-hooks.d.ts.map +1 -1
  68. package/dist/git-hooks.js +15 -0
  69. package/dist/git-hooks.js.map +1 -1
  70. package/dist/input-snapshot.d.ts.map +1 -1
  71. package/dist/input-snapshot.js +2 -6
  72. package/dist/input-snapshot.js.map +1 -1
  73. package/dist/legacy-exclusion-paths.d.ts +28 -0
  74. package/dist/legacy-exclusion-paths.d.ts.map +1 -0
  75. package/dist/legacy-exclusion-paths.js +48 -0
  76. package/dist/legacy-exclusion-paths.js.map +1 -0
  77. package/dist/providers.d.ts +54 -0
  78. package/dist/providers.d.ts.map +1 -1
  79. package/dist/providers.js +101 -0
  80. package/dist/providers.js.map +1 -1
  81. package/dist/staged-candidate.d.ts.map +1 -1
  82. package/dist/staged-candidate.js +2 -1
  83. package/dist/staged-candidate.js.map +1 -1
  84. package/dist/trusted-policy.d.ts.map +1 -1
  85. package/dist/trusted-policy.js +3 -2
  86. package/dist/trusted-policy.js.map +1 -1
  87. package/guides/CONNECT-YOUR-PROJECT.md +64 -0
  88. package/guides/QUICKSTART.md +68 -15
  89. package/guides/REFERENCE.md +229 -33
  90. package/guides/TEST-ENVIRONMENT.md +36 -0
  91. package/guides/UPGRADE-0.8-to-0.9.md +9 -1
  92. package/guides/UPGRADE-0.9-to-0.10.md +137 -0
  93. package/package.json +10 -10
package/README.md CHANGED
@@ -4,7 +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.9.0 vs. published 0.8.0:** `check --staged` reads the staged bytes, the scan skips untracked gitignored files (receipt identity unchanged), Gateforge's own setup files are policy inputs so the setup commit passes with the policy digest pinned, test-directory models stay out of the graph, per-tenant singletons are tagged only on an exact configured scope, `init` asks one plane question per route folder, `classify plane` takes a folder, `--docs-exclude-file`, `init --behavior`, `explain <path>`, ranked and capped `tests suggest`, `FASTAPI_ROUTER_UNMOUNTED` / `HTTP_METHOD_DYNAMIC` / `ENDPOINT_RESOURCE_CANDIDATE_UNMATCHED` / folded FastAPI prefixes, and no `.pyc` in a published tarball. Upgrading: [UPGRADE-0.8-to-0.9](guides/UPGRADE-0.8-to-0.9.md).
7
+ **0.10.0:** evidence exclusions moved INTO `.gateforge.yml` (`evidence.exclude.docs` / `.cache`), and `gateforge migrate` moves an existing 0.9 declaration there; `enforcement pin --pin-file` writes the owner-approved policy digest outside the repository and `enforcement doctor` reports `policy-inputs-vs-HEAD` / `approved-digest`; transport (`http:*`) obligations can now be PROVEN through the Observe channel by an ordinary suite-driven test; `@gate-forge/pack-playwright/fixture` works from CommonJS (`require`), so a default-shaped Playwright suite can route its traffic through the session proxy; `classify delete` records owner-declared delete semantics. Upgrading: [UPGRADE-0.9-to-0.10](guides/UPGRADE-0.9-to-0.10.md).
8
+ **0.9.1:** `init --blocking` and `enforce` now insert the `gateforge-check` entry as the FIRST item of an existing `.pre-commit-config.yaml` `repos:` list, so file-mutating hooks cannot run before the gate. See [CHANGELOG.md](../CHANGELOG.md) for the 0.9.1 fixes. **0.9.0 vs. published 0.8.0:** `check --staged` reads the staged bytes, the scan skips untracked gitignored files (receipt identity unchanged), Gateforge's own setup files are policy inputs so the setup commit passes with the policy digest pinned, test-directory models stay out of the graph, per-tenant singletons are tagged only on an exact configured scope, `init` asks one plane question per route folder, `classify plane` takes a folder, `--docs-exclude-file`, `init --behavior`, `explain <path>`, ranked and capped `tests suggest`, `FASTAPI_ROUTER_UNMOUNTED` / `HTTP_METHOD_DYNAMIC` / `ENDPOINT_RESOURCE_CANDIDATE_UNMATCHED` / folded FastAPI prefixes, and no `.pyc` in a published tarball. Upgrading: [UPGRADE-0.8-to-0.9](guides/UPGRADE-0.8-to-0.9.md).
8
9
 
9
10
  **0.8.0 vs. published 0.7.1:** one-command local proof (`gateforge run`), witnessed single tests (`--test`), test-only re-seal, owner-chosen strictness and quarantine, a strict run preflight in the doctor, CI progress stream and witnessed CI templates, adapter kit and scaffold, an engine-owned queue observer for `task` cases, timing chaos and twin path coverage. Upgrading: [UPGRADE-0.7-to-0.8](guides/UPGRADE-0.7-to-0.8.md).
10
11
 
@@ -30,6 +31,7 @@ including tarball installs: [Quickstart](guides/QUICKSTART.md).
30
31
  - [Quickstart](guides/QUICKSTART.md)
31
32
  - [Test environment](guides/TEST-ENVIRONMENT.md)
32
33
  - [Upgrade from 0.8 to 0.9](guides/UPGRADE-0.8-to-0.9.md)
34
+ - [Upgrade from 0.9 to 0.10](guides/UPGRADE-0.9-to-0.10.md)
33
35
  - [Upgrade from 0.7 to 0.8](guides/UPGRADE-0.7-to-0.8.md)
34
36
  - [Upgrade from 0.6 to 0.7](guides/UPGRADE-0.6-to-0.7.md)
35
37
  - [Runners other than Playwright](guides/RUNNER-NEUTRAL-EVIDENCE.md)
@@ -115,10 +117,15 @@ run), `2` config/usage error. `tests diagnose` has its own advisory contract
115
117
  - Staged candidates containing symlinks or submodules (and unmerged index
116
118
  entries) are typed blocks in `check --staged` and `broker commit` —
117
119
  explicit, never fallbacks; support is not implemented.
118
- - A Playwright config with NO named project yields native rows with an
119
- empty project name, which the strict catalog schema rejects as an
120
- internal error (exit 2) instead of a typed row; a typed empty-project
121
- row is open work.
120
+ - A Playwright config with NO named project: `tests discover` prints an
121
+ error line naming the config and the fix
122
+ (`projects: [{ name: 'chromium' }]`) and still writes the catalog, and
123
+ `enforcement doctor` fails the `playwright-projects` row — `test-gates`
124
+ needs a named project.
125
+ - Gateforge reads the FIRST of `playwright.config.{ts,mts,cts,js,mjs,cjs}`
126
+ at the repository root; a suffixed config such as
127
+ `playwright.config.e2e.js` is not read — rename it to
128
+ `playwright.config.js` if it is the suite to prove.
122
129
  - Run-state hygiene is enforced, not forgiven: a committed run-state
123
130
  directory or include globs that omit the spec directories fail closed —
124
131
  gitignore `.gateforge/test-gates/` and include the spec globs.
@@ -1,10 +1,11 @@
1
1
  import type { GateforgeConfig } from '@gate-forge/core';
2
- /** Repo-relative owner declaration path. */
3
- export declare const CACHE_EXCLUSIONS_PATH = ".gateforge/cache-exclusions.yml";
2
+ /** Where the declaration is read from, named in refusals and digests. */
3
+ export declare const CACHE_EXCLUSIONS_SOURCE = ".gateforge.yml (evidence.exclude.cache)";
4
4
  /** The reduced guarantee shown in reports when bytecode is excluded. */
5
5
  export declare const CACHE_EXCLUSIONS_GUARANTEE: string;
6
6
  /**
7
- * Loads and validates the optional owner-declared Python bytecode files.
7
+ * Loads and validates the owner-declared Python bytecode files from
8
+ * `.gateforge.yml` (`evidence.exclude.cache`).
8
9
  *
9
10
  * Args:
10
11
  * cwd: absolute repository root.
@@ -14,32 +15,38 @@ export declare const CACHE_EXCLUSIONS_GUARANTEE: string;
14
15
  * string[]: sorted exact cache paths, or an empty list when undeclared.
15
16
  *
16
17
  * Throws:
17
- * UsageError: malformed declarations, unsafe paths, or unreadable files.
18
+ * UsageError: a pre-0.10 declaration file, or any refusal below.
18
19
  */
19
20
  export declare function loadCacheExclusions(cwd: string, config: GateforgeConfig): string[];
20
21
  /**
21
- * Validates an init request and returns canonical, sorted file paths.
22
+ * Reads the REMOVED 0.9 declaration file — for `gateforge migrate` only.
23
+ * Same symlink, shape and validation rules as the 0.9 loader, so a
24
+ * migrated repository gets exactly the list it had before.
22
25
  *
23
26
  * Args:
24
27
  * cwd: absolute repository root.
25
- * files: exact paths requested by the owner.
26
28
  * config: validated Gateforge configuration.
27
29
  *
28
30
  * Returns:
29
- * string[]: validated, sorted paths.
31
+ * string[]: sorted exact cache paths, or an empty list when absent.
30
32
  *
31
33
  * Throws:
32
- * UsageError: an invalid path, configured input, or unsafe filesystem entry.
34
+ * UsageError: an unreadable, malformed or unsafe declaration.
33
35
  */
34
- export declare function validateRequestedCacheFiles(cwd: string, files: readonly string[], config: GateforgeConfig): string[];
36
+ export declare function readLegacyCacheExclusions(cwd: string, config: GateforgeConfig): string[];
35
37
  /**
36
- * Writes the owner declaration in a stable format.
38
+ * Validates an init request and returns canonical, sorted file paths.
37
39
  *
38
40
  * Args:
39
- * files: validated cache paths.
41
+ * cwd: absolute repository root.
42
+ * files: exact paths requested by the owner.
43
+ * config: validated Gateforge configuration.
40
44
  *
41
45
  * Returns:
42
- * string: YAML declaration text.
46
+ * string[]: validated, sorted paths.
47
+ *
48
+ * Throws:
49
+ * UsageError: an invalid path, configured input, or unsafe filesystem entry.
43
50
  */
44
- export declare function renderCacheExclusions(files: readonly string[]): string;
51
+ export declare function validateRequestedCacheFiles(cwd: string, files: readonly string[], config: GateforgeConfig): string[];
45
52
  //# sourceMappingURL=cache-exclusions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache-exclusions.d.ts","sourceRoot":"","sources":["../src/cache-exclusions.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAEvE,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,QAEyB,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAgClF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,eAAe,GACtB,MAAM,EAAE,CAEV;AAuHD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAItE"}
1
+ {"version":3,"file":"cache-exclusions.d.ts","sourceRoot":"","sources":["../src/cache-exclusions.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKxD,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AACjF,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,QAEyB,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAKlF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAmCxF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,eAAe,GACtB,MAAM,EAAE,CAEV"}
@@ -1,20 +1,23 @@
1
1
  /**
2
2
  * Owner-declared Python bytecode files that may leave evidence identity.
3
- * The declaration is trusted only when the matching trusted-policy digest
4
- * is provisioned outside the candidate repository.
3
+ * The declaration lives in `.gateforge.yml` under `evidence.exclude.cache`
4
+ * (0.10.0) and is trusted only when the matching trusted-policy digest is
5
+ * provisioned outside the candidate repository.
5
6
  */
6
7
  import { existsSync, lstatSync, readFileSync } from 'node:fs';
7
8
  import { join, resolve } from 'node:path';
8
9
  import { parse as parseYaml } from 'yaml';
9
10
  import { collectDeclaredInputs } from './input-snapshot.js';
10
11
  import { UsageError } from './errors.js';
11
- /** Repo-relative owner declaration path. */
12
- export const CACHE_EXCLUSIONS_PATH = '.gateforge/cache-exclusions.yml';
12
+ import { LEGACY_CACHE_EXCLUSIONS_PATH, rejectLegacyExclusions } from './legacy-exclusion-paths.js';
13
+ /** Where the declaration is read from, named in refusals and digests. */
14
+ export const CACHE_EXCLUSIONS_SOURCE = '.gateforge.yml (evidence.exclude.cache)';
13
15
  /** The reduced guarantee shown in reports when bytecode is excluded. */
14
16
  export const CACHE_EXCLUSIONS_GUARANTEE = 'owner assertion only: Gateforge does not prove excluded bytecode cannot affect runtime behavior; ' +
15
17
  'a changed bytecode file can make old evidence appear current';
16
18
  /**
17
- * Loads and validates the optional owner-declared Python bytecode files.
19
+ * Loads and validates the owner-declared Python bytecode files from
20
+ * `.gateforge.yml` (`evidence.exclude.cache`).
18
21
  *
19
22
  * Args:
20
23
  * cwd: absolute repository root.
@@ -24,39 +27,64 @@ export const CACHE_EXCLUSIONS_GUARANTEE = 'owner assertion only: Gateforge does
24
27
  * string[]: sorted exact cache paths, or an empty list when undeclared.
25
28
  *
26
29
  * Throws:
27
- * UsageError: malformed declarations, unsafe paths, or unreadable files.
30
+ * UsageError: a pre-0.10 declaration file, or any refusal below.
28
31
  */
29
32
  export function loadCacheExclusions(cwd, config) {
30
- const absolute = join(cwd, ...CACHE_EXCLUSIONS_PATH.split('/'));
33
+ rejectLegacyExclusions(cwd);
34
+ const files = config.evidence?.exclude?.cache ?? [];
35
+ if (files.length === 0)
36
+ return [];
37
+ return validateCacheFiles(cwd, files, config);
38
+ }
39
+ /**
40
+ * Reads the REMOVED 0.9 declaration file — for `gateforge migrate` only.
41
+ * Same symlink, shape and validation rules as the 0.9 loader, so a
42
+ * migrated repository gets exactly the list it had before.
43
+ *
44
+ * Args:
45
+ * cwd: absolute repository root.
46
+ * config: validated Gateforge configuration.
47
+ *
48
+ * Returns:
49
+ * string[]: sorted exact cache paths, or an empty list when absent.
50
+ *
51
+ * Throws:
52
+ * UsageError: an unreadable, malformed or unsafe declaration.
53
+ */
54
+ export function readLegacyCacheExclusions(cwd, config) {
55
+ const absolute = join(cwd, ...LEGACY_CACHE_EXCLUSIONS_PATH.split('/'));
31
56
  if (!existsSync(absolute))
32
57
  return [];
33
- inspectCachePathComponents(cwd, CACHE_EXCLUSIONS_PATH, true, false);
58
+ inspectCachePathComponents(cwd, LEGACY_CACHE_EXCLUSIONS_PATH, true, false);
34
59
  let stat;
35
60
  try {
36
61
  stat = lstatSync(absolute);
37
62
  }
38
63
  catch (error) {
39
- throw new UsageError(`cannot inspect ${CACHE_EXCLUSIONS_PATH}: ${error.message}`);
64
+ throw new UsageError(`cannot inspect ${LEGACY_CACHE_EXCLUSIONS_PATH}: ${error.message}`);
40
65
  }
41
66
  if (stat.isSymbolicLink() || !stat.isFile()) {
42
- throw new UsageError(`${CACHE_EXCLUSIONS_PATH} must be a regular file, not a symlink or directory`);
67
+ throw new UsageError(`${LEGACY_CACHE_EXCLUSIONS_PATH} must be a regular file, not a symlink or directory`);
43
68
  }
44
69
  let document;
45
70
  try {
46
71
  document = parseYaml(readFileSync(absolute, 'utf8'));
47
72
  }
48
73
  catch (error) {
49
- throw new UsageError(`${CACHE_EXCLUSIONS_PATH} is not valid YAML: ${error.message}`);
74
+ throw new UsageError(`${LEGACY_CACHE_EXCLUSIONS_PATH} is not valid YAML: ${error.message}`);
50
75
  }
51
- if (typeof document !== 'object' || document === null || Array.isArray(document) ||
52
- Object.keys(document).some((key) => key !== 'schemaVersion' && key !== 'files') ||
53
- document['schemaVersion'] !== 1 ||
54
- !Array.isArray(document['files'])) {
55
- throw new UsageError(`${CACHE_EXCLUSIONS_PATH} must contain only schemaVersion: 1 and a files list`);
76
+ if (typeof document !== 'object' || document === null || Array.isArray(document)) {
77
+ throw new UsageError(`${LEGACY_CACHE_EXCLUSIONS_PATH} must contain only schemaVersion: 1 and a files list`);
56
78
  }
57
- const files = document.files;
58
- if (files.some((file) => typeof file !== 'string')) {
59
- throw new UsageError(`${CACHE_EXCLUSIONS_PATH} files must contain exact repo-relative Python bytecode paths`);
79
+ const raw = 'files' in document ? document.files : null;
80
+ const listed = Array.isArray(raw) ? raw : [];
81
+ const files = listed.filter((file) => typeof file === 'string');
82
+ if (!Array.isArray(raw) ||
83
+ files.length !== listed.length ||
84
+ !('schemaVersion' in document) ||
85
+ document.schemaVersion !== 1 ||
86
+ Object.keys(document).some((key) => key !== 'schemaVersion' && key !== 'files')) {
87
+ throw new UsageError(`${LEGACY_CACHE_EXCLUSIONS_PATH} must contain only schemaVersion: 1 and a files list`);
60
88
  }
61
89
  return validateCacheFiles(cwd, files, config);
62
90
  }
@@ -188,18 +216,4 @@ function inspectCachePathComponents(cwd, path, requireTarget, targetMustBeFile)
188
216
  }
189
217
  }
190
218
  }
191
- /**
192
- * Writes the owner declaration in a stable format.
193
- *
194
- * Args:
195
- * files: validated cache paths.
196
- *
197
- * Returns:
198
- * string: YAML declaration text.
199
- */
200
- export function renderCacheExclusions(files) {
201
- return files.length === 0
202
- ? 'schemaVersion: 1\nfiles: []\n'
203
- : `schemaVersion: 1\nfiles:\n${files.map((file) => ` - ${JSON.stringify(file)}`).join('\n')}\n`;
204
- }
205
219
  //# sourceMappingURL=cache-exclusions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache-exclusions.js","sourceRoot":"","sources":["../src/cache-exclusions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAA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QACpF,CAAC;QACD,IAAI,QAAQ,IAAI,gBAAgB,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,UAAU,CAAC,8BAA8B,IAAI,0BAA0B,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;AACH,CAAC"}
package/dist/cli.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Io } from './io.js';
2
2
  /** The top-level usage text (also printed for `--help`). */
3
- export declare const USAGE = "usage: gateforge <command> [options]\n\ncommands:\n init [--languages <comma,list>] [--plugins <comma,list>] [--accept-recommended] [--no-scan]\n [--proof overlay|observe] [--blocking] [--strict-e2e] [--witnessed staged|full]\n scan the repo, print the recommended install, and write\n .gateforge.yml + skeleton + GATEFORGE.md + overlay README\n (idempotent; --blocking installs AND verifies an active\n pre-commit hook + CI wiring)\n enforce [--ci github|gitlab] [--witnessed] wire the blocking pre-commit + CI gate into an initialized repo (idempotent);\n --witnessed also writes the witnessed 'gateforge run' job template\n adopt adopt enforcement: seed the baseline from current debt (the one bulk-add) + wire the gate\n discover [--json] run detectors and dump the resource graph\n classify [--json] [--write-snapshot P] inspect effective classifications + typed blocks\n explain <resourceId> [--json] full signal/rule/obligation trace for one resource\n tests discover [--json] [--pytest] inventory existing tests into the run-state catalog\n tests suggest [--changed] [--json] suggest existing tests for uncovered obligations (inspection, never a gate)\n tests mark --test K --kind K [--category C]...\n --obligation ID... --reason \"T\" declare an existing test in .gateforge/test-map.yml (atomic, idempotent)\n tests explain --test K [--json] requirements/mapping/next action for one existing test\n tests diagnose [--suite N] [--json] run the configured pytest diagnostic suites (advisory; exit 0/1/2)\n adapters scaffold [--dry-run] write a starting-point evidence adapter per business resource\n [--dry-run] that has none (never overwrites; every guess is marked)\n adapters check [--json] load and validate every adapter; report the resources with none\n [--probe --base-url URL] with the app running: one read-only GET per adapter\n [--probe-id ID]\n obligations [--json] evaluate policies and dump obligations\n history [--test TEXT] [--failed] [--since ISO] query retained supervised run history\n check [--changed] [--staged] [--candidate-commit SHA] run the gate against all files, the exact frozen\n index, or the selected immutable commit tree; --changed narrows the selected candidate's diff;\n [--require-e2e] [--format F] require a valid receipt and select text|json|sarif output\n next [--changed] [--json] print the ONE blocking next action (navigation, not the gate)\n test-gates [--changed] [--suite CMD] supervised E2E run over the obligations (--changed) or the\n [--out DIR] [--format F] legacy suite escape hatch; seals a gate receipt on complete success\n [--witness-url URL]\n pre-commit --scope staged|full freeze the Git index, run the witnessed gate against those exact\n bytes, validate the new receipt, and recheck the index before success\n broker commit --workspace DIR commit broker (MECHANISM, not deployment): verifies a gate\n --message MSG [--receipt P] receipt for the exact workspace bytes, then commits via compare-and-swap\n [--ref REF] ref update. Guaranteed only when the broker runs outside the agent's\n write/process boundary (ADR 0005 D1)\n key create|import-env|rotate|retire owner-only verifier-key ceremony; stores keys outside the repo\n --file PATH --confirm key IDs are safe to log; key material is never printed\n enforcement doctor [--json] honest enforcement diagnostics: hook activation, runner/observer readiness,\n trusted binary/policy ownership, snapshot mode, standard/managed boundary\n baseline update <fp...> shrink the baseline to a strict subset (invariant 4)\n baseline diff <before> <after> compare adopted obligations by ID without printing fingerprints\n waive <resourceId:contract> write an expiring, owner-approved waiver for one obligation\n --owner N --approver N (GF-15: all fields mandatory; justification URL required;\n --justification-url U --expires D no --force \u2014 renewal is a hand-edit of the written file)\n quarantine <testKey> write an expiring, owner-approved flaky-test quarantine\n --owner N --approver N (never proof, never blocking; at most 14 days; no --force;\n --reason \"T\" --expires D an expired quarantine BLOCKS until renewed or deleted)\n run [--] [test-gates flags] the whole local proof in order: doctor preflight (strict), the optional\n .gateforge/runtime.yml recipe (reset/seed/up/health), the supervised\n test-gates, check --require-e2e, and the recipe's teardown \u2014 one line\n per step, exit code = the first failing step's own code\n --version print the version\n --help show this help\n\nexit codes: 0 clean/waived, 1 unresolved obligations, 2 config/usage error";
3
+ export declare const USAGE = "usage: gateforge <command> [options]\n\ncommands:\n init [--languages <comma,list>] [--plugins <comma,list>] [--accept-recommended] [--no-scan]\n [--proof overlay|observe] [--blocking] [--strict-e2e] [--witnessed staged|full]\n scan the repo, print the recommended install, and write\n .gateforge.yml + skeleton + GATEFORGE.md + overlay README\n (idempotent; --blocking installs AND verifies an active\n pre-commit hook + CI wiring)\n enforce [--ci github|gitlab] [--witnessed] wire the blocking pre-commit + CI gate into an initialized repo (idempotent);\n --witnessed also writes the witnessed 'gateforge run' job template\n adopt adopt enforcement: seed the baseline from current debt (the one bulk-add) + wire the gate\n discover [--json] run detectors and dump the resource graph\n classify [--json] [--write-snapshot P] inspect effective classifications + typed blocks\n classify plane <src> <plane> --reason T [--confirm]\n declare the data plane for a file, folder, or glob (preview without --confirm)\n classify delete <src> <hard|archive> [--archive-field k=v]... --reason T [--confirm]\n declare how removal manifests for a file, folder, or glob\n explain <resourceId> [--json] full signal/rule/obligation trace for one resource\n tests discover [--json] [--pytest] inventory existing tests into the run-state catalog\n tests suggest [--changed] [--json] suggest existing tests for uncovered obligations (inspection, never a gate)\n tests mark --test K --kind K [--category C]...\n --obligation ID... --reason \"T\" declare an existing test in .gateforge/test-map.yml (atomic, idempotent)\n tests explain --test K [--json] requirements/mapping/next action for one existing test\n tests diagnose [--suite N] [--json] run the configured pytest diagnostic suites (advisory; exit 0/1/2)\n adapters scaffold [--dry-run] write a starting-point evidence adapter per business resource\n [--dry-run] that has none (never overwrites; every guess is marked)\n adapters check [--json] load and validate every adapter; report the resources with none\n [--probe --base-url URL] with the app running: one read-only GET per adapter\n [--probe-id ID]\n obligations [--json] evaluate policies and dump obligations\n history [--test TEXT] [--failed] [--since ISO] query retained supervised run history\n check [--changed] [--staged] [--candidate-commit SHA] run the gate against all files, the exact frozen\n index, or the selected immutable commit tree; --changed narrows the selected candidate's diff;\n [--require-e2e] [--format F] require a valid receipt and select text|json|sarif output\n next [--changed] [--json] print the ONE blocking next action (navigation, not the gate)\n test-gates [--changed] [--suite CMD] supervised E2E run over the obligations (--changed) or the\n [--out DIR] [--format F] legacy suite escape hatch; seals a gate receipt on complete success\n [--witness-url URL]\n pre-commit --scope staged|full freeze the Git index, run the witnessed gate against those exact\n bytes, validate the new receipt, and recheck the index before success\n broker commit --workspace DIR commit broker (MECHANISM, not deployment): verifies a gate\n --message MSG [--receipt P] receipt for the exact workspace bytes, then commits via compare-and-swap\n [--ref REF] ref update. Guaranteed only when the broker runs outside the agent's\n write/process boundary (ADR 0005 D1)\n key create|import-env|rotate|retire owner-only verifier-key ceremony; stores keys outside the repo\n --file PATH --confirm key IDs are safe to log; key material is never printed\n enforcement doctor [--json] honest enforcement diagnostics: hook activation, runner/observer readiness,\n trusted binary/policy ownership, snapshot mode, standard/managed boundary\n enforcement pin --pin-file PATH [--confirm] write the STAGED revision's approved policy digest into an env file\n OUTSIDE the repo (mode 0600); preview by default (NOT --env-file: node owns it)\n baseline update <fp...> shrink the baseline to a strict subset (invariant 4)\n baseline diff <before> <after> compare adopted obligations by ID without printing fingerprints\n waive <resourceId:contract> write an expiring, owner-approved waiver for one obligation\n --owner N --approver N (GF-15: all fields mandatory; justification URL required;\n --justification-url U --expires D no --force \u2014 renewal is a hand-edit of the written file)\n quarantine <testKey> write an expiring, owner-approved flaky-test quarantine\n --owner N --approver N (never proof, never blocking; at most 14 days; no --force;\n --reason \"T\" --expires D an expired quarantine BLOCKS until renewed or deleted)\n run [--] [test-gates flags] the whole local proof in order: doctor preflight (strict), the optional\n .gateforge/runtime.yml recipe (reset/seed/up/health), the supervised\n test-gates, check --require-e2e, and the recipe's teardown \u2014 one line\n per step, exit code = the first failing step's own code\n migrate [--confirm] move owner declarations into .gateforge.yml (evidence.exclude.docs|cache);\n preview by default, idempotent, re-pin reminder on write\n --version print the version\n --help show this help\n\nexit codes: 0 clean/waived, 1 unresolved obligations, 2 config/usage error";
4
4
  /**
5
5
  * Runs the gateforge CLI.
6
6
  *
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAyBlC,4DAA4D;AAC5D,eAAO,MAAM,KAAK,k8KA6DyD,CAAC;AAE5E;;;;;;;;;GASG;AACH,wBAAsB,IAAI,CACxB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,GAAE,EAAgB,GACnB,OAAO,CAAC,MAAM,CAAC,CAoEjB"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AA0BlC,4DAA4D;AAC5D,eAAO,MAAM,KAAK,wvMAqEyD,CAAC;AAE5E;;;;;;;;;GASG;AACH,wBAAsB,IAAI,CACxB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,GAAE,EAAgB,GACnB,OAAO,CAAC,MAAM,CAAC,CAsEjB"}
package/dist/cli.js CHANGED
@@ -28,6 +28,7 @@ import { explainCommand } from './commands/explain.js';
28
28
  import { testsCommand } from './commands/tests.js';
29
29
  import { adaptersCommand } from './commands/adapters.js';
30
30
  import { runCommand } from './commands/run.js';
31
+ import { migrateCommand } from './commands/migrate.js';
31
32
  import { enforcementCommand } from './commands/enforcement.js';
32
33
  import { brokerCommand } from './broker.js';
33
34
  import { keysCommand } from './commands/keys.js';
@@ -48,6 +49,10 @@ commands:
48
49
  adopt adopt enforcement: seed the baseline from current debt (the one bulk-add) + wire the gate
49
50
  discover [--json] run detectors and dump the resource graph
50
51
  classify [--json] [--write-snapshot P] inspect effective classifications + typed blocks
52
+ classify plane <src> <plane> --reason T [--confirm]
53
+ declare the data plane for a file, folder, or glob (preview without --confirm)
54
+ classify delete <src> <hard|archive> [--archive-field k=v]... --reason T [--confirm]
55
+ declare how removal manifests for a file, folder, or glob
51
56
  explain <resourceId> [--json] full signal/rule/obligation trace for one resource
52
57
  tests discover [--json] [--pytest] inventory existing tests into the run-state catalog
53
58
  tests suggest [--changed] [--json] suggest existing tests for uncovered obligations (inspection, never a gate)
@@ -79,6 +84,8 @@ commands:
79
84
  --file PATH --confirm key IDs are safe to log; key material is never printed
80
85
  enforcement doctor [--json] honest enforcement diagnostics: hook activation, runner/observer readiness,
81
86
  trusted binary/policy ownership, snapshot mode, standard/managed boundary
87
+ enforcement pin --pin-file PATH [--confirm] write the STAGED revision's approved policy digest into an env file
88
+ OUTSIDE the repo (mode 0600); preview by default (NOT --env-file: node owns it)
82
89
  baseline update <fp...> shrink the baseline to a strict subset (invariant 4)
83
90
  baseline diff <before> <after> compare adopted obligations by ID without printing fingerprints
84
91
  waive <resourceId:contract> write an expiring, owner-approved waiver for one obligation
@@ -91,6 +98,8 @@ commands:
91
98
  .gateforge/runtime.yml recipe (reset/seed/up/health), the supervised
92
99
  test-gates, check --require-e2e, and the recipe's teardown — one line
93
100
  per step, exit code = the first failing step's own code
101
+ migrate [--confirm] move owner declarations into .gateforge.yml (evidence.exclude.docs|cache);
102
+ preview by default, idempotent, re-pin reminder on write
94
103
  --version print the version
95
104
  --help show this help
96
105
 
@@ -163,6 +172,8 @@ export async function main(argv, io = processIo()) {
163
172
  return runWithExitCodes(io, () => Promise.resolve(baselineCommand(io, rest)));
164
173
  case 'waive':
165
174
  return runWithExitCodes(io, () => waiveCommand(io, rest));
175
+ case 'migrate':
176
+ return runWithExitCodes(io, () => Promise.resolve(migrateCommand(io, rest)));
166
177
  case 'quarantine':
167
178
  return runWithExitCodes(io, () => quarantineCommand(io, rest));
168
179
  default:
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,SAAS,E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AAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAClE,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAC7D,KAAK,KAAK;YACR,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,KAAK,UAAU;YACb,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAChF,KAAK,OAAO;YACV,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAC5D,KAAK,SAAS;YACZ,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/E,KAAK,YAAY;YACf,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACjE;YACE,OAAO,gBAAgB,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;gBACrC,sEAAsE;gBACtE,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChB,MAAM,IAAI,UAAU,CAAC,oBAAoB,OAAO,GAAG,CAAC,CAAC;YACvD,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC"}
@@ -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\nExit codes: 0 adopted (or an idempotent no-op), 2 config/usage.";
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).";
10
10
  /**
11
11
  * Runs the adopt subcommand.
12
12
  *
@@ -15,7 +15,8 @@ export declare const ADOPT_HELP = "usage: gateforge adopt\n\nAdopts an EXISTING
15
15
  * argv: flags after the subcommand (none supported beyond --help).
16
16
  *
17
17
  * Returns:
18
- * number: exit code — 0 adopted (or idempotent no-op), 2 config/usage.
18
+ * number: exit code — 0 adopted (or idempotent no-op), 2 config/usage
19
+ * or a plane-unresolved blocking entry (R1-9: nothing written).
19
20
  * @throws fail-closed errors (exit 2) from config/pipeline/baseline layers.
20
21
  */
21
22
  export declare function adoptCommand(io: Io, argv: readonly string[]): Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAQnC,eAAO,MAAM,WAAW,2BAA2B,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,q3CA2ByC,CAAC;AAWjE;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAoJnF"}
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"}
@@ -24,6 +24,11 @@
24
24
  * adoption stays fail-closed: `baseline update` remains
25
25
  * subset-only (GF-07/08), new debt blocks, and both adopted layers
26
26
  * are SHRINK-ONLY from here.
27
+ * Adoption is plane-ordered (R1-9): while any blocking
28
+ * entry is plane-unresolved the command exits 2 and
29
+ * writes nothing — a plane answer changes the resource's
30
+ * identity, so debt adopted before the answer would not
31
+ * match after it.
27
32
  * 3. Applies the enforcement wiring through the shared `init --blocking`
28
33
  * path (pre-commit hook block + CI template + engine reference),
29
34
  * idempotent like every gateforge write.
@@ -44,7 +49,7 @@ import { writeLine } from '../io.js';
44
49
  import { UsageError } from '../errors.js';
45
50
  import { evaluateRun, obligationFingerprint } from '../evaluate.js';
46
51
  import { headSha, resolveRepoPath, runPipeline, sourcesByResourceId } from '../pipeline.js';
47
- import { engineRootFromInvocation, ensureBlockingWiring } from './blocking.js';
52
+ import { engineRootFromInvocation, ensureBlockingWiring, generatedHookGateArgs, } from './blocking.js';
48
53
  import { loadConfigAt } from './common.js';
49
54
  export const ADOPT_USAGE = 'usage: gateforge adopt';
50
55
  /**
@@ -80,7 +85,13 @@ project that already has code and therefore already has findings.
80
85
  hook block + CI template) through the same idempotent path as
81
86
  \`gateforge init --blocking\`.
82
87
 
83
- Exit codes: 0 adopted (or an idempotent no-op), 2 config/usage.`;
88
+ plane-ordered — adoption refuses (exit 2, nothing written) while
89
+ any blocking entry is plane-unresolved: a plane answer changes
90
+ the resource's identity, so debt adopted before the answer
91
+ would not match after it. Answer the planes first
92
+ (\`gateforge classify plane <folder> <tenant|master|global> --confirm\`).
93
+
94
+ Exit codes: 0 adopted (or an idempotent no-op), 2 config/usage or a plane-unresolved resource (R1-9).`;
84
95
  /** Groups the adopted red set by source for the adoption report. */
85
96
  function groupReds(reds) {
86
97
  const counts = new Map();
@@ -96,7 +107,8 @@ function groupReds(reds) {
96
107
  * argv: flags after the subcommand (none supported beyond --help).
97
108
  *
98
109
  * Returns:
99
- * number: exit code — 0 adopted (or idempotent no-op), 2 config/usage.
110
+ * number: exit code — 0 adopted (or idempotent no-op), 2 config/usage
111
+ * or a plane-unresolved blocking entry (R1-9: nothing written).
100
112
  * @throws fail-closed errors (exit 2) from config/pipeline/baseline layers.
101
113
  */
102
114
  export async function adoptCommand(io, argv) {
@@ -118,7 +130,7 @@ export async function adoptCommand(io, argv) {
118
130
  // refuse the re-seed, exit 0.
119
131
  const existingRecord = loadAdoptionRecord(recordPath);
120
132
  if (existingRecord !== null) {
121
- ensureBlockingWiring(io, engineRootFromInvocation());
133
+ ensureBlockingWiring(io, engineRootFromInvocation(), generatedHookGateArgs(io.cwd) ?? undefined);
122
134
  const adoptedClassifications = existingRecord.classificationBlocked?.length ?? 0;
123
135
  writeLine(io.stdout, `already adopted at ${existingRecord.adoptedAt} — ${existingRecord.adopted} fingerprint(s) in the baseline` +
124
136
  (existingRecord.classificationBlocked !== undefined
@@ -153,6 +165,27 @@ export async function adoptCommand(io, argv) {
153
165
  changedFiles: null,
154
166
  baseline: null,
155
167
  });
168
+ // R1-9: adoption is plane-ordered. A plane-unresolved blocking
169
+ // entry names a resource whose identity is NOT yet decided — a
170
+ // plane answer changes it — so the red set captured now would
171
+ // not match the repository that exists after the answer. Refuse
172
+ // the whole command before any write: nothing is baselined,
173
+ // nothing is wired, and the owner gets the exact answer to
174
+ // give first.
175
+ const planeUnresolved = evaluated.blocking.filter((entry) => entry.detail.startsWith('[PLANE_UNRESOLVED]'));
176
+ if (planeUnresolved.length > 0) {
177
+ const folders = [
178
+ ...new Set(planeUnresolved.map((entry) => entry.location === null ? null : dirname(entry.location.file))),
179
+ ]
180
+ .filter((folder) => folder !== null)
181
+ .sort()
182
+ .slice(0, 3);
183
+ writeLine(io.stderr, `adopt: ${planeUnresolved.length} resources have no data plane yet` +
184
+ (folders.length > 0 ? ` (e.g. ${folders.join(', ')})` : '') +
185
+ '. Answer them first — gateforge classify plane <folder> <tenant|master|global> --confirm — then adopt. ' +
186
+ 'Plane answers change resource identities, so debt adopted before them would not match afterwards.');
187
+ return 2;
188
+ }
156
189
  const reds = new Map();
157
190
  // The classification layer (two-layer adoption): the resource ids of
158
191
  // the classification-blocked ([classification] entries with a derived
@@ -209,7 +242,7 @@ export async function adoptCommand(io, argv) {
209
242
  ])),
210
243
  });
211
244
  // Step 3: enforcement wiring through the shared init --blocking path.
212
- ensureBlockingWiring(io, engineRootFromInvocation());
245
+ ensureBlockingWiring(io, engineRootFromInvocation(), generatedHookGateArgs(io.cwd) ?? undefined);
213
246
  // The adoption report: counts, groups, wiring, and the standing rule.
214
247
  writeLine(io.stdout, `adopted as forgiven: ${reds.size}; already proven: ${proven}`);
215
248
  if (reds.size > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"adopt.js","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;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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: Io): void;
75
75
  * gateforge resolves from PATH instead (the npm-install future).
76
76
  */
77
77
  export declare function writeEngineReference(io: Io, engineRoot: string | null): void;
78
+ /**
79
+ * Reads the gate args an EXISTING generated hook script
80
+ * recorded at generation time — the `const args = [...]`
81
+ * line the template writes, which is the ONE thing that
82
+ * distinguishes a strict init's staged commit gate from the
83
+ * changed-scoped default. Returns null when the hook is
84
+ * absent, a foreign file, or its recorded args are
85
+ * unparsable — callers then fall back to their own default.
86
+ */
87
+ export declare function generatedHookGateArgs(cwd: string): string[] | null;
78
88
  /** Ensures the check-gate hook script exists (executable).
79
89
  *
80
90
  * Args:
@@ -86,7 +96,16 @@ export declare function writeEngineReference(io: Io, engineRoot: string | null):
86
96
  * invocation differs, and it is recorded in the generated file.
87
97
  */
88
98
  export declare function ensureHookScript(io: Io, engineRoot: string | null, gateArgs?: readonly string[]): string;
89
- /** Appends the gateforge-check hook to .pre-commit-config.yaml (idempotent). */
99
+ /**
100
+ * Adds the gateforge-check hook to .pre-commit-config.yaml
101
+ * (idempotent). When the file already has a block-style `repos:`
102
+ * sequence, the hook block is inserted as its FIRST item — above
103
+ * the repository's own hooks, so a file-mutating hook can never
104
+ * run before the gate and invalidate its receipt. Only when no
105
+ * such sequence exists (no `repos:` line, or a flow-style
106
+ * `repos: []`) is the block appended at the end instead, with a
107
+ * note telling the owner to move the entry to the top by hand.
108
+ */
90
109
  export declare function appendPreCommitHook(io: Io): void;
91
110
  /** Writes the GitLab CI job template + include wiring (idempotent). */
92
111
  export declare function writeGitlabCiTemplate(io: Io, mode?: GitlabGateMode): void;
@@ -1 +1 @@
1
- {"version":3,"file":"blocking.d.ts","sourceRoot":"","sources":["../../src/commands/blocking.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAInC,0EAA0E;AAC1E,eAAO,MAAM,2BAA2B,2CAA2C,CAAC;AACpF,eAAO,MAAM,yBAAyB,2CAA2C,CAAC;AAElF;;;;;GA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