FE-GATE-019 ran before the release existed and passed by comparing the declared headers with a copy of themselves. The fixture result is now UNVERIFIED, the gate runs in the production stage after deployment, and the live probe requests the entry script the served index.html names (D-14). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
2.2 KiB
TypeScript
69 lines
2.2 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-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-019 (13-05, D-14). Live hosting headers of the deployed promoted
|
|
// release; the declared-header fixture alone is UNVERIFIED, not PASS.
|
|
"FE-GATE-019",
|
|
// 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,
|
|
});
|
|
}
|