import type { RaceGate2Policy } from './gate2-policy.js'; export type LaneChosenBy = 'user-named' | 'user-picked'; export type TaskOutcome = 'landed' | 'escalated' | 'stopped'; export type RiskSurfaceHandling = 'refused' | 'escalated' | 'user-override-recorded' | 'none'; export type PilotGateVerdict = 'pass' | 'fail' | 'insufficient-evidence'; export type PilotTaskRow = { readonly rid: string; readonly sessionId: string; readonly date: string; readonly laneChosenBy: LaneChosenBy; readonly outcome: TaskOutcome; readonly filesChanged: readonly string[]; readonly riskSurfacesHit: readonly number[]; readonly riskSurfaceHandling: RiskSurfaceHandling; readonly rolledBack: boolean; readonly ciRed: boolean; readonly missedRiskSurface: boolean; }; export type PilotGateCounts = { readonly taskCount: number; readonly coreCapabilityTaskCount: number; readonly sessionCount: number; readonly safetyArmExercisedCount: number; readonly rollbackCount: number; readonly ciRedCount: number; readonly missedRiskSurfaceCount: number; }; export type PilotGateReason = { readonly code: string; readonly message: string; readonly observed: number; readonly threshold: number; }; export type PilotGateEvaluation = { readonly verdict: PilotGateVerdict; readonly counts: PilotGateCounts; readonly reasons: readonly PilotGateReason[]; }; /** * The safety arm fired and left a disposition. A hit with `'none'` is a MISSING * record, not a clean row — so `'none'` does not count (PRD §3.2(b)). * * Counting basis is deliberately different from `taskCount`'s: this predicate is * applied over ALL records, `escalated` and `stopped` included. An escalation is * the safety arm firing correctly, and a landed-only reading would exclude the * one sample where it did (PRD §3.1, the exception paragraph). */ export declare function safetyArmExercised(row: PilotTaskRow): boolean; /** * The coverage condition, DERIVED — never a `coreCapability: true` the author * wrote (PRD §3.2). A row qualifies by reaching a hard-blocked family, or by * exercising the safety arm. * * It does NOT test `outcome`: the caller applies this over landed rows only * (§3.1), which is a property of the counting set, not of the predicate. */ export declare function taskExercisesCoreCapability(row: PilotTaskRow): boolean; export declare function evaluatePilotGate(tasks: readonly PilotTaskRow[], policy: RaceGate2Policy): PilotGateEvaluation;