Drills held constant true verdicts and read public/ placeholders, so they passed with no build or with JS assets deleted. They now check the local dist, mark boot, live traffic and provider steps UNVERIFIED (exit 3), and FE-GATE-016 is retired because it repeated FE-GATE-025's FE-RB-005 drill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
2.0 KiB
TypeScript
67 lines
2.0 KiB
TypeScript
export const PROMOTION_FORMULA = Object.freeze({
|
|
MERGE_READY: Object.freeze([
|
|
"FE-GATE-001",
|
|
"FE-GATE-002",
|
|
"FE-GATE-003",
|
|
"FE-GATE-004",
|
|
"FE-GATE-005",
|
|
"FE-GATE-006",
|
|
"FE-GATE-007",
|
|
"FE-GATE-008",
|
|
"FE-GATE-009",
|
|
"FE-GATE-010",
|
|
"FE-GATE-011",
|
|
"FE-GATE-013",
|
|
"FE-GATE-020",
|
|
]),
|
|
RELEASE_READY: Object.freeze([
|
|
"FE-GATE-012",
|
|
"FE-GATE-014",
|
|
"FE-GATE-015",
|
|
"FE-GATE-019",
|
|
"FE-GATE-026",
|
|
// FE-GATE-027. A candidate is only release-ready once it has been admitted
|
|
// to a named environment; coherence alone never proved it belonged there.
|
|
"FE-GATE-027",
|
|
// FE-GATE-028 (08-06). The signed human accessibility review belongs to a
|
|
// release candidate, so it gates release; merge checks the record format.
|
|
"FE-GATE-028",
|
|
]),
|
|
PROD_PROMOTION_READY: Object.freeze([
|
|
// FE-GATE-016 is retired (D-14): it repeated FE-GATE-025's FE-RB-005 drill.
|
|
"FE-GATE-021",
|
|
"FE-GATE-022",
|
|
"FE-GATE-023",
|
|
"FE-GATE-024",
|
|
"FE-GATE-025",
|
|
]),
|
|
FIELD_SLO_READY: Object.freeze(["FE-GATE-018"]),
|
|
DOCUMENTATION_READY: Object.freeze(["FE-GATE-017"]),
|
|
});
|
|
|
|
export type GateResult = "PASS" | "FAIL" | "UNVERIFIED";
|
|
|
|
export function evaluatePromotionReadiness(
|
|
gateResults: Readonly<Record<string, GateResult>>,
|
|
) {
|
|
const allPass = (gateIds: readonly string[]) =>
|
|
gateIds.every((gateId) => gateResults[gateId] === "PASS");
|
|
|
|
const mergeReady = allPass(PROMOTION_FORMULA.MERGE_READY);
|
|
const releaseReady =
|
|
mergeReady && allPass(PROMOTION_FORMULA.RELEASE_READY);
|
|
const productionReady =
|
|
releaseReady && allPass(PROMOTION_FORMULA.PROD_PROMOTION_READY);
|
|
const fieldReady =
|
|
productionReady && allPass(PROMOTION_FORMULA.FIELD_SLO_READY);
|
|
const documentationReady = allPass(PROMOTION_FORMULA.DOCUMENTATION_READY);
|
|
|
|
return Object.freeze({
|
|
MERGE_READY: mergeReady,
|
|
RELEASE_READY: releaseReady,
|
|
PROD_PROMOTION_READY: productionReady,
|
|
FIELD_SLO_READY: fieldReady,
|
|
DOCUMENTATION_READY: documentationReady,
|
|
});
|
|
}
|