/** * Ship E2E Smoke — one-shot walker that validates the full release * lifecycle from `plan` through `npm publish`. * * Why this exists (T10103 · Saga T10099 SG-RELEASE-AUDIT-V2) * ---------------------------------------------------------- * The v2026.5.100 release ship required four manual interventions * (manual `gh workflow run`, manual `git tag + push`, manual CHANGELOG * append, manual `npm install -g`). The smoke walker exists to detect * those gaps mechanically on every release before the operator runs the * real flow — gaps surface as `step.status === 'failed'` instead of as * 3am dogfood pain. * * Architecture * ------------ * The walker is a pure orchestrator: it takes a `SmokeEnvironment` * dependency capsule that owns every external interaction (CLI dispatch, * `gh` polling, `npm view`). Tests inject a fake environment to assert * step ordering and dry-run semantics without touching the network. * * Steps (each idempotent — re-runnable from any failure point): * 1. plan — build & persist Release Plan envelope * 2. open — dispatch release-prepare workflow * 3. wait-for-pr — poll until release PR merges * 4. wait-for-tag — poll until `v` git tag visible * 5. verify-npm-published — poll until `npm view @cleocode/cleo@` * resolves * * Dry-run mode (default): every step reports what it WOULD do and * returns `status: 'skipped'`. `--execute` flips the runner to perform * the real mutations. * * @task T10103 * @epic E-CLEO-RELEASE-VERBS * @saga T10099 */ import type { ShipE2eSmokeParams, ShipE2eSmokeResult } from '@cleocode/contracts'; /** * Pluggable environment for the smoke walker. Every operation the * walker performs is routed through this capsule so tests can inject * fakes without monkey-patching globals. */ export interface SmokeEnvironment { /** * Run `cleo release plan --epic `. Returns the resolved * plan path so the walker can include it in the step detail. */ runPlan(args: { version: string; epicId: string; }): Promise<{ planPath: string; }>; /** * Run `cleo release open `. Returns the workflow run ID * dispatched by `gh workflow run`. */ runOpen(args: { version: string; }): Promise<{ workflowRunId: string; }>; /** * Poll `gh pr list --state merged --search "release/v"` * until the release PR is merged or the deadline is hit. Returns the * merged PR number. */ waitForPr(args: { version: string; deadlineEpochMs: number; pollIntervalMs: number; }): Promise<{ prNumber: number; }>; /** * Poll `git ls-remote --tags origin v` until the tag is * visible or the deadline is hit. Returns the tag commit SHA. */ waitForTag(args: { version: string; deadlineEpochMs: number; pollIntervalMs: number; }): Promise<{ tagSha: string; }>; /** * Poll `npm view @cleocode/cleo@` until the version * resolves on the registry or the deadline is hit. Returns the * registry-reported tarball URL. */ verifyNpmPublished(args: { version: string; deadlineEpochMs: number; pollIntervalMs: number; }): Promise<{ tarballUrl: string; }>; /** * Wall-clock now in milliseconds. Tests fake this to avoid `Date.now` * coupling. */ now(): number; } /** * Run the smoke walker against the given environment. Returns the * aggregate envelope. Never throws — all errors are captured in step * records so the envelope is always parseable. */ export declare function runShipE2eSmoke(params: ShipE2eSmokeParams, env: SmokeEnvironment): Promise; //# sourceMappingURL=ship-e2e-smoke.d.ts.map