import type { WorkflowRunDetail } from "./runtime.js"; import type { WorkflowTodoLifecycle } from "./todo-ports.js"; /** * What a run that reached a success End owes its bound Todo. * * Reaching one used to be proof enough: the runner closed the Todo whenever a * success End completed behind an approved operator-only gate, without ever * asking what the run had produced. A landing phase that aborted on five rebase * conflicts reported "nothing merged" and satisfied that exactly as well as a * real merge did, because its node contract asked for a summary and not for a * commit — so the board read `done` for work that never left its branch. * * A success End may now declare what has to be true first. Ends that declare * nothing behave exactly as before: most Todo-closing Workflows land nothing, * and a demand they cannot meet would close nothing at all. */ /** Proof that a commit a run reported really reached the canonical branch. A port so the rule * can be judged without a repository; the default shells git. */ export interface WorkflowLandingVerifier { mergedIntoMain(input: { commit: string; checkout: string; }): Promise; } /** Why a landing cannot be believed, and the End that demanded it. */ export interface WorkflowLandingShortfall { nodeId: string; reason: string; } export declare function reachedSuccessEnd(run: WorkflowRunDetail): boolean; /** * Why a completed run must NOT close its Todo, or `undefined` when every success * End it reached is satisfied. * * A missing field, a blank one and a value that is not a SHA are the same * failure in different clothes: the phase landed nothing and said so in the * only place it had. A declared checkout makes canonical delivery mandatory; * an unavailable repository or remote is failed proof, never permission to close. */ export declare function landingShortfall(run: WorkflowRunDetail, verifier?: WorkflowLandingVerifier): Promise; /** Close the bound Todo of a run that completed behind an approved reserved * gate. Best-effort like every other Todo-side write from a run: the Todo may * have been closed or deleted since the run started. */ export declare function completeBoundTodo(lifecycle: WorkflowTodoLifecycle | undefined, run: WorkflowRunDetail): void; //# sourceMappingURL=run-closure.d.ts.map