@tangle-network/agent-eval 0.209.1 → 0.211.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/dist/adapters/http.d.ts +1 -1
- package/dist/analyst/index.d.ts +2 -2
- package/dist/analyst/index.js +1 -1
- package/dist/{analyze-runs-0cdYMgob.js → analyze-runs-3xpby3p2.js} +4 -4
- package/dist/analyze-runs-3xpby3p2.js.map +1 -0
- package/dist/{benchmark-command-Cve7mHNC.js → benchmark-command-S8tCtkxh.js} +3 -3
- package/dist/{benchmark-command-Cve7mHNC.js.map → benchmark-command-S8tCtkxh.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +9 -9
- package/dist/{campaign-evidence-B5qsCHEn.js → campaign-evidence-OcUciD-N.js} +2 -2
- package/dist/campaign-evidence-OcUciD-N.js.map +1 -0
- package/dist/{campaign-CvhmiLKa.js → campaign-wvvJA1ps.js} +10 -10
- package/dist/{campaign-CvhmiLKa.js.map → campaign-wvvJA1ps.js.map} +1 -1
- package/dist/claude-jsonl-dZir12m6.js +86 -0
- package/dist/claude-jsonl-dZir12m6.js.map +1 -0
- package/dist/cli.js +4 -4
- package/dist/contract/index.d.ts +5 -5
- package/dist/contract/index.js +90 -14
- package/dist/contract/index.js.map +1 -1
- package/dist/counterfactual-DtMWvn7D.js.map +1 -1
- package/dist/{define-agent-eval-_nyV5nev.d.ts → define-agent-eval-B_zZY2AZ.d.ts} +3 -3
- package/dist/{define-agent-eval-_nyV5nev.d.ts.map → define-agent-eval-B_zZY2AZ.d.ts.map} +1 -1
- package/dist/{define-agent-eval-Csd47ur_.js → define-agent-eval-CoXXDCMu.js} +4 -4
- package/dist/{define-agent-eval-Csd47ur_.js.map → define-agent-eval-CoXXDCMu.js.map} +1 -1
- package/dist/diagnosis/index.js +1 -1
- package/dist/{eval-campaign-C31Qbv77.js → eval-campaign-4byTtqrf.js} +2 -2
- package/dist/{eval-campaign-C31Qbv77.js.map → eval-campaign-4byTtqrf.js.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/experiment/index.js +6 -6
- package/dist/feedback-trajectory-CX01700m.d.ts.map +1 -1
- package/dist/{index-H-u7f-w3.d.ts → index-D0_l25We.d.ts} +20 -41
- package/dist/{index-H-u7f-w3.d.ts.map → index-D0_l25We.d.ts.map} +1 -1
- package/dist/{index-BHh9Z9El.d.ts → index-DnZdBxCL.d.ts} +9 -6
- package/dist/{index-BHh9Z9El.d.ts.map → index-DnZdBxCL.d.ts.map} +1 -1
- package/dist/{index-Ddi5M-TQ.d.ts → index-xnhRdqik.d.ts} +3 -14
- package/dist/{index-Ddi5M-TQ.d.ts.map → index-xnhRdqik.d.ts.map} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/judge-gate-B1_O0QIs.d.ts +454 -0
- package/dist/judge-gate-B1_O0QIs.d.ts.map +1 -0
- package/dist/judge-gate-B1qYnkpi.js +658 -0
- package/dist/judge-gate-B1qYnkpi.js.map +1 -0
- package/dist/{llm-judge-C0256VT_.js → llm-judge-Tr7MBUnf.js} +6 -6
- package/dist/llm-judge-Tr7MBUnf.js.map +1 -0
- package/dist/meta-eval/index.d.ts +2 -132
- package/dist/meta-eval/index.d.ts.map +1 -1
- package/dist/meta-eval/index.js +2 -275
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{paired-arms-B5v-X7No.js → paired-arms-DzKn0TfY.js} +2 -2
- package/dist/{paired-arms-B5v-X7No.js.map → paired-arms-DzKn0TfY.js.map} +1 -1
- package/dist/{paired-binary-b2L3WKqr.js → paired-binary-Q36bhn2R.js} +13 -9
- package/dist/paired-binary-Q36bhn2R.js.map +1 -0
- package/dist/{paired-promotion-decision-2deJ7sDX.js → paired-promotion-decision-BN6IQTiu.js} +2 -2
- package/dist/{paired-promotion-decision-2deJ7sDX.js.map → paired-promotion-decision-BN6IQTiu.js.map} +1 -1
- package/dist/{produced-state-CgB9g0VX.js → produced-state-CKybuR9F.js} +3 -3
- package/dist/produced-state-CKybuR9F.js.map +1 -0
- package/dist/{promotion-policy-CCmyEH_c.js → promotion-policy-CWW35UWq.js} +3 -3
- package/dist/{promotion-policy-CCmyEH_c.js.map → promotion-policy-CWW35UWq.js.map} +1 -1
- package/dist/reporting.js +2 -2
- package/dist/rl.js +3 -3
- package/dist/rollout/index.d.ts +2 -2
- package/dist/rollout/index.js +3 -3
- package/dist/{rollout-BZqQc0YY.js → rollout-D9bKKBnZ.js} +29 -164
- package/dist/rollout-D9bKKBnZ.js.map +1 -0
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-Bfe3kzRk.js → search-kernel-BIXWM7YV.js} +3 -3
- package/dist/search-kernel-BIXWM7YV.js.map +1 -0
- package/dist/{search-summary-DK1bwTAf.js → search-summary-nwrtXxC_.js} +3 -3
- package/dist/{search-summary-DK1bwTAf.js.map → search-summary-nwrtXxC_.js.map} +1 -1
- package/dist/{sequential-BOzBND4t.js → sequential-D-1PPCmM.js} +2 -2
- package/dist/{sequential-BOzBND4t.js.map → sequential-D-1PPCmM.js.map} +1 -1
- package/dist/{skillopt-optimization-method-BCojvoP1.js → skillopt-optimization-method-DujPOiwD.js} +4 -4
- package/dist/{skillopt-optimization-method-BCojvoP1.js.map → skillopt-optimization-method-DujPOiwD.js.map} +1 -1
- package/dist/{statistical-heldout-BP6iEJvR.js → statistical-heldout-1Gbmex7v.js} +2 -2
- package/dist/{statistical-heldout-BP6iEJvR.js.map → statistical-heldout-1Gbmex7v.js.map} +1 -1
- package/dist/{statistical-heldout-D0rX_IDl.d.ts → statistical-heldout-8RGPIeyo.d.ts} +14 -10
- package/dist/statistical-heldout-8RGPIeyo.d.ts.map +1 -0
- package/dist/{summary-report-BsaEFEwA.js → summary-report-DtdRucM0.js} +2 -2
- package/dist/{summary-report-BsaEFEwA.js.map → summary-report-DtdRucM0.js.map} +1 -1
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +34 -69
- package/dist/supervisor-run/index.js.map +1 -1
- package/dist/{tree-CZ78tiPg.js → tree-kc1d80yF.js} +3 -3
- package/dist/{tree-CZ78tiPg.js.map → tree-kc1d80yF.js.map} +1 -1
- package/docs/concepts.md +14 -0
- package/docs/experiment.md +10 -0
- package/docs/trace-analysis.md +3 -0
- package/package.json +4 -3
- package/dist/analyze-runs-0cdYMgob.js.map +0 -1
- package/dist/campaign-evidence-B5qsCHEn.js.map +0 -1
- package/dist/claude-jsonl-CG3JUbTJ.js +0 -211
- package/dist/claude-jsonl-CG3JUbTJ.js.map +0 -1
- package/dist/llm-judge-C0256VT_.js.map +0 -1
- package/dist/paired-binary-b2L3WKqr.js.map +0 -1
- package/dist/produced-state-CgB9g0VX.js.map +0 -1
- package/dist/rollout-BZqQc0YY.js.map +0 -1
- package/dist/search-kernel-Bfe3kzRk.js.map +0 -1
- package/dist/series-convergence-CjO2QdRW.js +0 -43
- package/dist/series-convergence-CjO2QdRW.js.map +0 -1
- package/dist/series-convergence-hEfKdoi-.d.ts +0 -126
- package/dist/series-convergence-hEfKdoi-.d.ts.map +0 -1
- package/dist/statistical-heldout-D0rX_IDl.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as pairedBootstrap } from "./paired-tests-jbwPdSz5.js";
|
|
2
|
-
import { t as decidePairedPromotion } from "./paired-promotion-decision-
|
|
2
|
+
import { t as decidePairedPromotion } from "./paired-promotion-decision-BN6IQTiu.js";
|
|
3
3
|
//#region src/campaign/gates/statistical-heldout.ts
|
|
4
4
|
/**
|
|
5
5
|
* Held-out inference pairs execution cells and judge identities before taking
|
|
@@ -253,4 +253,4 @@ function dimensionRegressions(candidate, baseline, scenarioIds, criticalDimensio
|
|
|
253
253
|
//#endregion
|
|
254
254
|
export { heldoutSignificance as a, dimensionRegressions as i, aggregatePairedHoldout as n, pairHoldout as o, detectScale as r, TIE_WARN_FRACTION as t };
|
|
255
255
|
|
|
256
|
-
//# sourceMappingURL=statistical-heldout-
|
|
256
|
+
//# sourceMappingURL=statistical-heldout-1Gbmex7v.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistical-heldout-BP6iEJvR.js","names":[],"sources":["../src/campaign/gates/statistical-heldout.ts"],"sourcesContent":["/**\n * Held-out inference pairs execution cells and judge identities before taking\n * means within registered independent units. Repetitions can improve a unit's\n * precision without increasing n. Ungrouped inference concerns independently\n * sampled execution cells conditional on a fixed scenario roster.\n *\n * The shared paired decision rule selects the estimator and statistical test.\n * Dimension reports retain missing coverage so required safety checks cannot\n * pass through absent evidence. Thresholds use the judge's native score scale.\n */\n\nimport {\n decidePairedPromotion,\n type PairedDecisionMethod,\n type PairedDecisionStatistic,\n type PairedMcNemarEvidence,\n type PairedPromotionDecision,\n} from '../../paired-promotion-decision'\nimport {\n DECISION_PAIRED_DELTA_STATISTIC,\n type PairedBootstrapResult,\n pairedBootstrap,\n} from '../../statistics'\nimport type { JudgeScore } from '../types'\n\n/** Tie fraction at/above which a gate annotates its verdict with the tie share.\n * Tie-domination of the median bites structurally at >= 0.5 (the median is then\n * 0 by construction); 0.4 is a softer warn threshold that flags a run APPROACHING\n * that regime, so an operator sees it before the median goes fully blind. */\nexport const TIE_WARN_FRACTION = 0.4\n\nexport interface PairedHoldout {\n /** Baseline scalar per paired cell (same order as `after`/`cellIds`). */\n before: number[]\n /** Candidate scalar per paired cell. */\n after: number[]\n /** The full cellIds (`scenario:rep`) that paired, in order. */\n cellIds: string[]\n}\n\n/** Campaign cell IDs append a numeric repetition after the scenario's full ID. */\nexport function scenarioIdFromCellId(cellId: string): string {\n const separator = cellId.lastIndexOf(':')\n const repetition = cellId.slice(separator + 1)\n if (\n separator < 1 ||\n cellId.trim() !== cellId ||\n !/^(0|[1-9]\\d*)$/.test(repetition) ||\n !Number.isSafeInteger(Number(repetition))\n ) {\n throw new Error(`pairHoldout: malformed cellId '${cellId}'; expected scenarioId:rep`)\n }\n return cellId.slice(0, separator)\n}\n\n/** Preserve cell pairing before taking equal-weight independent-unit means. */\nexport function aggregatePairedHoldout(\n paired: PairedHoldout,\n independentUnitByScenarioId?: ReadonlyMap<string, string>,\n): { before: number[]; after: number[]; unitIds: string[] } {\n if (\n paired.before.length !== paired.after.length ||\n paired.before.length !== paired.cellIds.length\n ) {\n throw new Error('aggregatePairedHoldout: scores and cellIds must have the same length')\n }\n if (new Set(paired.cellIds).size !== paired.cellIds.length) {\n throw new Error('aggregatePairedHoldout: duplicate cellIds cannot count as new observations')\n }\n if (\n paired.before.some((value) => !Number.isFinite(value)) ||\n paired.after.some((value) => !Number.isFinite(value))\n ) {\n throw new Error('aggregatePairedHoldout: paired scores must be finite')\n }\n if (independentUnitByScenarioId === undefined) {\n return { before: [...paired.before], after: [...paired.after], unitIds: [...paired.cellIds] }\n }\n const scenarioIds = paired.cellIds.map(scenarioIdFromCellId)\n const groups = new Map<string, { before: number; after: number; n: number }>()\n for (let i = 0; i < paired.cellIds.length; i++) {\n const scenarioId = scenarioIds[i]!\n const unitId = independentUnitByScenarioId.get(scenarioId)\n if (typeof unitId !== 'string' || unitId.length === 0 || unitId.trim() !== unitId) {\n throw new Error(\n `aggregatePairedHoldout: missing independent unit for scenario '${scenarioId}'`,\n )\n }\n const group = groups.get(unitId) ?? { before: 0, after: 0, n: 0 }\n group.before += paired.before[i]!\n group.after += paired.after[i]!\n group.n += 1\n groups.set(unitId, group)\n }\n const unitIds = [...groups.keys()].sort()\n return {\n before: unitIds.map((id) => groups.get(id)!.before / groups.get(id)!.n),\n after: unitIds.map((id) => groups.get(id)!.after / groups.get(id)!.n),\n unitIds,\n }\n}\n\n/**\n * Pair candidate vs baseline holdout observations by FULL cellId. `select`\n * pulls the scalar from a cell's judge reports (composite, or a named\n * dimension); a cell contributes the mean of `select` across its judges. Cells\n * whose scenario is not in `scenarioIds`, or where `select` is undefined for\n * every judge on both sides, are skipped. The selected judge IDs must agree\n * within each pair. Throws when the two maps disagree on holdout cell IDs — a\n * load-bearing invariant: the baseline + winner holdout campaigns run the same\n * scenarios with the same seed base, so their cellIds MUST align; a mismatch\n * means a silent pairing bug, not a soft fallback.\n */\nexport function pairHoldout(\n candidate: Map<string, Record<string, JudgeScore>>,\n baseline: Map<string, Record<string, JudgeScore>>,\n scenarioIds: Set<string>,\n select: (s: JudgeScore) => number | undefined,\n): PairedHoldout {\n const cellValues = (\n byCell: Map<string, Record<string, JudgeScore>>,\n cellId: string,\n ): Map<string, number> => {\n const scores = byCell.get(cellId)\n const values = new Map<string, number>()\n if (!scores) return values\n for (const [judgeId, s] of Object.entries(scores)) {\n if (s.failed === true) {\n throw new Error(`pairHoldout: cell '${cellId}' contains a failed judge score`)\n }\n const v = select(s)\n if (typeof v === 'number' && !Number.isFinite(v)) {\n throw new Error(`pairHoldout: cell '${cellId}' contains a non-finite selected score`)\n }\n if (typeof v === 'number') values.set(judgeId, v)\n }\n return values\n }\n\n const inScope = (cellId: string) => scenarioIds.has(scenarioIdFromCellId(cellId))\n const candCells = [...candidate.keys()].filter(inScope).sort()\n const baseCells = [...baseline.keys()].filter(inScope).sort()\n // Alignment invariant — the holdout campaigns share scenarios + seed, so the\n // cell sets must be identical. Differ ⇒ a real pairing bug; fail loud.\n if (candCells.length !== baseCells.length || candCells.some((c, i) => c !== baseCells[i])) {\n throw new Error(\n `pairHoldout: candidate/baseline holdout cells do not align — ` +\n `candidate=[${candCells.join(',')}] baseline=[${baseCells.join(',')}]. ` +\n `Both holdout campaigns must run the same scenarios with the same seed base.`,\n )\n }\n\n const before: number[] = []\n const after: number[] = []\n const cellIds: string[] = []\n for (const cellId of candCells) {\n const b = cellValues(baseline, cellId)\n const a = cellValues(candidate, cellId)\n // A scalar absent on both sides means that dimension was not scored. A\n // one-sided absence is asymmetric evidence loss, never a row to discard.\n if (b.size === 0 && a.size === 0) continue\n if (b.size === 0 || a.size === 0) {\n throw new Error(`pairHoldout: cell '${cellId}' has a selected score on only one arm`)\n }\n if (b.size !== a.size || [...b.keys()].some((id) => !a.has(id))) {\n throw new Error(`pairHoldout: cell '${cellId}' selected judge IDs do not align`)\n }\n const judgeIds = [...b.keys()].sort()\n before.push(meanSelectedScores(judgeIds.map((id) => b.get(id)!)))\n after.push(meanSelectedScores(judgeIds.map((id) => a.get(id)!)))\n cellIds.push(cellId)\n }\n return { before, after, cellIds }\n}\n\nfunction meanSelectedScores(values: number[]): number {\n const first = values[0]!\n // Summing identical fractional scores can round their mean outside the\n // declared binary support. An agreeing judge set preserves its exact value.\n return values.every((value) => value === first)\n ? first\n : values.reduce((sum, value) => sum + value, 0) / values.length\n}\n\nexport interface HeldoutSignificance {\n paired: PairedHoldout\n /**\n * The paired bootstrap on the requested statistic (MEAN by default — see the\n * tie note on `heldoutSignificance`).\n *\n * DIAGNOSTIC, not necessarily the interval the verdict keyed on. On a\n * two-point (pass/fail) outcome the decision routes to Tango's score interval\n * instead, because a percentile bootstrap of the mean over a three-atom\n * lattice is not a valid interval at a nonzero margin. Read\n * `decision.low`/`decision.high` for the interval that actually decided, and\n * `decisionStatistic` for which one it is.\n */\n bootstrap: PairedBootstrapResult\n /** The MEDIAN paired-delta bootstrap, reported as a diagnostic. When many\n * scenarios are tied (both sides solve them), the median is pinned near 0\n * regardless of the mean lift — comparing the two exposes tie-domination. */\n medianBootstrap: PairedBootstrapResult\n /**\n * The full promotion decision: which estimator the outcome's shape admits,\n * the interval it produced, McNemar's exact veto on the two-point path, and\n * whether the interval was zero-width (no evidence in either direction). The\n * single source of `significant`.\n */\n decision: PairedPromotionDecision\n /** Which paired estimator the verdict was decided on. */\n decisionStatistic: PairedDecisionStatistic\n /** McNemar's exact evidence on the two-point path; null otherwise. */\n mcnemar: PairedMcNemarEvidence | null\n /** Fraction of paired observations that are exact ties (|delta| < 1e-9). A\n * high tie fraction is WHY a median-based gate would have missed a real lift;\n * it is the observability the tie fix adds. */\n tieFraction: number\n /** Number of paired observation units, after configured aggregation. */\n n: number\n /** Original matched execution cells, before aggregation. */\n pairedCellN: number\n observationUnit: 'registered' | 'cell'\n /** Registered unit IDs, or cell IDs on the ungrouped path. */\n unitIds: string[]\n /** Effective minimum for the requested target and chosen estimator. */\n minimumRequired: number\n /** Statistical method that carried the decision. */\n decisionMethod: PairedDecisionMethod\n /** Exact one-sided p-value on the small-sample path; otherwise null. */\n pValue: number | null\n /** True iff n >= minimumRequired, the DECIDING interval has nonzero width,\n * its lower bound clears the threshold, and McNemar's exact test does not\n * veto at a non-negative threshold. */\n significant: boolean\n /** Set when n < minimumRequired — too little evidence to claim significance. */\n fewRuns: boolean\n}\n\nexport interface HeldoutSignificanceOptions {\n deltaThreshold?: number\n minProductiveRuns?: number\n confidence?: number\n resamples?: number\n /** Fixed by default for a deterministic, reproducible gate verdict. */\n seed?: number\n statistic?: 'mean' | 'median'\n /** Group full cell pairs into equal-weight independent units before inference. */\n independentUnitByScenarioId?: ReadonlyMap<string, string>\n}\n\n/**\n * Significance of the held-out composite lift: ship only when the lower bound\n * of the interval the outcome's shape ADMITS exceeds `deltaThreshold` (default\n * 0 ⇒ \"confidently positive\"). Interpret `deltaThreshold` in the judge's native\n * scale.\n *\n * The decision is delegated whole to {@link decidePairedPromotion}, the one\n * copy of the rule (`src/paired-promotion-decision.ts`), which `HeldOutGate`\n * also calls. That module's header carries the measurements; the short version\n * is three guards a bare `bootstrap.low > threshold` does not have:\n *\n * - a two-point (pass/fail) outcome decides on Tango's SCORE interval, the\n * only paired-binary construction that stays valid at a nonzero margin;\n * - McNemar's exact test VETOES at any non-negative threshold;\n * - a ZERO-WIDTH interval is refused rather than promoted, in either\n * direction — [0,0] clears every negative threshold and [g,g] clears every\n * threshold below g, and both are an absence of evidence, not a result.\n *\n * Measured on this function before those guards landed, at a nominal 5 %:\n * 14.60 % false promotion at n = 40 on a paired-binary noninferiority boundary,\n * and 88.50 % at n = 6 under a bounded asymmetric null whose true mean paired\n * delta is exactly 0.\n *\n * Continuous mean targets require bootstrap eligibility. Explicit median\n * targets can use the exact sign test at its confidence-dependent minimum.\n */\nexport function heldoutSignificance(\n paired: PairedHoldout,\n opts: HeldoutSignificanceOptions = {},\n): HeldoutSignificance {\n const deltaThreshold = opts.deltaThreshold ?? 0\n const confidence = opts.confidence ?? 0.95\n const resamples = opts.resamples ?? 2000\n const seed = opts.seed ?? 1337\n // DEFAULT to the MEAN paired delta, not the median. The median is destroyed by\n // TIES: whenever both baseline and candidate solve a holdout scenario (a common\n // case once the agent is decent — and INCREASINGLY common as you add holdout\n // scenarios for statistical power), that scenario contributes delta 0. When\n // >=50% of paired cells are ties the median is pinned at 0 regardless of a large,\n // consistent lift on the rest, and the gate holds a genuinely better candidate.\n // (Measured live, supervisor-lab run 6: 40 cells, 20 ties, MEAN +0.177, MEDIAN 0\n // → false hold. Doubling the holdout for \"power\" made it WORSE by adding ties.)\n // The mean equals the reported aggregate lift, ties correctly contribute 0\n // without dominating, and it is the textbook paired-comparison estimator; the\n // median is kept as a reported diagnostic. Callers wanting outlier-robustness at\n // the cost of tie-blindness can still pass `statistic: 'median'`.\n const statistic = opts.statistic ?? 'mean'\n const observations = aggregatePairedHoldout(paired, opts.independentUnitByScenarioId)\n const decision = decidePairedPromotion(observations.before, observations.after, {\n confidence,\n resamples,\n statistic,\n seed,\n threshold: deltaThreshold,\n minPairs: opts.minProductiveRuns,\n })\n // `decision.bootstrap` is null exactly when the score interval decided, so\n // the requested-statistic bootstrap is computed here for the diagnostic\n // field. Same two bootstraps as before on every path.\n const bootstrap =\n decision.bootstrap ??\n pairedBootstrap(observations.before, observations.after, {\n confidence,\n resamples,\n statistic,\n seed,\n })\n const medianBootstrap =\n statistic === 'median'\n ? bootstrap\n : pairedBootstrap(observations.before, observations.after, {\n confidence,\n resamples,\n statistic: 'median',\n seed,\n })\n const n = observations.before.length\n let ties = 0\n for (let i = 0; i < n; i += 1) {\n const after = observations.after[i]!\n const before = observations.before[i]!\n if (Math.abs(after - before) < 1e-9) ties += 1\n }\n const tieFraction = n === 0 ? 0 : ties / n\n return {\n paired,\n bootstrap,\n medianBootstrap,\n decision,\n decisionStatistic: decision.statistic,\n mcnemar: decision.mcnemar,\n tieFraction,\n n,\n pairedCellN: paired.cellIds.length,\n observationUnit: opts.independentUnitByScenarioId === undefined ? 'cell' : 'registered',\n unitIds: observations.unitIds,\n minimumRequired: decision.minimumPairs,\n decisionMethod: decision.method,\n pValue: decision.pValue,\n significant: decision.promote,\n fewRuns: !decision.sufficient,\n }\n}\n\nexport interface DimensionRegression {\n dimension: string\n /** Paired bootstrap on (candidate − baseline). DIAGNOSTIC on a pass/fail\n * dimension, where `ci` carries the interval that decided instead. */\n bootstrap: PairedBootstrapResult\n /** Which paired statistic `bootstrap.low` is the lower bound of. `'mean'`\n * unless the caller asked for the median. `bootstrap.median` still carries\n * the median point estimate either way. */\n bootstrapStatistic: 'median' | 'mean'\n /** The interval `regressed` was decided on, in the dimension's native units. */\n ci: { low: number; high: number }\n /** Which estimator produced `ci`. */\n decisionStatistic: PairedDecisionStatistic\n /** McNemar's exact evidence on a pass/fail dimension; null otherwise. */\n mcnemar: PairedMcNemarEvidence | null\n /** `ci` has zero width — no evidence in either direction. */\n indeterminate: boolean\n /** The bootstrap lower bound is below negative tolerance, or the shared\n * paired test supports a drop exceeding tolerance. Missing coverage and\n * insufficient observations are reported separately. */\n regressed: boolean\n tolerance: number\n n: number\n pairedCellN: number\n observationUnit: 'registered' | 'cell'\n /** Statistical minimum for the configured independent observation unit. */\n minimumRequired: number\n fewRuns: boolean\n /** Both arms lack this dimension on these otherwise matched execution cells. */\n missingCellIds: string[]\n /** Configured scenarios with no paired dimension measurement at all. */\n missingScenarioIds: string[]\n}\n\n/** Detect the native scale of a set of scores: 0-100 when any magnitude clears\n * 1.5, else [0,1]. Used to auto-scale the regression tolerance so a default\n * expressed for [0,1] is not silently a no-op on a 0-100 dimension. */\nexport function detectScale(values: number[]): 1 | 100 {\n return values.some((v) => Math.abs(v) > 1.5) ? 100 : 1\n}\n\n/**\n * Report required-dimension evidence after full pairing and optional unit means.\n * A bootstrap floor breach or a shared paired test supporting a drop marks\n * regression. These two criteria are distinct; `ci` records the shared\n * estimator and `bootstrap` records the floor interval. Missing observations\n * and insufficient n remain explicit for the caller's evidence policy.\n * The default tolerance is 0.05 on [0,1] and 5 on a detected 0-100 scale.\n */\nexport function dimensionRegressions(\n candidate: Map<string, Record<string, JudgeScore>>,\n baseline: Map<string, Record<string, JudgeScore>>,\n scenarioIds: Set<string>,\n criticalDimensions: string[],\n opts: {\n tolerance?: number\n confidence?: number\n resamples?: number\n seed?: number\n /** Paired statistic the CI is computed on. Default `'mean'` — see\n * {@link DECISION_PAIRED_DELTA_STATISTIC} for why the median is not. */\n statistic?: 'mean' | 'median'\n independentUnitByScenarioId?: ReadonlyMap<string, string>\n minProductiveRuns?: number\n } = {},\n): DimensionRegression[] {\n const out: DimensionRegression[] = []\n const expectedCellIds = [...baseline.keys()]\n .filter((cellId) => scenarioIds.has(scenarioIdFromCellId(cellId)))\n .sort()\n for (const dim of criticalDimensions) {\n const paired = pairHoldout(candidate, baseline, scenarioIds, (s) => s.dimensions[dim])\n if (paired.before.length === 0) continue // dimension not scored on this judge\n const observations = aggregatePairedHoldout(paired, opts.independentUnitByScenarioId)\n const measuredCells = new Set(paired.cellIds)\n const measuredScenarios = new Set(paired.cellIds.map(scenarioIdFromCellId))\n const tolerance = opts.tolerance ?? 0.05 * detectScale([...paired.before, ...paired.after])\n const bootstrapStatistic = opts.statistic ?? DECISION_PAIRED_DELTA_STATISTIC\n const shared = {\n confidence: opts.confidence ?? 0.95,\n resamples: opts.resamples ?? 2000,\n statistic: bootstrapStatistic,\n seed: opts.seed ?? 1337,\n minPairs: opts.minProductiveRuns,\n }\n const guard = decidePairedPromotion(observations.before, observations.after, shared)\n const regression = decidePairedPromotion(observations.after, observations.before, {\n ...shared,\n threshold: tolerance,\n })\n const bootstrap =\n guard.bootstrap ?? pairedBootstrap(observations.before, observations.after, shared)\n out.push({\n dimension: dim,\n bootstrap,\n bootstrapStatistic,\n ci: { low: guard.low, high: guard.high },\n decisionStatistic: guard.statistic,\n mcnemar: guard.mcnemar,\n indeterminate: guard.indeterminate,\n // Fires on EITHER burden of proof — see `floorBreached` in\n // `promotion-policy.ts` for the same rule and the reasoning. The CI arm\n // is the contract this interface and `default-production-gate`'s reason\n // string both state (\"CI.low < -tolerance\"), read off the DECIDING\n // interval; the exact-test arm adds the small-sample path where the\n // bootstrap interval is descriptive only.\n // The credible-worst-case arm stays on the BOOTSTRAP — see the same\n // decision in `floorBreached` (`promotion-policy.ts`). On a pass/fail\n // dimension the score interval is ±z²/(n+z²) even when every pair is\n // concordant, so reading the floor off it would flag an unchanged safety\n // dimension as regressed at any realistic n. The PROVEN-drop arm does use\n // the shared rule, which is what closes the fail-open hole that mattered:\n // a genuine pass/fail regression is now judged on an interval valid at\n // the nonzero `tolerance`, instead of a bootstrap that is pinned wherever\n // ties dominate.\n regressed: bootstrap.low < -tolerance || regression.promote,\n tolerance,\n n: observations.before.length,\n pairedCellN: paired.cellIds.length,\n observationUnit: opts.independentUnitByScenarioId === undefined ? 'cell' : 'registered',\n minimumRequired: guard.minimumPairs,\n fewRuns: !guard.sufficient,\n missingCellIds: expectedCellIds.filter((cellId) => !measuredCells.has(cellId)),\n missingScenarioIds: [...scenarioIds].filter((id) => !measuredScenarios.has(id)).sort(),\n })\n }\n return out\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAa,oBAAoB;;AAYjC,SAAgB,qBAAqB,QAAwB;CAC3D,MAAM,YAAY,OAAO,YAAY,GAAG;CACxC,MAAM,aAAa,OAAO,MAAM,YAAY,CAAC;CAC7C,IACE,YAAY,KACZ,OAAO,KAAK,MAAM,UAClB,CAAC,iBAAiB,KAAK,UAAU,KACjC,CAAC,OAAO,cAAc,OAAO,UAAU,CAAC,GAExC,MAAM,IAAI,M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3,"file":"statistical-heldout-1Gbmex7v.js","names":[],"sources":["../src/campaign/gates/statistical-heldout.ts"],"sourcesContent":["/**\n * Held-out inference pairs execution cells and judge identities before taking\n * means within registered independent units. Repetitions can improve a unit's\n * precision without increasing n. Ungrouped inference concerns independently\n * sampled execution cells conditional on a fixed scenario roster.\n *\n * The shared paired decision rule selects the estimator and statistical test.\n * Dimension reports retain missing coverage so required safety checks cannot\n * pass through absent evidence. Thresholds use the judge's native score scale.\n */\n\nimport {\n decidePairedPromotion,\n type PairedDecisionMethod,\n type PairedDecisionStatistic,\n type PairedMcNemarEvidence,\n type PairedPromotionDecision,\n} from '../../paired-promotion-decision'\nimport {\n DECISION_PAIRED_DELTA_STATISTIC,\n type PairedBootstrapResult,\n pairedBootstrap,\n} from '../../statistics'\nimport type { JudgeScore } from '../types'\n\n/** Tie fraction at/above which a gate annotates its verdict with the tie share.\n * Tie-domination of the median bites structurally at >= 0.5 (the median is then\n * 0 by construction); 0.4 is a softer warn threshold that flags a run APPROACHING\n * that regime, so an operator sees it before the median goes fully blind. */\nexport const TIE_WARN_FRACTION = 0.4\n\nexport interface PairedHoldout {\n /** Baseline scalar per paired cell (same order as `after`/`cellIds`). */\n before: number[]\n /** Candidate scalar per paired cell. */\n after: number[]\n /** The full cellIds (`scenario:rep`) that paired, in order. */\n cellIds: string[]\n}\n\n/** Campaign cell IDs append a numeric repetition after the scenario's full ID. */\nexport function scenarioIdFromCellId(cellId: string): string {\n const separator = cellId.lastIndexOf(':')\n const repetition = cellId.slice(separator + 1)\n if (\n separator < 1 ||\n cellId.trim() !== cellId ||\n !/^(0|[1-9]\\d*)$/.test(repetition) ||\n !Number.isSafeInteger(Number(repetition))\n ) {\n throw new Error(`pairHoldout: malformed cellId '${cellId}'; expected scenarioId:rep`)\n }\n return cellId.slice(0, separator)\n}\n\n/** Preserve cell pairing before taking equal-weight independent-unit means. */\nexport function aggregatePairedHoldout(\n paired: PairedHoldout,\n independentUnitByScenarioId?: ReadonlyMap<string, string>,\n): { before: number[]; after: number[]; unitIds: string[] } {\n if (\n paired.before.length !== paired.after.length ||\n paired.before.length !== paired.cellIds.length\n ) {\n throw new Error('aggregatePairedHoldout: scores and cellIds must have the same length')\n }\n if (new Set(paired.cellIds).size !== paired.cellIds.length) {\n throw new Error('aggregatePairedHoldout: duplicate cellIds cannot count as new observations')\n }\n if (\n paired.before.some((value) => !Number.isFinite(value)) ||\n paired.after.some((value) => !Number.isFinite(value))\n ) {\n throw new Error('aggregatePairedHoldout: paired scores must be finite')\n }\n if (independentUnitByScenarioId === undefined) {\n return { before: [...paired.before], after: [...paired.after], unitIds: [...paired.cellIds] }\n }\n const scenarioIds = paired.cellIds.map(scenarioIdFromCellId)\n const groups = new Map<string, { before: number; after: number; n: number }>()\n for (let i = 0; i < paired.cellIds.length; i++) {\n const scenarioId = scenarioIds[i]!\n const unitId = independentUnitByScenarioId.get(scenarioId)\n if (typeof unitId !== 'string' || unitId.length === 0 || unitId.trim() !== unitId) {\n throw new Error(\n `aggregatePairedHoldout: missing independent unit for scenario '${scenarioId}'`,\n )\n }\n const group = groups.get(unitId) ?? { before: 0, after: 0, n: 0 }\n group.before += paired.before[i]!\n group.after += paired.after[i]!\n group.n += 1\n groups.set(unitId, group)\n }\n const unitIds = [...groups.keys()].sort()\n return {\n before: unitIds.map((id) => groups.get(id)!.before / groups.get(id)!.n),\n after: unitIds.map((id) => groups.get(id)!.after / groups.get(id)!.n),\n unitIds,\n }\n}\n\n/**\n * Pair candidate vs baseline holdout observations by FULL cellId. `select`\n * pulls the scalar from a cell's judge reports (composite, or a named\n * dimension); a cell contributes the mean of `select` across its judges. Cells\n * whose scenario is not in `scenarioIds`, or where `select` is undefined for\n * every judge on both sides, are skipped. The selected judge IDs must agree\n * within each pair. Throws when the two maps disagree on holdout cell IDs — a\n * load-bearing invariant: the baseline + winner holdout campaigns run the same\n * scenarios with the same seed base, so their cellIds MUST align; a mismatch\n * means a silent pairing bug, not a soft fallback.\n */\nexport function pairHoldout(\n candidate: Map<string, Record<string, JudgeScore>>,\n baseline: Map<string, Record<string, JudgeScore>>,\n scenarioIds: Set<string>,\n select: (s: JudgeScore) => number | undefined,\n): PairedHoldout {\n const cellValues = (\n byCell: Map<string, Record<string, JudgeScore>>,\n cellId: string,\n ): Map<string, number> => {\n const scores = byCell.get(cellId)\n const values = new Map<string, number>()\n if (!scores) return values\n for (const [judgeId, s] of Object.entries(scores)) {\n if (s.failed === true) {\n throw new Error(`pairHoldout: cell '${cellId}' contains a failed judge score`)\n }\n const v = select(s)\n if (typeof v === 'number' && !Number.isFinite(v)) {\n throw new Error(`pairHoldout: cell '${cellId}' contains a non-finite selected score`)\n }\n if (typeof v === 'number') values.set(judgeId, v)\n }\n return values\n }\n\n const inScope = (cellId: string) => scenarioIds.has(scenarioIdFromCellId(cellId))\n const candCells = [...candidate.keys()].filter(inScope).sort()\n const baseCells = [...baseline.keys()].filter(inScope).sort()\n // Alignment invariant — the holdout campaigns share scenarios + seed, so the\n // cell sets must be identical. Differ ⇒ a real pairing bug; fail loud.\n if (candCells.length !== baseCells.length || candCells.some((c, i) => c !== baseCells[i])) {\n throw new Error(\n `pairHoldout: candidate/baseline holdout cells do not align — ` +\n `candidate=[${candCells.join(',')}] baseline=[${baseCells.join(',')}]. ` +\n `Both holdout campaigns must run the same scenarios with the same seed base.`,\n )\n }\n\n const before: number[] = []\n const after: number[] = []\n const cellIds: string[] = []\n for (const cellId of candCells) {\n const b = cellValues(baseline, cellId)\n const a = cellValues(candidate, cellId)\n // A scalar absent on both sides means that dimension was not scored. A\n // one-sided absence is asymmetric evidence loss, never a row to discard.\n if (b.size === 0 && a.size === 0) continue\n if (b.size === 0 || a.size === 0) {\n throw new Error(`pairHoldout: cell '${cellId}' has a selected score on only one arm`)\n }\n if (b.size !== a.size || [...b.keys()].some((id) => !a.has(id))) {\n throw new Error(`pairHoldout: cell '${cellId}' selected judge IDs do not align`)\n }\n const judgeIds = [...b.keys()].sort()\n before.push(meanSelectedScores(judgeIds.map((id) => b.get(id)!)))\n after.push(meanSelectedScores(judgeIds.map((id) => a.get(id)!)))\n cellIds.push(cellId)\n }\n return { before, after, cellIds }\n}\n\nfunction meanSelectedScores(values: number[]): number {\n const first = values[0]!\n // Summing identical fractional scores can round their mean outside the\n // declared binary support. An agreeing judge set preserves its exact value.\n return values.every((value) => value === first)\n ? first\n : values.reduce((sum, value) => sum + value, 0) / values.length\n}\n\nexport interface HeldoutSignificance {\n paired: PairedHoldout\n /**\n * The paired bootstrap on the requested statistic (MEAN by default — see the\n * tie note on `heldoutSignificance`).\n *\n * DIAGNOSTIC, not necessarily the interval the verdict keyed on. On a\n * two-point (pass/fail) outcome the decision routes to Tango's score interval\n * instead, because a percentile bootstrap of the mean over a three-atom\n * lattice is not a valid interval at a nonzero margin. Read\n * `decision.low`/`decision.high` for the interval that actually decided, and\n * `decisionStatistic` for which one it is.\n */\n bootstrap: PairedBootstrapResult\n /** The MEDIAN paired-delta bootstrap, reported as a diagnostic. When many\n * scenarios are tied (both sides solve them), the median is pinned near 0\n * regardless of the mean lift — comparing the two exposes tie-domination. */\n medianBootstrap: PairedBootstrapResult\n /**\n * The full promotion decision: which estimator the outcome's shape admits,\n * the interval it produced, McNemar's exact veto on the two-point path, and\n * whether the interval was zero-width (no evidence in either direction). The\n * single source of `significant`.\n */\n decision: PairedPromotionDecision\n /** Which paired estimator the verdict was decided on. */\n decisionStatistic: PairedDecisionStatistic\n /** McNemar's exact evidence on the two-point path; null otherwise. */\n mcnemar: PairedMcNemarEvidence | null\n /** Fraction of paired observations that are exact ties (|delta| < 1e-9). A\n * high tie fraction is WHY a median-based gate would have missed a real lift;\n * it is the observability the tie fix adds. */\n tieFraction: number\n /** Number of paired observation units, after configured aggregation. */\n n: number\n /** Original matched execution cells, before aggregation. */\n pairedCellN: number\n observationUnit: 'registered' | 'cell'\n /** Registered unit IDs, or cell IDs on the ungrouped path. */\n unitIds: string[]\n /** Effective minimum for the requested target and chosen estimator. */\n minimumRequired: number\n /** Statistical method that carried the decision. */\n decisionMethod: PairedDecisionMethod\n /** Exact one-sided p-value on the small-sample path; otherwise null. */\n pValue: number | null\n /** True iff n >= minimumRequired, the DECIDING interval has nonzero width,\n * its lower bound clears the threshold, and McNemar's exact test does not\n * veto at a non-negative threshold. */\n significant: boolean\n /** Set when n < minimumRequired — too little evidence to claim significance. */\n fewRuns: boolean\n}\n\nexport interface HeldoutSignificanceOptions {\n deltaThreshold?: number\n minProductiveRuns?: number\n confidence?: number\n resamples?: number\n /** Fixed by default for a deterministic, reproducible gate verdict. */\n seed?: number\n statistic?: 'mean' | 'median'\n /** Group full cell pairs into equal-weight independent units before inference. */\n independentUnitByScenarioId?: ReadonlyMap<string, string>\n}\n\n/**\n * Significance of the held-out composite lift: ship only when the lower bound\n * of the interval the outcome's shape ADMITS exceeds `deltaThreshold` (default\n * 0 ⇒ \"confidently positive\"). Interpret `deltaThreshold` in the judge's native\n * scale.\n *\n * The decision is delegated whole to {@link decidePairedPromotion}, the one\n * copy of the rule (`src/paired-promotion-decision.ts`), which `HeldOutGate`\n * also calls. That module's header carries the measurements; the short version\n * is three guards a bare `bootstrap.low > threshold` does not have:\n *\n * - a two-point (pass/fail) outcome decides on Tango's SCORE interval, the\n * only paired-binary construction that stays valid at a nonzero margin;\n * - McNemar's exact test VETOES at any non-negative threshold;\n * - a ZERO-WIDTH interval is refused rather than promoted, in either\n * direction — [0,0] clears every negative threshold and [g,g] clears every\n * threshold below g, and both are an absence of evidence, not a result.\n *\n * Measured on this function before those guards landed, at a nominal 5 %:\n * 14.60 % false promotion at n = 40 on a paired-binary noninferiority boundary,\n * and 88.50 % at n = 6 under a bounded asymmetric null whose true mean paired\n * delta is exactly 0.\n *\n * Continuous mean targets require bootstrap eligibility. Explicit median\n * targets can use the exact sign test at its confidence-dependent minimum.\n */\nexport function heldoutSignificance(\n paired: PairedHoldout,\n opts: HeldoutSignificanceOptions = {},\n): HeldoutSignificance {\n const deltaThreshold = opts.deltaThreshold ?? 0\n const confidence = opts.confidence ?? 0.95\n const resamples = opts.resamples ?? 2000\n const seed = opts.seed ?? 1337\n // DEFAULT to the MEAN paired delta, not the median. The median is destroyed by\n // TIES: whenever both baseline and candidate solve a holdout scenario (a common\n // case once the agent is decent — and INCREASINGLY common as you add holdout\n // scenarios for statistical power), that scenario contributes delta 0. When\n // >=50% of paired cells are ties the median is pinned at 0 regardless of a large,\n // consistent lift on the rest, and the gate holds a genuinely better candidate.\n // (Measured live, supervisor-lab run 6: 40 cells, 20 ties, MEAN +0.177, MEDIAN 0\n // → false hold. Doubling the holdout for \"power\" made it WORSE by adding ties.)\n // The mean equals the reported aggregate lift, ties correctly contribute 0\n // without dominating, and it is the textbook paired-comparison estimator; the\n // median is kept as a reported diagnostic. Callers wanting outlier-robustness at\n // the cost of tie-blindness can still pass `statistic: 'median'`.\n const statistic = opts.statistic ?? 'mean'\n const observations = aggregatePairedHoldout(paired, opts.independentUnitByScenarioId)\n const decision = decidePairedPromotion(observations.before, observations.after, {\n confidence,\n resamples,\n statistic,\n seed,\n threshold: deltaThreshold,\n minPairs: opts.minProductiveRuns,\n })\n // `decision.bootstrap` is null exactly when the score interval decided, so\n // the requested-statistic bootstrap is computed here for the diagnostic\n // field. Same two bootstraps as before on every path.\n const bootstrap =\n decision.bootstrap ??\n pairedBootstrap(observations.before, observations.after, {\n confidence,\n resamples,\n statistic,\n seed,\n })\n const medianBootstrap =\n statistic === 'median'\n ? bootstrap\n : pairedBootstrap(observations.before, observations.after, {\n confidence,\n resamples,\n statistic: 'median',\n seed,\n })\n const n = observations.before.length\n let ties = 0\n for (let i = 0; i < n; i += 1) {\n const after = observations.after[i]!\n const before = observations.before[i]!\n if (Math.abs(after - before) < 1e-9) ties += 1\n }\n const tieFraction = n === 0 ? 0 : ties / n\n return {\n paired,\n bootstrap,\n medianBootstrap,\n decision,\n decisionStatistic: decision.statistic,\n mcnemar: decision.mcnemar,\n tieFraction,\n n,\n pairedCellN: paired.cellIds.length,\n observationUnit: opts.independentUnitByScenarioId === undefined ? 'cell' : 'registered',\n unitIds: observations.unitIds,\n minimumRequired: decision.minimumPairs,\n decisionMethod: decision.method,\n pValue: decision.pValue,\n significant: decision.promote,\n fewRuns: !decision.sufficient,\n }\n}\n\nexport interface DimensionRegression {\n dimension: string\n /** Paired bootstrap on (candidate − baseline). DIAGNOSTIC on a pass/fail\n * dimension, where `ci` carries the interval that decided instead. */\n bootstrap: PairedBootstrapResult\n /** Which paired statistic `bootstrap.low` is the lower bound of. `'mean'`\n * unless the caller asked for the median. `bootstrap.median` still carries\n * the median point estimate either way. */\n bootstrapStatistic: 'median' | 'mean'\n /** The interval `regressed` was decided on, in the dimension's native units. */\n ci: { low: number; high: number }\n /** Which estimator produced `ci`. */\n decisionStatistic: PairedDecisionStatistic\n /** McNemar's exact evidence on a pass/fail dimension; null otherwise. */\n mcnemar: PairedMcNemarEvidence | null\n /** `ci` has zero width — no evidence in either direction. */\n indeterminate: boolean\n /** The bootstrap lower bound is below negative tolerance, or the shared\n * paired test supports a drop exceeding tolerance. Missing coverage and\n * insufficient observations are reported separately. */\n regressed: boolean\n tolerance: number\n n: number\n pairedCellN: number\n observationUnit: 'registered' | 'cell'\n /** Statistical minimum for the configured independent observation unit. */\n minimumRequired: number\n fewRuns: boolean\n /** Both arms lack this dimension on these otherwise matched execution cells. */\n missingCellIds: string[]\n /** Configured scenarios with no paired dimension measurement at all. */\n missingScenarioIds: string[]\n}\n\n/** Detect the native scale of a set of scores: 0-100 when any magnitude clears\n * 1.5, else [0,1]. Used to auto-scale the regression tolerance so a default\n * expressed for [0,1] is not silently a no-op on a 0-100 dimension. */\nexport function detectScale(values: number[]): 1 | 100 {\n return values.some((v) => Math.abs(v) > 1.5) ? 100 : 1\n}\n\n/**\n * Report required-dimension evidence after full pairing and optional unit means.\n * A bootstrap floor breach or a shared paired test supporting a drop marks\n * regression. These two criteria are distinct; `ci` records the shared\n * estimator and `bootstrap` records the floor interval. Missing observations\n * and insufficient n remain explicit for the caller's evidence policy.\n * The default tolerance is 0.05 on [0,1] and 5 on a detected 0-100 scale.\n */\nexport function dimensionRegressions(\n candidate: Map<string, Record<string, JudgeScore>>,\n baseline: Map<string, Record<string, JudgeScore>>,\n scenarioIds: Set<string>,\n criticalDimensions: string[],\n opts: {\n tolerance?: number\n confidence?: number\n resamples?: number\n seed?: number\n /** Paired statistic the CI is computed on. Default `'mean'` — see\n * {@link DECISION_PAIRED_DELTA_STATISTIC} for why the median is not. */\n statistic?: 'mean' | 'median'\n independentUnitByScenarioId?: ReadonlyMap<string, string>\n minProductiveRuns?: number\n } = {},\n): DimensionRegression[] {\n const out: DimensionRegression[] = []\n const expectedCellIds = [...baseline.keys()]\n .filter((cellId) => scenarioIds.has(scenarioIdFromCellId(cellId)))\n .sort()\n for (const dim of criticalDimensions) {\n const paired = pairHoldout(candidate, baseline, scenarioIds, (s) => s.dimensions[dim])\n if (paired.before.length === 0) continue // dimension not scored on this judge\n const observations = aggregatePairedHoldout(paired, opts.independentUnitByScenarioId)\n const measuredCells = new Set(paired.cellIds)\n const measuredScenarios = new Set(paired.cellIds.map(scenarioIdFromCellId))\n const tolerance = opts.tolerance ?? 0.05 * detectScale([...paired.before, ...paired.after])\n const bootstrapStatistic = opts.statistic ?? DECISION_PAIRED_DELTA_STATISTIC\n const shared = {\n confidence: opts.confidence ?? 0.95,\n resamples: opts.resamples ?? 2000,\n statistic: bootstrapStatistic,\n seed: opts.seed ?? 1337,\n minPairs: opts.minProductiveRuns,\n }\n const guard = decidePairedPromotion(observations.before, observations.after, shared)\n const regression = decidePairedPromotion(observations.after, observations.before, {\n ...shared,\n threshold: tolerance,\n })\n const bootstrap =\n guard.bootstrap ?? pairedBootstrap(observations.before, observations.after, shared)\n out.push({\n dimension: dim,\n bootstrap,\n bootstrapStatistic,\n ci: { low: guard.low, high: guard.high },\n decisionStatistic: guard.statistic,\n mcnemar: guard.mcnemar,\n indeterminate: guard.indeterminate,\n // Fires on EITHER burden of proof — see `floorBreached` in\n // `promotion-policy.ts` for the same rule and the reasoning. The CI arm\n // is the contract this interface and `default-production-gate`'s reason\n // string both state (\"CI.low < -tolerance\"), read off the DECIDING\n // interval; the exact-test arm adds the small-sample path where the\n // bootstrap interval is descriptive only.\n // The credible-worst-case arm stays on the BOOTSTRAP — see the same\n // decision in `floorBreached` (`promotion-policy.ts`). On a pass/fail\n // dimension the score interval is ±z²/(n+z²) even when every pair is\n // concordant, so reading the floor off it would flag an unchanged safety\n // dimension as regressed at any realistic n. The PROVEN-drop arm does use\n // the shared rule, which is what closes the fail-open hole that mattered:\n // a genuine pass/fail regression is now judged on an interval valid at\n // the nonzero `tolerance`, instead of a bootstrap that is pinned wherever\n // ties dominate.\n regressed: bootstrap.low < -tolerance || regression.promote,\n tolerance,\n n: observations.before.length,\n pairedCellN: paired.cellIds.length,\n observationUnit: opts.independentUnitByScenarioId === undefined ? 'cell' : 'registered',\n minimumRequired: guard.minimumPairs,\n fewRuns: !guard.sufficient,\n missingCellIds: expectedCellIds.filter((cellId) => !measuredCells.has(cellId)),\n missingScenarioIds: [...scenarioIds].filter((id) => !measuredScenarios.has(id)).sort(),\n })\n }\n return out\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAa,oBAAoB;;AAYjC,SAAgB,qBAAqB,QAAwB;CAC3D,MAAM,YAAY,OAAO,YAAY,GAAG;CACxC,MAAM,aAAa,OAAO,MAAM,YAAY,CAAC;CAC7C,IACE,YAAY,KACZ,OAAO,KAAK,MAAM,UAClB,CAAC,iBAAiB,KAAK,UAAU,KACjC,CAAC,OAAO,cAAc,OAAO,UAAU,CAAC,GAExC,MAAM,IAAI,MAAM,kCAAkC,OAAO,2BAA2B;CAEtF,OAAO,OAAO,MAAM,GAAG,SAAS;AAClC;;AAGA,SAAgB,uBACd,QACA,6BAC0D;CAC1D,IACE,OAAO,OAAO,WAAW,OAAO,MAAM,UACtC,OAAO,OAAO,WAAW,OAAO,QAAQ,QAExC,MAAM,IAAI,MAAM,sEAAsE;CAExF,IAAI,IAAI,IAAI,OA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CAAC,GAAG,OAAO,QAAQ,GAAG,OAAO,KAAK,CAAC;EAC1F,MAAM,qBAAqB,KAAK,aAAA;EAChC,MAAM,SAAS;GACb,YAAY,KAAK,cAAc;GAC/B,WAAW,KAAK,aAAa;GAC7B,WAAW;GACX,MAAM,KAAK,QAAQ;GACnB,UAAU,KAAK;EACjB;EACA,MAAM,QAAQ,sBAAsB,aAAa,QAAQ,aAAa,OAAO,MAAM;EACnF,MAAM,aAAa,sBAAsB,aAAa,OAAO,aAAa,QAAQ;GAChF,GAAG;GACH,WAAW;EACb,CAAC;EACD,MAAM,YACJ,MAAM,aAAa,gBAAgB,aAAa,QAAQ,aAAa,OAAO,MAAM;EACpF,IAAI,KAAK;GACP,WAAW;GACX;GACA;GACA,IAAI;IAAE,KAAK,MAAM;IAAK,MAAM,MAAM;GAAK;GACvC,mBAAmB,MAAM;GACzB,SAAS,MAAM;GACf,eAAe,MAAM;GAgBrB,WAAW,UAAU,MAAM,CAAC,aAAa,WAAW;GACpD;GACA,GAAG,aAAa,OAAO;GACvB,aAAa,OAAO,QAAQ;GAC5B,iBAAiB,KAAK,gCAAgC,KAAA,IAAY,SAAS;GAC3E,iBAAiB,MAAM;GACvB,SAAS,CAAC,MAAM;GAChB,gBAAgB,gBAAgB,QAAQ,WAAW,CAAC,cAAc,IAAI,MAAM,CAAC;GAC7E,oBAAoB,CAAC,GAAG,WAAW,CAAC,CAAC,QAAQ,OAAO,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK;EACvF,CAAC;CACH;CACA,OAAO;AACT"}
|
|
@@ -6,7 +6,7 @@ import { z } from "zod";
|
|
|
6
6
|
//#region src/statistics/paired-binary.d.ts
|
|
7
7
|
/** A binomial proportion estimate with a confidence interval. */
|
|
8
8
|
interface ProportionInterval {
|
|
9
|
-
/** Point estimate successes / n
|
|
9
|
+
/** Point estimate successes / n; 0 is a compatibility placeholder when n = 0. */
|
|
10
10
|
estimate: number;
|
|
11
11
|
/** Lower bound, clamped to [0, 1]. */
|
|
12
12
|
lower: number;
|
|
@@ -19,7 +19,9 @@ interface ProportionInterval {
|
|
|
19
19
|
* understates coverage. Use this for any pass-rate / hit-rate / realness-rate
|
|
20
20
|
* CI — the continuous `confidenceInterval` assumes the wrong distribution for a
|
|
21
21
|
* proportion. Counts must be finite nonnegative integers, successes cannot exceed
|
|
22
|
-
* n, and confidence must lie strictly between zero and one.
|
|
22
|
+
* n, and confidence must lie strictly between zero and one. With n = 0 the
|
|
23
|
+
* interval is the full [0, 1] support: no rate is ruled out. The estimate stays
|
|
24
|
+
* 0 for compatibility, not as a measured failure rate; retain n alongside it.
|
|
23
25
|
*/
|
|
24
26
|
declare function wilson(successes: number, n: number, confidence?: number): ProportionInterval;
|
|
25
27
|
/**
|
|
@@ -84,7 +86,7 @@ interface RiskDifferenceResult {
|
|
|
84
86
|
b: number;
|
|
85
87
|
/** Discordant pairs: control-win count. */
|
|
86
88
|
c: number;
|
|
87
|
-
/** Paired risk difference
|
|
89
|
+
/** Paired risk difference (b − c) / n; 0 is a placeholder when n = 0. */
|
|
88
90
|
riskDifference: number;
|
|
89
91
|
/** Lower bound of the CI, clamped to [-1, 1]. */
|
|
90
92
|
lower: number;
|
|
@@ -99,7 +101,8 @@ interface RiskDifferenceResult {
|
|
|
99
101
|
* paired binary data equals (b − c) / n. The CI uses the paired variance from
|
|
100
102
|
* the discordant counts, not the independent-samples formula (which overstates
|
|
101
103
|
* the interval by ignoring the pairing). Inputs are paired 0/1 (or boolean)
|
|
102
|
-
* arrays, control first. Throws on unequal lengths.
|
|
104
|
+
* arrays, control first. Throws on unequal lengths. With no pairs, returns the
|
|
105
|
+
* full [-1, 1] support and a compatibility point estimate of 0, not equivalence.
|
|
103
106
|
*
|
|
104
107
|
* REPORTING ONLY — do NOT decide a promotion on this interval. The CI is a Wald
|
|
105
108
|
* normal approximation, which badly UNDERCOVERS when only a handful of pairs are
|
|
@@ -121,11 +124,11 @@ interface ExactRiskDifferenceResult {
|
|
|
121
124
|
c: number;
|
|
122
125
|
/** Discordant pairs (b + c) — the only ones carrying information. */
|
|
123
126
|
nDiscordant: number;
|
|
124
|
-
/** Paired risk difference
|
|
127
|
+
/** Paired risk difference (b − c) / n; 0 is a placeholder when n = 0. */
|
|
125
128
|
riskDifference: number;
|
|
126
|
-
/** Exact conditional CI lower bound
|
|
129
|
+
/** Exact conditional CI lower bound: -1 with no pairs; 0 with only concordant pairs. */
|
|
127
130
|
lower: number;
|
|
128
|
-
/** Exact conditional CI upper bound
|
|
131
|
+
/** Exact conditional CI upper bound: 1 with no pairs; 0 with only concordant pairs. */
|
|
129
132
|
upper: number;
|
|
130
133
|
/** Confidence level used. */
|
|
131
134
|
confidence: number;
|
|
@@ -154,7 +157,8 @@ interface ExactRiskDifferenceResult {
|
|
|
154
157
|
* discards the concordant pairs' information about m itself). That is the
|
|
155
158
|
* correct direction for a promotion gate: it refuses more often, never less.
|
|
156
159
|
*
|
|
157
|
-
* With
|
|
160
|
+
* With n = 0, returns the full [-1, 1] support, p = 1, and a compatibility
|
|
161
|
+
* point estimate of 0. With n > 0 and m = 0, π is not identified: the result
|
|
158
162
|
* is the degenerate [0, 0] with p = 1. That is NOT evidence of equivalence —
|
|
159
163
|
* callers must treat a zero-width interval as "cannot decide", not as "no
|
|
160
164
|
* difference". Inputs are paired 0/1 (or boolean) arrays, control first.
|
|
@@ -172,7 +176,7 @@ interface ScoreRiskDifferenceResult {
|
|
|
172
176
|
c: number;
|
|
173
177
|
/** Discordant pairs (b + c). */
|
|
174
178
|
nDiscordant: number;
|
|
175
|
-
/** Paired risk difference
|
|
179
|
+
/** Paired risk difference (b − c) / n; 0 is a placeholder when n = 0. */
|
|
176
180
|
riskDifference: number;
|
|
177
181
|
/** Score-interval lower bound on the population risk difference. */
|
|
178
182
|
lower: number;
|
|
@@ -1306,4 +1310,4 @@ declare function dimensionRegressions(candidate: Map<string, Record<string, Judg
|
|
|
1306
1310
|
}): DimensionRegression[];
|
|
1307
1311
|
//#endregion
|
|
1308
1312
|
export { paretoSignificanceGate as $, PairArmsOptions as A, EProcess as At, PowerPreflight as B, isBinaryOutcomeVector as Bt, hashJson as C, FinalEvidenceError as Ct, ComparePairedArmsOptions as D, FinalEvidenceRecord as Dt, verifyManifest as E, FinalEvidenceOutcome as Et, PairedCorrectness as F, ExactRiskDifferenceResult as Ft, BuildEvidenceVectorOptions as G, pairedRiskDifferenceScore as Gt, powerPreflight as H, pairedBinaryScale as Ht, PairedMetricDelta as I, McNemarResult as It, ParetoSignificanceGateOptions as J, EvidenceVector as K, passAtK as Kt, comparePairedArms as L, ProportionInterval as Lt, PairRunRecordsResult as M, EProcessState as Mt, PairedArmRow as N, EProcessStep as Nt, MatchedPair as O, FinalEvidenceReservation as Ot, PairedArmsComparison as P, eProcess as Pt, paretoPolicy as Q, pairArms as R, RiskDifferenceResult as Rt, evaluateHypothesis as S, FinalEvidenceConflictError as St, signManifest as T, FinalEvidenceMeasurement as Tt, AxisEvidence as U, pairedRiskDifference as Ut, PowerPreflightOptions as V, mcnemar as Vt, AxisVerdict as W, pairedRiskDifferenceExact as Wt, PromotionPolicy as X, PromotionObjective as Y, buildEvidenceVector as Z, sequentialPairedGate as _, AttestationProvenance as _t, detectScale as a, createCampaignEvidenceReceipt as at, SignedManifest as b, attest as bt, pairHoldout as c, EvidenceAuthority as ct, SequentialDecision as d, EvidenceReceipt as dt, Objective as et, SequentialObservation as f, EvidenceReceiptVerification as ft, sequentialDecide as g, ATTESTATION_ALGORITHM as gt, SequentialStreamState as h, verifyEvidenceReceipt as ht, PairedHoldout as i, CampaignEvidenceContext as it, PairArmsResult as j, EProcessOptions as jt, MatchedRunRecordPair as k, openFinalEvidenceLedger as kt, SequentialDecideFn as l, EvidenceAuthorityKind as lt, SequentialPairedGateOptions as m, isIndependentEvidence as mt, HeldoutSignificance as n, dominates as nt, dimensionRegressions as o, CreateEvidenceReceiptInput as ot, SequentialPairedGate as p, createEvidenceReceipt as pt, ObjectiveSource as q, wilson as qt, HeldoutSignificanceOptions as r, paretoFrontier as rt, heldoutSignificance as s, EVIDENCE_RECEIPT_VERSION as st, DimensionRegression as t, ParetoResult as tt, SequentialDecideOptions as u, EvidenceBinding as ut, HypothesisManifest as v, AttestationVerification as vt, manifestContentDigest as w, FinalEvidenceLedger as wt, SignedManifestAlgo as x, verifyAttestation as xt, HypothesisResult as y, AttestedReport as yt, pairRunRecords as z, ScoreRiskDifferenceResult as zt };
|
|
1309
|
-
//# sourceMappingURL=statistical-heldout-
|
|
1313
|
+
//# sourceMappingURL=statistical-heldout-8RGPIeyo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statistical-heldout-8RGPIeyo.d.ts","names":["_$__evidence_receipt0.EvidenceReceipt"],"sources":["../src/statistics/paired-binary.ts","../src/statistics/sequential-eprocess.ts","../src/experiment/final-evidence.ts","../src/attestation.ts","../src/experiment/evidence-receipt.ts","../src/experiment/campaign-evidence.ts","../src/pareto.ts","../src/campaign/gates/promotion-policy.ts","../src/campaign/gates/power-preflight.ts","../src/paired-arms.ts","../src/pre-registration.ts","../src/campaign/gates/sequential.ts","../src/campaign/gates/statistical-heldout.ts"],"mappings":";;;;;;;UAgBiB;;EAEf;;EAEA;;EAEA;;;;;;;;;;;;iBAac,OAAO,mBAAmB,WAAW,sBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiDzD,sBAAsB,QAAQ;;UAU7B;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;iBAec,QACd,SAAS,6BACT,WAAW,8BACV;;UAmBc;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;iBAmBc,qBACd,SAAS,6BACT,WAAW,6BACX,sBACC;;;;UAkCc;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCc,0BACd,SAAS,6BACT,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A8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BhB,oBACd,QAAQ,eACR,OAAM,6BACL;UA2Ec;EACf;;;EAGA,WAAW;;;;EAIX;;EAEA;IAAM;IAAa;;;EAEnB,mBAAmB;;EAEnB,SAAS;;EAET;;;;EAIA;EACA;EACA;EACA;EACA;;EAEA;EACA;;EAEA;;EAEA;;;;;iBAMc,YAAY;;;;;;;;;iBAYZ,qBACd,WAAW,YAAY,eAAe,cACtC,UAAU,YAAY,eAAe,cACrC,aAAa,aACb,8BACA;EACE;EACA;EACA;EACA;;;EAGA;EACA,8BAA8B;EAC9B;IAED"}
|
|
@@ -5,7 +5,7 @@ import { t as confidenceInterval } from "./descriptive-CnU8Yq29.js";
|
|
|
5
5
|
import { t as benjaminiHochberg } from "./multiplicity-D9cjmStq.js";
|
|
6
6
|
import { r as pairedBootstrap } from "./paired-tests-jbwPdSz5.js";
|
|
7
7
|
import { r as pairedMde } from "./power-and-mde-fK5Qocwo.js";
|
|
8
|
-
import { a as wilcoxonSignedRank, r as pairRunRecords } from "./paired-arms-
|
|
8
|
+
import { a as wilcoxonSignedRank, r as pairRunRecords } from "./paired-arms-DzKn0TfY.js";
|
|
9
9
|
import { r as observedSplitScore } from "./reward-nw2xZGZG.js";
|
|
10
10
|
//#region src/summary-report.ts
|
|
11
11
|
/**
|
|
@@ -859,4 +859,4 @@ function fmt(x) {
|
|
|
859
859
|
//#endregion
|
|
860
860
|
export { summaryTable as a, researchReport as i, gainHistogram as n, paretoChart as r, RESEARCH_REPORT_HARD_PAIR_FLOOR as t };
|
|
861
861
|
|
|
862
|
-
//# sourceMappingURL=summary-report-
|
|
862
|
+
//# sourceMappingURL=summary-report-DtdRucM0.js.map
|