@gate-forge/cli 0.4.0 → 0.5.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 (88) hide show
  1. package/README.md +37 -11
  2. package/dist/args.js +1 -1
  3. package/dist/args.js.map +1 -1
  4. package/dist/broker.d.ts.map +1 -1
  5. package/dist/broker.js +73 -123
  6. package/dist/broker.js.map +1 -1
  7. package/dist/candidate-tree.d.ts +36 -0
  8. package/dist/candidate-tree.d.ts.map +1 -0
  9. package/dist/candidate-tree.js +321 -0
  10. package/dist/candidate-tree.js.map +1 -0
  11. package/dist/cli.d.ts +8 -2
  12. package/dist/cli.d.ts.map +1 -1
  13. package/dist/cli.js +17 -3
  14. package/dist/cli.js.map +1 -1
  15. package/dist/commands/adopt.js +2 -2
  16. package/dist/commands/adopt.js.map +1 -1
  17. package/dist/commands/check.d.ts.map +1 -1
  18. package/dist/commands/check.js +10 -3
  19. package/dist/commands/check.js.map +1 -1
  20. package/dist/commands/controller.d.ts +43 -0
  21. package/dist/commands/controller.d.ts.map +1 -0
  22. package/dist/commands/controller.js +110 -0
  23. package/dist/commands/controller.js.map +1 -0
  24. package/dist/commands/enforcement.d.ts.map +1 -1
  25. package/dist/commands/enforcement.js +61 -1
  26. package/dist/commands/enforcement.js.map +1 -1
  27. package/dist/commands/explain.d.ts.map +1 -1
  28. package/dist/commands/explain.js +2 -7
  29. package/dist/commands/explain.js.map +1 -1
  30. package/dist/commands/init.d.ts +6 -2
  31. package/dist/commands/init.d.ts.map +1 -1
  32. package/dist/commands/init.js +426 -62
  33. package/dist/commands/init.js.map +1 -1
  34. package/dist/commands/next.d.ts +15 -0
  35. package/dist/commands/next.d.ts.map +1 -0
  36. package/dist/commands/next.js +337 -0
  37. package/dist/commands/next.js.map +1 -0
  38. package/dist/commands/test-gates.d.ts +18 -0
  39. package/dist/commands/test-gates.d.ts.map +1 -1
  40. package/dist/commands/test-gates.js +157 -5
  41. package/dist/commands/test-gates.js.map +1 -1
  42. package/dist/commands/tests.js +114 -13
  43. package/dist/commands/tests.js.map +1 -1
  44. package/dist/evaluate.d.ts +8 -0
  45. package/dist/evaluate.d.ts.map +1 -1
  46. package/dist/evaluate.js +19 -10
  47. package/dist/evaluate.js.map +1 -1
  48. package/dist/execution.d.ts +20 -0
  49. package/dist/execution.d.ts.map +1 -1
  50. package/dist/execution.js +14 -2
  51. package/dist/execution.js.map +1 -1
  52. package/dist/input-snapshot.d.ts.map +1 -1
  53. package/dist/input-snapshot.js +4 -0
  54. package/dist/input-snapshot.js.map +1 -1
  55. package/dist/io.d.ts +3 -0
  56. package/dist/io.d.ts.map +1 -1
  57. package/dist/io.js.map +1 -1
  58. package/dist/isolation.d.ts +104 -0
  59. package/dist/isolation.d.ts.map +1 -0
  60. package/dist/isolation.js +353 -0
  61. package/dist/isolation.js.map +1 -0
  62. package/dist/mapping.d.ts +29 -9
  63. package/dist/mapping.d.ts.map +1 -1
  64. package/dist/mapping.js +37 -10
  65. package/dist/mapping.js.map +1 -1
  66. package/dist/pipeline.d.ts +14 -4
  67. package/dist/pipeline.d.ts.map +1 -1
  68. package/dist/pipeline.js +64 -7
  69. package/dist/pipeline.js.map +1 -1
  70. package/dist/podman-bootstrap.d.ts +59 -0
  71. package/dist/podman-bootstrap.d.ts.map +1 -0
  72. package/dist/podman-bootstrap.js +123 -0
  73. package/dist/podman-bootstrap.js.map +1 -0
  74. package/dist/receipts.d.ts +8 -0
  75. package/dist/receipts.d.ts.map +1 -1
  76. package/dist/receipts.js +4 -0
  77. package/dist/receipts.js.map +1 -1
  78. package/dist/repo-scan.d.ts +63 -0
  79. package/dist/repo-scan.d.ts.map +1 -0
  80. package/dist/repo-scan.js +272 -0
  81. package/dist/repo-scan.js.map +1 -0
  82. package/dist/scope.d.ts.map +1 -1
  83. package/dist/scope.js +3 -0
  84. package/dist/scope.js.map +1 -1
  85. package/dist/state.d.ts.map +1 -1
  86. package/dist/state.js +2 -7
  87. package/dist/state.js.map +1 -1
  88. package/package.json +9 -9
package/README.md CHANGED
@@ -5,15 +5,35 @@ 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
7
 
8
- Just added a new table or endpoint and the gate is blocking? Start with the
9
- user manual: [`docs/guides/new-table-playbook.md`](../../docs/guides/new-table-playbook.md)
10
- — the three legal exits (prove / waive / reclassify), with worked examples.
8
+ Just added a new table or endpoint and the gate is blocking? Run
9
+ `gateforge next` (or `gateforge next --json`) — it prints the ONE blocking
10
+ next action. New proof tests go in `tests/e2e/gateforge/` (overlay);
11
+ never rewrite existing journeys, never `tests mark` as proof.
12
+
13
+ ## Proof paths
14
+
15
+ - **Overlay (default).** New thin tests in `tests/e2e/gateforge/` using
16
+ the engine-driven fixture (`evidence.ui.*` + `persistence.verify`).
17
+ Strongest: the engine types the form itself. `gateforge init`
18
+ scaffolds the directory README. Multi-screen creates use surface v2
19
+ wizard steps (`create.steps[]`; see `example/e2e/vendor-wizard-surface.js`).
20
+ - **Observe (`--proof observe`).** Existing suite-driven Playwright
21
+ tests keep driving `page`; the witness watches their session-proxy
22
+ traffic and reads state itself through the adapter. Map them
23
+ `--kind observed-e2e`. Weaker than overlay by design: proves
24
+ persistence ("the server stored what the proxied request sent"), not
25
+ "the engine typed the form". Requires the Playwright `baseURL` on
26
+ the session proxy plus per-adapter `observe` bindings and `list()`.
27
+ `crud:*` contracts stay engine-browser-only.
28
+ - **`tests mark` is intent, never proof.** A mapped test with no
29
+ witnessed evidence grades `EVIDENCE_NOT_COLLECTED` — blocking.
11
30
 
12
31
  ## Commands
13
32
 
14
33
  | Command | Purpose | Exit codes |
15
34
  | --- | --- | --- |
16
- | `gateforge init [--languages <comma,list>] [--blocking] [--strict-e2e]` | Create `.gateforge.yml`, `.gateforge/policies.yml`, `.gateforge/classification-policy.yml`, `.gateforge/baselines/obligations.json`, and the `adapters/` + `waivers/` skeleton dirs. Idempotent — never overwrites existing files. Default language: `python`. Bundled detectors are preconfigured automatically for the selected Python, JavaScript, and TypeScript languages. `--strict-e2e` writes the `enforcement` block (standard mode, `strictE2E`) and runs the capability preflight FIRST: a strict setup whose policies require a contract with no available proof channel fails closed (exit 2, nothing written). `--blocking` additionally installs AND verifies an ACTIVE pre-commit hook (the staged gate), writes the standalone staged-gate script, the `.pre-commit-config.yaml` block, and the GitLab strict-gate CI template + include; a foreign existing hook is never clobbered (typed conflict naming the exact chaining action). | 0 (blocking-install failure → 2) |
35
+ | `gateforge init [--languages <comma,list>] [--plugins <comma,list>] [--accept-recommended] [--no-scan] [--proof overlay\|observe] [--blocking] [--strict-e2e] [--managed]` | Scan the repo (heuristics, no network), print the recommended install (plugins, persistence-only policy, overlay proof), and write `.gateforge.yml`, `.gateforge/policies.yml`, `.gateforge/classification-policy.yml`, `.gateforge/baselines/obligations.json`, `GATEFORGE.md`, and (overlay proof only) `tests/e2e/gateforge/README.md`. Idempotent — never overwrites existing files. `pack-task` is opt-in only (`--plugins`); `--proof observe` skips the overlay scaffold and prints the observe wiring checklist instead. Default language: `python`. `--strict-e2e` writes the `enforcement` block and runs capability preflight. `--managed` tries the targeted native Podman package install first; if Arch requires a full `pacman -Syu` fallback, Gateforge asks the owner before running it. It then verifies rootless `podman info`, writes `enforcement.mode: managed`, and implies strict/blocking wiring. No npm lifecycle install or silent privilege escalation. | 0 (blocking/install failure → 2) |
36
+ | `gateforge next [--changed] [--json]` | Print the ONE blocking next action (`next`/`cause`/`why`/`do`; `--json` adds `remainingBlocking`). Navigation, not the gate: never requires an E2E receipt. Exit 0 clean, 1 next action, 2 config/usage. | 0/1/2 |
17
37
  | `gateforge discover [--json]` | Run every configured detector over the expanded `project.paths` and dump the resource graph (default: human listing; `--json`: GF-canonical JSON). | 0 |
18
38
  | `gateforge classify [--json] [--write-snapshot <path>]` | Recompute effective classifications from detector signals and print decisions, traces, and typed blocks. Snapshots are derived review artifacts and never pipeline input. | 0/1/2 |
19
39
  | `gateforge explain <resourceId> [--json]` | Show one resource's detector signals, classification rules, decision fingerprint, typed blocks, and generated obligations. | 0/1/2 |
@@ -68,15 +88,17 @@ tests:
68
88
  reason: Existing journey deletes the selected account.
69
89
  ```
70
90
 
71
- `--kind` is one of `browser-e2e`, `api-e2e`, `unit`, `integration`,
91
+ `--kind` is one of `browser-e2e`, `observed-e2e`, `api-e2e`, `unit`, `integration`,
72
92
  `component`, `unknown`. A declaration is INTENT, never proof:
73
93
 
74
94
  - Native `{ type: 'gateforge', description: '<obligation id>' }` annotations
75
95
  keep working; sidecar entries and native claims normalize through ONE
76
96
  resolver. Exact duplicate claims deduplicate; contradictions block with
77
97
  both source locations (`TEST_MAPPING_AMBIGUOUS`).
78
- - An explicit kind may resolve `unknown`, but cannot override observed
79
- mocking or a strong code-signal inference — `tests mark` refuses with
98
+ - An explicit kind may resolve `unknown` — and `observed-e2e` may refine an
99
+ inferred `browser-e2e` (same journey, witness-watched instead of
100
+ engine-driven) — but cannot override observed mocking or any other
101
+ strong code-signal inference — `tests mark` refuses with
80
102
  both locations instead of writing the file.
81
103
  - Agents may edit the sidecar directly; both paths receive identical
82
104
  validation. `mark` is idempotent: re-running an exact declaration writes
@@ -204,7 +226,9 @@ else):
204
226
  | `http:request-observed`, `http:response-status-ok` | AVAILABLE — transport semantics only: a witness-observed exchange plus a provenance-verified claimed `ui.action` anchor from the declaring test |
205
227
  | `http:frontend-request-observed` | UNAVAILABLE — no independent browser/test attribution channel; grades blocking `missing` before examining evidence |
206
228
  | `crud:*` (UI-semantic) | FAIL-CLOSED — the tested suite owns the browser; use `persistence:*` |
207
- | `auth:*`, `task:*`, `validation:*`, `webhook:*`, `workflow:*` | UNSUPPORTED — every contract fail-closed; surfaces as `VERIFIER_UNSUPPORTED` (implement/configure the observer; do not add duplicate tests) |
229
+ | `http:effect-verified`, `http:read-result-verified` | AVAILABLE (behavior-case channel) — graded across the approved required cases with witness-issued `behavior.case` records; needs a compiled `behaviorPolicy` requirement set |
230
+ | `auth:*`, `validation:*` | AVAILABLE (behavior-case channel) — same required-case aggregation over engine-controlled requests with independent state scopes |
231
+ | `task:*`, `webhook:*`, `workflow:*` | UNSUPPORTED — every contract fail-closed; surfaces as `VERIFIER_UNSUPPORTED` (remove the contract or drop the pack; do not add tests) |
208
232
 
209
233
  Unsupported proof stays blocking. Nothing silently replaces browser proof
210
234
  with HTTP status proof.
@@ -574,9 +598,11 @@ expected context, every witnessed record demotes to claimed-tier
574
598
  owner actions — the complete template and settings list ship from
575
599
  `init --blocking`, but a local simulation does not complete a server
576
600
  rollout (`docs/plans/immediate/20260913_consumer_migration_record.md`).
577
- - Managed mode ships the broker MECHANISM only (`gateforge broker commit`);
578
- no hardened deployment (authoritative Git dir + signing material outside
579
- the agent's write/process boundary) is included in this repository.
601
+ - Managed mode ships the broker mechanism plus rootless-Podman reference
602
+ deployment assets under `deploy/managed/`; those assets do not provision
603
+ the authoritative Git directory, credentials, protected refs, or external
604
+ app/worker services. The current managed backend supports Linux rootless
605
+ Podman only and rejects other platforms rather than guessing.
580
606
 
581
607
  ## Development
582
608
 
package/dist/args.js CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { UsageError } from './errors.js';
9
9
  /** Flags that carry no value (bare presence). */
10
- const BOOLEAN_FLAGS = new Set(['json', 'changed', 'staged', 'help', 'version', 'blocking', 'no-blocking', 'strict-e2e', 'pytest', 'require-e2e', 'pre-commit', 'no-pre-commit', 'ci', 'no-ci', 'planes', 'no-planes']);
10
+ const BOOLEAN_FLAGS = new Set(['json', 'changed', 'staged', 'help', 'version', 'blocking', 'no-blocking', 'strict-e2e', 'managed', 'pytest', 'require-e2e', 'pre-commit', 'no-pre-commit', 'ci', 'no-ci', 'planes', 'no-planes', 'accept-recommended', 'no-scan']);
11
11
  /**
12
12
  * Parses argv (without node/script) into options + positionals.
13
13
  *
package/dist/args.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA;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AAa,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAWpF"}
package/dist/broker.js CHANGED
@@ -14,22 +14,25 @@
14
14
  * doctor` reports that honestly.
15
15
  *
16
16
  * Flow (fail closed at every step):
17
- * 1. the workspace candidate's bytes are snapshotted into a throwaway
18
- * index (`GIT_INDEX_FILE` + `GIT_WORK_TREE` plumbing — the workspace
19
- * is never modified), yielding the immutable tree id;
20
- * 2. the current input digest + trusted policy digest are RECOMPUTED
21
- * from the workspace bytes with the Phase 4 machinery;
17
+ * 1. the workspace candidate's bytes are ingested RAW into the
18
+ * authoritative object store (`hash-object -w` per regular file +
19
+ * `mktree` — never `git add`, so candidate clean filters, hooks, and
20
+ * ambient `GIT_*` redirectors cannot execute or rewrite bytes),
21
+ * yielding the immutable tree id;
22
+ * 2. the trusted policy digest is recomputed from RAW workspace file
23
+ * bytes only (no plugin/adapter import, no pipeline execution in the
24
+ * authority process);
22
25
  * 3. the recomputed policy revision is compared against the OWNER-APPROVED
23
26
  * policy digest provisioned in the BROKER environment
24
27
  * (`GATEFORGE_APPROVED_POLICY_DIGEST` / `GATEFORGE_TRUSTED_CONFIG`
25
28
  * outside the candidate — never the workspace): a mismatch is a typed
26
29
  * ENFORCEMENT_UNTRUSTED rejection; a workspace declaring
27
30
  * `enforcement.strictE2E` demands the pin outright;
28
- * 4. a valid, non-stale gate receipt must verify (MAC with the broker's
29
- * verifier key, input digest, trusted policy digest, clean verdict
30
- * summary, supervised invocation) for EXACTLY those bytes — missing
31
- * receipts, stale/different-bytes receipts, and forged receipts are
32
- * typed rejections; under a provisioned pin the receipt must ALSO
31
+ * 4. a valid v2 gate receipt must verify (MAC with the broker's
32
+ * verifier key, candidate tree id, trusted policy digest, execution
33
+ * boundary, clean verdict summary, supervised invocation) for EXACTLY
34
+ * that tree — missing receipts, stale/different-bytes receipts, v1
35
+ * receipts, and forged receipts are typed rejections; under a provisioned pin the receipt must ALSO
33
36
  * bind the currently approved revision (a receipt sealed under a
34
37
  * since-revoked policy is rejected: policy revision changed after
35
38
  * sealing);
@@ -39,19 +42,17 @@
39
42
  * lockfile-guarded old-value check — a concurrent update fails the
40
43
  * CAS and no commit is accepted.
41
44
  */
42
- import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs';
45
+ import { existsSync, readFileSync } from 'node:fs';
43
46
  import { spawnSync } from 'node:child_process';
44
- import { tmpdir } from 'node:os';
45
47
  import { join, resolve } from 'node:path';
46
- import { loadConfig, verifyGateReceipt } from '@gate-forge/core';
48
+ import { loadConfig, verifyGateReceipt, executionBoundaryDigestOf } from '@gate-forge/core';
49
+ import { isolationProfileForEnvironment } from './isolation.js';
47
50
  import { parseArgs } from './args.js';
48
51
  import { trustedPolicyDigestForConfig, SUPERVISED_INVOCATION } from './execution.js';
49
52
  import { UsageError } from './errors.js';
50
53
  import { writeLine } from './io.js';
51
- import { TEST_MAP_RELATIVE } from './mapping.js';
52
- import { computeInputSnapshot } from './input-snapshot.js';
53
- import { runPipeline } from './pipeline.js';
54
- import { httpRoutesView, resolveStateDir } from './state.js';
54
+ import { computeCandidateTreeId, resolveGitDir } from './candidate-tree.js';
55
+ import { resolveStateDir } from './state.js';
55
56
  import { assertReceiptApprovedPolicy, evaluateApprovedPolicy, resolveApprovedPolicyDigest } from './trusted-policy.js';
56
57
  import { rejectUnknownFlags } from './commands/common.js';
57
58
  export const BROKER_USAGE = 'usage: gateforge broker commit --workspace <dir> --message <msg> [--receipt <path>] [--ref <ref>]\n' +
@@ -103,104 +104,42 @@ function authorityGit(cwd, env, args, extraEnv = {}) {
103
104
  };
104
105
  }
105
106
  /**
106
- * Computes the immutable tree id of a workspace candidate: the bytes are
107
- * snapshotted into a throwaway index (the workspace itself is never
108
- * modified) and `git write-tree` pins the tree into the authoritative
109
- * object store. Symlink/submodule candidates are typed rejections.
110
- *
111
- * Args:
112
- * authorityCwd: the authoritative repository cwd.
113
- * env: process environment.
114
- * workspace: absolute workspace path (the candidate bytes).
115
- * scratchDir: scratch directory for the throwaway index.
116
- *
117
- * Returns:
118
- * string: 40-char hex tree id.
119
- *
120
- * Throws:
121
- * UsageError: when the workspace is missing or plumbing fails.
122
- * BrokerRejection: unsupported symlink/submodule entries.
107
+ * Raw owner-controlled boundary label, retained for operator-facing
108
+ * diagnostics. Receipt digests use the normalized isolation profile below.
123
109
  */
124
- function workspaceTreeId(authorityCwd, env, workspace, scratchDir) {
125
- if (!existsSync(workspace)) {
126
- throw new UsageError(`broker: workspace '${workspace}' does not exist`);
127
- }
128
- const index = join(scratchDir, 'workspace-index');
129
- const emptied = authorityGit(authorityCwd, env, ['read-tree', '--empty'], { GIT_INDEX_FILE: index });
130
- if (emptied.status !== 0) {
131
- throw new UsageError(`broker: could not initialize the candidate index: ${emptied.stderr.trim()}`);
132
- }
133
- const added = spawnSync('git', ['add', '-A', '--'], {
134
- cwd: authorityCwd,
135
- env: { ...env, GIT_INDEX_FILE: index, GIT_WORK_TREE: workspace },
136
- encoding: 'buffer',
137
- maxBuffer: 64 * 1024 * 1024,
138
- });
139
- if (added.error !== undefined || added.status !== 0) {
140
- throw new UsageError(`broker: could not snapshot the workspace candidate (git add, exit ${added.status ?? -1}): ` +
141
- `${(added.stderr ?? Buffer.alloc(0)).toString('utf8').trim()}`);
142
- }
143
- const staged = authorityGit(authorityCwd, env, ['ls-files', '-s', '-z'], { GIT_INDEX_FILE: index });
144
- for (const entry of staged.stdout.split('\0')) {
145
- const tab = entry.indexOf('\t');
146
- if (tab < 0)
147
- continue;
148
- const mode = entry.slice(0, tab).split(' ')[0] ?? '';
149
- const path = entry.slice(tab + 1);
150
- if (mode === '120000' || mode === '160000') {
151
- throw new BrokerRejection('ENFORCEMENT_UNTRUSTED', `the workspace candidate contains an unsupported entry ('${path}', mode ${mode}); ` +
152
- 'symlink/submodule candidates cannot be verified (fail closed)');
153
- }
154
- }
155
- const written = authorityGit(authorityCwd, env, ['write-tree'], { GIT_INDEX_FILE: index });
156
- if (written.status !== 0) {
157
- throw new UsageError(`broker: git write-tree failed: ${written.stderr.trim()}`);
158
- }
159
- const treeId = written.stdout.trim();
160
- if (!/^[0-9a-f]{40}$/.test(treeId)) {
161
- throw new UsageError('broker: git write-tree returned an unusable tree id');
162
- }
163
- return treeId;
110
+ function authorityBoundaryLabel(env) {
111
+ const raw = env['GATEFORGE_AUTHORITY_BOUNDARY'];
112
+ return typeof raw === 'string' && raw.length > 0 ? raw : 'local-unisolated';
113
+ }
114
+ /**
115
+ * Normalized execution-boundary profile accepted by this authority.
116
+ * Managed-authoritative is an authority label, not a receipt profile.
117
+ */
118
+ function authorityBoundaryProfile(env) {
119
+ return isolationProfileForEnvironment(env);
164
120
  }
165
121
  /**
166
- * Recomputes the workspace candidate's trusted digests with the Phase 4
167
- * machinery (the exact binding a supervised gate run seals): the
168
- * pipeline-derived input snapshot digest and the trusted policy/config
169
- * revision digest, both from the WORKSPACE bytes.
122
+ * Recomputes the workspace candidate's trusted digests from RAW file
123
+ * bytes only: the resolved config (pure YAML parse — no plugin import,
124
+ * no detector execution) plus the trusted policy/config revision digest
125
+ * (file bytes hashed, never imported). No pipeline runs in the authority
126
+ * process, so candidate-selected executable input can never execute here.
170
127
  *
171
128
  * Args:
172
129
  * workspace: absolute workspace path.
173
- * env: process environment.
174
130
  *
175
131
  * Returns:
176
- * {inputDigest, trustedPolicyDigest, config}: the recomputed binding
177
- * digests plus the workspace-loaded config (the approved-policy gate
178
- * reads enforcement.strictE2E / candidate-declared pins from it).
132
+ * {trustedPolicyDigest, config}: the recomputed policy revision plus
133
+ * the workspace-loaded config (the approved-policy gate reads
134
+ * enforcement.strictE2E from it).
179
135
  *
180
136
  * Throws:
181
137
  * UsageError: when the workspace has no valid gateforge config.
182
138
  */
183
- async function recomputeWorkspaceDigests(workspace, env) {
139
+ function recomputeWorkspaceDigests(workspace) {
184
140
  const config = loadConfig(join(workspace, '.gateforge.yml'));
185
- const stateDir = resolveStateDir(workspace);
186
- const pipeline = await runPipeline({
187
- cwd: workspace,
188
- env,
189
- config,
190
- provider: 'all-files',
191
- stateDir,
192
- });
193
- const inputDigest = computeInputSnapshot({
194
- cwd: workspace,
195
- config,
196
- stateDir,
197
- classifications: pipeline.classificationsView.resources,
198
- obligations: pipeline.policy.obligations,
199
- httpRoutes: httpRoutesView(pipeline.graph),
200
- plugins: pipeline.manifest.plugins.map((plugin) => ({ id: plugin.id, version: plugin.version })),
201
- }).inputDigest;
202
141
  const trustedPolicyDigest = trustedPolicyDigestForConfig(workspace, config);
203
- return { inputDigest, trustedPolicyDigest, config };
142
+ return { trustedPolicyDigest, config };
204
143
  }
205
144
  /**
206
145
  * Runs `gateforge broker commit` (plan Phase 5 item 6): verifies the
@@ -249,25 +188,20 @@ export async function brokerCommitCommand(io, argv) {
249
188
  throw new BrokerRejection('BROKER_UNSAFE_MESSAGE', 'the commit message is empty; refusing (fail closed)');
250
189
  }
251
190
  // 1. Freeze the candidate bytes (immutable tree id) + recompute the
252
- // Phase 4 binding digests from those bytes. The workspace IS the
253
- // evaluated repository for this step: the process cwd follows it so
254
- // repo-relative readers (in-process plugin modules read repo-relative
255
- // paths against the process cwd) resolve the workspace bytes — never
256
- // the authoritative repo's. Restored on every path.
257
- const scratchDir = mkdtempSync(join(tmpdir(), 'gateforge-broker-'));
258
- let treeId;
259
- let digests;
260
- const previousCwd = process.cwd();
261
- process.chdir(workspace);
262
- try {
263
- treeId = workspaceTreeId(io.cwd, io.env, workspace, scratchDir);
264
- digests = await recomputeWorkspaceDigests(workspace, io.env);
191
+ // trusted policy digest from RAW workspace bytes. No `process.chdir`
192
+ // into the candidate, no pipeline execution, no plugin/adapter
193
+ // import in the authority process: candidate-selected executable
194
+ // input can never execute here. The workspace itself is never
195
+ // modified.
196
+ if (!existsSync(workspace)) {
197
+ throw new UsageError(`broker: workspace '${workspace}' does not exist`);
265
198
  }
266
- finally {
267
- if (process.cwd() !== previousCwd)
268
- process.chdir(previousCwd);
269
- rmSync(scratchDir, { recursive: true, force: true });
199
+ const authorityGitDir = resolveGitDir(io.cwd, io.env);
200
+ if (authorityGitDir === null) {
201
+ throw new UsageError('broker: the authoritative directory is not a Git checkout (fail closed)');
270
202
  }
203
+ const treeId = computeCandidateTreeId(authorityGitDir, workspace, io.env, resolveStateDir(workspace));
204
+ const digests = recomputeWorkspaceDigests(workspace);
271
205
  // 1b. Approved-policy ownership gate (review 2026-09-13 P1 #5): the
272
206
  // workspace's recomputed policy revision must match the
273
207
  // OWNER-APPROVED digest provisioned in the BROKER environment
@@ -288,8 +222,15 @@ export async function brokerCommitCommand(io, argv) {
288
222
  writeLine(io.stderr, 'broker: no approved policy digest provisioned (GATEFORGE_APPROVED_POLICY_DIGEST); ' +
289
223
  'policy-revision ownership NOT enforced for this commit');
290
224
  }
291
- // 2. Require a valid receipt for EXACTLY these bytes (Phase 4
292
- // verification incl. trustedPolicyDigest + staleness binding).
225
+ // 2. Require a valid v2 receipt for EXACTLY this tree (Phase 3
226
+ // authority cutover). The MAC authenticates the sealed binding set;
227
+ // the broker additionally demands: the sealed candidate tree equals
228
+ // the freshly ingested tree, the sealed policy revision equals the
229
+ // raw recomputed revision, and the sealed execution boundary equals
230
+ // THIS authority's expectation. The sealed input digest rides inside
231
+ // the authenticated envelope (the trusted controller bound it at
232
+ // seal time); the broker never re-runs a candidate-configured
233
+ // pipeline to second-guess it.
293
234
  if (!existsSync(receiptPath)) {
294
235
  throw new BrokerRejection('RUN_INCOMPLETE', `no gate receipt at '${receiptPath}' — run \`gateforge test-gates --changed\` in the workspace; ` +
295
236
  'the broker never commits an unverified candidate (fail closed)');
@@ -305,16 +246,25 @@ export async function brokerCommitCommand(io, argv) {
305
246
  if (verifierKey === undefined || verifierKey.length === 0) {
306
247
  throw new BrokerRejection('ENFORCEMENT_UNTRUSTED', 'no witness verifier key in the broker environment; the receipt cannot be authenticated (fail closed)');
307
248
  }
249
+ const expectedBoundary = executionBoundaryDigestOf(authorityBoundaryProfile(io.env));
308
250
  const verified = verifyGateReceipt(verifierKey, receiptRaw, {
309
- inputDigest: digests.inputDigest,
251
+ candidateTreeId: treeId,
310
252
  trustedPolicyDigest: digests.trustedPolicyDigest,
253
+ executionBoundaryDigest: expectedBoundary,
311
254
  });
312
255
  if (!verified.ok) {
313
- if (verified.rejection === 'input-digest-mismatch' || verified.rejection === 'policy-digest-mismatch') {
256
+ if (verified.rejection === 'input-digest-mismatch' ||
257
+ verified.rejection === 'policy-digest-mismatch' ||
258
+ verified.rejection === 'tree-mismatch') {
314
259
  // Binding mismatches are STALENESS: the receipt is for other bytes
315
260
  // or a different trusted policy revision (E13).
316
261
  throw new BrokerRejection('EVIDENCE_STALE', `broker: ${verified.detail} (rerun the gate for the exact candidate)`);
317
262
  }
263
+ if (verified.rejection === 'boundary-mismatch') {
264
+ throw new BrokerRejection('ENFORCEMENT_UNTRUSTED', `broker: ${verified.detail} — this authority requires execution-boundary ` +
265
+ `'${authorityBoundaryProfile(io.env)}' (authority label '${authorityBoundaryLabel(io.env)}'); a '${'local-unisolated'}' receipt cannot authorize ` +
266
+ 'managed acceptance (fail closed)');
267
+ }
318
268
  throw new BrokerRejection('ENFORCEMENT_UNTRUSTED', `broker: ${verified.detail}`);
319
269
  }
320
270
  const receipt = verified.receipt;
@@ -365,7 +315,7 @@ export async function brokerCommitCommand(io, argv) {
365
315
  throw new BrokerRejection('BROKER_CAS_MISMATCH', `the authoritative ref '${ref}' moved during the commit (compare-and-swap rejected; expected parent ` +
366
316
  `'${parentSha ?? 'unborn'}'); no commit was accepted`);
367
317
  }
368
- writeLine(io.stdout, `broker: committed ${newSha} on ${ref} (tree ${treeId}, receipt ${receipt.receiptId}, input ${digests.inputDigest.slice(0, 12)})`);
318
+ writeLine(io.stdout, `broker: committed ${newSha} on ${ref} (tree ${treeId}, receipt ${receipt.receiptId}, boundary ${authorityBoundaryLabel(io.env)} / profile ${authorityBoundaryProfile(io.env)})`);
369
319
  writeLine(io.stdout, 'managed-mode note: this guarantee holds only while the broker (Git dir, engine, verifier key) stays outside the agent boundary (ADR 0005 D1)');
370
320
  return 0;
371
321
  }
@@ -1 +1 @@
1
- {"version":3,"file":"broker.js","sourceRoot":"","sources":["../src/broker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAA0C,MAAM,kBAAkB,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,YAAY,GACvB,qGAAqG;IACrG,8GAA8G;IAC9G,2GAA2G;IAC3G,kGAAkG;IAClG,mGAAmG;IACnG,oGAAoG;IACpG,uDAAuD,CAAC;AAE1D,wDAAwD;AACxD,MAAM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CAAC;QACzB,MAAM,IAAI,eAAe,CACvB,qBAAqB,EACrB,0BAA0B,GAAG,wEAAwE;YACnG,IAAI,SAAS,IAAI,QAAQ,4BAA4B,CACxD,CAAC;IACJ,CAAC;IACD,SAAS,CACP,EAAE,CAAC,MAAM,EACT,qBAAqB,MAAM,OAAO,GAAG,UAAU,MAAM,aAAa,OAAO,CAAC,SAAS,cAAc,sBAAsB,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,wBAAwB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CACjL,CAAC;IACF,SAAS,CACP,EAAE,CAAC,MAAM,EACT,8IAA8I,CAC/I,CAAC;IACF,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAAM,EAAE,IAAuB;IACjE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACjD,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QACnC,OAAO,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;QACrB,MAAM,IAAI,UAAU,CAAC,8BAA8B,GAAG,0BAA0B,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Builds the sanitized child environment for authority Git plumbing:
3
+ * ambient redirectors stripped, everything else inherited.
4
+ */
5
+ export declare function sanitizedAuthorityEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
6
+ /**
7
+ * Resolves the absolute git dir of the repository at `cwd`.
8
+ *
9
+ * Returns:
10
+ * string | null: absolute git dir, or null when `cwd` is not inside a
11
+ * Git work tree (a non-git workspace seals `candidateTreeId: null`).
12
+ */
13
+ export declare function resolveGitDir(cwd: string, env: NodeJS.ProcessEnv): string | null;
14
+ /**
15
+ * Computes the immutable tree id of a workspace candidate from raw bytes.
16
+ *
17
+ * Args:
18
+ * gitDir: absolute git dir of the AUTHORITY object store the tree is
19
+ * pinned into (resolved with {@link resolveGitDir}).
20
+ * workspace: absolute workspace path (the candidate bytes).
21
+ * env: process environment (sanitized for every child).
22
+ * excludeDir: absolute run-state output directory excluded from the
23
+ * tree (receipts and execution records are outputs, never inputs;
24
+ * null/omitted excludes nothing).
25
+ * symlinks: 'reject' (authority ingestion — symlink candidates cannot
26
+ * be verified) or 'record' (controller sealing — faithful git semantics:
27
+ * symlinks become 120000 blobs of the target string, never followed).
28
+ *
29
+ * Returns:
30
+ * string: 40-char hex tree id pinned in the authority store.
31
+ *
32
+ * Throws:
33
+ * UsageError: on plumbing failures or unsupported entries (fail closed).
34
+ */
35
+ export declare function computeCandidateTreeId(gitDir: string, workspace: string, env: NodeJS.ProcessEnv, excludeDir?: string | null, symlinks?: 'reject' | 'record'): string;
36
+ //# sourceMappingURL=candidate-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidate-tree.d.ts","sourceRoot":"","sources":["../src/candidate-tree.ts"],"names":[],"mappings":"AAuDA;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAK/E;AAWD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,GAAG,IAAI,CAShF;AA2LD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,EAC1B,QAAQ,GAAE,QAAQ,GAAG,QAAmB,GACvC,MAAM,CAuDR"}