import { nowIso } from './fsx.js';
export const RELEASE_PARALLEL_FULL_COVERAGE_SCHEMA = 'sks.release-parallel-full-coverage.v1';
export const RELEASE_1_17_GATE_SNAPSHOT = Object.freeze([
    'build',
    'runtime:no-src-mjs',
    'runtime:ts-source-of-truth',
    'architecture:guard',
    'runtime:dist-parity',
    'routes:proof-artifact-structure',
    'agent:codex-app-cockpit',
    'agent:janitor',
    'agent:multi-project-isolation',
    'verification:parallel-engine',
    'typecheck',
    'schema:check',
    'release:metadata',
    'release:readiness'
]);
export const RELEASE_1_18_REQUIRED_GATES = Object.freeze([
    'xai-mcp:capability',
    'source-intelligence:policy',
    'source-intelligence:all-modes',
    'codex-web:adapter',
    'goal-mode:official-default',
    'agent:main-no-scout',
    'agent:worker-scout-limited',
    'agent:background-terminals',
    'agent:zellij-runtime',
    'agent:dynamic-pool',
    'agent:backfill-replenishment',
    'agent:scheduler-proof',
    'agent:session-generation',
    'agent:terminal-generations',
    'mad-sks:zellij-launch',
    'agent:dynamic-cockpit',
    'agent:source-intelligence-propagation',
    'agent:goal-mode-propagation',
    'agent:visual-consistency',
    'release:parallel-full-coverage',
    'priority:full-closure',
    'release:native-agent-backend',
    'agent:legacy-multiagent-removed',
    'all-features:completion',
    'all-features:deep-completion',
    'json-schema:recursive-check',
    'evidence:flagship-coverage',
    'image-fidelity:check',
    'imagegen:capability',
    'imagegen:gpt-image-2-request-validator',
    'ux-review:run-wires-imagegen',
    'ux-review:extract-wires-real-extractor',
    'ux-review:patch-diff-recheck',
    'ux-review:imagegen-blackbox',
    'ux-review:real-loop-fixture',
    'ux-review:generate-callouts-fixture',
    'ux-review:extract-real-callouts-fixture',
    'ux-review:patch-handoff-fixture',
    'ux-review:recapture-recheck-fixture',
    'ux-review:no-text-fallback',
    'ux-review:no-fake-callouts',
    'ux-review:image-voxel-relations',
    'ppt:imagegen-review-fixture',
    'ppt:full-e2e-blackbox',
    'ppt:full-e2e-artifact-graph',
    'ppt:real-export-adapter',
    'ppt:real-imagegen-wiring',
    'ppt:reexport-rereview',
    'ppt:imagegen-blackbox',
    'ux-ppt:structured-extraction',
    'ppt:slide-export-fixture',
    'ppt:no-text-fallback',
    'ppt:no-mock-as-real',
    'ppt:issue-extraction-fixture',
    'ppt:image-voxel-relations',
    'ppt:proof-trust-fixture',
    'dfix:fixture',
    'dfix:fast-kernel',
    'dfix:blackbox-fast',
    'dfix:performance',
    'dfix:patch-handoff',
    'dfix:verification-recommendation',
    'dfix:verification',
    'hooks:strict-subset-check',
    'hooks:latest-schema-check',
    'hooks:trust-state-check',
    'hooks:trust-warning-zero',
    'hooks:subagent-events-check',
    'hooks:no-unsupported-handlers',
    'hooks:actual-parity-check',
    'hooks:actual-parity-v2',
    'hooks:official-hash-parity',
    'hooks:official-hash-oracle',
    'hooks:managed-install-fixture',
    'hooks:runtime-replay-warning-zero',
    'hooks:runtime-replay-warning-zero-v2',
    'codex-lb:persistence-truth',
    'codex-lb:setup-truthfulness',
    'computer-use:visual-route-fixture',
    'computer-use:live-evidence',
    'codex:0.133-compat',
    'codex:output-schema-fixture',
    'codex:exec-syntax-parity',
    'codex:0.133-official-compat',
    'flagship:proof-graph-v3',
    'flagship:proof-graph-v4',
    'mad-sks:permission-model',
    'mad-sks:immutable-harness',
    'mad-sks:write-guard',
    'mad-sks:audit-proof',
    'mad-sks:no-harness-modification',
    'mad-sks:actual-executor',
    'mad-sks:file-write-executor',
    'mad-sks:shell-executor',
    'mad-sks:package-executor',
    'mad-sks:service-executor',
    'mad-sks:db-executor',
    'mad-sks:rollback-apply',
    'mad-sks:live-guard-smoke',
    'mad-sks:executor-proof-graph',
    'memory-summary:rebuild-check',
    'loop-blocker:check',
    'docs:truthfulness',
    'official-docs:compat',
    'blackbox:matrix:contract',
    'test:blackbox',
    'rust:check',
    'rust:smoke',
    'release:dist-freshness',
    'perf:gate'
]);
export function evaluateReleaseParallelFullCoverage(currentGateIds) {
    const current = [...new Set(currentGateIds)];
    const previousMissing = RELEASE_1_17_GATE_SNAPSHOT.filter((gate) => !current.includes(gate));
    const requiredMissing = RELEASE_1_18_REQUIRED_GATES.filter((gate) => !current.includes(gate));
    const independentGroups = {
        source_intelligence: current.filter((gate) => /source-intelligence|xai|codex-web|goal-mode/.test(gate)),
        agent_runtime: current.filter((gate) => /agent:/.test(gate)),
        release_readiness: current.filter((gate) => /release:|priority:/.test(gate)),
        baseline: current.filter((gate) => RELEASE_1_17_GATE_SNAPSHOT.includes(gate))
    };
    return {
        schema: RELEASE_PARALLEL_FULL_COVERAGE_SCHEMA,
        generated_at: nowIso(),
        ok: previousMissing.length === 0 && requiredMissing.length === 0,
        previous_gate_count: RELEASE_1_17_GATE_SNAPSHOT.length,
        current_gate_count: current.length,
        previous_gate_snapshot: [...RELEASE_1_17_GATE_SNAPSHOT],
        current_gate_list: current,
        missing_previous_gates: previousMissing,
        missing_1_18_required_gates: requiredMissing,
        coverage_regression: previousMissing.length > 0,
        independent_groups: independentGroups,
        speedup_summary: {
            parallel_groups: Object.values(independentGroups).filter((rows) => rows.length > 0).length,
            estimated_speedup: current.length > 1 ? 'parallel DAG preserves baseline coverage and adds independent 1.18 groups' : 'none'
        }
    };
}
//# sourceMappingURL=release-parallel-full-coverage.js.map