/*
Register the werkstatt.e2e.cold command with the kernel registry and module loader (RFC-0965).
- Do not implement cold run logic — delegate to src/e2e/cold.ts.
RFC-0965
- RFC-1097: step 6 — compass.migrate codemod run
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.
- RFC-1097: sweep — werkstatt-engine clean
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.
- RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)
- RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
follows the parsed selector. Guard renamed assertAllSitesAllowed ->
assertAllFlagAccepted, message updated. 417 declaration sites + type
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.
- RFC-1324: intake fixture matrix + zero-fabrication cold run — --fixture/--until/--with-deploy flags, not-idempotent declaration, fixtures reads glob
*/
import type {
KernelCommandInput,
KernelCommandResult,
KernelRuntimeContext,
} from "../src/kernel/types.ts";
import type { ModuleExport } from "../src/runtime/desired-state.ts";
import { runColdE2e, type ColdMatrixReport } from "../src/e2e/cold.ts";
export const werkstattE2eModule: ModuleExport = {
name: "werkstatt-e2e",
version: "0.1.0",
declarations: [],
commands: [
{
name: "werkstatt.e2e.cold",
mutatesState: true,
contract: "werkstatt",
rules: [],
modulePath: "packages/werkstatt-engine/os/werkstatt-e2e-module.ts",
idempotency: "not-idempotent",
idempotencyNote:
"Provisions real external resources (workers, repos) per fixture; each run needs a fresh temp root + teardown (RFC-1324).",
description:
"Cold end-to-end proving run: clone, install, register from an intake fixture, scripted compose, validate, release — one birth per fixture in a disposable temp directory (RFC-0965/1324). Flags: --fixture, --keep, --until, --with-deploy, --timeout-minutes, --json.",
scope: "workspace",
acceptsAllFlag: false,
longRunning: true,
cacheable: false,
flags: {
fixture: {
kind: "string",
description:
"Run a single named intake fixture (default: all fixtures, sequentially, each in its own temp root)",
required: false,
},
keep: {
kind: "boolean",
description: "Keep the temp directory for debugging (default: delete on success)",
},
until: {
kind: "string",
description: "Pipeline phase to run to: closed (default) or dev",
required: false,
},
"with-deploy": {
kind: "boolean",
description: "Continue to leitstand.ship --until dev (requires CF secrets in env)",
},
"timeout-minutes": {
kind: "string",
description: "Total timeout in minutes (default: 90)",
},
json: { kind: "boolean", description: "Output report as JSON" },
},
reads: ["packages/werkstatt-engine/src/intake/fixtures/**"],
async execute(
input: KernelCommandInput,
context: KernelRuntimeContext,
): Promise> {
return runColdE2e(input, context);
},
},
],
pipelines: [],
};