Files
openclaw/scripts/full-release-validation-policy.d.mts
Vincent Koc a2f0b84e8a fix(release): report blockers before diagnostics finish (#127014)
* fix(release): separate decisions from diagnostic drain

* test(release): align decision drain fixtures

* fix(release): pin artifact downloads to valid v8 SHA

* fix(release): default empty evidence paths in plans

* fix(release): bind complete evidence reuse selection

* fix(release): harden retry artifact integrity

* fix(release): canonicalize reused validation evidence

* fix(release): bind manifest children to execution plan

* test(release): fix validation fixture types

* fix(release): retry transient decision artifact reads
2026-08-21 09:14:39 -07:00

85 lines
2.7 KiB
TypeScript

export interface ReleaseRecord {
[key: string]: unknown;
}
export interface ReleaseChild extends ReleaseRecord {
key: string;
runAttempt: number | null;
runId: string;
}
export interface ReleaseExecutionPlan extends ReleaseRecord {
children: ReleaseChild[];
evidenceReuse: ReleaseRecord;
gates: ReleaseRecord[];
}
export interface ReleaseStateArtifact extends ReleaseRecord {
blockers: ReleaseRecord[];
children: Record<string, ReleaseRecord>;
errors: ReleaseRecord[];
parentRunAttempt: number;
sourceParentRunAttempt: number;
state: string;
}
export type ReleaseGhTransportErrorClass = "hard" | "transient";
export function classifyReleaseGhTransportError(error: unknown): ReleaseGhTransportErrorClass;
export function buildReleaseExecutionPlan(input: ReleaseRecord): {
children: ReleaseChild[];
gates: ReleaseRecord[];
};
export function buildReleaseExecutionPlanArtifact(input: ReleaseRecord): ReleaseExecutionPlan;
export function validateReleaseExecutionPlanArtifact(
payload: unknown,
expected?: Record<string, unknown>,
): ReleaseExecutionPlan;
export function releaseExecutionPlanSha256(plan: ReleaseRecord): string;
export function terminalPolicyPass(
child: ReleaseRecord,
releaseProfile: string,
workflowRef: string,
): boolean;
export function classifyReleaseSnapshot(input: ReleaseRecord): ReleaseStateArtifact;
export function releasePlanGateFailures(gates: ReleaseRecord[]): ReleaseRecord[];
export function buildReleaseStateArtifact(input: ReleaseRecord): ReleaseStateArtifact;
export function validateReleaseStateArtifact(
payload: unknown,
expected?: Record<string, unknown>,
expectedMode?: string,
): ReleaseStateArtifact;
export function verifyReleaseStateArtifacts(
executionPlanPayload: unknown,
decisionPayload: unknown,
drainPayload: unknown,
expected?: Record<string, unknown>,
): {
decision: ReleaseStateArtifact;
drain: ReleaseStateArtifact;
executionPlan: ReleaseExecutionPlan;
sourceAttempts: {
decision: number;
drain: number;
executionPlan: number;
};
};
export function selectReleaseStateArtifacts(
executionPlanPayload: unknown,
decisionCandidates: Array<{ name: string; payload: unknown }>,
drainCandidates: Array<{ name: string; payload: unknown }>,
expected?: Record<string, unknown>,
): {
decision: ReleaseStateArtifact;
drain: ReleaseStateArtifact;
executionPlan: ReleaseExecutionPlan;
sourceAttempts: {
decision: number;
drain: number;
executionPlan: number;
};
};
export function formatReleaseStateOutcome(payload: ReleaseRecord): string;
export function affectedActiveRunIds(
children: ReleaseRecord[],
blockers: ReleaseRecord[],
cancelledRunIds?: Set<string>,
): string[];