import { readJson } from '../fsx.js';
import { loopGraphProofPath } from './loop-artifacts.js';
export async function readLoopGraphProof(root, missionId) {
    return readJson(loopGraphProofPath(root, missionId), null);
}
export function summarizeLoopGraphProof(proof) {
    if (!proof)
        return { total: 0, running: 0, completed: 0, blocked: 0, speedup_ratio: 0, active_loop_ids: [], blocked_loop_ids: [] };
    return {
        total: proof.total_loops,
        running: Math.max(0, proof.total_loops - proof.completed_loops - proof.blocked_loops - proof.failed_loops - proof.handoff_loops),
        completed: proof.completed_loops,
        blocked: proof.blocked_loops + proof.failed_loops + proof.handoff_loops,
        speedup_ratio: proof.parallelism.speedup_ratio,
        active_loop_ids: [],
        blocked_loop_ids: proof.blockers
    };
}
//# sourceMappingURL=loop-observability.js.map