@tangle-network/agent-eval 0.129.0 → 0.130.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.
- package/CHANGELOG.md +21 -0
- package/README.md +2 -0
- package/dist/active-curriculum-C4mk67HP.js +214 -0
- package/dist/active-curriculum-C4mk67HP.js.map +1 -0
- package/dist/adversarial-smnADNFS.d.ts +21 -0
- package/dist/adversarial-smnADNFS.d.ts.map +1 -0
- package/dist/analyst/index.d.ts +81 -2872
- package/dist/analyst/index.d.ts.map +1 -0
- package/dist/analyst/index.js +319 -360
- package/dist/analyst/index.js.map +1 -1
- package/dist/analyst-BkTS3C58.d.ts +89 -0
- package/dist/analyst-BkTS3C58.d.ts.map +1 -0
- package/dist/analyst-LsnNpSkm.js +152 -0
- package/dist/analyst-LsnNpSkm.js.map +1 -0
- package/dist/analyze-runs-C1CavBMk.js +1067 -0
- package/dist/analyze-runs-C1CavBMk.js.map +1 -0
- package/dist/analyze-runs-FsgYCinh.d.ts +72 -0
- package/dist/analyze-runs-FsgYCinh.d.ts.map +1 -0
- package/dist/attribute-vocabulary-DLJ6303h.d.ts +54 -0
- package/dist/attribute-vocabulary-DLJ6303h.d.ts.map +1 -0
- package/dist/authenticity/index.d.ts +81 -79
- package/dist/authenticity/index.d.ts.map +1 -0
- package/dist/authenticity/index.js +209 -193
- package/dist/authenticity/index.js.map +1 -1
- package/dist/baseline-HsBvw_dk.js +550 -0
- package/dist/baseline-HsBvw_dk.js.map +1 -0
- package/dist/baseline-hG3K85h4.d.ts +125 -0
- package/dist/baseline-hG3K85h4.d.ts.map +1 -0
- package/dist/belief-state/index.d.ts +448 -1188
- package/dist/belief-state/index.d.ts.map +1 -0
- package/dist/belief-state/index.js +1617 -1709
- package/dist/belief-state/index.js.map +1 -1
- package/dist/benchmarks/index.d.ts +2 -891
- package/dist/benchmarks/index.js +2 -60
- package/dist/benchmarks-BJgDGkAD.js +754 -0
- package/dist/benchmarks-BJgDGkAD.js.map +1 -0
- package/dist/builder-eval/index.d.ts +150 -662
- package/dist/builder-eval/index.d.ts.map +1 -0
- package/dist/builder-eval/index.js +356 -345
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/calibration-CNWWA6K8.js +94 -0
- package/dist/calibration-CNWWA6K8.js.map +1 -0
- package/dist/campaign/index.d.ts +5 -6381
- package/dist/campaign/index.js +3 -213
- package/dist/campaign-aKJt6emI.js +3886 -0
- package/dist/campaign-aKJt6emI.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +164 -175
- package/dist/cli.js.map +1 -1
- package/dist/client-C97NMzqi.d.ts +581 -0
- package/dist/client-C97NMzqi.d.ts.map +1 -0
- package/dist/client-CYzbdJOZ.js +637 -0
- package/dist/client-CYzbdJOZ.js.map +1 -0
- package/dist/code-agent-session-BjkMTQ7H.js +1390 -0
- package/dist/code-agent-session-BjkMTQ7H.js.map +1 -0
- package/dist/code-agent-session-DqqgOJaz.d.ts +143 -0
- package/dist/code-agent-session-DqqgOJaz.d.ts.map +1 -0
- package/dist/concurrency-DIxRZF_J.js +85 -0
- package/dist/concurrency-DIxRZF_J.js.map +1 -0
- package/dist/contract/index.d.ts +645 -5565
- package/dist/contract/index.d.ts.map +1 -0
- package/dist/contract/index.js +1730 -1938
- package/dist/contract/index.js.map +1 -1
- package/dist/control.d.ts +3 -1030
- package/dist/control.js +2 -33
- package/dist/cost-ledger-DIgQUFZZ.js +801 -0
- package/dist/cost-ledger-DIgQUFZZ.js.map +1 -0
- package/dist/cost-ledger-Dye6jCgg.d.ts +236 -0
- package/dist/cost-ledger-Dye6jCgg.d.ts.map +1 -0
- package/dist/dataset-BvtnC8Dc.d.ts +115 -0
- package/dist/dataset-BvtnC8Dc.d.ts.map +1 -0
- package/dist/default-registry-C-vFCSEc.js +2579 -0
- package/dist/default-registry-C-vFCSEc.js.map +1 -0
- package/dist/default-registry-CNPo-Vsb.d.ts +540 -0
- package/dist/default-registry-CNPo-Vsb.d.ts.map +1 -0
- package/dist/emitter-CPBAhxum.js +266 -0
- package/dist/emitter-CPBAhxum.js.map +1 -0
- package/dist/emitter-DGQGoLyj.d.ts +113 -0
- package/dist/emitter-DGQGoLyj.d.ts.map +1 -0
- package/dist/errors-8YnH8WlF.js +64 -0
- package/dist/errors-8YnH8WlF.js.map +1 -0
- package/dist/errors-CEk209JS.d.ts +76 -0
- package/dist/errors-CEk209JS.d.ts.map +1 -0
- package/dist/eval-campaign-DEm6c8ru.js +349 -0
- package/dist/eval-campaign-DEm6c8ru.js.map +1 -0
- package/dist/execution-tracks-CpgFPpS5.js +93 -0
- package/dist/execution-tracks-CpgFPpS5.js.map +1 -0
- package/dist/exporters-q9iL-2Jf.js +148 -0
- package/dist/exporters-q9iL-2Jf.js.map +1 -0
- package/dist/extract-usage-BrQ8mCLX.js +155 -0
- package/dist/extract-usage-BrQ8mCLX.js.map +1 -0
- package/dist/failure-cluster-CqcvCcdR.d.ts +59 -0
- package/dist/failure-cluster-CqcvCcdR.d.ts.map +1 -0
- package/dist/feedback-trajectory-CVaeREXV.d.ts +340 -0
- package/dist/feedback-trajectory-CVaeREXV.d.ts.map +1 -0
- package/dist/fuzz.d.ts +320 -646
- package/dist/fuzz.d.ts.map +1 -0
- package/dist/fuzz.js +670 -618
- package/dist/fuzz.js.map +1 -1
- package/dist/hf-dataset-DBJXXoY1.js +763 -0
- package/dist/hf-dataset-DBJXXoY1.js.map +1 -0
- package/dist/hosted/index.d.ts +11 -831
- package/dist/hosted/index.d.ts.map +1 -0
- package/dist/hosted/index.js +2 -37
- package/dist/index-2JJSA6-r2.d.ts +926 -0
- package/dist/index-2JJSA6-r2.d.ts.map +1 -0
- package/dist/index-6N0aYmpW.d.ts +217 -0
- package/dist/index-6N0aYmpW.d.ts.map +1 -0
- package/dist/index-BAvgST_9.d.ts +131 -0
- package/dist/index-BAvgST_9.d.ts.map +1 -0
- package/dist/index-BvnJuTGD.d.ts +68 -0
- package/dist/index-BvnJuTGD.d.ts.map +1 -0
- package/dist/index-C61Wi7yg.d.ts +547 -0
- package/dist/index-C61Wi7yg.d.ts.map +1 -0
- package/dist/index-CD_WZ_Xr.d.ts +2250 -0
- package/dist/index-CD_WZ_Xr.d.ts.map +1 -0
- package/dist/index-DSC51roc.d.ts +102 -0
- package/dist/index-DSC51roc.d.ts.map +1 -0
- package/dist/index-Em67JBjs.d.ts +335 -0
- package/dist/index-Em67JBjs.d.ts.map +1 -0
- package/dist/index.d.ts +3755 -15555
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11182 -11216
- package/dist/index.js.map +1 -1
- package/dist/integrity-BzRbCHzi.js +424 -0
- package/dist/integrity-BzRbCHzi.js.map +1 -0
- package/dist/integrity-rmVhXWA7.d.ts +61 -0
- package/dist/integrity-rmVhXWA7.d.ts.map +1 -0
- package/dist/judge-calibration-DFtEMlde.d.ts +146 -0
- package/dist/judge-calibration-DFtEMlde.d.ts.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -0
- package/dist/ledger-core/index.js +2 -0
- package/dist/ledger-core-DtZz1RG0.js +388 -0
- package/dist/ledger-core-DtZz1RG0.js.map +1 -0
- package/dist/llm-client--GR4JbZE.js +687 -0
- package/dist/llm-client--GR4JbZE.js.map +1 -0
- package/dist/llm-client-B_nIBlYo.d.ts +290 -0
- package/dist/llm-client-B_nIBlYo.d.ts.map +1 -0
- package/dist/matrix/index.d.ts +3 -155
- package/dist/matrix/index.js +2 -8
- package/dist/matrix-BzQnu2S6.js +270 -0
- package/dist/matrix-BzQnu2S6.js.map +1 -0
- package/dist/meta-eval/index.d.ts +4 -1027
- package/dist/meta-eval/index.js +393 -390
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/metrics-C9YY1OcL.js +239 -0
- package/dist/metrics-C9YY1OcL.js.map +1 -0
- package/dist/mint-yN2M2eh0.js +201 -0
- package/dist/mint-yN2M2eh0.js.map +1 -0
- package/dist/multi-layer-verifier-BHY1gWAc.d.ts +138 -0
- package/dist/multi-layer-verifier-BHY1gWAc.d.ts.map +1 -0
- package/dist/multishot/index.d.ts +273 -480
- package/dist/multishot/index.d.ts.map +1 -0
- package/dist/multishot/index.js +595 -548
- package/dist/multishot/index.js.map +1 -1
- package/dist/off-policy-DvgzvtIx.js +220 -0
- package/dist/off-policy-DvgzvtIx.js.map +1 -0
- package/dist/off-policy-mskQw8Mb.d.ts +153 -0
- package/dist/off-policy-mskQw8Mb.d.ts.map +1 -0
- package/dist/openapi.json +1 -1
- package/dist/opencode-sqlite-BGrHeDu3.js +318 -0
- package/dist/opencode-sqlite-BGrHeDu3.js.map +1 -0
- package/dist/outcome-store-BYHIuO0e.d.ts +65 -0
- package/dist/outcome-store-BYHIuO0e.d.ts.map +1 -0
- package/dist/outcome-store-ChBKlTd_.js +75 -0
- package/dist/outcome-store-ChBKlTd_.js.map +1 -0
- package/dist/paired-arms-D9D0wXj2.js +260 -0
- package/dist/paired-arms-D9D0wXj2.js.map +1 -0
- package/dist/pipelines/index.d.ts +95 -532
- package/dist/pipelines/index.d.ts.map +1 -0
- package/dist/pipelines/index.js +497 -478
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pre-registration-DakwTRXk.js +96 -0
- package/dist/pre-registration-DakwTRXk.js.map +1 -0
- package/dist/propose-review-control-LhIWGzHl.js +1458 -0
- package/dist/propose-review-control-LhIWGzHl.js.map +1 -0
- package/dist/query-CJ_DX8vl.d.ts +28 -0
- package/dist/query-CJ_DX8vl.d.ts.map +1 -0
- package/dist/query-Di7eEQ79.js +83 -0
- package/dist/query-Di7eEQ79.js.map +1 -0
- package/dist/raw-provider-sink-BQd7mzyT.js +201 -0
- package/dist/raw-provider-sink-BQd7mzyT.js.map +1 -0
- package/dist/raw-provider-sink-BU29Sh8h.d.ts +134 -0
- package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +1 -0
- package/dist/redact-7Aq1ukl-.js +107 -0
- package/dist/redact-7Aq1ukl-.js.map +1 -0
- package/dist/release-report-Cz9NKH39.js +603 -0
- package/dist/release-report-Cz9NKH39.js.map +1 -0
- package/dist/release-report-mvB2G4_J.d.ts +244 -0
- package/dist/release-report-mvB2G4_J.d.ts.map +1 -0
- package/dist/replay-GnyotH0J.js +1741 -0
- package/dist/replay-GnyotH0J.js.map +1 -0
- package/dist/replay-OoidtG1E.d.ts +749 -0
- package/dist/replay-OoidtG1E.d.ts.map +1 -0
- package/dist/reporting.d.ts +6 -1312
- package/dist/reporting.js +6 -51
- package/dist/researcher-CwTdwXG1.d.ts +314 -0
- package/dist/researcher-CwTdwXG1.d.ts.map +1 -0
- package/dist/reward-hacking-eAnOsynk.d.ts +224 -0
- package/dist/reward-hacking-eAnOsynk.d.ts.map +1 -0
- package/dist/reward-hacking-qipEpKvY.js +596 -0
- package/dist/reward-hacking-qipEpKvY.js.map +1 -0
- package/dist/reward-nw2xZGZG.js +137 -0
- package/dist/reward-nw2xZGZG.js.map +1 -0
- package/dist/rl.d.ts +760 -4010
- package/dist/rl.d.ts.map +1 -0
- package/dist/rl.js +2325 -1958
- package/dist/rl.js.map +1 -1
- package/dist/rolldown-runtime-8H4AJuhK.js +14 -0
- package/dist/rollout/index.d.ts +3 -2087
- package/dist/rollout/index.js +8 -168
- package/dist/rollout-BOYjemfR.js +624 -0
- package/dist/rollout-BOYjemfR.js.map +1 -0
- package/dist/rubric-predictive-validity-B3xmbmS1.js +141 -0
- package/dist/rubric-predictive-validity-B3xmbmS1.js.map +1 -0
- package/dist/rubric-predictive-validity-Ku_clp_1.d.ts +74 -0
- package/dist/rubric-predictive-validity-Ku_clp_1.d.ts.map +1 -0
- package/dist/run-evidence-ClRX_8A9.d.ts +225 -0
- package/dist/run-evidence-ClRX_8A9.d.ts.map +1 -0
- package/dist/run-record-BuoE80Dq.js +467 -0
- package/dist/{chunk-56TAVBOK.js.map → run-record-BuoE80Dq.js.map} +1 -1
- package/dist/run-record-CnZu_gjl.d.ts +357 -0
- package/dist/run-record-CnZu_gjl.d.ts.map +1 -0
- package/dist/run-score-iEEAWiBY.js +41 -0
- package/dist/run-score-iEEAWiBY.js.map +1 -0
- package/dist/runtime-trajectory-1gyaTOoC.js +93 -0
- package/dist/runtime-trajectory-1gyaTOoC.js.map +1 -0
- package/dist/runtime-trajectory-BvSZcCHD.d.ts +50 -0
- package/dist/runtime-trajectory-BvSZcCHD.d.ts.map +1 -0
- package/dist/schema-BtVldJ3T.d.ts +206 -0
- package/dist/schema-BtVldJ3T.d.ts.map +1 -0
- package/dist/schema-C6DW4ZHR.js +821 -0
- package/dist/schema-C6DW4ZHR.js.map +1 -0
- package/dist/schema-CRhEY1SO.js +69 -0
- package/dist/schema-CRhEY1SO.js.map +1 -0
- package/dist/schema-Cef2cFmb.d.ts +408 -0
- package/dist/schema-Cef2cFmb.d.ts.map +1 -0
- package/dist/semantic-concept-judge-B6cWNJ2K.js +725 -0
- package/dist/semantic-concept-judge-B6cWNJ2K.js.map +1 -0
- package/dist/sequential-Br0mAPHA.js +148 -0
- package/dist/sequential-Br0mAPHA.js.map +1 -0
- package/dist/sequential-CYwq6Ff_.d.ts +141 -0
- package/dist/sequential-CYwq6Ff_.d.ts.map +1 -0
- package/dist/series-convergence-CjO2QdRW.js +43 -0
- package/dist/series-convergence-CjO2QdRW.js.map +1 -0
- package/dist/series-convergence-ofsqPWhs.d.ts +35 -0
- package/dist/series-convergence-ofsqPWhs.d.ts.map +1 -0
- package/dist/server-m5D9cvnG.js +1040 -0
- package/dist/server-m5D9cvnG.js.map +1 -0
- package/dist/skill-usage-C_pXm7lP.d.ts +534 -0
- package/dist/skill-usage-C_pXm7lP.d.ts.map +1 -0
- package/dist/skillopt-optimization-method-CUmHkGbI.js +7718 -0
- package/dist/skillopt-optimization-method-CUmHkGbI.js.map +1 -0
- package/dist/skillopt-optimization-method-CWKVTnks.d.ts +1740 -0
- package/dist/skillopt-optimization-method-CWKVTnks.d.ts.map +1 -0
- package/dist/statistics-Cmj6nynr.d.ts +514 -0
- package/dist/statistics-Cmj6nynr.d.ts.map +1 -0
- package/dist/statistics-CnnxdpOg.js +1437 -0
- package/dist/statistics-CnnxdpOg.js.map +1 -0
- package/dist/store-CT9YIIve.d.ts +117 -0
- package/dist/store-CT9YIIve.d.ts.map +1 -0
- package/dist/store-CxJry_cs.d.ts +229 -0
- package/dist/store-CxJry_cs.d.ts.map +1 -0
- package/dist/storyboard/index.d.ts +84 -203
- package/dist/storyboard/index.d.ts.map +1 -0
- package/dist/storyboard/index.js +609 -542
- package/dist/storyboard/index.js.map +1 -1
- package/dist/summary-report-BNs5nmXI.js +862 -0
- package/dist/summary-report-BNs5nmXI.js.map +1 -0
- package/dist/summary-report-Cj9gdw4i.d.ts +407 -0
- package/dist/summary-report-Cj9gdw4i.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts +2 -959
- package/dist/supervisor-run/index.js +2 -65
- package/dist/supervisor-run-_lnTLM3z.js +1679 -0
- package/dist/supervisor-run-_lnTLM3z.js.map +1 -0
- package/dist/task-failure-attributes-CQZlB3et.js +311 -0
- package/dist/task-failure-attributes-CQZlB3et.js.map +1 -0
- package/dist/test-graded-scenario-BsqWLmPt.js +318 -0
- package/dist/test-graded-scenario-BsqWLmPt.js.map +1 -0
- package/dist/test-graded-scenario-D1TaI2va.d.ts +141 -0
- package/dist/test-graded-scenario-D1TaI2va.d.ts.map +1 -0
- package/dist/tools-BmuN627J.js +1085 -0
- package/dist/tools-BmuN627J.js.map +1 -0
- package/dist/trace-attributes.d.ts +2 -52
- package/dist/trace-attributes.js +131 -61
- package/dist/trace-attributes.js.map +1 -1
- package/dist/traces.d.ts +12 -2365
- package/dist/traces.js +12 -252
- package/dist/trajectory-D_7rLrvE.js +56 -0
- package/dist/trajectory-D_7rLrvE.js.map +1 -0
- package/dist/types-DGsxbAEd.d.ts +387 -0
- package/dist/types-DGsxbAEd.d.ts.map +1 -0
- package/dist/types-k9tZGKUg.d.ts +640 -0
- package/dist/types-k9tZGKUg.d.ts.map +1 -0
- package/dist/verdict-Dps8_okt.d.ts +37 -0
- package/dist/verdict-Dps8_okt.d.ts.map +1 -0
- package/dist/wire/index.d.ts +702 -1173
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/wire/index.js +2 -81
- package/docs/campaign-proposers.md +1 -0
- package/package.json +17 -9
- package/dist/benchmarks/index.js.map +0 -1
- package/dist/campaign/index.js.map +0 -1
- package/dist/chunk-2QU3YOPR.js +0 -7374
- package/dist/chunk-2QU3YOPR.js.map +0 -1
- package/dist/chunk-3OCR4R5I.js +0 -728
- package/dist/chunk-3OCR4R5I.js.map +0 -1
- package/dist/chunk-3RF76KTD.js +0 -84
- package/dist/chunk-3RF76KTD.js.map +0 -1
- package/dist/chunk-56TAVBOK.js +0 -698
- package/dist/chunk-5DTSBUL2.js +0 -159
- package/dist/chunk-5DTSBUL2.js.map +0 -1
- package/dist/chunk-7FO3TNPI.js +0 -232
- package/dist/chunk-7FO3TNPI.js.map +0 -1
- package/dist/chunk-7ZZMD7UK.js +0 -386
- package/dist/chunk-7ZZMD7UK.js.map +0 -1
- package/dist/chunk-BOD4O7OF.js +0 -40
- package/dist/chunk-BOD4O7OF.js.map +0 -1
- package/dist/chunk-BSO5JDQH.js +0 -2335
- package/dist/chunk-BSO5JDQH.js.map +0 -1
- package/dist/chunk-C6LXANRU.js +0 -1550
- package/dist/chunk-C6LXANRU.js.map +0 -1
- package/dist/chunk-DODXQREJ.js +0 -752
- package/dist/chunk-DODXQREJ.js.map +0 -1
- package/dist/chunk-DRYIUNWY.js +0 -622
- package/dist/chunk-DRYIUNWY.js.map +0 -1
- package/dist/chunk-E7QXT7SX.js +0 -183
- package/dist/chunk-E7QXT7SX.js.map +0 -1
- package/dist/chunk-EG66UGL4.js +0 -341
- package/dist/chunk-EG66UGL4.js.map +0 -1
- package/dist/chunk-FXTVJPYD.js +0 -576
- package/dist/chunk-FXTVJPYD.js.map +0 -1
- package/dist/chunk-G7MGMCZD.js +0 -153
- package/dist/chunk-G7MGMCZD.js.map +0 -1
- package/dist/chunk-GGE4NNQT.js +0 -65
- package/dist/chunk-GGE4NNQT.js.map +0 -1
- package/dist/chunk-H23X7XKK.js +0 -181
- package/dist/chunk-H23X7XKK.js.map +0 -1
- package/dist/chunk-HHWE3POT.js +0 -94
- package/dist/chunk-HHWE3POT.js.map +0 -1
- package/dist/chunk-HPWUNB47.js +0 -289
- package/dist/chunk-HPWUNB47.js.map +0 -1
- package/dist/chunk-IYCLP2N2.js +0 -766
- package/dist/chunk-IYCLP2N2.js.map +0 -1
- package/dist/chunk-JHCHEVET.js +0 -274
- package/dist/chunk-JHCHEVET.js.map +0 -1
- package/dist/chunk-JQSF5DQT.js +0 -701
- package/dist/chunk-JQSF5DQT.js.map +0 -1
- package/dist/chunk-K4DBDHLK.js +0 -158
- package/dist/chunk-K4DBDHLK.js.map +0 -1
- package/dist/chunk-K6N6XJJX.js +0 -306
- package/dist/chunk-K6N6XJJX.js.map +0 -1
- package/dist/chunk-M4YBQKIJ.js +0 -1040
- package/dist/chunk-M4YBQKIJ.js.map +0 -1
- package/dist/chunk-MA6HLL3S.js +0 -65
- package/dist/chunk-MA6HLL3S.js.map +0 -1
- package/dist/chunk-MAZ26DC7.js +0 -99
- package/dist/chunk-MAZ26DC7.js.map +0 -1
- package/dist/chunk-NPCTHQIO.js +0 -91
- package/dist/chunk-NPCTHQIO.js.map +0 -1
- package/dist/chunk-NY44NC4A.js +0 -1056
- package/dist/chunk-NY44NC4A.js.map +0 -1
- package/dist/chunk-OIUOT4QD.js +0 -44
- package/dist/chunk-OIUOT4QD.js.map +0 -1
- package/dist/chunk-ONWEPEDO.js +0 -57
- package/dist/chunk-ONWEPEDO.js.map +0 -1
- package/dist/chunk-OWN5NPMC.js +0 -152
- package/dist/chunk-OWN5NPMC.js.map +0 -1
- package/dist/chunk-P6FYH6K4.js +0 -1161
- package/dist/chunk-P6FYH6K4.js.map +0 -1
- package/dist/chunk-PC4UYEBM.js +0 -166
- package/dist/chunk-PC4UYEBM.js.map +0 -1
- package/dist/chunk-PC5DOSM7.js +0 -579
- package/dist/chunk-PC5DOSM7.js.map +0 -1
- package/dist/chunk-PXE2VKMX.js +0 -140
- package/dist/chunk-PXE2VKMX.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-QB6BDBP2.js +0 -4464
- package/dist/chunk-QB6BDBP2.js.map +0 -1
- package/dist/chunk-RXHCETDZ.js +0 -536
- package/dist/chunk-RXHCETDZ.js.map +0 -1
- package/dist/chunk-RZTMDUO7.js +0 -49
- package/dist/chunk-RZTMDUO7.js.map +0 -1
- package/dist/chunk-SFLLL76A.js +0 -669
- package/dist/chunk-SFLLL76A.js.map +0 -1
- package/dist/chunk-SZLVEKMJ.js +0 -1446
- package/dist/chunk-SZLVEKMJ.js.map +0 -1
- package/dist/chunk-T4SQEITX.js +0 -95
- package/dist/chunk-T4SQEITX.js.map +0 -1
- package/dist/chunk-T6RLYGAD.js +0 -158
- package/dist/chunk-T6RLYGAD.js.map +0 -1
- package/dist/chunk-TJVT4QFF.js +0 -911
- package/dist/chunk-TJVT4QFF.js.map +0 -1
- package/dist/chunk-TQ7LNKZ3.js +0 -136
- package/dist/chunk-TQ7LNKZ3.js.map +0 -1
- package/dist/chunk-U4L7JRPZ.js +0 -1706
- package/dist/chunk-U4L7JRPZ.js.map +0 -1
- package/dist/chunk-U4PHLT2N.js +0 -419
- package/dist/chunk-U4PHLT2N.js.map +0 -1
- package/dist/chunk-VCZ5FQYW.js +0 -928
- package/dist/chunk-VCZ5FQYW.js.map +0 -1
- package/dist/chunk-VI2UW6B6.js +0 -162
- package/dist/chunk-VI2UW6B6.js.map +0 -1
- package/dist/chunk-VQMK5FMP.js +0 -247
- package/dist/chunk-VQMK5FMP.js.map +0 -1
- package/dist/chunk-WGXIEX7P.js +0 -116
- package/dist/chunk-WGXIEX7P.js.map +0 -1
- package/dist/chunk-WVATSFCP.js +0 -1553
- package/dist/chunk-WVATSFCP.js.map +0 -1
- package/dist/chunk-X4YIBDER.js +0 -1662
- package/dist/chunk-X4YIBDER.js.map +0 -1
- package/dist/chunk-YQN4ICPP.js +0 -355
- package/dist/chunk-YQN4ICPP.js.map +0 -1
- package/dist/chunk-ZET2UAYW.js +0 -89
- package/dist/chunk-ZET2UAYW.js.map +0 -1
- package/dist/chunk-ZHTZ4EYI.js +0 -1212
- package/dist/chunk-ZHTZ4EYI.js.map +0 -1
- package/dist/control.js.map +0 -1
- package/dist/hosted/index.js.map +0 -1
- package/dist/matrix/index.js.map +0 -1
- package/dist/reporting.js.map +0 -1
- package/dist/rollout/index.js.map +0 -1
- package/dist/run-campaign-OJJ7CZF4.js +0 -18
- package/dist/run-campaign-OJJ7CZF4.js.map +0 -1
- package/dist/supervisor-run/index.js.map +0 -1
- package/dist/traces.js.map +0 -1
- package/dist/wire/index.js.map +0 -1
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
import { c as VerificationError, s as ValidationError } from "./errors-8YnH8WlF.js";
|
|
2
|
+
import { s as validateRunRecord } from "./run-record-BuoE80Dq.js";
|
|
3
|
+
import { r as observedSplitScore, t as isRealnessGated } from "./reward-nw2xZGZG.js";
|
|
4
|
+
import { t as FAILURE_CLASSES } from "./schema-CRhEY1SO.js";
|
|
5
|
+
import { a as summaryTable } from "./summary-report-BNs5nmXI.js";
|
|
6
|
+
//#region src/release-confidence.ts
|
|
7
|
+
const DEFAULT_THRESHOLDS = {
|
|
8
|
+
requireCorpus: true,
|
|
9
|
+
minScenarioCount: 1,
|
|
10
|
+
minSearchRuns: 1,
|
|
11
|
+
minHoldoutRuns: 1,
|
|
12
|
+
requireHoldout: true,
|
|
13
|
+
minPassRate: .8,
|
|
14
|
+
minMeanScore: .7,
|
|
15
|
+
maxOverfitGap: .15,
|
|
16
|
+
maxMeanCostUsd: Number.POSITIVE_INFINITY,
|
|
17
|
+
maxP95WallMs: Number.POSITIVE_INFINITY,
|
|
18
|
+
requireAsiForFailures: true,
|
|
19
|
+
failureScoreThreshold: .5
|
|
20
|
+
};
|
|
21
|
+
function evaluateReleaseConfidence(input) {
|
|
22
|
+
const thresholds = {
|
|
23
|
+
...DEFAULT_THRESHOLDS,
|
|
24
|
+
...input.thresholds
|
|
25
|
+
};
|
|
26
|
+
const candidateId = input.candidateId ?? null;
|
|
27
|
+
const runs = filterCandidate((input.runs ?? []).map(validateRunRecord), candidateId, input.baselineId);
|
|
28
|
+
const traces = filterTraceCandidate((input.traces ?? []).map(validateReleaseTraceEvidence), candidateId, input.baselineId);
|
|
29
|
+
const scenarios = input.scenarios ?? [];
|
|
30
|
+
const scenarioCount = input.dataset?.scenarioCount ?? scenarios.length;
|
|
31
|
+
const splitCounts = input.dataset?.splitCounts ?? countScenarioSplits(scenarios);
|
|
32
|
+
const searchScores = scoresFor(runs, "search");
|
|
33
|
+
const holdoutScores = scoresFor(runs, "holdout");
|
|
34
|
+
const runScores = runs.map(runSplitScore).filter(isFiniteNumber);
|
|
35
|
+
const traceScores = traces.map((t) => t.score).filter(isFiniteNumber);
|
|
36
|
+
const scoreUniverse = runs.length > 0 ? runScores : traceScores;
|
|
37
|
+
const qualityRuns = runs.filter((run) => runSplitScore(run) !== void 0);
|
|
38
|
+
const unscoredRuns = runs.filter((run) => runSplitScore(run) === void 0 && !hasExplicitTaskFailure(run) && !isFailedTerminalOutcome(run.terminalOutcome)).length;
|
|
39
|
+
const honestRuns = runs.filter((run) => !isRealnessGated(run));
|
|
40
|
+
const passOutcomes = runs.length > 0 ? honestRuns.map((run) => runPassOutcome(run, thresholds.failureScoreThreshold)) : traces.map((trace) => tracePassOutcome(trace, thresholds.failureScoreThreshold));
|
|
41
|
+
const reliabilityRows = runs.length > 0 ? runs.map((run) => terminalSuccess(run.terminalOutcome)) : traces.map((trace) => trace.ok);
|
|
42
|
+
const unclassifiedTerminalRuns = reliabilityRows.filter((outcome) => outcome === void 0).length;
|
|
43
|
+
const terminalFailureRuns = reliabilityRows.filter((outcome) => outcome === false).length;
|
|
44
|
+
const reliabilityRate = reliabilityRows.length === 0 || unclassifiedTerminalRuns > 0 ? null : (reliabilityRows.length - terminalFailureRuns) / reliabilityRows.length;
|
|
45
|
+
const searchRuns = qualityRuns.filter((r) => r.splitTag === "search").length;
|
|
46
|
+
const holdoutRuns = qualityRuns.filter((r) => r.splitTag === "holdout").length;
|
|
47
|
+
const failed = failedRows(runs, traces, thresholds.failureScoreThreshold);
|
|
48
|
+
const searchMeanScore = meanOrNull(searchScores);
|
|
49
|
+
const holdoutMeanScore = meanOrNull(holdoutScores);
|
|
50
|
+
const runCosts = runs.flatMap((run) => run.costProvenance.kind === "uncaptured" ? [] : [run.costProvenance.usd]);
|
|
51
|
+
const traceCosts = traces.map((trace) => trace.costUsd).filter(isFiniteNumber);
|
|
52
|
+
const meanCostUsd = runs.length > 0 ? runCosts.length === runs.length ? meanOrNull(runCosts) : null : meanOrNull(traceCosts);
|
|
53
|
+
const wallTimes = runs.length > 0 ? runs.map((run) => run.wallMs) : traces.map((trace) => trace.durationMs).filter(isFiniteNumber);
|
|
54
|
+
const metrics = {
|
|
55
|
+
scenarioCount,
|
|
56
|
+
searchRuns,
|
|
57
|
+
holdoutRuns,
|
|
58
|
+
unscoredRuns,
|
|
59
|
+
unclassifiedTerminalRuns,
|
|
60
|
+
terminalFailureRuns,
|
|
61
|
+
reliabilityRate,
|
|
62
|
+
passRate: passOutcomeRate(passOutcomes),
|
|
63
|
+
realnessGatedRuns: runs.length - honestRuns.length,
|
|
64
|
+
meanScore: meanOrNull(scoreUniverse),
|
|
65
|
+
searchMeanScore,
|
|
66
|
+
holdoutMeanScore,
|
|
67
|
+
overfitGap: diffOrNull(searchMeanScore, holdoutMeanScore),
|
|
68
|
+
meanCostUsd,
|
|
69
|
+
p95WallMs: percentileOrNull(wallTimes, .95),
|
|
70
|
+
failedRows: failed.length,
|
|
71
|
+
failuresWithAsi: failed.filter((row) => row.hasAsi).length,
|
|
72
|
+
singleShotTraces: traces.filter((t) => t.turnCount === 1).length,
|
|
73
|
+
multiShotTraces: traces.filter((t) => (t.turnCount ?? 0) > 1).length,
|
|
74
|
+
splitCounts,
|
|
75
|
+
domainCounts: countDomains(scenarios),
|
|
76
|
+
failureClassCounts: countFailureClasses(runs, traces, thresholds.failureScoreThreshold),
|
|
77
|
+
responsibleSurfaceCounts: countResponsibleSurfaces(traces)
|
|
78
|
+
};
|
|
79
|
+
const issues = [];
|
|
80
|
+
checkCorpus(input, thresholds, metrics, issues);
|
|
81
|
+
checkQuality(thresholds, metrics, issues);
|
|
82
|
+
checkReliability(metrics, issues);
|
|
83
|
+
checkGeneralization(input.gateDecision ?? null, thresholds, metrics, issues);
|
|
84
|
+
checkDiagnostics(thresholds, metrics, issues);
|
|
85
|
+
checkEfficiency(thresholds, metrics, issues);
|
|
86
|
+
const axes = buildAxes(metrics, thresholds, issues);
|
|
87
|
+
const status = issues.some((i) => i.severity === "critical") ? "fail" : issues.length > 0 ? "warn" : "pass";
|
|
88
|
+
return {
|
|
89
|
+
target: input.target,
|
|
90
|
+
candidateId,
|
|
91
|
+
baselineId: input.baselineId ?? null,
|
|
92
|
+
status,
|
|
93
|
+
promote: status === "pass" && (input.gateDecision ? input.gateDecision.promote : true),
|
|
94
|
+
axes,
|
|
95
|
+
issues,
|
|
96
|
+
metrics,
|
|
97
|
+
dataset: input.dataset ?? null,
|
|
98
|
+
gateDecision: input.gateDecision ?? null,
|
|
99
|
+
summary: renderSummary(input.target, status, metrics, issues)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function assertReleaseConfidence(input) {
|
|
103
|
+
const scorecard = evaluateReleaseConfidence(input);
|
|
104
|
+
if (scorecard.status === "fail") throw new VerificationError(scorecard.summary);
|
|
105
|
+
return scorecard;
|
|
106
|
+
}
|
|
107
|
+
function filterCandidate(runs, candidateId, baselineId) {
|
|
108
|
+
if (candidateId) return runs.filter((r) => r.candidateId === candidateId);
|
|
109
|
+
if (baselineId) return runs.filter((r) => r.candidateId !== baselineId);
|
|
110
|
+
return [...runs];
|
|
111
|
+
}
|
|
112
|
+
function filterTraceCandidate(traces, candidateId, baselineId) {
|
|
113
|
+
if (candidateId) return traces.filter((t) => t.candidateId === void 0 || t.candidateId === candidateId);
|
|
114
|
+
if (baselineId) return traces.filter((t) => t.candidateId === void 0 || t.candidateId !== baselineId);
|
|
115
|
+
return [...traces];
|
|
116
|
+
}
|
|
117
|
+
function validateReleaseTraceEvidence(trace, index) {
|
|
118
|
+
const value = trace;
|
|
119
|
+
if (Object.hasOwn(value, "failureMode")) throw new ValidationError(`traces[${index}].failureMode is not supported; use canonical failureClass`);
|
|
120
|
+
if (trace.failureClass !== void 0 && !FAILURE_CLASSES.includes(trace.failureClass)) throw new ValidationError(`traces[${index}].failureClass must be one of ${FAILURE_CLASSES.join(", ")}`);
|
|
121
|
+
return trace;
|
|
122
|
+
}
|
|
123
|
+
function checkCorpus(input, thresholds, metrics, issues) {
|
|
124
|
+
if (thresholds.requireCorpus && !input.dataset && (input.scenarios?.length ?? 0) === 0) issues.push({
|
|
125
|
+
axis: "corpus",
|
|
126
|
+
severity: "critical",
|
|
127
|
+
code: "missing_corpus",
|
|
128
|
+
detail: "No Dataset manifest or scenarios supplied."
|
|
129
|
+
});
|
|
130
|
+
if (metrics.scenarioCount < thresholds.minScenarioCount) issues.push({
|
|
131
|
+
axis: "corpus",
|
|
132
|
+
severity: "critical",
|
|
133
|
+
code: "few_scenarios",
|
|
134
|
+
detail: `${metrics.scenarioCount} scenario(s) < min ${thresholds.minScenarioCount}.`
|
|
135
|
+
});
|
|
136
|
+
if (thresholds.requireHoldout && metrics.splitCounts.holdout === 0) issues.push({
|
|
137
|
+
axis: "corpus",
|
|
138
|
+
severity: "critical",
|
|
139
|
+
code: "missing_holdout_split",
|
|
140
|
+
detail: "Corpus has no holdout scenarios."
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function checkQuality(thresholds, metrics, issues) {
|
|
144
|
+
if (metrics.searchRuns < thresholds.minSearchRuns) issues.push({
|
|
145
|
+
axis: "quality",
|
|
146
|
+
severity: "critical",
|
|
147
|
+
code: "few_search_runs",
|
|
148
|
+
detail: `${metrics.searchRuns} search run(s) < min ${thresholds.minSearchRuns}.`
|
|
149
|
+
});
|
|
150
|
+
if (metrics.unscoredRuns > 0) issues.push({
|
|
151
|
+
axis: "quality",
|
|
152
|
+
severity: "critical",
|
|
153
|
+
code: "unscored_runs",
|
|
154
|
+
detail: `${metrics.unscoredRuns} supplied run(s) have no task result.`
|
|
155
|
+
});
|
|
156
|
+
if (metrics.passRate === null || metrics.meanScore === null) issues.push({
|
|
157
|
+
axis: "quality",
|
|
158
|
+
severity: "critical",
|
|
159
|
+
code: "missing_quality_scores",
|
|
160
|
+
detail: "No task-quality scores are available for pass-rate and mean-score checks."
|
|
161
|
+
});
|
|
162
|
+
if (metrics.passRate !== null && metrics.passRate < thresholds.minPassRate) issues.push({
|
|
163
|
+
axis: "quality",
|
|
164
|
+
severity: "critical",
|
|
165
|
+
code: "low_pass_rate",
|
|
166
|
+
detail: `passRate ${fmt(metrics.passRate)} < ${fmt(thresholds.minPassRate)}.`
|
|
167
|
+
});
|
|
168
|
+
if (metrics.meanScore !== null && metrics.meanScore < thresholds.minMeanScore) issues.push({
|
|
169
|
+
axis: "quality",
|
|
170
|
+
severity: "critical",
|
|
171
|
+
code: "low_mean_score",
|
|
172
|
+
detail: `meanScore ${fmt(metrics.meanScore)} < ${fmt(thresholds.minMeanScore)}.`
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function checkReliability(metrics, issues) {
|
|
176
|
+
if (metrics.reliabilityRate === null) issues.push({
|
|
177
|
+
axis: "reliability",
|
|
178
|
+
severity: "critical",
|
|
179
|
+
code: "missing_reliability_evidence",
|
|
180
|
+
detail: metrics.unclassifiedTerminalRuns > 0 ? `${metrics.unclassifiedTerminalRuns} supplied run(s) have no classified terminal result.` : "No classified terminal results are available."
|
|
181
|
+
});
|
|
182
|
+
if (metrics.terminalFailureRuns > 0) issues.push({
|
|
183
|
+
axis: "reliability",
|
|
184
|
+
severity: "critical",
|
|
185
|
+
code: "terminal_run_failures",
|
|
186
|
+
detail: `${metrics.terminalFailureRuns} run(s) ended failed, cancelled, or incomplete.`
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function checkGeneralization(gateDecision, thresholds, metrics, issues) {
|
|
190
|
+
if (thresholds.requireHoldout && metrics.holdoutRuns < thresholds.minHoldoutRuns) issues.push({
|
|
191
|
+
axis: "generalization",
|
|
192
|
+
severity: "critical",
|
|
193
|
+
code: "few_holdout_runs",
|
|
194
|
+
detail: `${metrics.holdoutRuns} holdout run(s) < min ${thresholds.minHoldoutRuns}.`
|
|
195
|
+
});
|
|
196
|
+
if (metrics.overfitGap !== null && metrics.overfitGap > thresholds.maxOverfitGap) issues.push({
|
|
197
|
+
axis: "generalization",
|
|
198
|
+
severity: "critical",
|
|
199
|
+
code: "overfit_gap",
|
|
200
|
+
detail: `search-holdout gap ${fmt(metrics.overfitGap)} > ${fmt(thresholds.maxOverfitGap)}.`
|
|
201
|
+
});
|
|
202
|
+
if (gateDecision && !gateDecision.promote) issues.push({
|
|
203
|
+
axis: "generalization",
|
|
204
|
+
severity: "critical",
|
|
205
|
+
code: `gate_${gateDecision.rejectionCode ?? "reject"}`,
|
|
206
|
+
detail: gateDecision.reason
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function checkDiagnostics(thresholds, metrics, issues) {
|
|
210
|
+
if (!thresholds.requireAsiForFailures) return;
|
|
211
|
+
if (metrics.failedRows > metrics.failuresWithAsi) issues.push({
|
|
212
|
+
axis: "diagnostics",
|
|
213
|
+
severity: "critical",
|
|
214
|
+
code: "missing_failure_asi",
|
|
215
|
+
detail: `${metrics.failedRows - metrics.failuresWithAsi} failed row(s) have no actionable side information.`
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function checkEfficiency(thresholds, metrics, issues) {
|
|
219
|
+
if (Number.isFinite(thresholds.maxMeanCostUsd) && metrics.meanCostUsd === null) issues.push({
|
|
220
|
+
axis: "efficiency",
|
|
221
|
+
severity: "critical",
|
|
222
|
+
code: "missing_cost",
|
|
223
|
+
detail: "A finite cost limit was configured but no cost evidence is available."
|
|
224
|
+
});
|
|
225
|
+
else if (metrics.meanCostUsd !== null && metrics.meanCostUsd > thresholds.maxMeanCostUsd) issues.push({
|
|
226
|
+
axis: "efficiency",
|
|
227
|
+
severity: "critical",
|
|
228
|
+
code: "cost_budget",
|
|
229
|
+
detail: `meanCostUsd ${fmt(metrics.meanCostUsd)} > ${fmt(thresholds.maxMeanCostUsd)}.`
|
|
230
|
+
});
|
|
231
|
+
if (Number.isFinite(thresholds.maxP95WallMs) && metrics.p95WallMs === null) issues.push({
|
|
232
|
+
axis: "efficiency",
|
|
233
|
+
severity: "critical",
|
|
234
|
+
code: "missing_latency",
|
|
235
|
+
detail: "A finite latency limit was configured but no latency evidence is available."
|
|
236
|
+
});
|
|
237
|
+
else if (metrics.p95WallMs !== null && metrics.p95WallMs > thresholds.maxP95WallMs) issues.push({
|
|
238
|
+
axis: "efficiency",
|
|
239
|
+
severity: "critical",
|
|
240
|
+
code: "latency_budget",
|
|
241
|
+
detail: `p95WallMs ${fmt(metrics.p95WallMs)} > ${fmt(thresholds.maxP95WallMs)}.`
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function buildAxes(metrics, thresholds, issues) {
|
|
245
|
+
return [
|
|
246
|
+
axis("corpus", issues, bounded(metrics.scenarioCount / Math.max(1, thresholds.minScenarioCount)), `${metrics.scenarioCount} scenarios; holdout=${metrics.splitCounts.holdout}`),
|
|
247
|
+
axis("quality", issues, metrics.passRate === null || metrics.meanScore === null ? null : Math.min(metrics.passRate, metrics.meanScore), `passRate=${fmt(metrics.passRate)} meanScore=${fmt(metrics.meanScore)}`),
|
|
248
|
+
axis("reliability", issues, metrics.reliabilityRate, `successRate=${fmt(metrics.reliabilityRate)} terminalFailures=${metrics.terminalFailureRuns} unclassified=${metrics.unclassifiedTerminalRuns}`),
|
|
249
|
+
axis("generalization", issues, gapScore(metrics.overfitGap, thresholds.maxOverfitGap), `holdoutRuns=${metrics.holdoutRuns} overfitGap=${fmt(metrics.overfitGap)}`),
|
|
250
|
+
axis("diagnostics", issues, metrics.failedRows === 0 ? 1 : metrics.failuresWithAsi / metrics.failedRows, `failuresWithAsi=${metrics.failuresWithAsi}/${metrics.failedRows}`),
|
|
251
|
+
axis("efficiency", issues, efficiencyScore(metrics, thresholds), `meanCostUsd=${fmt(metrics.meanCostUsd)} p95WallMs=${fmt(metrics.p95WallMs)}`)
|
|
252
|
+
];
|
|
253
|
+
}
|
|
254
|
+
function axis(name, issues, score, detail) {
|
|
255
|
+
const own = issues.filter((i) => i.axis === name);
|
|
256
|
+
return {
|
|
257
|
+
name,
|
|
258
|
+
status: own.some((i) => i.severity === "critical") ? "fail" : own.length > 0 ? "warn" : "pass",
|
|
259
|
+
score: score === null ? null : bounded(score),
|
|
260
|
+
detail
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function countScenarioSplits(scenarios) {
|
|
264
|
+
const counts = {
|
|
265
|
+
train: 0,
|
|
266
|
+
dev: 0,
|
|
267
|
+
test: 0,
|
|
268
|
+
holdout: 0
|
|
269
|
+
};
|
|
270
|
+
for (const scenario of scenarios) counts[scenario.split ?? "train"]++;
|
|
271
|
+
return counts;
|
|
272
|
+
}
|
|
273
|
+
function countDomains(scenarios) {
|
|
274
|
+
const out = {};
|
|
275
|
+
for (const scenario of scenarios) {
|
|
276
|
+
const domain = scenario.tags?.domain ?? scenario.tags?.category ?? "uncategorized";
|
|
277
|
+
out[domain] = (out[domain] ?? 0) + 1;
|
|
278
|
+
}
|
|
279
|
+
return out;
|
|
280
|
+
}
|
|
281
|
+
function countFailureClasses(runs, traces, threshold) {
|
|
282
|
+
const out = {};
|
|
283
|
+
for (const run of runs) if (runPassOutcome(run, threshold) === false) {
|
|
284
|
+
const failureClass = run.failureClass !== void 0 && run.failureClass !== "success" ? run.failureClass : "unknown";
|
|
285
|
+
out[failureClass] = (out[failureClass] ?? 0) + 1;
|
|
286
|
+
}
|
|
287
|
+
for (const trace of traces) if (tracePassOutcome(trace, threshold) === false) {
|
|
288
|
+
const failureClass = trace.failureClass !== void 0 && trace.failureClass !== "success" ? trace.failureClass : "unknown";
|
|
289
|
+
out[failureClass] = (out[failureClass] ?? 0) + 1;
|
|
290
|
+
}
|
|
291
|
+
return out;
|
|
292
|
+
}
|
|
293
|
+
function countResponsibleSurfaces(traces) {
|
|
294
|
+
const out = {};
|
|
295
|
+
for (const trace of traces) for (const asi of trace.asi ?? []) {
|
|
296
|
+
const surface = asi.responsibleSurface ?? "unknown";
|
|
297
|
+
out[surface] = (out[surface] ?? 0) + 1;
|
|
298
|
+
}
|
|
299
|
+
return out;
|
|
300
|
+
}
|
|
301
|
+
function failedRows(runs, traces, threshold) {
|
|
302
|
+
const out = [];
|
|
303
|
+
for (const run of runs) if (runPassOutcome(run, threshold) === false) {
|
|
304
|
+
const asiMetric = run.outcome.raw.asi;
|
|
305
|
+
out.push({ hasAsi: typeof asiMetric === "number" && asiMetric > 0 });
|
|
306
|
+
}
|
|
307
|
+
for (const trace of traces) if (tracePassOutcome(trace, threshold) === false) out.push({ hasAsi: (trace.asi?.length ?? 0) > 0 });
|
|
308
|
+
return out;
|
|
309
|
+
}
|
|
310
|
+
function passOutcomeRate(outcomes) {
|
|
311
|
+
const classified = outcomes.filter((outcome) => outcome !== null);
|
|
312
|
+
if (classified.length === 0) return null;
|
|
313
|
+
return classified.filter(Boolean).length / classified.length;
|
|
314
|
+
}
|
|
315
|
+
function runPassOutcome(run, threshold) {
|
|
316
|
+
if (hasExplicitTaskFailure(run)) return false;
|
|
317
|
+
const score = runSplitScore(run);
|
|
318
|
+
return score === void 0 ? null : score >= threshold;
|
|
319
|
+
}
|
|
320
|
+
function hasExplicitTaskFailure(run) {
|
|
321
|
+
return run.failureClass !== void 0 && run.failureClass !== "success";
|
|
322
|
+
}
|
|
323
|
+
function tracePassOutcome(trace, threshold) {
|
|
324
|
+
if (trace.failureClass !== void 0 && trace.failureClass !== "success") return false;
|
|
325
|
+
if (trace.ok === false) return false;
|
|
326
|
+
if (isFiniteNumber(trace.score)) return trace.score >= threshold;
|
|
327
|
+
return trace.ok === true ? true : null;
|
|
328
|
+
}
|
|
329
|
+
function isFailedTerminalOutcome(outcome) {
|
|
330
|
+
return outcome === "failed" || outcome === "cancelled" || outcome === "incomplete";
|
|
331
|
+
}
|
|
332
|
+
function terminalSuccess(outcome) {
|
|
333
|
+
if (outcome === "succeeded") return true;
|
|
334
|
+
if (isFailedTerminalOutcome(outcome)) return false;
|
|
335
|
+
}
|
|
336
|
+
function scoresFor(runs, split) {
|
|
337
|
+
return runs.filter((run) => run.splitTag === split).map(runSplitScore).filter(isFiniteNumber);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* RAW and split-exact (`observedSplitScore`): this feeds the per-split means,
|
|
341
|
+
* the overfit gap, and the pass threshold — descriptions of what the runs
|
|
342
|
+
* reported. A gamed run inflating them is visible next to `realnessGatedRuns`,
|
|
343
|
+
* and the promotion number (`passRate`) excludes gated runs entirely.
|
|
344
|
+
*/
|
|
345
|
+
function runSplitScore(run) {
|
|
346
|
+
const score = observedSplitScore(run, run.splitTag === "holdout" ? "holdout" : "search");
|
|
347
|
+
return isFiniteNumber(score) ? score : void 0;
|
|
348
|
+
}
|
|
349
|
+
function meanOrNull(xs) {
|
|
350
|
+
if (xs.length === 0) return null;
|
|
351
|
+
return xs.reduce((sum, x) => sum + x, 0) / xs.length;
|
|
352
|
+
}
|
|
353
|
+
function percentileOrNull(xs, p) {
|
|
354
|
+
if (xs.length === 0) return null;
|
|
355
|
+
const sorted = [...xs].sort((a, b) => a - b);
|
|
356
|
+
return sorted[Math.min(sorted.length - 1, Math.max(0, Math.ceil(p * sorted.length) - 1))];
|
|
357
|
+
}
|
|
358
|
+
function isFiniteNumber(value) {
|
|
359
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
360
|
+
}
|
|
361
|
+
function diffOrNull(a, b) {
|
|
362
|
+
if (a === null || b === null) return null;
|
|
363
|
+
return a - b;
|
|
364
|
+
}
|
|
365
|
+
function gapScore(gap, maxGap) {
|
|
366
|
+
if (gap === null) return null;
|
|
367
|
+
if (maxGap <= 0) return gap <= 0 ? 1 : 0;
|
|
368
|
+
return bounded(1 - Math.max(0, gap) / maxGap);
|
|
369
|
+
}
|
|
370
|
+
function efficiencyScore(metrics, thresholds) {
|
|
371
|
+
const cost = Number.isFinite(thresholds.maxMeanCostUsd) ? metrics.meanCostUsd === null ? null : bounded(thresholds.maxMeanCostUsd / Math.max(metrics.meanCostUsd, 1e-12)) : 1;
|
|
372
|
+
const latency = Number.isFinite(thresholds.maxP95WallMs) ? metrics.p95WallMs === null ? null : bounded(thresholds.maxP95WallMs / Math.max(metrics.p95WallMs, 1e-12)) : 1;
|
|
373
|
+
if (cost === null || latency === null) return null;
|
|
374
|
+
return Math.min(cost, latency);
|
|
375
|
+
}
|
|
376
|
+
function bounded(x) {
|
|
377
|
+
if (!Number.isFinite(x)) return 0;
|
|
378
|
+
return Math.max(0, Math.min(1, x));
|
|
379
|
+
}
|
|
380
|
+
function renderSummary(target, status, metrics, issues) {
|
|
381
|
+
const prefix = `release confidence ${status}: ${target}`;
|
|
382
|
+
const metricText = `scenarios=${metrics.scenarioCount} searchRuns=${metrics.searchRuns} holdoutRuns=${metrics.holdoutRuns} passRate=${fmt(metrics.passRate)} meanScore=${fmt(metrics.meanScore)}`;
|
|
383
|
+
if (issues.length === 0) return `${prefix}; ${metricText}`;
|
|
384
|
+
return `${prefix}; ${metricText}; issues=${issues.map((i) => i.code).join(",")}`;
|
|
385
|
+
}
|
|
386
|
+
function fmt(x) {
|
|
387
|
+
if (x === null) return "n/a";
|
|
388
|
+
return x.toFixed(4);
|
|
389
|
+
}
|
|
390
|
+
//#endregion
|
|
391
|
+
//#region src/promotion-gate.ts
|
|
392
|
+
/**
|
|
393
|
+
* Compute the bootstrap CI on (candidateMean - baselineMean) and a verdict.
|
|
394
|
+
*
|
|
395
|
+
* Uses simple percentile bootstrap on the difference of resampled means.
|
|
396
|
+
* That's the standard non-parametric primitive — no distributional
|
|
397
|
+
* assumptions, robust to skew, easy to reason about.
|
|
398
|
+
*/
|
|
399
|
+
function bootstrapCi(baseline, candidate, options = {}) {
|
|
400
|
+
const alpha = options.alpha ?? .05;
|
|
401
|
+
const iterations = options.iterations ?? 1e3;
|
|
402
|
+
const minTotal = options.minTotalSamples ?? 6;
|
|
403
|
+
const rng = mulberry32(options.seed ?? hashSeed(baseline, candidate));
|
|
404
|
+
const baselineMean = mean(baseline);
|
|
405
|
+
const candidateMean = mean(candidate);
|
|
406
|
+
const delta = candidateMean - baselineMean;
|
|
407
|
+
if (baseline.length + candidate.length < minTotal || baseline.length === 0 || candidate.length === 0) return {
|
|
408
|
+
baselineMean,
|
|
409
|
+
candidateMean,
|
|
410
|
+
delta,
|
|
411
|
+
ciLower: -Infinity,
|
|
412
|
+
ciUpper: Infinity,
|
|
413
|
+
iterations: 0,
|
|
414
|
+
alpha,
|
|
415
|
+
verdict: "INCONCLUSIVE"
|
|
416
|
+
};
|
|
417
|
+
const deltas = new Array(iterations);
|
|
418
|
+
for (let i = 0; i < iterations; i++) {
|
|
419
|
+
const bResample = resample(baseline, rng);
|
|
420
|
+
deltas[i] = mean(resample(candidate, rng)) - mean(bResample);
|
|
421
|
+
}
|
|
422
|
+
deltas.sort((a, b) => a - b);
|
|
423
|
+
const lowerIdx = Math.floor(alpha / 2 * iterations);
|
|
424
|
+
const upperIdx = Math.floor((1 - alpha / 2) * iterations) - 1;
|
|
425
|
+
const ciLower = deltas[Math.max(0, lowerIdx)];
|
|
426
|
+
const ciUpper = deltas[Math.min(iterations - 1, upperIdx)];
|
|
427
|
+
let verdict;
|
|
428
|
+
if (ciLower > 0) verdict = "ADVANCE";
|
|
429
|
+
else if (ciUpper < 0) verdict = "REVERT";
|
|
430
|
+
else if (delta >= 0) verdict = "KEEP";
|
|
431
|
+
else verdict = "INCONCLUSIVE";
|
|
432
|
+
return {
|
|
433
|
+
baselineMean,
|
|
434
|
+
candidateMean,
|
|
435
|
+
delta,
|
|
436
|
+
ciLower,
|
|
437
|
+
ciUpper,
|
|
438
|
+
iterations,
|
|
439
|
+
alpha,
|
|
440
|
+
verdict
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
function mean(xs) {
|
|
444
|
+
if (xs.length === 0) return 0;
|
|
445
|
+
let s = 0;
|
|
446
|
+
for (const x of xs) s += x;
|
|
447
|
+
return s / xs.length;
|
|
448
|
+
}
|
|
449
|
+
function resample(xs, rng) {
|
|
450
|
+
const out = new Array(xs.length);
|
|
451
|
+
for (let i = 0; i < xs.length; i++) out[i] = xs[Math.floor(rng() * xs.length)];
|
|
452
|
+
return out;
|
|
453
|
+
}
|
|
454
|
+
/** Mulberry32 — fast deterministic PRNG. Stable across runs given the same seed. */
|
|
455
|
+
function mulberry32(seed) {
|
|
456
|
+
let t = seed >>> 0;
|
|
457
|
+
return () => {
|
|
458
|
+
t += 1831565813;
|
|
459
|
+
let r = t;
|
|
460
|
+
r = Math.imul(r ^ r >>> 15, r | 1);
|
|
461
|
+
r ^= r + Math.imul(r ^ r >>> 7, r | 61);
|
|
462
|
+
return ((r ^ r >>> 14) >>> 0) / 4294967296;
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
/** Stable seed derived from the inputs — same data → same CI bounds. */
|
|
466
|
+
function hashSeed(a, b) {
|
|
467
|
+
let h = 2166136261;
|
|
468
|
+
for (const x of [...a, ...b]) {
|
|
469
|
+
const view = new Float64Array([x]);
|
|
470
|
+
const bytes = new Uint8Array(view.buffer);
|
|
471
|
+
for (const byte of bytes) {
|
|
472
|
+
h ^= byte;
|
|
473
|
+
h = Math.imul(h, 16777619);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return h >>> 0;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Confirm a candidate's win with a stronger judge: score baseline and candidate outputs independently, then bootstrap a CI to verify the lift generalises beyond the inner loop.
|
|
480
|
+
*/
|
|
481
|
+
async function judgeReplayGate(args) {
|
|
482
|
+
const concurrency = args.judgeConcurrency ?? 4;
|
|
483
|
+
const baselineScores = await scoreAll(args.baselineOutputs, args.judge, concurrency);
|
|
484
|
+
const candidateScores = await scoreAll(args.candidateOutputs, args.judge, concurrency);
|
|
485
|
+
return {
|
|
486
|
+
...bootstrapCi(baselineScores, candidateScores, {
|
|
487
|
+
...args.alpha !== void 0 ? { alpha: args.alpha } : {},
|
|
488
|
+
...args.iterations !== void 0 ? { iterations: args.iterations } : {},
|
|
489
|
+
...args.seed !== void 0 ? { seed: args.seed } : {}
|
|
490
|
+
}),
|
|
491
|
+
baselineSamples: baselineScores.length,
|
|
492
|
+
candidateSamples: candidateScores.length
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
async function scoreAll(outputs, judge, concurrency) {
|
|
496
|
+
const results = new Array(outputs.length);
|
|
497
|
+
let next = 0;
|
|
498
|
+
async function worker() {
|
|
499
|
+
while (true) {
|
|
500
|
+
const i = next++;
|
|
501
|
+
if (i >= outputs.length) return;
|
|
502
|
+
const v = await judge(outputs[i]);
|
|
503
|
+
results[i] = Number.isFinite(v) ? v : 0;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
await Promise.all(Array.from({ length: Math.max(1, concurrency) }, () => worker()));
|
|
507
|
+
return results;
|
|
508
|
+
}
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region src/release-report.ts
|
|
511
|
+
function renderReleaseReport(scorecard, options = {}) {
|
|
512
|
+
const title = options.title ?? `Release Report: ${scorecard.target}`;
|
|
513
|
+
const lines = [];
|
|
514
|
+
lines.push(`# ${title}`);
|
|
515
|
+
lines.push("");
|
|
516
|
+
lines.push(`Status: **${scorecard.status.toUpperCase()}**`);
|
|
517
|
+
lines.push(`Promote: **${scorecard.promote ? "yes" : "no"}**`);
|
|
518
|
+
if (scorecard.candidateId) lines.push(`Candidate: \`${scorecard.candidateId}\``);
|
|
519
|
+
if (scorecard.baselineId) lines.push(`Baseline: \`${scorecard.baselineId}\``);
|
|
520
|
+
lines.push("");
|
|
521
|
+
lines.push(scorecard.summary);
|
|
522
|
+
lines.push("");
|
|
523
|
+
lines.push("## Metrics");
|
|
524
|
+
lines.push("");
|
|
525
|
+
lines.push("| Metric | Value |");
|
|
526
|
+
lines.push("|---|---:|");
|
|
527
|
+
lines.push(`| Scenarios | ${scorecard.metrics.scenarioCount} |`);
|
|
528
|
+
lines.push(`| Search runs | ${scorecard.metrics.searchRuns} |`);
|
|
529
|
+
lines.push(`| Holdout runs | ${scorecard.metrics.holdoutRuns} |`);
|
|
530
|
+
lines.push(`| Unscored runs | ${scorecard.metrics.unscoredRuns} |`);
|
|
531
|
+
lines.push(`| Terminal failures | ${scorecard.metrics.terminalFailureRuns} |`);
|
|
532
|
+
lines.push(`| Pass rate | ${pct(scorecard.metrics.passRate)} |`);
|
|
533
|
+
lines.push(`| Mean score | ${num(scorecard.metrics.meanScore)} |`);
|
|
534
|
+
lines.push(`| Search mean | ${num(scorecard.metrics.searchMeanScore)} |`);
|
|
535
|
+
lines.push(`| Holdout mean | ${num(scorecard.metrics.holdoutMeanScore)} |`);
|
|
536
|
+
lines.push(`| Overfit gap | ${num(scorecard.metrics.overfitGap)} |`);
|
|
537
|
+
lines.push(`| Mean cost | $${num(scorecard.metrics.meanCostUsd)} |`);
|
|
538
|
+
lines.push(`| p95 wall time | ${duration(scorecard.metrics.p95WallMs)} |`);
|
|
539
|
+
lines.push("");
|
|
540
|
+
if (scorecard.issues.length > 0) {
|
|
541
|
+
lines.push("## Issues");
|
|
542
|
+
lines.push("");
|
|
543
|
+
for (const issue of scorecard.issues) lines.push(`- **${issue.severity}** \`${issue.code}\` (${issue.axis}): ${issue.detail}`);
|
|
544
|
+
lines.push("");
|
|
545
|
+
}
|
|
546
|
+
const surfaces = entries(scorecard.metrics.responsibleSurfaceCounts);
|
|
547
|
+
if (surfaces.length > 0) {
|
|
548
|
+
lines.push("## Responsible Surfaces");
|
|
549
|
+
lines.push("");
|
|
550
|
+
for (const [surface, count] of surfaces) lines.push(`- ${surface}: ${count}`);
|
|
551
|
+
lines.push("");
|
|
552
|
+
}
|
|
553
|
+
const failures = entries(scorecard.metrics.failureClassCounts);
|
|
554
|
+
if (failures.length > 0) {
|
|
555
|
+
lines.push("## Failure Classes");
|
|
556
|
+
lines.push("");
|
|
557
|
+
for (const [mode, count] of failures) lines.push(`- ${mode}: ${count}`);
|
|
558
|
+
lines.push("");
|
|
559
|
+
}
|
|
560
|
+
if (options.runs && options.runs.length > 0) {
|
|
561
|
+
lines.push("## Run Summary");
|
|
562
|
+
lines.push("");
|
|
563
|
+
lines.push(summaryTable([...options.runs], {
|
|
564
|
+
comparator: options.comparator ?? scorecard.baselineId ?? void 0,
|
|
565
|
+
split: "holdout"
|
|
566
|
+
}).markdown);
|
|
567
|
+
lines.push("");
|
|
568
|
+
}
|
|
569
|
+
if (options.traceAnalystFindings && options.traceAnalystFindings.length > 0) {
|
|
570
|
+
lines.push("## TraceAnalyst Findings");
|
|
571
|
+
lines.push("");
|
|
572
|
+
for (const finding of options.traceAnalystFindings) lines.push(`- ${finding}`);
|
|
573
|
+
lines.push("");
|
|
574
|
+
}
|
|
575
|
+
const nextActions = options.nextActions ?? defaultNextActions(scorecard);
|
|
576
|
+
if (nextActions.length > 0) {
|
|
577
|
+
lines.push("## Next Actions");
|
|
578
|
+
lines.push("");
|
|
579
|
+
for (const action of nextActions) lines.push(`- ${action}`);
|
|
580
|
+
lines.push("");
|
|
581
|
+
}
|
|
582
|
+
return `${lines.join("\n").trimEnd()}\n`;
|
|
583
|
+
}
|
|
584
|
+
function defaultNextActions(scorecard) {
|
|
585
|
+
if (scorecard.promote) return ["Promote the candidate and keep canaries enabled."];
|
|
586
|
+
return scorecard.issues.filter((issue) => issue.severity === "critical").map((issue) => `Resolve ${issue.code}: ${issue.detail}`);
|
|
587
|
+
}
|
|
588
|
+
function entries(values) {
|
|
589
|
+
return Object.entries(values).filter(([, count]) => count > 0).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]));
|
|
590
|
+
}
|
|
591
|
+
function pct(value) {
|
|
592
|
+
return value === null ? "n/a" : `${(value * 100).toFixed(1)}%`;
|
|
593
|
+
}
|
|
594
|
+
function num(value) {
|
|
595
|
+
return value === null ? "n/a" : value.toFixed(3);
|
|
596
|
+
}
|
|
597
|
+
function duration(value) {
|
|
598
|
+
return value === null ? "n/a" : `${Math.round(value)} ms`;
|
|
599
|
+
}
|
|
600
|
+
//#endregion
|
|
601
|
+
export { evaluateReleaseConfidence as a, assertReleaseConfidence as i, bootstrapCi as n, judgeReplayGate as r, renderReleaseReport as t };
|
|
602
|
+
|
|
603
|
+
//# sourceMappingURL=release-report-Cz9NKH39.js.map
|