@tangle-network/agent-eval 0.197.0 → 0.198.1

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.
Files changed (150) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +3 -1
  3. package/dist/active-curriculum-B_Lc9kfO.js +61 -0
  4. package/dist/active-curriculum-B_Lc9kfO.js.map +1 -0
  5. package/dist/adapters/http.d.ts +2 -2
  6. package/dist/analyst/index.d.ts +5 -5
  7. package/dist/analyst/index.js +3 -3
  8. package/dist/{analyze-runs-B6gv7vAT.js → analyze-runs-DFbp2gB8.js} +5 -5
  9. package/dist/{analyze-runs-B6gv7vAT.js.map → analyze-runs-DFbp2gB8.js.map} +1 -1
  10. package/dist/{benchmark-command-DB7pxlks.js → benchmark-command-DKQuLrrD.js} +6 -5
  11. package/dist/{benchmark-command-DB7pxlks.js.map → benchmark-command-DKQuLrrD.js.map} +1 -1
  12. package/dist/benchmarks/index.d.ts +4 -3
  13. package/dist/benchmarks/index.d.ts.map +1 -1
  14. package/dist/benchmarks/index.js +3 -3
  15. package/dist/campaign/index.d.ts +5 -4
  16. package/dist/campaign/index.js +13 -11
  17. package/dist/{campaign-BUFSOI36.js → campaign-DRdKwxm-.js} +13 -12
  18. package/dist/{campaign-BUFSOI36.js.map → campaign-DRdKwxm-.js.map} +1 -1
  19. package/dist/{campaign-evidence-DJc60F9C.js → campaign-evidence-jL_U7Ikv.js} +2 -2
  20. package/dist/{campaign-evidence-DJc60F9C.js.map → campaign-evidence-jL_U7Ikv.js.map} +1 -1
  21. package/dist/cli.js +247 -13
  22. package/dist/cli.js.map +1 -1
  23. package/dist/contract/index.d.ts +7 -6
  24. package/dist/contract/index.js +9 -9
  25. package/dist/{default-registry-D2csUBBQ.d.ts → default-registry-oK9hHfX_.d.ts} +3 -3
  26. package/dist/{default-registry-D2csUBBQ.d.ts.map → default-registry-oK9hHfX_.d.ts.map} +1 -1
  27. package/dist/{define-agent-eval-ulRlLvse.d.ts → define-agent-eval-9JYoCkDI.d.ts} +5 -4
  28. package/dist/define-agent-eval-9JYoCkDI.d.ts.map +1 -0
  29. package/dist/{define-agent-eval-4J02MdF7.js → define-agent-eval-DkfcqaCF.js} +6 -6
  30. package/dist/{define-agent-eval-4J02MdF7.js.map → define-agent-eval-DkfcqaCF.js.map} +1 -1
  31. package/dist/diagnosis/index.js +1 -1
  32. package/dist/{dspy-rlm-engine-k_QdEBZo.js → dspy-rlm-engine-B5T43BkZ.js} +2 -2
  33. package/dist/{dspy-rlm-engine-k_QdEBZo.js.map → dspy-rlm-engine-B5T43BkZ.js.map} +1 -1
  34. package/dist/{engine-De2hfuiQ.d.ts → engine-Dc996kAg.d.ts} +2 -2
  35. package/dist/{engine-De2hfuiQ.d.ts.map → engine-Dc996kAg.d.ts.map} +1 -1
  36. package/dist/{eval-campaign-CXT2WYUe.js → eval-campaign-GapmPHIA.js} +2 -2
  37. package/dist/{eval-campaign-CXT2WYUe.js.map → eval-campaign-GapmPHIA.js.map} +1 -1
  38. package/dist/evaluation.d.ts +1 -1
  39. package/dist/experiment/index.d.ts +1 -1
  40. package/dist/experiment/index.js +8 -6
  41. package/dist/experiment/index.js.map +1 -1
  42. package/dist/{external-optimizer-process-_YIECYJ7.js → external-optimizer-process-CEXcCKqd.js} +2 -2
  43. package/dist/{external-optimizer-process-_YIECYJ7.js.map → external-optimizer-process-CEXcCKqd.js.map} +1 -1
  44. package/dist/{external-optimizer-subprocess-BrghTvEp.js → external-optimizer-subprocess-laM1-UDV.js} +2 -61
  45. package/dist/external-optimizer-subprocess-laM1-UDV.js.map +1 -0
  46. package/dist/fuzz.d.ts.map +1 -1
  47. package/dist/fuzz.js +2 -3
  48. package/dist/fuzz.js.map +1 -1
  49. package/dist/hosted/index.js +1 -1
  50. package/dist/{index-DJKZEldg.d.ts → index-BXJHJ_jE.d.ts} +12 -947
  51. package/dist/index-BXJHJ_jE.d.ts.map +1 -0
  52. package/dist/{index-CRsmcAGl.d.ts → index-DzQ6T34s.d.ts} +6 -6
  53. package/dist/{index-CRsmcAGl.d.ts.map → index-DzQ6T34s.d.ts.map} +1 -1
  54. package/dist/{index-kKECJfib.d.ts → index-lbwvO9vJ.d.ts} +3 -3
  55. package/dist/{index-kKECJfib.d.ts.map → index-lbwvO9vJ.d.ts.map} +1 -1
  56. package/dist/index.d.ts +9 -9
  57. package/dist/index.js +15 -13
  58. package/dist/index.js.map +1 -1
  59. package/dist/jev.d.ts +1 -1
  60. package/dist/{llm-judge-fhkFQL1N.js → llm-judge-3ncNcWNT.js} +415 -1981
  61. package/dist/llm-judge-3ncNcWNT.js.map +1 -0
  62. package/dist/{matrix-C1X-fIVX.d.ts → matrix-BnksRaDD.d.ts} +2 -2
  63. package/dist/{matrix-C1X-fIVX.d.ts.map → matrix-BnksRaDD.d.ts.map} +1 -1
  64. package/dist/multiplicity-D9cjmStq.js +101 -0
  65. package/dist/multiplicity-D9cjmStq.js.map +1 -0
  66. package/dist/multishot/golden/index.d.ts +1 -1
  67. package/dist/multishot/golden/index.js +1 -1
  68. package/dist/multishot/index.d.ts +2 -2
  69. package/dist/multishot/index.js +1 -1
  70. package/dist/openapi.json +1 -1
  71. package/dist/{paired-arms-JSDcs2zx.js → paired-arms-DKZFVPt8.js} +4 -398
  72. package/dist/paired-arms-DKZFVPt8.js.map +1 -0
  73. package/dist/paired-binary-fzkwENI4.js +399 -0
  74. package/dist/paired-binary-fzkwENI4.js.map +1 -0
  75. package/dist/{paired-promotion-decision-DTKl6-G8.js → paired-promotion-decision-D5B1Cxc2.js} +78 -5
  76. package/dist/paired-promotion-decision-D5B1Cxc2.js.map +1 -0
  77. package/dist/{power-and-mde-BJOpt6pq.js → power-and-mde-K_CmO3dc.js} +3 -101
  78. package/dist/power-and-mde-K_CmO3dc.js.map +1 -0
  79. package/dist/{produced-state-1RnbLrSa.js → produced-state-qIhqN3V5.js} +3 -3
  80. package/dist/{produced-state-1RnbLrSa.js.map → produced-state-qIhqN3V5.js.map} +1 -1
  81. package/dist/{promotion-policy-Cy5OV8BV.js → promotion-policy-C6FAJvmZ.js} +3 -3
  82. package/dist/{promotion-policy-Cy5OV8BV.js.map → promotion-policy-C6FAJvmZ.js.map} +1 -1
  83. package/dist/reporting.js +3 -3
  84. package/dist/rl.d.ts +17 -39
  85. package/dist/rl.d.ts.map +1 -1
  86. package/dist/rl.js +5 -5
  87. package/dist/search/index.d.ts +1187 -0
  88. package/dist/search/index.d.ts.map +1 -0
  89. package/dist/search/index.js +187 -0
  90. package/dist/search/index.js.map +1 -0
  91. package/dist/search-kernel-CumYAjA3.js +2427 -0
  92. package/dist/search-kernel-CumYAjA3.js.map +1 -0
  93. package/dist/search-kernel-TLoiMMcq.d.ts +1185 -0
  94. package/dist/search-kernel-TLoiMMcq.d.ts.map +1 -0
  95. package/dist/{search-ledger-9W0g5FP6.js → search-ledger-BnUytR8X.js} +3 -1
  96. package/dist/search-ledger-BnUytR8X.js.map +1 -0
  97. package/dist/{search-shipper-CYbmJQx8.js → search-shipper-Cn8cxcyp.js} +2 -2
  98. package/dist/{search-shipper-CYbmJQx8.js.map → search-shipper-Cn8cxcyp.js.map} +1 -1
  99. package/dist/search-summary-dJOaZ3Dw.js +133 -0
  100. package/dist/search-summary-dJOaZ3Dw.js.map +1 -0
  101. package/dist/{semantic-concept-judge-Bh5lvKGg.js → semantic-concept-judge-2SE_kXGF.js} +2 -2
  102. package/dist/{semantic-concept-judge-Bh5lvKGg.js.map → semantic-concept-judge-2SE_kXGF.js.map} +1 -1
  103. package/dist/{sequential-C21_PP7F.js → sequential-Yz3OSskl.js} +2 -2
  104. package/dist/{sequential-C21_PP7F.js.map → sequential-Yz3OSskl.js.map} +1 -1
  105. package/dist/single-run-lock-fVu3MZWH.js +62 -0
  106. package/dist/single-run-lock-fVu3MZWH.js.map +1 -0
  107. package/dist/{skillopt-optimization-method-CHUcZ8w6.js → skillopt-optimization-method-BL_j6mX8.js} +8 -7
  108. package/dist/{skillopt-optimization-method-CHUcZ8w6.js.map → skillopt-optimization-method-BL_j6mX8.js.map} +1 -1
  109. package/dist/{statistical-heldout-DANVmyug.js → statistical-heldout-BAFDCo07.js} +2 -2
  110. package/dist/{statistical-heldout-DANVmyug.js.map → statistical-heldout-BAFDCo07.js.map} +1 -1
  111. package/dist/{statistical-heldout-BedVSZb2.d.ts → statistical-heldout-CMpxMjlQ.d.ts} +2 -2
  112. package/dist/{statistical-heldout-BedVSZb2.d.ts.map → statistical-heldout-CMpxMjlQ.d.ts.map} +1 -1
  113. package/dist/{store-tool-spans-CawP-WxM.d.ts → store-tool-spans-CUwWSXoj.d.ts} +3 -3
  114. package/dist/{store-tool-spans-CawP-WxM.d.ts.map → store-tool-spans-CUwWSXoj.d.ts.map} +1 -1
  115. package/dist/{summary-report-BMvou2oZ.js → summary-report-BeYnvddy.js} +4 -3
  116. package/dist/{summary-report-BMvou2oZ.js.map → summary-report-BeYnvddy.js.map} +1 -1
  117. package/dist/{tool-groups-B4JVrH3g.d.ts → tool-groups-DVJAR1GE.d.ts} +2 -2
  118. package/dist/tool-groups-DVJAR1GE.d.ts.map +1 -0
  119. package/dist/trace-repair/index.d.ts +1 -1
  120. package/dist/traces.d.ts +2 -2
  121. package/dist/tree-DxGfhISA.js +4100 -0
  122. package/dist/tree-DxGfhISA.js.map +1 -0
  123. package/dist/{types-B3jzCp0p.js → types-B3jzCp0p2.js} +1 -1
  124. package/dist/types-B3jzCp0p2.js.map +1 -0
  125. package/dist/{types-CjFDKMDe.d.ts → types-D94EanDL.d.ts} +2 -2
  126. package/dist/{types-CjFDKMDe.d.ts.map → types-D94EanDL.d.ts.map} +1 -1
  127. package/dist/{types-B2673PBj.d.ts → types-EBUav9Bu.d.ts} +8 -4
  128. package/dist/types-EBUav9Bu.d.ts.map +1 -0
  129. package/docs/campaign-proposers.md +2 -0
  130. package/docs/design/statistics-decisions.md +1 -1
  131. package/docs/search-ledger.md +145 -8
  132. package/docs/trace-contracts.md +1 -3
  133. package/package.json +6 -1
  134. package/dist/active-curriculum-OjIWgrUJ.js +0 -204
  135. package/dist/active-curriculum-OjIWgrUJ.js.map +0 -1
  136. package/dist/define-agent-eval-ulRlLvse.d.ts.map +0 -1
  137. package/dist/external-optimizer-subprocess-BrghTvEp.js.map +0 -1
  138. package/dist/index-DJKZEldg.d.ts.map +0 -1
  139. package/dist/llm-judge-fhkFQL1N.js.map +0 -1
  140. package/dist/paired-arms-JSDcs2zx.js.map +0 -1
  141. package/dist/paired-delta-test-BF-FEP8V.js +0 -78
  142. package/dist/paired-delta-test-BF-FEP8V.js.map +0 -1
  143. package/dist/paired-promotion-decision-DTKl6-G8.js.map +0 -1
  144. package/dist/power-and-mde-BJOpt6pq.js.map +0 -1
  145. package/dist/search-ledger-9W0g5FP6.js.map +0 -1
  146. package/dist/search-summary-CcavvYLe.js +0 -378
  147. package/dist/search-summary-CcavvYLe.js.map +0 -1
  148. package/dist/tool-groups-B4JVrH3g.d.ts.map +0 -1
  149. package/dist/types-B2673PBj.d.ts.map +0 -1
  150. package/dist/types-B3jzCp0p.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"promotion-policy-Cy5OV8BV.js","names":[],"sources":["../src/campaign/gates/promotion-policy.ts"],"sourcesContent":["/**\n * Build paired evidence for each objective and apply a promotion policy.\n * The default policy requires at least one gain and every regression floor to\n * clear. A floor can fail because a larger loss remains plausible; that does\n * not demonstrate an observed regression. Missing evidence stays unresolved.\n * Confidence intervals apply to each axis, without a multiplicity adjustment.\n *\n * Cost and latency remain aggregate constraints because GateContext does not\n * supply paired observations for them. Compose a budget gate when needed.\n */\n\nimport {\n decidePairedPromotion,\n type PairedDecisionMethod,\n type PairedDecisionStatistic,\n type PairedMcNemarEvidence,\n} from '../../paired-promotion-decision'\nimport type { Direction } from '../../pareto'\nimport {\n DECISION_PAIRED_DELTA_STATISTIC,\n type PairedBootstrapResult,\n pairedBootstrap,\n} from '../../statistics'\nimport type { Gate, GateContext, GateDecision, GateResult, JudgeScore, Scenario } from '../types'\nimport { detectScale, pairHoldout } from './statistical-heldout'\n\n/** Where an objective's per-cell scalar comes from. `composite` reads the\n * judge's composite; `dimension` reads a named per-dimension score. */\nexport type ObjectiveSource = { kind: 'composite' } | { kind: 'dimension'; dimension: string }\n\nexport interface PromotionObjective {\n /** Stable label used in reports + `contributingGates`. */\n name: string\n source: ObjectiveSource\n /** 'maximize' (quality dims) or 'minimize' (error/risk/length dims). Orients\n * the paired delta so a positive bootstrap always means \"candidate better\". */\n direction: Direction\n /** Declared binary support {0, binaryScale}, including zero-only observations.\n * Must be finite and positive; paired cell scores must be 0 or this scale.\n * Uses the risk-difference mean and rejects the 'median' statistic. */\n binaryScale?: number\n /** The good-direction paired-delta CI lower bound must EXCEED this to count\n * as a significant gain on this axis. Interpreted in the judge's native\n * scale. Default 0 (⇒ \"confidently better\"). */\n gainThreshold?: number\n /** A floor breach (regression) is declared when the good-direction CI lower\n * bound is below −floorTolerance, or when the exact small-sample test proves\n * a drop past it. Defaults to 0.05 times the declared binary scale, or\n * auto-scales off observed magnitudes (0.05 on [0,1], 5 on 0-100). */\n floorTolerance?: number\n}\n\n/** Per-axis verdict from the shared paired decision rule.\n * 'regressed' includes uncertainty that prevents clearing the regression floor. */\nexport type AxisVerdict = 'improved' | 'regressed' | 'flat' | 'few_runs' | 'indeterminate'\n\nexport interface AxisEvidence {\n name: string\n source: ObjectiveSource\n direction: Direction\n /** Paired bootstrap on the GOOD-DIRECTION delta (oriented by `direction`):\n * a positive value means the candidate is better on this axis.\n *\n * DIAGNOSTIC on a pass/fail axis: there the verdict is decided on Tango's\n * score interval instead, because a percentile bootstrap over a three-atom\n * delta lattice is not a valid interval at the nonzero margin `floorTolerance`\n * and `gainThreshold` create. `ci` carries the interval that decided. */\n bootstrap: PairedBootstrapResult\n /** Which paired statistic `bootstrap.low`/`.high` bracket. `'mean'` unless the\n * caller asked for the median — on a pass/fail axis the median and its whole\n * CI are pinned at 0 by tie domination and can see neither a gain nor a\n * regression. `bootstrap.median` still carries the median point estimate. */\n bootstrapStatistic: 'median' | 'mean'\n /** The interval the axis verdict was actually decided on, good-direction and\n * in the axis'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 axis; null otherwise. */\n mcnemar: PairedMcNemarEvidence | null\n /** `ci` has zero width or non-finite bounds. It cannot establish a gain or\n * clear a regression floor, regardless of the point estimate. */\n indeterminate: boolean\n /** Paired observations contributing to this axis. */\n n: number\n minimumRequired: number\n decisionMethod: PairedDecisionMethod\n gainThreshold: number\n floorTolerance: number\n verdict: AxisVerdict\n}\n\nexport interface EvidenceVector {\n /** One entry per objective — NOTHING averaged across axes. */\n axes: AxisEvidence[]\n /** Smallest paired n across axes that produced observations — the binding\n * evidence-sufficiency constraint. 0 when no axis produced observations. */\n minN: number\n /** Aggregate per-side cost from the gate context (a constraint input, not a\n * CI axis — see the module header). */\n cost: { candidate: number; baseline: number }\n}\n\n/** A promotion strategy: a pure function from the evidence vector to a verdict.\n * Many policies can run over the same `EvidenceVector` and disagree — that's\n * the point (competing strategies, shared evidence). */\nexport type PromotionPolicy = (ev: EvidenceVector) => GateResult\n\nexport interface BuildEvidenceVectorOptions {\n /** Minimum paired observations before an axis can claim significance; below\n * it the axis is `few_runs`. The exact small-sample test may require more\n * observations at the selected confidence. */\n minProductiveRuns?: number\n /** Confidence level for every axis bootstrap. Default 0.95. */\n confidence?: number\n /** Bootstrap resamples. Default 2000. */\n resamples?: number\n /** Fixed bootstrap seed for a deterministic, reproducible verdict. Default 1337. */\n seed?: number\n /** Paired statistic every axis CI is computed on. Default `'mean'` — see\n * {@link DECISION_PAIRED_DELTA_STATISTIC} for why the median is not. */\n statistic?: 'mean' | 'median'\n}\n\n/**\n * The Evidence Bus. For each objective, pair candidate vs baseline by full\n * cellId and bootstrap a CI on the good-direction paired delta. Reuses the\n * exact `pairHoldout` + `pairedBootstrap` machinery the held-out gate uses, so\n * a single source of truth governs pairing granularity + scale handling.\n */\nexport function buildEvidenceVector<TArtifact, TScenario extends Scenario>(\n ctx: GateContext<TArtifact, TScenario>,\n objectives: PromotionObjective[],\n opts: BuildEvidenceVectorOptions = {},\n): EvidenceVector {\n if (objectives.length === 0) {\n throw new Error('buildEvidenceVector: at least 1 objective required')\n }\n const confidence = opts.confidence ?? 0.95\n const resamples = opts.resamples ?? 2000\n const seed = opts.seed ?? 1337\n const baseline = ctx.baselineJudgeScores ?? ctx.judgeScores\n const scenarioIds = new Set(ctx.scenarios.map((s) => s.id))\n\n const axes: AxisEvidence[] = []\n for (const obj of objectives) {\n let select: (s: JudgeScore) => number | undefined\n if (obj.source.kind === 'composite') {\n select = (s) => s.composite\n } else {\n const dim = obj.source.dimension\n select = (s) => s.dimensions[dim]\n }\n const paired = pairHoldout(ctx.judgeScores, baseline, scenarioIds, select)\n // Orient to the good direction: maximize ⇒ bootstrap (candidate − baseline);\n // minimize ⇒ bootstrap (baseline − candidate) by swapping args, so a\n // positive bootstrap always reads as \"candidate better on this axis\".\n const before = obj.direction === 'maximize' ? paired.before : paired.after\n const after = obj.direction === 'maximize' ? paired.after : paired.before\n const n = paired.before.length\n const binaryScale = obj.binaryScale\n const floorTolerance =\n obj.floorTolerance ?? 0.05 * (binaryScale ?? detectScale([...paired.before, ...paired.after]))\n const gainThreshold = obj.gainThreshold ?? 0\n // Axes are decided on the MEAN paired delta — which for a pass/fail axis is\n // exactly the change in success rate. The median is structurally blind on\n // the shapes eval data lands in: with most pairs tied its bootstrap CI\n // collapses to [0,0] and the axis reads 'flat', hiding real gains AND real\n // regressions — pass/fail axes on ANY encoding ({0,1} and the 0-100 one\n // `detectScale` exists for), and low-cardinality axes even below half ties.\n // Orthogonal to `pairedDeltaTest`'s own small-sample switch: that picks the\n // TEST (bootstrap CI at n ≥ 20, exact sign test below), this picks the\n // ESTIMATOR the test is applied to. Both are needed — an exact sign test on\n // a tie-pinned median is still blind.\n const bootstrapStatistic = opts.statistic ?? DECISION_PAIRED_DELTA_STATISTIC\n // Both burdens of proof route through the ONE shared rule\n // (`decidePairedPromotion`), so a pass/fail axis is judged on Tango's score\n // interval — the only paired-binary construction valid at the nonzero\n // margins `gainThreshold` / `floorTolerance` create — and a zero-width\n // interval cannot buy a verdict in either direction.\n const improvement = decidePairedPromotion(before, after, {\n confidence,\n resamples,\n statistic: bootstrapStatistic,\n seed,\n threshold: gainThreshold,\n minPairs: opts.minProductiveRuns,\n binaryScale,\n })\n const regression = decidePairedPromotion(after, before, {\n confidence,\n resamples,\n statistic: bootstrapStatistic,\n seed,\n threshold: floorTolerance,\n minPairs: opts.minProductiveRuns,\n binaryScale,\n })\n const bootstrap =\n improvement.bootstrap ??\n pairedBootstrap(before, after, {\n confidence,\n resamples,\n statistic: bootstrapStatistic,\n seed,\n })\n // A floor breach fires on EITHER burden of proof, because they cover\n // different failures and the floor is the anti-Goodhart guard:\n // - `improvement.low < -floorTolerance` — the CREDIBLE WORST CASE exceeds\n // the tolerance. This is the contract `AxisEvidence.floorTolerance` and\n // `paretoPolicy`'s own reason string state, and it is the conservative\n // posture a safety axis needs: block unless the data can rule the\n // breach out, rather than waiting for the breach to be proven. Read off\n // the DECIDING interval, so a pass/fail axis is not screened by a\n // bootstrap that is pinned wherever ties dominate.\n // - `regression.promote` — a PROVEN drop past the tolerance. Adds the\n // small-sample path, where the decision is an exact sign test because\n // the bootstrap interval is descriptive only.\n // A tied binary axis still has uncertainty about unseen discordant pairs.\n // Its diagnostic bootstrap collapses to zero, so only the deciding score\n // interval can establish that a regression stays within the declared floor.\n const floorBreached = improvement.low < -floorTolerance || regression.promote\n // Floor check precedes the gain check: a credible regression must never be\n // masked as \"improved\". With the defaults (gainThreshold 0, positive floor)\n // the regions are disjoint and order is moot, but a consumer who sets a\n // negative gainThreshold (\"accept small dips\") could otherwise have a real\n // floor breach classified as a gain — anti-Goodhart wins the tie.\n const verdict: AxisVerdict = !improvement.sufficient\n ? 'few_runs'\n : improvement.indeterminate\n ? 'indeterminate'\n : floorBreached\n ? 'regressed'\n : improvement.promote\n ? 'improved'\n : 'flat'\n axes.push({\n name: obj.name,\n source: obj.source,\n direction: obj.direction,\n bootstrap,\n bootstrapStatistic,\n ci: { low: improvement.low, high: improvement.high },\n decisionStatistic: improvement.statistic,\n mcnemar: improvement.mcnemar,\n indeterminate: improvement.indeterminate,\n n,\n minimumRequired: improvement.minimumPairs,\n decisionMethod: improvement.method,\n gainThreshold,\n floorTolerance,\n verdict,\n })\n }\n const ns = axes.map((a) => a.n).filter((n) => n > 0)\n const minN = ns.length > 0 ? Math.min(...ns) : 0\n return { axes, minN, cost: { candidate: ctx.cost.candidate, baseline: ctx.cost.baseline } }\n}\n\n/**\n * Require a supported gain and every configured regression floor to clear.\n * A failed floor holds the candidate, including when uncertainty permits a loss.\n * Missing or indeterminate evidence requires more work; no gain holds release.\n */\nexport const paretoPolicy: PromotionPolicy = (ev) => {\n const contributingGates = ev.axes.map((ax) => ({\n name: `objective:${ax.name}`,\n status:\n ax.verdict === 'regressed'\n ? ('fail' as const)\n : ax.verdict === 'few_runs' || ax.verdict === 'indeterminate'\n ? ('not_evaluated' as const)\n : ('pass' as const),\n detail: {\n direction: ax.direction,\n source: ax.source,\n verdict: ax.verdict,\n n: ax.n,\n deltaMedian: ax.bootstrap.median,\n ciLow: ax.ci.low,\n ciHigh: ax.ci.high,\n decisionStatistic: ax.decisionStatistic,\n decisionMethod: ax.decisionMethod,\n mcnemar: ax.mcnemar,\n indeterminate: ax.indeterminate,\n bootstrapCiLow: ax.bootstrap.low,\n bootstrapCiHigh: ax.bootstrap.high,\n confidence: ax.bootstrap.confidence,\n gainThreshold: ax.gainThreshold,\n floorTolerance: ax.floorTolerance,\n },\n }))\n\n const regressed = ev.axes.filter((a) => a.verdict === 'regressed')\n const insufficient = ev.axes.filter(\n (a) => a.verdict === 'few_runs' || a.verdict === 'indeterminate',\n )\n const improved = ev.axes.filter((a) => a.verdict === 'improved')\n\n let decision: GateDecision\n const reasons: string[] = []\n if (regressed.length > 0) {\n // A gain on another axis cannot excuse an unresolved regression floor.\n decision = 'hold'\n for (const a of regressed) {\n reasons.push(\n `objective '${a.name}' did not clear its regression floor -${a.floorTolerance}: good-direction CI [${a.ci.low.toFixed(3)}, ${a.ci.high.toFixed(3)}] (n=${a.n})`,\n )\n }\n } else if (insufficient.length > 0) {\n // An unresolved axis cannot establish either a gain or a safe floor.\n decision = 'need_more_work'\n for (const a of insufficient) {\n reasons.push(\n a.verdict === 'few_runs'\n ? `objective '${a.name}' has only n=${a.n} paired runs — insufficient evidence to claim significance`\n : `objective '${a.name}' has an indeterminate deciding CI [${a.ci.low}, ${a.ci.high}] — insufficient evidence to clear its regression floor (n=${a.n})`,\n )\n }\n } else if (improved.length > 0) {\n decision = 'ship'\n reasons.push(\n `Supported objective gain: ${improved\n .map(\n (a) =>\n `'${a.name}' +${a.ci.low > 0 ? a.ci.low.toFixed(3) : a.bootstrap.mean.toFixed(3)} (CI.low ${a.ci.low.toFixed(3)})`,\n )\n .join(', ')}; every regression floor cleared`,\n )\n } else {\n // Every floor cleared, but no objective demonstrated a significant gain.\n decision = 'hold'\n reasons.push(\n 'no Pareto improvement: no objective shows a significant gain; every regression floor cleared',\n )\n }\n\n // `delta` surfaces the composite axis if present, else the first axis — a\n // single convenience scalar; the vector lives in `contributingGates`.\n const composite = ev.axes.find((a) => a.source.kind === 'composite') ?? ev.axes[0]\n return { decision, reasons, contributingGates, delta: composite?.bootstrap.median }\n}\n\nexport interface ParetoSignificanceGateOptions extends BuildEvidenceVectorOptions {\n /** The objective vector. Every axis is both a gain source and a safety floor. */\n objectives: PromotionObjective[]\n /** Strategy applied to the evidence vector. Default `paretoPolicy`. Override\n * to run a stricter/looser strategy over the SAME bus (competing policies). */\n policy?: PromotionPolicy\n /** Override the gate name in reports. */\n name?: string\n}\n\n/**\n * Wrap the bus + a policy as a `Gate`. Plugs into the existing\n * `runImprovementLoop({ gate })` slot and composes via `composeGate`; default\n * loop behavior is unchanged because consumers opt in by passing this gate.\n */\nexport function paretoSignificanceGate<TArtifact = unknown, TScenario extends Scenario = Scenario>(\n options: ParetoSignificanceGateOptions,\n): Gate<TArtifact, TScenario> {\n if (options.objectives.length === 0) {\n throw new Error('paretoSignificanceGate: at least 1 objective required')\n }\n const policy = options.policy ?? paretoPolicy\n return {\n name: options.name ?? 'paretoSignificanceGate',\n async decide(ctx: GateContext<TArtifact, TScenario>): Promise<GateResult> {\n const ev = buildEvidenceVector(ctx, options.objectives, options)\n return policy(ev)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkIA,SAAgB,oBACd,KACA,YACA,OAAmC,CAAC,GACpB;CAChB,IAAI,WAAW,WAAW,GACxB,MAAM,IAAI,MAAM,oDAAoD;CAEtE,MAAM,aAAa,KAAK,cAAc;CACtC,MAAM,YAAY,KAAK,aAAa;CACpC,MAAM,OAAO,KAAK,QAAQ;CAC1B,MAAM,WAAW,IAAI,uBAAuB,IAAI;CAChD,MAAM,cAAc,IAAI,IAAI,IAAI,UAAU,KAAK,MAAM,EAAE,EAAE,CAAC;CAE1D,MAAM,OAAuB,CAAC;CAC9B,KAAK,MAAM,OAAO,YAAY;EAC5B,IAAI;EACJ,IAAI,IAAI,OAAO,SAAS,aACtB,UAAU,MAAM,EAAE;OACb;GACL,MAAM,MAAM,IAAI,OAAO;GACvB,UAAU,MAAM,EAAE,WAAW;EAC/B;EACA,MAAM,SAAS,YAAY,IAAI,aAAa,UAAU,aAAa,MAAM;EAIzE,MAAM,SAAS,IAAI,cAAc,aAAa,OAAO,SAAS,OAAO;EACrE,MAAM,QAAQ,IAAI,cAAc,aAAa,OAAO,QAAQ,OAAO;EACnE,MAAM,IAAI,OAAO,OAAO;EACxB,MAAM,cAAc,IAAI;EACxB,MAAM,iBACJ,IAAI,kBAAkB,OAAQ,eAAe,YAAY,CAAC,GAAG,OAAO,QAAQ,GAAG,OAAO,KAAK,CAAC;EAC9F,MAAM,gBAAgB,IAAI,iBAAiB;EAW3C,MAAM,qBAAqB,KAAK,aAAA;EAMhC,MAA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CAAC,EAAE,EACpH,CAAC,CACA,KAAK,IAAI,EAAE,iCAChB;CACF,OAAO;EAEL,WAAW;EACX,QAAQ,KACN,8FACF;CACF;CAIA,MAAM,YAAY,GAAG,KAAK,MAAM,MAAM,EAAE,OAAO,SAAS,WAAW,KAAK,GAAG,KAAK;CAChF,OAAO;EAAE;EAAU;EAAS;EAAmB,OAAO,WAAW,UAAU;CAAO;AACpF;;;;;;AAiBA,SAAgB,uBACd,SAC4B;CAC5B,IAAI,QAAQ,WAAW,WAAW,GAChC,MAAM,IAAI,MAAM,uDAAuD;CAEzE,MAAM,SAAS,QAAQ,UAAU;CACjC,OAAO;EACL,MAAM,QAAQ,QAAQ;EACtB,MAAM,OAAO,KAA6D;GACxE,MAAM,KAAK,oBAAoB,KAAK,QAAQ,YAAY,OAAO;GAC/D,OAAO,OAAO,EAAE;EAClB;CACF;AACF"}
1
+ {"version":3,"file":"promotion-policy-C6FAJvmZ.js","names":[],"sources":["../src/campaign/gates/promotion-policy.ts"],"sourcesContent":["/**\n * Build paired evidence for each objective and apply a promotion policy.\n * The default policy requires at least one gain and every regression floor to\n * clear. A floor can fail because a larger loss remains plausible; that does\n * not demonstrate an observed regression. Missing evidence stays unresolved.\n * Confidence intervals apply to each axis, without a multiplicity adjustment.\n *\n * Cost and latency remain aggregate constraints because GateContext does not\n * supply paired observations for them. Compose a budget gate when needed.\n */\n\nimport {\n decidePairedPromotion,\n type PairedDecisionMethod,\n type PairedDecisionStatistic,\n type PairedMcNemarEvidence,\n} from '../../paired-promotion-decision'\nimport type { Direction } from '../../pareto'\nimport {\n DECISION_PAIRED_DELTA_STATISTIC,\n type PairedBootstrapResult,\n pairedBootstrap,\n} from '../../statistics'\nimport type { Gate, GateContext, GateDecision, GateResult, JudgeScore, Scenario } from '../types'\nimport { detectScale, pairHoldout } from './statistical-heldout'\n\n/** Where an objective's per-cell scalar comes from. `composite` reads the\n * judge's composite; `dimension` reads a named per-dimension score. */\nexport type ObjectiveSource = { kind: 'composite' } | { kind: 'dimension'; dimension: string }\n\nexport interface PromotionObjective {\n /** Stable label used in reports + `contributingGates`. */\n name: string\n source: ObjectiveSource\n /** 'maximize' (quality dims) or 'minimize' (error/risk/length dims). Orients\n * the paired delta so a positive bootstrap always means \"candidate better\". */\n direction: Direction\n /** Declared binary support {0, binaryScale}, including zero-only observations.\n * Must be finite and positive; paired cell scores must be 0 or this scale.\n * Uses the risk-difference mean and rejects the 'median' statistic. */\n binaryScale?: number\n /** The good-direction paired-delta CI lower bound must EXCEED this to count\n * as a significant gain on this axis. Interpreted in the judge's native\n * scale. Default 0 (⇒ \"confidently better\"). */\n gainThreshold?: number\n /** A floor breach (regression) is declared when the good-direction CI lower\n * bound is below −floorTolerance, or when the exact small-sample test proves\n * a drop past it. Defaults to 0.05 times the declared binary scale, or\n * auto-scales off observed magnitudes (0.05 on [0,1], 5 on 0-100). */\n floorTolerance?: number\n}\n\n/** Per-axis verdict from the shared paired decision rule.\n * 'regressed' includes uncertainty that prevents clearing the regression floor. */\nexport type AxisVerdict = 'improved' | 'regressed' | 'flat' | 'few_runs' | 'indeterminate'\n\nexport interface AxisEvidence {\n name: string\n source: ObjectiveSource\n direction: Direction\n /** Paired bootstrap on the GOOD-DIRECTION delta (oriented by `direction`):\n * a positive value means the candidate is better on this axis.\n *\n * DIAGNOSTIC on a pass/fail axis: there the verdict is decided on Tango's\n * score interval instead, because a percentile bootstrap over a three-atom\n * delta lattice is not a valid interval at the nonzero margin `floorTolerance`\n * and `gainThreshold` create. `ci` carries the interval that decided. */\n bootstrap: PairedBootstrapResult\n /** Which paired statistic `bootstrap.low`/`.high` bracket. `'mean'` unless the\n * caller asked for the median — on a pass/fail axis the median and its whole\n * CI are pinned at 0 by tie domination and can see neither a gain nor a\n * regression. `bootstrap.median` still carries the median point estimate. */\n bootstrapStatistic: 'median' | 'mean'\n /** The interval the axis verdict was actually decided on, good-direction and\n * in the axis'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 axis; null otherwise. */\n mcnemar: PairedMcNemarEvidence | null\n /** `ci` has zero width or non-finite bounds. It cannot establish a gain or\n * clear a regression floor, regardless of the point estimate. */\n indeterminate: boolean\n /** Paired observations contributing to this axis. */\n n: number\n minimumRequired: number\n decisionMethod: PairedDecisionMethod\n gainThreshold: number\n floorTolerance: number\n verdict: AxisVerdict\n}\n\nexport interface EvidenceVector {\n /** One entry per objective — NOTHING averaged across axes. */\n axes: AxisEvidence[]\n /** Smallest paired n across axes that produced observations — the binding\n * evidence-sufficiency constraint. 0 when no axis produced observations. */\n minN: number\n /** Aggregate per-side cost from the gate context (a constraint input, not a\n * CI axis — see the module header). */\n cost: { candidate: number; baseline: number }\n}\n\n/** A promotion strategy: a pure function from the evidence vector to a verdict.\n * Many policies can run over the same `EvidenceVector` and disagree — that's\n * the point (competing strategies, shared evidence). */\nexport type PromotionPolicy = (ev: EvidenceVector) => GateResult\n\nexport interface BuildEvidenceVectorOptions {\n /** Minimum paired observations before an axis can claim significance; below\n * it the axis is `few_runs`. The exact small-sample test may require more\n * observations at the selected confidence. */\n minProductiveRuns?: number\n /** Confidence level for every axis bootstrap. Default 0.95. */\n confidence?: number\n /** Bootstrap resamples. Default 2000. */\n resamples?: number\n /** Fixed bootstrap seed for a deterministic, reproducible verdict. Default 1337. */\n seed?: number\n /** Paired statistic every axis CI is computed on. Default `'mean'` — see\n * {@link DECISION_PAIRED_DELTA_STATISTIC} for why the median is not. */\n statistic?: 'mean' | 'median'\n}\n\n/**\n * The Evidence Bus. For each objective, pair candidate vs baseline by full\n * cellId and bootstrap a CI on the good-direction paired delta. Reuses the\n * exact `pairHoldout` + `pairedBootstrap` machinery the held-out gate uses, so\n * a single source of truth governs pairing granularity + scale handling.\n */\nexport function buildEvidenceVector<TArtifact, TScenario extends Scenario>(\n ctx: GateContext<TArtifact, TScenario>,\n objectives: PromotionObjective[],\n opts: BuildEvidenceVectorOptions = {},\n): EvidenceVector {\n if (objectives.length === 0) {\n throw new Error('buildEvidenceVector: at least 1 objective required')\n }\n const confidence = opts.confidence ?? 0.95\n const resamples = opts.resamples ?? 2000\n const seed = opts.seed ?? 1337\n const baseline = ctx.baselineJudgeScores ?? ctx.judgeScores\n const scenarioIds = new Set(ctx.scenarios.map((s) => s.id))\n\n const axes: AxisEvidence[] = []\n for (const obj of objectives) {\n let select: (s: JudgeScore) => number | undefined\n if (obj.source.kind === 'composite') {\n select = (s) => s.composite\n } else {\n const dim = obj.source.dimension\n select = (s) => s.dimensions[dim]\n }\n const paired = pairHoldout(ctx.judgeScores, baseline, scenarioIds, select)\n // Orient to the good direction: maximize ⇒ bootstrap (candidate − baseline);\n // minimize ⇒ bootstrap (baseline − candidate) by swapping args, so a\n // positive bootstrap always reads as \"candidate better on this axis\".\n const before = obj.direction === 'maximize' ? paired.before : paired.after\n const after = obj.direction === 'maximize' ? paired.after : paired.before\n const n = paired.before.length\n const binaryScale = obj.binaryScale\n const floorTolerance =\n obj.floorTolerance ?? 0.05 * (binaryScale ?? detectScale([...paired.before, ...paired.after]))\n const gainThreshold = obj.gainThreshold ?? 0\n // Axes are decided on the MEAN paired delta — which for a pass/fail axis is\n // exactly the change in success rate. The median is structurally blind on\n // the shapes eval data lands in: with most pairs tied its bootstrap CI\n // collapses to [0,0] and the axis reads 'flat', hiding real gains AND real\n // regressions — pass/fail axes on ANY encoding ({0,1} and the 0-100 one\n // `detectScale` exists for), and low-cardinality axes even below half ties.\n // Orthogonal to `pairedDeltaTest`'s own small-sample switch: that picks the\n // TEST (bootstrap CI at n ≥ 20, exact sign test below), this picks the\n // ESTIMATOR the test is applied to. Both are needed — an exact sign test on\n // a tie-pinned median is still blind.\n const bootstrapStatistic = opts.statistic ?? DECISION_PAIRED_DELTA_STATISTIC\n // Both burdens of proof route through the ONE shared rule\n // (`decidePairedPromotion`), so a pass/fail axis is judged on Tango's score\n // interval — the only paired-binary construction valid at the nonzero\n // margins `gainThreshold` / `floorTolerance` create — and a zero-width\n // interval cannot buy a verdict in either direction.\n const improvement = decidePairedPromotion(before, after, {\n confidence,\n resamples,\n statistic: bootstrapStatistic,\n seed,\n threshold: gainThreshold,\n minPairs: opts.minProductiveRuns,\n binaryScale,\n })\n const regression = decidePairedPromotion(after, before, {\n confidence,\n resamples,\n statistic: bootstrapStatistic,\n seed,\n threshold: floorTolerance,\n minPairs: opts.minProductiveRuns,\n binaryScale,\n })\n const bootstrap =\n improvement.bootstrap ??\n pairedBootstrap(before, after, {\n confidence,\n resamples,\n statistic: bootstrapStatistic,\n seed,\n })\n // A floor breach fires on EITHER burden of proof, because they cover\n // different failures and the floor is the anti-Goodhart guard:\n // - `improvement.low < -floorTolerance` — the CREDIBLE WORST CASE exceeds\n // the tolerance. This is the contract `AxisEvidence.floorTolerance` and\n // `paretoPolicy`'s own reason string state, and it is the conservative\n // posture a safety axis needs: block unless the data can rule the\n // breach out, rather than waiting for the breach to be proven. Read off\n // the DECIDING interval, so a pass/fail axis is not screened by a\n // bootstrap that is pinned wherever ties dominate.\n // - `regression.promote` — a PROVEN drop past the tolerance. Adds the\n // small-sample path, where the decision is an exact sign test because\n // the bootstrap interval is descriptive only.\n // A tied binary axis still has uncertainty about unseen discordant pairs.\n // Its diagnostic bootstrap collapses to zero, so only the deciding score\n // interval can establish that a regression stays within the declared floor.\n const floorBreached = improvement.low < -floorTolerance || regression.promote\n // Floor check precedes the gain check: a credible regression must never be\n // masked as \"improved\". With the defaults (gainThreshold 0, positive floor)\n // the regions are disjoint and order is moot, but a consumer who sets a\n // negative gainThreshold (\"accept small dips\") could otherwise have a real\n // floor breach classified as a gain — anti-Goodhart wins the tie.\n const verdict: AxisVerdict = !improvement.sufficient\n ? 'few_runs'\n : improvement.indeterminate\n ? 'indeterminate'\n : floorBreached\n ? 'regressed'\n : improvement.promote\n ? 'improved'\n : 'flat'\n axes.push({\n name: obj.name,\n source: obj.source,\n direction: obj.direction,\n bootstrap,\n bootstrapStatistic,\n ci: { low: improvement.low, high: improvement.high },\n decisionStatistic: improvement.statistic,\n mcnemar: improvement.mcnemar,\n indeterminate: improvement.indeterminate,\n n,\n minimumRequired: improvement.minimumPairs,\n decisionMethod: improvement.method,\n gainThreshold,\n floorTolerance,\n verdict,\n })\n }\n const ns = axes.map((a) => a.n).filter((n) => n > 0)\n const minN = ns.length > 0 ? Math.min(...ns) : 0\n return { axes, minN, cost: { candidate: ctx.cost.candidate, baseline: ctx.cost.baseline } }\n}\n\n/**\n * Require a supported gain and every configured regression floor to clear.\n * A failed floor holds the candidate, including when uncertainty permits a loss.\n * Missing or indeterminate evidence requires more work; no gain holds release.\n */\nexport const paretoPolicy: PromotionPolicy = (ev) => {\n const contributingGates = ev.axes.map((ax) => ({\n name: `objective:${ax.name}`,\n status:\n ax.verdict === 'regressed'\n ? ('fail' as const)\n : ax.verdict === 'few_runs' || ax.verdict === 'indeterminate'\n ? ('not_evaluated' as const)\n : ('pass' as const),\n detail: {\n direction: ax.direction,\n source: ax.source,\n verdict: ax.verdict,\n n: ax.n,\n deltaMedian: ax.bootstrap.median,\n ciLow: ax.ci.low,\n ciHigh: ax.ci.high,\n decisionStatistic: ax.decisionStatistic,\n decisionMethod: ax.decisionMethod,\n mcnemar: ax.mcnemar,\n indeterminate: ax.indeterminate,\n bootstrapCiLow: ax.bootstrap.low,\n bootstrapCiHigh: ax.bootstrap.high,\n confidence: ax.bootstrap.confidence,\n gainThreshold: ax.gainThreshold,\n floorTolerance: ax.floorTolerance,\n },\n }))\n\n const regressed = ev.axes.filter((a) => a.verdict === 'regressed')\n const insufficient = ev.axes.filter(\n (a) => a.verdict === 'few_runs' || a.verdict === 'indeterminate',\n )\n const improved = ev.axes.filter((a) => a.verdict === 'improved')\n\n let decision: GateDecision\n const reasons: string[] = []\n if (regressed.length > 0) {\n // A gain on another axis cannot excuse an unresolved regression floor.\n decision = 'hold'\n for (const a of regressed) {\n reasons.push(\n `objective '${a.name}' did not clear its regression floor -${a.floorTolerance}: good-direction CI [${a.ci.low.toFixed(3)}, ${a.ci.high.toFixed(3)}] (n=${a.n})`,\n )\n }\n } else if (insufficient.length > 0) {\n // An unresolved axis cannot establish either a gain or a safe floor.\n decision = 'need_more_work'\n for (const a of insufficient) {\n reasons.push(\n a.verdict === 'few_runs'\n ? `objective '${a.name}' has only n=${a.n} paired runs — insufficient evidence to claim significance`\n : `objective '${a.name}' has an indeterminate deciding CI [${a.ci.low}, ${a.ci.high}] — insufficient evidence to clear its regression floor (n=${a.n})`,\n )\n }\n } else if (improved.length > 0) {\n decision = 'ship'\n reasons.push(\n `Supported objective gain: ${improved\n .map(\n (a) =>\n `'${a.name}' +${a.ci.low > 0 ? a.ci.low.toFixed(3) : a.bootstrap.mean.toFixed(3)} (CI.low ${a.ci.low.toFixed(3)})`,\n )\n .join(', ')}; every regression floor cleared`,\n )\n } else {\n // Every floor cleared, but no objective demonstrated a significant gain.\n decision = 'hold'\n reasons.push(\n 'no Pareto improvement: no objective shows a significant gain; every regression floor cleared',\n )\n }\n\n // `delta` surfaces the composite axis if present, else the first axis — a\n // single convenience scalar; the vector lives in `contributingGates`.\n const composite = ev.axes.find((a) => a.source.kind === 'composite') ?? ev.axes[0]\n return { decision, reasons, contributingGates, delta: composite?.bootstrap.median }\n}\n\nexport interface ParetoSignificanceGateOptions extends BuildEvidenceVectorOptions {\n /** The objective vector. Every axis is both a gain source and a safety floor. */\n objectives: PromotionObjective[]\n /** Strategy applied to the evidence vector. Default `paretoPolicy`. Override\n * to run a stricter/looser strategy over the SAME bus (competing policies). */\n policy?: PromotionPolicy\n /** Override the gate name in reports. */\n name?: string\n}\n\n/**\n * Wrap the bus + a policy as a `Gate`. Plugs into the existing\n * `runImprovementLoop({ gate })` slot and composes via `composeGate`; default\n * loop behavior is unchanged because consumers opt in by passing this gate.\n */\nexport function paretoSignificanceGate<TArtifact = unknown, TScenario extends Scenario = Scenario>(\n options: ParetoSignificanceGateOptions,\n): Gate<TArtifact, TScenario> {\n if (options.objectives.length === 0) {\n throw new Error('paretoSignificanceGate: at least 1 objective required')\n }\n const policy = options.policy ?? paretoPolicy\n return {\n name: options.name ?? 'paretoSignificanceGate',\n async decide(ctx: GateContext<TArtifact, TScenario>): Promise<GateResult> {\n const ev = buildEvidenceVector(ctx, options.objectives, options)\n return policy(ev)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkIA,SAAgB,oBACd,KACA,YACA,OAAmC,CAAC,GACpB;CAChB,IAAI,WAAW,WAAW,GACxB,MAAM,IAAI,MAAM,oDAAoD;CAEtE,MAAM,aAAa,KAAK,cAAc;CACtC,MAAM,YAAY,KAAK,aAAa;CACpC,MAAM,OAAO,KAAK,QAAQ;CAC1B,MAAM,WAAW,IAAI,uBAAuB,IAAI;CAChD,MAAM,cAAc,IAAI,IAAI,IAAI,UAAU,KAAK,MAAM,EAAE,EAAE,CAAC;CAE1D,MAAM,OAAuB,CAAC;CAC9B,KAAK,MAAM,OAAO,YAAY;EAC5B,IAAI;EACJ,IAAI,IAAI,OAAO,SAAS,aACtB,UAAU,MAAM,EAAE;OACb;GACL,MAAM,MAAM,IAAI,OAAO;GACvB,UAAU,MAAM,EAAE,WAAW;EAC/B;EACA,MAAM,SAAS,YAAY,IAAI,aAAa,UAAU,aAAa,MAAM;EAIzE,MAAM,SAAS,IAAI,cAAc,aAAa,OAAO,SAAS,OAAO;EACrE,MAAM,QAAQ,IAAI,cAAc,aAAa,OAAO,QAAQ,OAAO;EACnE,MAAM,IAAI,OAAO,OAAO;EACxB,MAAM,cAAc,IAAI;EACxB,MAAM,iBACJ,IAAI,kBAAkB,OAAQ,eAAe,YAAY,CAAC,GAAG,OAAO,QAAQ,GAAG,OAAO,KAAK,CAAC;EAC9F,MAAM,gBAAgB,IAAI,iBAAiB;EAW3C,MAAM,qBAAqB,KAAK,aAAA;EAMhC,MAAM,cAAc,sBAAsB,QAAQ,OAAO;GACvD;GACA;GACA,WAAW;GACX;GACA,WAAW;GACX,UAAU,KAAK;GACf;EACF,CAAC;EACD,MAAM,aA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AM,YAAY,GAAG,KAAK,MAAM,MAAM,EAAE,OAAO,SAAS,WAAW,KAAK,GAAG,KAAK;CAChF,OAAO;EAAE;EAAU;EAAS;EAAmB,OAAO,WAAW,UAAU;CAAO;AACpF;;;;;;AAiBA,SAAgB,uBACd,SAC4B;CAC5B,IAAI,QAAQ,WAAW,WAAW,GAChC,MAAM,IAAI,MAAM,uDAAuD;CAEzE,MAAM,SAAS,QAAQ,UAAU;CACjC,OAAO;EACL,MAAM,QAAQ,QAAQ;EACtB,MAAM,OAAO,KAA6D;GACxE,MAAM,KAAK,oBAAoB,KAAK,QAAQ,YAAY,OAAO;GAC/D,OAAO,OAAO,EAAE;EAClB;CACF;AACF"}
package/dist/reporting.js CHANGED
@@ -1,7 +1,7 @@
1
- import { o as benjaminiHochberg } from "./power-and-mde-BJOpt6pq.js";
2
- import { l as wilcoxonSignedRank } from "./paired-arms-JSDcs2zx.js";
1
+ import { t as benjaminiHochberg } from "./multiplicity-D9cjmStq.js";
3
2
  import { r as pairedBootstrap } from "./paired-tests-C8iCsioC.js";
4
- import { a as summaryTable, i as researchReport, n as gainHistogram, r as paretoChart, t as RESEARCH_REPORT_HARD_PAIR_FLOOR } from "./summary-report-BMvou2oZ.js";
3
+ import { l as wilcoxonSignedRank } from "./paired-arms-DKZFVPt8.js";
4
+ import { a as summaryTable, i as researchReport, n as gainHistogram, r as paretoChart, t as RESEARCH_REPORT_HARD_PAIR_FLOOR } from "./summary-report-BeYnvddy.js";
5
5
  import { n as pairedEvalueSequence, t as evaluateInterimReleaseConfidence } from "./sequential-CzK5DarL.js";
6
6
  import { i as judgeReplayGate, n as evaluateReleaseConfidence, r as bootstrapCi, t as assertReleaseConfidence } from "./release-confidence-XQm_xjhR.js";
7
7
  import { t as rubricPredictiveValidity } from "./rubric-predictive-validity-CCK-1B7w.js";
package/dist/rl.d.ts CHANGED
@@ -4,7 +4,7 @@ import { a as PairedPromotionDecision, d as PairedBootstrapResult } from "./pair
4
4
  import { s as TraceStore } from "./store-C4avFjIi.js";
5
5
  import { a as MintedRolloutLine, t as ChatMessage, y as RolloutSplit } from "./schema-B5LtYvn9.js";
6
6
  import { t as MintRolloutOptions } from "./mint-C9Lojt1V.js";
7
- import { a as CampaignResult } from "./types-B2673PBj.js";
7
+ import { a as CampaignResult } from "./types-EBUav9Bu.js";
8
8
  import { s as VerificationReport } from "./multi-layer-verifier-BUaQ4C17.js";
9
9
  import { a as detectRewardHacking, c as VerifiableRewardSource, d as filterDeterministicallyRewarded, i as RewardHackingSignal, l as extractVerifiableReward, n as RewardHackingFinding, o as VerifiableReward, r as RewardHackingReport, s as VerifiableRewardExtractionOptions, t as DetectRewardHackingInput, u as extractVerifiableRewardsFromRecords } from "./reward-hacking-Cyk-QHk9.js";
10
10
  import { i as InMemoryOutcomeStore, n as FileSystemOutcomeStore, o as OutcomeStore, r as FileSystemOutcomeStoreOptions, t as DeploymentOutcome } from "./outcome-store-CNt4iZ67.js";
@@ -14,13 +14,26 @@ import { a as SteeringChange, f as EvalCampaignOptions, h as runEvalCampaign, i
14
14
  import { o as TrainingExportOptions } from "./exporters-XMCYJlqT.js";
15
15
  import { a as RubricPredictiveValidityReport, t as OutcomeMetricSpec } from "./rubric-predictive-validity-DIUwJJ9Y.js";
16
16
  //#region src/rl/active-curriculum.d.ts
17
+ /**
18
+ * Adaptive curriculum: active scenario selection by variance.
19
+ *
20
+ * Fixed scenario sets waste sample budget on cells whose outcome is already
21
+ * settled. `varianceBasedCurriculum` scores each (variant, scenario) cell by
22
+ * the empirical variance of past observations and allocates the next round's
23
+ * budget toward the noisy and under-sampled cells. The output is a next-round
24
+ * allocation, a list of (variant, scenario, count) triples, which the
25
+ * consumer runs and feeds back.
26
+ *
27
+ * Choosing which search node to expand is not a curriculum; it belongs to the
28
+ * search policy (`aide` draws parents by Thompson sampling over each node's
29
+ * posterior, in `campaign/search-policy.ts`). Scenario generation belongs to
30
+ * the adversarial primitive.
31
+ */
17
32
  interface CellObservation {
18
33
  variantId: string;
19
34
  scenarioId: string;
20
35
  /** Observed score in [0, 1]. */
21
36
  score: number;
22
- /** For Bernoulli arms — derive from the score with a threshold if needed. */
23
- pass?: boolean;
24
37
  }
25
38
  interface CurriculumAllocation {
26
39
  variantId: string;
@@ -56,41 +69,6 @@ declare function varianceBasedCurriculum(observations: CellObservation[], candid
56
69
  variantId: string;
57
70
  scenarioId: string;
58
71
  }>, opts: VarianceCurriculumOptions): CurriculumAllocation[];
59
- interface ThompsonCurriculumOptions {
60
- budget: number;
61
- /**
62
- * The per-scenario decision threshold. Cells whose posterior mean is
63
- * closest to this get the most budget — that's where the next observation
64
- * has the highest information value for the gate decision. Default 0.5.
65
- */
66
- decisionThreshold?: number;
67
- /** Beta prior parameters. Default α=β=1 (uniform). */
68
- priorAlpha?: number;
69
- priorBeta?: number;
70
- /** Seed the Thompson sampler. Absent, the seed is derived from the observed
71
- * scores, so the same observations reproduce the same allocation. */
72
- seed?: number;
73
- }
74
- /**
75
- * Thompson-sampling-style allocation for pass/fail cells. For each cell:
76
- *
77
- * - Maintain Beta(α + passes, β + failures) posterior on pass-rate
78
- * - Allocation weight ∝ exp(-((sampledMean - threshold) / σ)^2):
79
- * cells whose sampled posterior straddles the decision boundary get
80
- * the most weight; cells already clearly above or below get less.
81
- *
82
- * This is the right primitive when promotion gates fire at a known
83
- * threshold and you want to sharpen the posterior near the boundary.
84
- */
85
- declare function thompsonCurriculum(observations: CellObservation[], candidateCells: Array<{
86
- variantId: string;
87
- scenarioId: string;
88
- }>, opts: ThompsonCurriculumOptions): CurriculumAllocation[];
89
- /** Convenience: extract `CellObservation[]` directly from `RunRecord[]`. */
90
- declare function observationsFromRunRecords(runs: RunRecord[], opts?: {
91
- passThreshold?: number;
92
- useHoldout?: boolean;
93
- }): CellObservation[];
94
72
  //#endregion
95
73
  //#region src/rl/adaptation-eval.d.ts
96
74
  interface AdaptationRunner<S> {
@@ -1815,5 +1793,5 @@ interface VerifiedFindingsDataset {
1815
1793
  */
1816
1794
  declare function loadVerifiedFindingsDataset(source: VerifiedFindingsSource): VerifiedFindingsDataset;
1817
1795
  //#endregion
1818
- export { ABSENT_CATEGORY, AdaptationCurve, AdaptationPoint, AdaptationRunner, AdapterContext, AdversarialMutation, BehaviorFeatures, BradleyTerryFit, BradleyTerryRating, BuildPairwiseFromCampaignInput, BuildVerifiedFindingRowArgs, CaseVerdictDetail, CellObservation, CompareCurvesResult, ComputeBestOfNOptions, ComputeBestOfNResult, ComputeCurve, ComputeCurveBudget, ComputeCurvePoint, ContaminationProbeInput, ContaminationProbeOptions, ContaminationProbeReport, CorpusAppendResult, CorpusRecord, CurriculumAllocation, DatasetFormat, type DeploymentOutcome, DetectRewardHackingInput, DpoExportRow, DpoLineContext, DpoLookups, EasyModeOptions, EasyModeReport, EloOptions, ExtractPreferencesOptions, ExtractStepRewardsOptions, FeatureDivergence, FeatureShift, FidelityReport, FidelityVerdict, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, FixOutcome, GoldLabelEntry, GrpoExportRow, GrpoLookups, HarvestOptions, InMemoryOutcomeStore, NormalizedStep, OffPolicyContributionCounts, OffPolicyEstimate, OffPolicyOptions, OffPolicyTrajectory, type OutcomeStore, PairedDeltaCoverage, PairwiseOutcome, ParetoPointInput, PredictiveValidityResearcher, PredictiveValidityResearcherOptions, PreferenceExtractionReport, PreferenceStrategy, PreferenceTriple, PrefixDivergence, PrmExportRow, PrmLineContext, PrmLookups, PrmTrainingTriple, RLCampaignResult, ReplayBatchCase, ReplayBatchFix, ReplayBatchReport, RewardHackingFinding, RewardHackingReport, RewardHackingSignal, RewardKind, RewardStats, RlDatasetBundle, RlDatasetConfig, RlDatasetManifest, RlDatasetStats, type RolloutLineContext, RunAdaptationCurveOptions, RunComputeCurveOptions, RunRLCampaignOptions, RunwiseStepSummary, ScenarioPerturbation, ScenarioPerturbationKind, SelfConsistencyOptions, SelfConsistencyResult, SftExportRow, SftLookups, SimFidelityOptions, StepReward, StepRewardJsonlRow, StepScorer, ThompsonCurriculumOptions, TrainingLineSelectionOptions, TrajectoryStep, VERIFIED_FINDING_SCHEMA, VarianceCurriculumOptions, VerifiableReward, VerifiableRewardExtractionOptions, VerifiableRewardSource, VerifiedFindingFix, VerifiedFindingRow, VerifiedFindingsCorpusSource, VerifiedFindingsDataset, VerifiedFindingsSource, VerifiedFindingsSummary, appendToCorpus, applyEloUpdate, bestOfN, bucketLabel, buildDatasetFromCorpus, buildPairwiseFromCampaign, buildRlDataset, buildVerifiedFindingRow, campaignToRunRecords, compareAdaptationCurves, datasheetToMarkdown, defaultBehaviorFeatures, detectRewardHacking, doublyRobust, easyModeCheck, extractPreferences, extractStepRewards, extractVerifiableReward, extractVerifiableRewardsFromRecords, filterDeterministicallyRewarded, firstPassK, fitBradleyTerry, injectIrrelevantClause, inverseProbabilityWeighting, jsDivergence, loadVerifiedFindingsDataset, observationsFromRunRecords, offPolicyEstimateAll, paretoFrontier, prmTrainingPairs, quantileEdges, readCorpus, renameVariables, runAdaptationCurve, runComputeCurve, runContaminationProbe, runEvalCampaign, runRLCampaign, runwiseStepRewardSummary, selfConsistency, selfNormalizedImportanceWeighting, shuffleOrder, simFidelityReport, stepRewardsToJsonl, summarizeVerifiedFindings, thompsonCurriculum, toAnthropicFormat, toDpoJsonl, toDpoRows, toGrpoJsonl, toGrpoRows, toPrmJsonl, toPrmRows, toSftJsonl, toSftRows, toTRLFormat, validateDatasetFormats, varianceBasedCurriculum, verificationReportToRunRecord, verifiedFindingsToJsonl };
1796
+ export { ABSENT_CATEGORY, AdaptationCurve, AdaptationPoint, AdaptationRunner, AdapterContext, AdversarialMutation, BehaviorFeatures, BradleyTerryFit, BradleyTerryRating, BuildPairwiseFromCampaignInput, BuildVerifiedFindingRowArgs, CaseVerdictDetail, CellObservation, CompareCurvesResult, ComputeBestOfNOptions, ComputeBestOfNResult, ComputeCurve, ComputeCurveBudget, ComputeCurvePoint, ContaminationProbeInput, ContaminationProbeOptions, ContaminationProbeReport, CorpusAppendResult, CorpusRecord, CurriculumAllocation, DatasetFormat, type DeploymentOutcome, DetectRewardHackingInput, DpoExportRow, DpoLineContext, DpoLookups, EasyModeOptions, EasyModeReport, EloOptions, ExtractPreferencesOptions, ExtractStepRewardsOptions, FeatureDivergence, FeatureShift, FidelityReport, FidelityVerdict, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, FixOutcome, GoldLabelEntry, GrpoExportRow, GrpoLookups, HarvestOptions, InMemoryOutcomeStore, NormalizedStep, OffPolicyContributionCounts, OffPolicyEstimate, OffPolicyOptions, OffPolicyTrajectory, type OutcomeStore, PairedDeltaCoverage, PairwiseOutcome, ParetoPointInput, PredictiveValidityResearcher, PredictiveValidityResearcherOptions, PreferenceExtractionReport, PreferenceStrategy, PreferenceTriple, PrefixDivergence, PrmExportRow, PrmLineContext, PrmLookups, PrmTrainingTriple, RLCampaignResult, ReplayBatchCase, ReplayBatchFix, ReplayBatchReport, RewardHackingFinding, RewardHackingReport, RewardHackingSignal, RewardKind, RewardStats, RlDatasetBundle, RlDatasetConfig, RlDatasetManifest, RlDatasetStats, type RolloutLineContext, RunAdaptationCurveOptions, RunComputeCurveOptions, RunRLCampaignOptions, RunwiseStepSummary, ScenarioPerturbation, ScenarioPerturbationKind, SelfConsistencyOptions, SelfConsistencyResult, SftExportRow, SftLookups, SimFidelityOptions, StepReward, StepRewardJsonlRow, StepScorer, TrainingLineSelectionOptions, TrajectoryStep, VERIFIED_FINDING_SCHEMA, VarianceCurriculumOptions, VerifiableReward, VerifiableRewardExtractionOptions, VerifiableRewardSource, VerifiedFindingFix, VerifiedFindingRow, VerifiedFindingsCorpusSource, VerifiedFindingsDataset, VerifiedFindingsSource, VerifiedFindingsSummary, appendToCorpus, applyEloUpdate, bestOfN, bucketLabel, buildDatasetFromCorpus, buildPairwiseFromCampaign, buildRlDataset, buildVerifiedFindingRow, campaignToRunRecords, compareAdaptationCurves, datasheetToMarkdown, defaultBehaviorFeatures, detectRewardHacking, doublyRobust, easyModeCheck, extractPreferences, extractStepRewards, extractVerifiableReward, extractVerifiableRewardsFromRecords, filterDeterministicallyRewarded, firstPassK, fitBradleyTerry, injectIrrelevantClause, inverseProbabilityWeighting, jsDivergence, loadVerifiedFindingsDataset, offPolicyEstimateAll, paretoFrontier, prmTrainingPairs, quantileEdges, readCorpus, renameVariables, runAdaptationCurve, runComputeCurve, runContaminationProbe, runEvalCampaign, runRLCampaign, runwiseStepRewardSummary, selfConsistency, selfNormalizedImportanceWeighting, shuffleOrder, simFidelityReport, stepRewardsToJsonl, summarizeVerifiedFindings, toAnthropicFormat, toDpoJsonl, toDpoRows, toGrpoJsonl, toGrpoRows, toPrmJsonl, toPrmRows, toSftJsonl, toSftRows, toTRLFormat, validateDatasetFormats, varianceBasedCurriculum, verificationReportToRunRecord, verifiedFindingsToJsonl };
1819
1797
  //# sourceMappingURL=rl.d.ts.map
package/dist/rl.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rl.d.ts","names":[],"sources":["../src/rl/active-curriculum.ts","../src/rl/adaptation-eval.ts","../src/rl/compute-curves.ts","../src/rl/contamination.ts","../src/rl/rollout-input.ts","../src/rl/preferences.ts","../src/rl/process-reward.ts","../src/rl/exporters.ts","../src/rl/dataset.ts","../src/rl/corpus.ts","../src/rl/off-policy.ts","../src/rl/predictive-validity-researcher.ts","../src/rl/rl-campaign.ts","../src/rl/run-record-adapters.ts","../src/rl/sim-fidelity.ts","../src/rl/tournament.ts","../src/rl/verified-findings-dataset.ts"],"mappings":";;;;;;;;;;;;;;;;UAqCiB;EACf;EACA;;EAEA;;EAEA;;UAGe;EACf;EACA;;EAEA;;EAEA;;UAGe;;EAEf;;;;;;EAMA;;;;;EAKA;;;;;;;;;iBAUc,wBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;UAoDc;EACf;;;;;;EAMA;;EAEA;EACA;;;EAGA;;;;;;;;;;;;;iBAcc,mBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;;iB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A;EACA;EACA;;UAGe;EACf;EACA,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;IAAQ;IAAkB;;;;UAI7B;EACf;EACA;EACA;;UAGe;EACf;;;EAGA;;EAEA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA,mBAAmB;EACnB;EACA;IAAU;IAAyB;;;UAKpB;EACf;EACA;EACA;;EAEA;EACA;;KAGU;UAEK;EACf,SAAS;EACT;EACA;EACA;EACA;;UAGe;EACf,eAAe;;EAEf;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;;IAEE;;IAEA;;IAEA;;IAEA;IACA;;;EAGF;IACE;MAAU;MAAe;;IACzB,OAAO;;EAET;IACE;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;;;IAGA;IACA,wBAAwB;IACxB;IACA;IACA;IACA;;EAEF,KAAK;EACL;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;UAIa;EACf;EACA;;;;EAIA;EACA,KAAK,OAAO;EACZ,UAAU;IAAiB;IAAc;IAAoB;;;UAO9C;EACf,WAAW;EACX,OAAO;EACP,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;;;;;;iBAiEc,wBAAwB,MAAM,8BAA8B;iBA8I5D,0BAA0B,MAAM,uBAAuB;iBAwBvD,wBAAwB,MAAM;UAM7B;EACf;;EAEA;;UAGe;EACf;;EAEA;;EAEA,SAAS,eAAe;;EAExB;EACA;;UAGe;EACf,MAAM;EACN,SAAS;EACT;IACE;IACA;IACA;IACA;IACA,SAAS;MAAiB;MAAoB;MAAsB;;;;;;;;;iBAuExD,4BACd,QAAQ,yBACP"}
1
+ {"version":3,"file":"rl.d.ts","names":[],"sources":["../src/rl/active-curriculum.ts","../src/rl/adaptation-eval.ts","../src/rl/compute-curves.ts","../src/rl/contamination.ts","../src/rl/rollout-input.ts","../src/rl/preferences.ts","../src/rl/process-reward.ts","../src/rl/exporters.ts","../src/rl/dataset.ts","../src/rl/corpus.ts","../src/rl/off-policy.ts","../src/rl/predictive-validity-researcher.ts","../src/rl/rl-campaign.ts","../src/rl/run-record-adapters.ts","../src/rl/sim-fidelity.ts","../src/rl/tournament.ts","../src/rl/verified-findings-dataset.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgBiB;EACf;EACA;;EAEA;;UAGe;EACf;EACA;;EAEA;;EAEA;;UAGe;;EAEf;;;;;;EAMA;;;;;EAKA;;;;;;;;;iBAUc,wBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;;;UC9Cc,iBAAiB;;;;;;EAMhC,IAAI;IAAQ,UAAU;IAAG;IAAW;MAAgB;;UAGrC,0BAA0B;EACzC,WAAW;;EAEX;;EAEA;EACA,QAAQ,iBAAiB;;EAEzB;;UAGe;EACf;EACA;EACA;EACA;EACA;;EAEA,aAAa;IAAQ;IAAoB;IAAmB;IAAgB;;;UAG7D;EACf,QAAQ;;;;;EAKR;;;;;EAKA;;iBAGoB,mBAAmB;EAAY;GACnD,MAAM,0BAA0B,KAC/B,QAAQ;UAmEM;EACf,MAAM;IACJ;;IAEA,OAAO;;;EAGT,WAAW;;EAEX,cAAc;EACd,cAAc;;EAEd;;EAEA;;EAEA;;;;;;;;;iBAUc,wBACd,GAAG,iBACH,GAAG,iBACH;EACE;EACA;EACA;;EAEA;IAED;;iBA0Ea,WAAW,OAAO,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC3MlC;;EAEf;;EAEA;;EAEA,OAAO;;UAGQ;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA,UAAU;;UAGK;EACf;EACA,QAAQ;;EAER;;EAEA,MAAM;;UAGS;EACf;EACA,SAAS;;;;;EAKT,cAAc,QAAQ,uBAAuB;IAC3C;IACA;IACA;IACA,UAAU;;;iBAIQ,gBAAgB,MAAM,yBAAyB,QAAQ;UAmB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;;;;;;;UA+Gc;;EAEf;;EAEA;;iBAGc,eACd,SAAS,qBACT,SAAS,iBACT,OAAM;EACH;EAAqB;;;;;;;;UA2BT;EACf,MAAM;IACJ;;IAEA;IACA;;;;;;EAMF;;iBAGc,0BACd,OAAO,iCACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC/MU;;UAKI;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA,KAAK;EACL;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;IAAQ;IAAkB;;;;UAI7B;EACf;EACA;EACA;;UAGe;EACf;;;EAGA;;EAEA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA,mBAAmB;EACnB;EACA;IAAU;IAAyB;;;UAKpB;EACf;EACA;EACA;;EAEA;EACA;;KAGU;UAEK;EACf,SAAS;EACT;EACA;EACA;EACA;;UAGe;EACf,eAAe;;EAEf;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;;IAEE;;IAEA;;IAEA;;IAEA;IACA;;;EAGF;IACE;MAAU;MAAe;;IACzB,OAAO;;EAET;IACE;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;;;IAGA;IACA,wBAAwB;IACxB;IACA;IACA;IACA;;EAEF,KAAK;EACL;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;UAIa;EACf;EACA;;;;EAIA;EACA,KAAK,OAAO;EACZ,UAAU;IAAiB;IAAc;IAAoB;;;UAO9C;EACf,WAAW;EACX,OAAO;EACP,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;;;;;;iBAiEc,wBAAwB,MAAM,8BAA8B;iBA8I5D,0BAA0B,MAAM,uBAAuB;iBAwBvD,wBAAwB,MAAM;UAM7B;EACf;;EAEA;;UAGe;EACf;;EAEA;;EAEA,SAAS,eAAe;;EAExB;EACA;;UAGe;EACf,MAAM;EACN,SAAS;EACT;IACE;IACA;IACA;IACA;IACA,SAAS;MAAiB;MAAoB;MAAsB;;;;;;;;;iBAuExD,4BACd,QAAQ,yBACP"}
package/dist/rl.js CHANGED
@@ -2,21 +2,21 @@ import { s as ValidationError } from "./errors-Dngq5h35.js";
2
2
  import { i as compareCodeUnits } from "./canonical-BsZVgBhW.js";
3
3
  import { a as medianInPlace } from "./internal-BMFSR8Ns.js";
4
4
  import { t as mulberry32 } from "./random-Dn5fPWkt.js";
5
- import { l as wilcoxonSignedRank } from "./paired-arms-JSDcs2zx.js";
6
5
  import { r as pairedBootstrap } from "./paired-tests-C8iCsioC.js";
7
- import { t as decidePairedPromotion } from "./paired-promotion-decision-DTKl6-G8.js";
6
+ import { l as wilcoxonSignedRank } from "./paired-arms-DKZFVPt8.js";
7
+ import { t as decidePairedPromotion } from "./paired-promotion-decision-D5B1Cxc2.js";
8
8
  import { r as observedSplitScore, s as trainingScore } from "./reward-nw2xZGZG.js";
9
9
  import { c as runTaskScore } from "./run-record-BRlM99rX.js";
10
10
  import { n as campaignCellToRunRecord } from "./run-record-tNnlQIrD.js";
11
11
  import { i as filterDeterministicallyRewarded, n as extractVerifiableReward, r as extractVerifiableRewardsFromRecords, t as detectRewardHacking } from "./reward-hacking-D0XwhVWE.js";
12
12
  import { n as InMemoryTraceStore } from "./store-DNe_Uv1Q.js";
13
- import { t as runEvalCampaign } from "./eval-campaign-CXT2WYUe.js";
13
+ import { t as runEvalCampaign } from "./eval-campaign-GapmPHIA.js";
14
14
  import { s as assertRewardGate } from "./schema-C1aaAxTf.js";
15
15
  import { n as isTrainingLineEligible, s as toSftRows$1, t as isSplitEligible } from "./exporters-DEcXbvgO.js";
16
16
  import { t as mintRolloutRows } from "./mint-iCD-W43s.js";
17
17
  import { t as evaluateInterimReleaseConfidence } from "./sequential-CzK5DarL.js";
18
18
  import { n as assertUniqueObservationIds, s as validateOutcomeMetricSpecifications, t as rubricPredictiveValidity } from "./rubric-predictive-validity-CCK-1B7w.js";
19
- import { n as thompsonCurriculum, r as varianceBasedCurriculum, t as observationsFromRunRecords } from "./active-curriculum-OjIWgrUJ.js";
19
+ import { t as varianceBasedCurriculum } from "./active-curriculum-B_Lc9kfO.js";
20
20
  import { n as InMemoryOutcomeStore, t as FileSystemOutcomeStore } from "./outcome-store-BXlkwMPR.js";
21
21
  import { createHash } from "node:crypto";
22
22
  import { appendFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
@@ -3138,6 +3138,6 @@ function loadVerifiedFindingsDataset(source) {
3138
3138
  };
3139
3139
  }
3140
3140
  //#endregion
3141
- export { ABSENT_CATEGORY, FileSystemOutcomeStore, InMemoryOutcomeStore, PredictiveValidityResearcher, VERIFIED_FINDING_SCHEMA, appendToCorpus, applyEloUpdate, bestOfN, bucketLabel, buildDatasetFromCorpus, buildPairwiseFromCampaign, buildRlDataset, buildVerifiedFindingRow, campaignToRunRecords, compareAdaptationCurves, datasheetToMarkdown, defaultBehaviorFeatures, detectRewardHacking, doublyRobust, easyModeCheck, extractPreferences, extractStepRewards, extractVerifiableReward, extractVerifiableRewardsFromRecords, filterDeterministicallyRewarded, firstPassK, fitBradleyTerry, injectIrrelevantClause, inverseProbabilityWeighting, jsDivergence, loadVerifiedFindingsDataset, observationsFromRunRecords, offPolicyEstimateAll, paretoFrontier, prmTrainingPairs, quantileEdges, readCorpus, renameVariables, runAdaptationCurve, runComputeCurve, runContaminationProbe, runEvalCampaign, runRLCampaign, runwiseStepRewardSummary, selfConsistency, selfNormalizedImportanceWeighting, shuffleOrder, simFidelityReport, stepRewardsToJsonl, summarizeVerifiedFindings, thompsonCurriculum, toAnthropicFormat, toDpoJsonl, toDpoRows, toGrpoJsonl, toGrpoRows, toPrmJsonl, toPrmRows, toSftJsonl, toSftRows, toTRLFormat, validateDatasetFormats, varianceBasedCurriculum, verificationReportToRunRecord, verifiedFindingsToJsonl };
3141
+ export { ABSENT_CATEGORY, FileSystemOutcomeStore, InMemoryOutcomeStore, PredictiveValidityResearcher, VERIFIED_FINDING_SCHEMA, appendToCorpus, applyEloUpdate, bestOfN, bucketLabel, buildDatasetFromCorpus, buildPairwiseFromCampaign, buildRlDataset, buildVerifiedFindingRow, campaignToRunRecords, compareAdaptationCurves, datasheetToMarkdown, defaultBehaviorFeatures, detectRewardHacking, doublyRobust, easyModeCheck, extractPreferences, extractStepRewards, extractVerifiableReward, extractVerifiableRewardsFromRecords, filterDeterministicallyRewarded, firstPassK, fitBradleyTerry, injectIrrelevantClause, inverseProbabilityWeighting, jsDivergence, loadVerifiedFindingsDataset, offPolicyEstimateAll, paretoFrontier, prmTrainingPairs, quantileEdges, readCorpus, renameVariables, runAdaptationCurve, runComputeCurve, runContaminationProbe, runEvalCampaign, runRLCampaign, runwiseStepRewardSummary, selfConsistency, selfNormalizedImportanceWeighting, shuffleOrder, simFidelityReport, stepRewardsToJsonl, summarizeVerifiedFindings, toAnthropicFormat, toDpoJsonl, toDpoRows, toGrpoJsonl, toGrpoRows, toPrmJsonl, toPrmRows, toSftJsonl, toSftRows, toTRLFormat, validateDatasetFormats, varianceBasedCurriculum, verificationReportToRunRecord, verifiedFindingsToJsonl };
3142
3142
 
3143
3143
  //# sourceMappingURL=rl.js.map