/** * Shared [G2] pre-flight gate — the deploy-path wrapper around * `runDriftPreFlight` + `partitionPreFlightByRemediation`. The application * path and the single-component (platform/account) path both run this gate * between synth and the CFN update; the converge/recreate warns and the * block message are user-facing [G2] copy that must stay byte-identical * across the two surfaces, so the wrapper owns them once. * * Fail-open on probe infrastructure errors (the runDriftPreFlight contract): * in the FINDING flow only a CONFIRMED out-of-band deletion with no covering * remediation blocks. The flipless-by-necessity absence re-verification * (`verifyByNecessityBeforeConverge`) is the exception and fails CLOSED — * those targets carry no Retain policy, so a converge that cannot re-prove * their absence would issue a real physical delete. Each caller renders the * blocked outcome in its own failure idiom — the message is identifier-only * (stack, logical ID, resource type, physical ID) and pre-masked by * construction. * * The gate also owns the Route53 record-collision pre-flight (D5): running * it here reaches all four deploy surfaces through their one shared [G2] * call. It runs LAST, after the drift verdicts — a confirmed out-of-band * deletion outranks a record collision in the operator's queue. Its own * fail-closed/fail-open split is documented in `route53RecordPreflight.ts`. */ import type { AwsProvider } from "../../aws/AwsProvider.js"; import type { CloudFormationService } from "../../services/infrastructure/CloudFormationService.js"; import type { DeployCallbacks } from "../../types/callbacks.js"; import { type ByNecessityConvergeTarget, type ForgetOrchestrationOptions } from "../remediation/forgetResource.js"; export interface DriftPreFlightGateParams { stackNames: readonly string[]; /** cdk.out assembly dir for the synth-omission converge check and the * record-collision claim extraction. */ cdkOutPath: string; /** `getTemplate` feeds the D5 record pre-flight's ownership baseline. */ cfnService: Pick; callbacks: Pick; abortSignal?: AbortSignal; /** Journal/clock injection for the remediation partition and the * by-necessity re-verification (tests; production uses the defaults). */ remediationOptions?: ForgetOrchestrationOptions; } export type DriftPreFlightGateOutcome = { kind: "proceed"; /** Flipless-by-necessity targets re-proven absent against their owning * service by THIS pre-flight — the destruction gate consumes this to * suppress their already-consented, physically-no-op delete rows. */ verifiedAbsentByNecessity?: ByNecessityConvergeTarget[]; } | { kind: "blocked"; message: string; }; export declare function runDriftPreFlightGate(aws: AwsProvider, params: DriftPreFlightGateParams): Promise;