@tangle-network/agent-eval 0.217.1 → 0.219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -1
- package/dist/adapters/http.d.ts +3 -3
- package/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +1 -0
- package/dist/adapters/http.js.map +1 -1
- package/dist/{agent-profile-DTt8uGP9.d.ts → agent-profile-D01Io2Xw.d.ts} +4 -4
- package/dist/{agent-profile-DTt8uGP9.d.ts.map → agent-profile-D01Io2Xw.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +13 -13
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +10 -10
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-DyeNcenW.d.ts → analyze-runs-BWAHBDAw.d.ts} +4 -4
- package/dist/{analyze-runs-DyeNcenW.d.ts.map → analyze-runs-BWAHBDAw.d.ts.map} +1 -1
- package/dist/{benchmark-command-xQK8nOI6.js → benchmark-command-BzmMTnvC.js} +664 -565
- package/dist/benchmark-command-BzmMTnvC.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -5
- package/dist/benchmarks/index.js +3 -3
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/campaign/index.d.ts +8 -8
- package/dist/campaign/index.js +11 -11
- package/dist/{campaign-CJGkxAQ6.js → campaign-BVPC6ODQ.js} +452 -282
- package/dist/campaign-BVPC6ODQ.js.map +1 -0
- package/dist/{campaign-evidence-CQYw8_0H.js → campaign-evidence-DunzcJGv.js} +2 -2
- package/dist/campaign-evidence-DunzcJGv.js.map +1 -0
- package/dist/{chat-client-ldqxYYTN.js → chat-client-CMQ8_h4J.js} +2 -2
- package/dist/{chat-client-ldqxYYTN.js.map → chat-client-CMQ8_h4J.js.map} +1 -1
- package/dist/{chat-json-call-DavzexSp.js → chat-json-call-BrZKn0L3.js} +2 -2
- package/dist/{chat-json-call-DavzexSp.js.map → chat-json-call-BrZKn0L3.js.map} +1 -1
- package/dist/cli.js +10 -10
- package/dist/{completion-verifier-B_jw6C9p.js → completion-verifier-Cigap8CG.js} +5 -5
- package/dist/{completion-verifier-B_jw6C9p.js.map → completion-verifier-Cigap8CG.js.map} +1 -1
- package/dist/contract/index.d.ts +11 -11
- package/dist/contract/index.js +91 -11
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-D0352Z4d.js → cost-ledger-BGZB6yY2.js} +75 -2
- package/dist/cost-ledger-BGZB6yY2.js.map +1 -0
- package/dist/{cost-ledger-Jk62OBfF.d.ts → cost-ledger-C1W3ICmP.d.ts} +26 -2
- package/dist/cost-ledger-C1W3ICmP.d.ts.map +1 -0
- package/dist/{default-registry-ClYjq3QE.js → default-registry-BrKmT01n.js} +310 -278
- package/dist/{default-registry-ClYjq3QE.js.map → default-registry-BrKmT01n.js.map} +1 -1
- package/dist/{default-registry-DXgLmoDI.d.ts → default-registry-Cwg_QN3d.d.ts} +6 -6
- package/dist/{default-registry-DXgLmoDI.d.ts.map → default-registry-Cwg_QN3d.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BIkH_gAR.d.ts → define-agent-eval-C2nFhHPu.d.ts} +8 -8
- package/dist/{define-agent-eval-BIkH_gAR.d.ts.map → define-agent-eval-C2nFhHPu.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BDxNlP3D.js → define-agent-eval-UQY3VbJ2.js} +165 -105
- package/dist/define-agent-eval-UQY3VbJ2.js.map +1 -0
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/{dspy-rlm-engine-DhdCr1Dc.js → dspy-rlm-engine-Bn_Mt_LW.js} +3 -3
- package/dist/{dspy-rlm-engine-DhdCr1Dc.js.map → dspy-rlm-engine-Bn_Mt_LW.js.map} +1 -1
- package/dist/{engine-BvZ0R-36.d.ts → engine-BpGGw6cd.d.ts} +3 -3
- package/dist/{engine-BvZ0R-36.d.ts.map → engine-BpGGw6cd.d.ts.map} +1 -1
- package/dist/eval-campaign-BUMIxKTE.js +393 -0
- package/dist/eval-campaign-BUMIxKTE.js.map +1 -0
- package/dist/{evaluation-jTjC_QQD.d.ts → evaluation-CBdQt_kr.d.ts} +4 -4
- package/dist/{evaluation-jTjC_QQD.d.ts.map → evaluation-CBdQt_kr.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -1
- package/dist/{exact-types-CflbJ9f3.d.ts → exact-types-BYFmYq44.d.ts} +2 -2
- package/dist/{exact-types-CflbJ9f3.d.ts.map → exact-types-BYFmYq44.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +24 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +110 -71
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-Cl6IeNAu.js → exporters-DWvM16LE.js} +2 -2
- package/dist/{exporters-Cl6IeNAu.js.map → exporters-DWvM16LE.js.map} +1 -1
- package/dist/{external-optimizer-process-KVFGvYX1.js → external-optimizer-process-wOLfzsCC.js} +2 -2
- package/dist/{external-optimizer-process-KVFGvYX1.js.map → external-optimizer-process-wOLfzsCC.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-XIHBOSKt.js → external-optimizer-subprocess-D670Oxf2.js} +4 -4
- package/dist/{external-optimizer-subprocess-XIHBOSKt.js.map → external-optimizer-subprocess-D670Oxf2.js.map} +1 -1
- package/dist/{feedback-trajectory-BWmhRBGu.d.ts → feedback-trajectory-DhB9WzYg.d.ts} +3 -3
- package/dist/{feedback-trajectory-BWmhRBGu.d.ts.map → feedback-trajectory-DhB9WzYg.d.ts.map} +1 -1
- package/dist/{findings-store-BMVQtEsm.js → findings-store-CvNo712L.js} +6 -6
- package/dist/{findings-store-BMVQtEsm.js.map → findings-store-CvNo712L.js.map} +1 -1
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +1 -1
- package/dist/{hf-dataset-D9f7-oX7.js → hf-dataset-CKxIJQba.js} +3 -3
- package/dist/{hf-dataset-D9f7-oX7.js.map → hf-dataset-CKxIJQba.js.map} +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/{index-CX-GAUpw.d.ts → index-CHxwfW5g.d.ts} +2 -2
- package/dist/{index-CX-GAUpw.d.ts.map → index-CHxwfW5g.d.ts.map} +1 -1
- package/dist/{index-BLGqZ81N.d.ts → index-CVFStrQD.d.ts} +8 -8
- package/dist/{index-BLGqZ81N.d.ts.map → index-CVFStrQD.d.ts.map} +1 -1
- package/dist/{index-9jJ2fKSX.d.ts → index-CalAsXMR.d.ts} +7 -5
- package/dist/index-CalAsXMR.d.ts.map +1 -0
- package/dist/{index-CiRwLv2R.d.ts → index-D7fmC-1K.d.ts} +3 -4
- package/dist/index-D7fmC-1K.d.ts.map +1 -0
- package/dist/{index-BiT6RtNH.d.ts → index-DAXfpVf7.d.ts} +10 -10
- package/dist/{index-BiT6RtNH.d.ts.map → index-DAXfpVf7.d.ts.map} +1 -1
- package/dist/{index-ZuWx52WG.d.ts → index-Q6DvdcwI.d.ts} +67 -24
- package/dist/index-Q6DvdcwI.d.ts.map +1 -0
- package/dist/index.d.ts +26 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +615 -692
- package/dist/index.js.map +1 -1
- package/dist/{integrity-DOd9Q86O.js → integrity-C8oUeB0g.js} +322 -197
- package/dist/integrity-C8oUeB0g.js.map +1 -0
- package/dist/{integrity-_qgZLA5p.d.ts → integrity-CCwvezWS.d.ts} +2 -2
- package/dist/{integrity-_qgZLA5p.d.ts.map → integrity-CCwvezWS.d.ts.map} +1 -1
- package/dist/{journal-CR4QikYp.js → journal-C7om8Gum.js} +48 -38
- package/dist/journal-C7om8Gum.js.map +1 -0
- package/dist/judge-gate-Co5tuh57.js.map +1 -1
- package/dist/{judge-gate-DsL0yFcb.d.ts → judge-gate-Dc_mXQsL.d.ts} +2 -2
- package/dist/judge-gate-Dc_mXQsL.d.ts.map +1 -0
- package/dist/{kind-factory-Gy4fXixd.js → kind-factory-BhxbtUsQ.js} +2 -2
- package/dist/{kind-factory-Gy4fXixd.js.map → kind-factory-BhxbtUsQ.js.map} +1 -1
- package/dist/ledger-core/index.d.ts +1 -1
- package/dist/ledger-core/index.js +2 -2
- package/dist/ledger-core/lock-holder.d.ts +2 -0
- package/dist/ledger-core/lock-holder.js +181 -0
- package/dist/ledger-core/lock-holder.js.map +1 -0
- package/dist/{ledger-core-DrJhbms9.js → ledger-core-CAxUdDk0.js} +2 -2
- package/dist/{ledger-core-DrJhbms9.js.map → ledger-core-CAxUdDk0.js.map} +1 -1
- package/dist/{llm-client-BshCREn6.js → llm-client-DXuOTseU.js} +239 -249
- package/dist/llm-client-DXuOTseU.js.map +1 -0
- package/dist/{llm-judge-C8jMTNNG.js → llm-judge-Cc8vDJh_.js} +648 -459
- package/dist/llm-judge-Cc8vDJh_.js.map +1 -0
- package/dist/lock-holder-DaJbfpci.d.ts +86 -0
- package/dist/lock-holder-DaJbfpci.d.ts.map +1 -0
- package/dist/matrix/index.d.ts +2 -2
- package/dist/{matrix-DHe-dwVJ.d.ts → matrix-Cf-AGxGh.d.ts} +4 -4
- package/dist/{matrix-DHe-dwVJ.d.ts.map → matrix-Cf-AGxGh.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/{mint-zszyYlpA.js → mint-CbdwjTPW.js} +2 -2
- package/dist/{mint-zszyYlpA.js.map → mint-CbdwjTPW.js.map} +1 -1
- package/dist/{mint-BRZXuwRi.d.ts → mint-CkzpVPdz.d.ts} +3 -3
- package/dist/{mint-BRZXuwRi.d.ts.map → mint-CkzpVPdz.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{pareto-BzsxidFD.js → pareto-BiBnQXAE.js} +306 -212
- package/dist/pareto-BiBnQXAE.js.map +1 -0
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{prime-protocol-BWG2DQIk.d.ts → prime-protocol-CckHBxGu.d.ts} +3 -3
- package/dist/{prime-protocol-BWG2DQIk.d.ts.map → prime-protocol-CckHBxGu.d.ts.map} +1 -1
- package/dist/{promotion-gate-DaY95yU6.d.ts → promotion-gate-CkVZHagC.d.ts} +3 -3
- package/dist/{promotion-gate-DaY95yU6.d.ts.map → promotion-gate-CkVZHagC.d.ts.map} +1 -1
- package/dist/{proposal-findings-BbWidvUk.js → proposal-findings-E1aSC_cU.js} +2 -2
- package/dist/{proposal-findings-BbWidvUk.js.map → proposal-findings-E1aSC_cU.js.map} +1 -1
- package/dist/{registry-ssNoHzwD.d.ts → registry-B_yG-1jh.d.ts} +5 -5
- package/dist/{registry-ssNoHzwD.d.ts.map → registry-B_yG-1jh.d.ts.map} +1 -1
- package/dist/{render-C-w2EZ6p.js → render-Cs34y0iX.js} +404 -208
- package/dist/render-Cs34y0iX.js.map +1 -0
- package/dist/reporting.d.ts +3 -3
- package/dist/{researcher-0ABVIdGa.d.ts → researcher-H0p44OYC.d.ts} +5 -5
- package/dist/{researcher-0ABVIdGa.d.ts.map → researcher-H0p44OYC.d.ts.map} +1 -1
- package/dist/{reward-DrZ71vnf.d.ts → reward-BeUgVVC_.d.ts} +2 -2
- package/dist/{reward-DrZ71vnf.d.ts.map → reward-BeUgVVC_.d.ts.map} +1 -1
- package/dist/{reward-hacking-E52wq86n.d.ts → reward-hacking-WTxUbtbb.d.ts} +2 -2
- package/dist/{reward-hacking-E52wq86n.d.ts.map → reward-hacking-WTxUbtbb.d.ts.map} +1 -1
- package/dist/rl.d.ts +8 -8
- package/dist/rl.js +4 -4
- package/dist/rollout/index.d.ts +3 -3
- package/dist/rollout/index.js +5 -5
- package/dist/{rollout-D6C50mfA.js → rollout-Dd1ucT_M.js} +5 -5
- package/dist/{rollout-D6C50mfA.js.map → rollout-Dd1ucT_M.js.map} +1 -1
- package/dist/{rubric-predictive-validity-DiwT8PbL.d.ts → rubric-predictive-validity-noY7uE03.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-DiwT8PbL.d.ts.map → rubric-predictive-validity-noY7uE03.d.ts.map} +1 -1
- package/dist/{run-record-CaxbLq6Y.d.ts → run-record-C3awiXPf.d.ts} +2 -2
- package/dist/{run-record-CaxbLq6Y.d.ts.map → run-record-C3awiXPf.d.ts.map} +1 -1
- package/dist/schema-C-ziyJD7.d.ts.map +1 -1
- package/dist/{schema-DxcKTzbi.js → schema-CvhfLjtZ.js} +77 -47
- package/dist/schema-CvhfLjtZ.js.map +1 -0
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-DxqjBxA-.d.ts → search-kernel-Dloxd6gs.d.ts} +5 -5
- package/dist/{search-kernel-DxqjBxA-.d.ts.map → search-kernel-Dloxd6gs.d.ts.map} +1 -1
- package/dist/{search-ledger-TUvB5gWH.js → search-ledger-CZRqtFbW.js} +252 -245
- package/dist/search-ledger-CZRqtFbW.js.map +1 -0
- package/dist/{search-ledger-file-UKCO2r8a.js → search-ledger-file-Bd5Tioq6.js} +3 -3
- package/dist/{search-ledger-file-UKCO2r8a.js.map → search-ledger-file-Bd5Tioq6.js.map} +1 -1
- package/dist/{search-shipper-Cw2z3-td.js → search-shipper-Dn3NLsuH.js} +3 -3
- package/dist/{search-shipper-Cw2z3-td.js.map → search-shipper-Dn3NLsuH.js.map} +1 -1
- package/dist/{search-summary-DQIvJsSB.js → search-summary-D4bwYnAE.js} +3 -3
- package/dist/{search-summary-DQIvJsSB.js.map → search-summary-D4bwYnAE.js.map} +1 -1
- package/dist/{server-DoVbqqtJ.js → server-8TS8XCvg.js} +3 -3
- package/dist/{server-DoVbqqtJ.js.map → server-8TS8XCvg.js.map} +1 -1
- package/dist/{single-run-lock-U58yf8N6.js → single-run-lock-Dekd8_Wv.js} +7 -7
- package/dist/single-run-lock-Dekd8_Wv.js.map +1 -0
- package/dist/{skillopt-optimization-method-kyL94-ri.js → skillopt-optimization-method-DLKqdhcR.js} +1384 -1059
- package/dist/skillopt-optimization-method-DLKqdhcR.js.map +1 -0
- package/dist/{statistical-heldout-C9AbgREN.d.ts → statistical-heldout-3z3I-kJN.d.ts} +3 -3
- package/dist/{statistical-heldout-C9AbgREN.d.ts.map → statistical-heldout-3z3I-kJN.d.ts.map} +1 -1
- package/dist/{store-otlp-BteDAbHK.js → store-otlp-dyWE3wAG.js} +2 -2
- package/dist/{store-otlp-BteDAbHK.js.map → store-otlp-dyWE3wAG.js.map} +1 -1
- package/dist/{store-tool-spans-D5l_OfTJ.js → store-tool-spans-DIUgZbzu.js} +3 -3
- package/dist/{store-tool-spans-D5l_OfTJ.js.map → store-tool-spans-DIUgZbzu.js.map} +1 -1
- package/dist/{store-tool-spans-DZS0HWVf.d.ts → store-tool-spans-DPwXHQkH.d.ts} +7 -7
- package/dist/{store-tool-spans-DZS0HWVf.d.ts.map → store-tool-spans-DPwXHQkH.d.ts.map} +1 -1
- package/dist/{summary-report-DM7tlml1.d.ts → summary-report-C8V49Jt3.d.ts} +18 -3
- package/dist/summary-report-C8V49Jt3.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +3 -3
- package/dist/{systemone-Bp_Ac0p1.d.ts → systemone-DVA7t76V.d.ts} +6 -6
- package/dist/{systemone-Bp_Ac0p1.d.ts.map → systemone-DVA7t76V.d.ts.map} +1 -1
- package/dist/{systemone-review-CwE6JGIp.d.ts → systemone-review-CUBMuTLi.d.ts} +2 -2
- package/dist/{systemone-review-CwE6JGIp.d.ts.map → systemone-review-CUBMuTLi.d.ts.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/{terminal-record-78g6E4vh.js → terminal-record-D4Rv-j1W.js} +241 -193
- package/dist/{terminal-record-78g6E4vh.js.map → terminal-record-D4Rv-j1W.js.map} +1 -1
- package/dist/{tool-groups-DyNz2JZ_.d.ts → tool-groups-LISbBWCg.d.ts} +3 -3
- package/dist/tool-groups-LISbBWCg.d.ts.map +1 -0
- package/dist/{trace-questions-xxwgsuMi.d.ts → trace-questions-C42fYEE4.d.ts} +4 -4
- package/dist/{trace-questions-xxwgsuMi.d.ts.map → trace-questions-C42fYEE4.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +3 -3
- package/dist/traces.d.ts +6 -6
- package/dist/traces.js +3 -3
- package/dist/trajectory-replay/index.d.ts +4 -1
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +854 -823
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-BGRglkKd.js → tree-DSqwJpL9.js} +122 -14
- package/dist/tree-DSqwJpL9.js.map +1 -0
- package/dist/{types-CW8ewATZ.d.ts → types-8yQzNm8u.d.ts} +4 -4
- package/dist/{types-CW8ewATZ.d.ts.map → types-8yQzNm8u.d.ts.map} +1 -1
- package/dist/{types-D8GhJoHk.d.ts → types-CHfn1zg5.d.ts} +70 -72
- package/dist/types-CHfn1zg5.d.ts.map +1 -0
- package/dist/{types-DtMbFw6U.d.ts → types-D8GXK9Z5.d.ts} +3 -3
- package/dist/{types-DtMbFw6U.d.ts.map → types-D8GXK9Z5.d.ts.map} +1 -1
- package/dist/{types-D-mgRzlh.d.ts → types-eMhdacVp.d.ts} +2 -2
- package/dist/{types-D-mgRzlh.d.ts.map → types-eMhdacVp.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/campaign-proposers.md +16 -0
- package/docs/concepts.md +31 -0
- package/docs/design/statistics-decisions.md +1 -1
- package/docs/eval-surface-map.md +1 -0
- package/docs/profile-json-identity.md +1 -2
- package/docs/public-api.md +100 -88
- package/package.json +8 -6
- package/dist/benchmark-command-xQK8nOI6.js.map +0 -1
- package/dist/campaign-CJGkxAQ6.js.map +0 -1
- package/dist/campaign-evidence-CQYw8_0H.js.map +0 -1
- package/dist/cost-ledger-D0352Z4d.js.map +0 -1
- package/dist/cost-ledger-Jk62OBfF.d.ts.map +0 -1
- package/dist/define-agent-eval-BDxNlP3D.js.map +0 -1
- package/dist/eval-campaign-BLEfBGbA.js +0 -343
- package/dist/eval-campaign-BLEfBGbA.js.map +0 -1
- package/dist/index-9jJ2fKSX.d.ts.map +0 -1
- package/dist/index-CiRwLv2R.d.ts.map +0 -1
- package/dist/index-ZuWx52WG.d.ts.map +0 -1
- package/dist/integrity-DOd9Q86O.js.map +0 -1
- package/dist/journal-CR4QikYp.js.map +0 -1
- package/dist/judge-gate-DsL0yFcb.d.ts.map +0 -1
- package/dist/llm-client-BshCREn6.js.map +0 -1
- package/dist/llm-judge-C8jMTNNG.js.map +0 -1
- package/dist/pareto-BzsxidFD.js.map +0 -1
- package/dist/render-C-w2EZ6p.js.map +0 -1
- package/dist/schema-DxcKTzbi.js.map +0 -1
- package/dist/search-ledger-TUvB5gWH.js.map +0 -1
- package/dist/single-run-lock-U58yf8N6.js.map +0 -1
- package/dist/skillopt-optimization-method-kyL94-ri.js.map +0 -1
- package/dist/summary-report-DM7tlml1.d.ts.map +0 -1
- package/dist/tool-groups-DyNz2JZ_.d.ts.map +0 -1
- package/dist/tree-BGRglkKd.js.map +0 -1
- package/dist/types-D8GhJoHk.d.ts.map +0 -1
package/dist/experiment/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { c as studentTCdf, i as pairedBootstrap, l as studentTQuantile, n as BOO
|
|
|
9
9
|
import { a as requiredSampleSize, i as requiredPairedSampleSize, n as mcnemarRequiredN, r as pairedMde, t as mcnemarPower } from "../power-and-mde-N5nU4_Ly.js";
|
|
10
10
|
import { t as eProcess } from "../sequential-eprocess-DodI6RoF.js";
|
|
11
11
|
import { a as heldoutSignificance, o as pairHoldout } from "../statistical-heldout-Bksv92Th.js";
|
|
12
|
-
import { S as openFinalEvidenceLedger, b as FinalEvidenceConflictError, i as verifyEvidenceReceipt, n as createEvidenceReceipt, r as isIndependentEvidence, t as createCampaignEvidenceReceipt, x as FinalEvidenceError, y as powerPreflight } from "../campaign-evidence-
|
|
12
|
+
import { S as openFinalEvidenceLedger, b as FinalEvidenceConflictError, i as verifyEvidenceReceipt, n as createEvidenceReceipt, r as isIndependentEvidence, t as createCampaignEvidenceReceipt, x as FinalEvidenceError, y as powerPreflight } from "../campaign-evidence-DunzcJGv.js";
|
|
13
13
|
import { n as evaluatePredicate, r as readField, t as compareValues } from "../predicate-FdKmElA_.js";
|
|
14
14
|
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "../claim-BPVuyHuy.js";
|
|
15
15
|
import { n as pairedEvalueSequence } from "../sequential-BVv1sjsw.js";
|
|
@@ -1261,8 +1261,8 @@ function sealRandomizedCanaryRule(rule) {
|
|
|
1261
1261
|
algo: "sha256-rfc8785"
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
/**
|
|
1265
|
-
function
|
|
1264
|
+
/** Check the registration seal, the cohort receipt, the frozen roster and the independent verifier. */
|
|
1265
|
+
function verifyCohortEvidence(sealed, cohort, rows, verifyCohort) {
|
|
1266
1266
|
if (sealed.algo !== "sha256-rfc8785") throw new ValidationError("randomized canary: unsupported registration digest scheme");
|
|
1267
1267
|
validateRule(sealed.rule);
|
|
1268
1268
|
if (hashCanonical(sealed.rule) !== sealed.digest) throw new ValidationError("randomized canary: registration digest mismatch");
|
|
@@ -1287,57 +1287,83 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1287
1287
|
if (!Number.isSafeInteger(cohort.assignmentCount) || cohort.assignmentCount < 1 || rows.length !== cohort.assignmentCount) throw new ValidationError("randomized canary: assignment count differs from complete ledger receipt");
|
|
1288
1288
|
if (randomizedCanaryRosterDigest(rows) !== cohort.assignmentRosterDigest) throw new ValidationError("randomized canary: assignment roster digest mismatch");
|
|
1289
1289
|
if (randomizedCanaryObservationDigest(rows) !== cohort.observationSnapshotDigest) throw new ValidationError("randomized canary: frozen observation snapshot digest mismatch");
|
|
1290
|
+
verifyCohortTimes(sealed, cohort);
|
|
1291
|
+
if (typeof verifyCohort !== "function") throw new ValidationError("randomized canary: independent cohort verifier is required");
|
|
1292
|
+
const verification = verifyCohort(cohort, sealed);
|
|
1293
|
+
if (verification?.verified !== true || verification.authorityId !== cohort.authorityId || verification.protocolWitnessedBeforeTraffic !== true || verification.familySlotReservedBeforeTraffic !== true || verification.eligibilityAndDispositionVerified !== true || verification.randomizationVerified !== true || verification.rosterCompleteAtCutoff !== true || verification.outcomeAndBillingSnapshotFrozen !== true || verification.sourceJoinsVerified !== true || verification.armIsolationVerified !== true) throw new ValidationError(`randomized canary: cohort attestation or completeness unverified${verification?.verified === false ? `: ${verification.reason}` : ""}`);
|
|
1294
|
+
}
|
|
1295
|
+
/** Require the ledger closure, observation freeze and attestation times to match the registered cutoff. */
|
|
1296
|
+
function verifyCohortTimes(sealed, cohort) {
|
|
1290
1297
|
const cutoff = Date.parse(sealed.rule.analysisCutoff);
|
|
1291
1298
|
const closedAt = Date.parse(cohort.closedAt);
|
|
1292
1299
|
const frozenAt = Date.parse(cohort.observationFrozenAt);
|
|
1293
1300
|
const attestedAt = Date.parse(cohort.attestedAt);
|
|
1294
1301
|
const expectedFreezeAt = cutoff + sealed.rule.outcomeMaturityMs;
|
|
1295
1302
|
if (!Number.isFinite(closedAt) || closedAt < cutoff || !cohort.closedAt.endsWith("Z") || !Number.isFinite(frozenAt) || frozenAt !== expectedFreezeAt || closedAt > frozenAt || !cohort.observationFrozenAt.endsWith("Z") || !Number.isFinite(attestedAt) || attestedAt < frozenAt || !cohort.attestedAt.endsWith("Z")) throw new ValidationError("randomized canary: ledger closure or frozen observation time differs from registered cutoffs");
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
+
}
|
|
1304
|
+
/** Validate one row's evidence fields and count its gaps; returns whether it is a recorded no-execution. */
|
|
1305
|
+
function checkObservationRow(row, index, tally) {
|
|
1306
|
+
if (row.checkedOutcome !== 0 && row.checkedOutcome !== 1 && row.checkedOutcome !== null) throw new ValidationError(`randomized canary: assignment ${index} outcome must be 0, 1, or null`);
|
|
1307
|
+
if (row.checkedOutcome === null) tally.missingOutcomes++;
|
|
1308
|
+
if (row.outcomeSourceId === null) {
|
|
1309
|
+
if (row.checkedOutcome !== null) throw new ValidationError(`randomized canary: assignment ${index} has an outcome without its source`);
|
|
1310
|
+
} else nonEmpty(row.outcomeSourceId, `assignment ${index} outcome source id`);
|
|
1311
|
+
if (row.billedCostUsd === null) tally.missingBilling++;
|
|
1312
|
+
else if (!Number.isFinite(row.billedCostUsd) || row.billedCostUsd < 0) throw new ValidationError(`randomized canary: assignment ${index} billed cost must be nonnegative`);
|
|
1313
|
+
if (row.billingSourceId === null) {
|
|
1314
|
+
if (row.billedCostUsd !== null) throw new ValidationError(`randomized canary: assignment ${index} has billed cost without its source`);
|
|
1315
|
+
} else nonEmpty(row.billingSourceId, `assignment ${index} billing source id`);
|
|
1316
|
+
if (row.turns === null) tally.missingTurns++;
|
|
1317
|
+
else if (!Number.isSafeInteger(row.turns) || row.turns < 0) throw new ValidationError(`randomized canary: assignment ${index} turns must be a nonnegative integer`);
|
|
1318
|
+
if (row.traceSourceId !== null) nonEmpty(row.traceSourceId, `assignment ${index} trace source id`);
|
|
1319
|
+
if (row.noExecutionSourceId !== null) nonEmpty(row.noExecutionSourceId, `assignment ${index} no-execution source id`);
|
|
1320
|
+
if (row.traceSourceId !== null && row.noExecutionSourceId !== null) throw new ValidationError(`randomized canary: assignment ${index} has conflicting trace and no-execution receipts`);
|
|
1321
|
+
const noExecution = row.noExecutionSourceId !== null && row.turns === 0 && row.billedCostUsd === 0 && row.checkedOutcome === 0;
|
|
1322
|
+
if (row.traceSourceId === null && !noExecution) tally.missingTraces++;
|
|
1323
|
+
for (const field of [
|
|
1324
|
+
"servedProfileDigest",
|
|
1325
|
+
"servedCodeRevisionDigest",
|
|
1326
|
+
"outcomeCheckerDigest"
|
|
1327
|
+
]) if (row[field] !== null) nonEmpty(row[field], `assignment ${index} ${field}`);
|
|
1328
|
+
return noExecution;
|
|
1329
|
+
}
|
|
1330
|
+
/** Whether a row was served by, or checked with, anything other than the registered profile, code and checker. */
|
|
1331
|
+
function drifted(row, noExecution, rule) {
|
|
1332
|
+
const expectedProfile = row.arm === "control" ? rule.controlProfileDigest : rule.candidateProfileDigest;
|
|
1333
|
+
return row.traceSourceId !== null && (row.servedProfileDigest !== expectedProfile || row.servedCodeRevisionDigest !== rule.servedCodeRevisionDigest) || row.checkedOutcome !== null && row.outcomeCheckerDigest !== rule.outcomeCheckerDigest || noExecution && (row.servedProfileDigest !== null || row.servedCodeRevisionDigest !== null);
|
|
1334
|
+
}
|
|
1335
|
+
/** Validate every row against the registered rule, then group by arm and cluster. */
|
|
1336
|
+
function tallyObservations(rule, rows) {
|
|
1337
|
+
const tally = {
|
|
1338
|
+
clusters: /* @__PURE__ */ new Map(),
|
|
1339
|
+
arms: {
|
|
1340
|
+
control: [],
|
|
1341
|
+
candidate: []
|
|
1342
|
+
},
|
|
1343
|
+
missingOutcomes: 0,
|
|
1344
|
+
missingBilling: 0,
|
|
1345
|
+
missingTurns: 0,
|
|
1346
|
+
missingTraces: 0,
|
|
1347
|
+
executionDrift: 0
|
|
1303
1348
|
};
|
|
1304
|
-
let missingOutcomes = 0;
|
|
1305
|
-
let missingBilling = 0;
|
|
1306
|
-
let missingTurns = 0;
|
|
1307
|
-
let missingTraces = 0;
|
|
1308
|
-
let executionDrift = 0;
|
|
1309
1349
|
for (const [index, row] of rows.entries()) {
|
|
1310
|
-
if (row
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
if (row.checkedOutcome !== null) throw new ValidationError(`randomized canary: assignment ${index} has an outcome without its source`);
|
|
1314
|
-
} else nonEmpty(row.outcomeSourceId, `assignment ${index} outcome source id`);
|
|
1315
|
-
if (row.billedCostUsd === null) missingBilling++;
|
|
1316
|
-
else if (!Number.isFinite(row.billedCostUsd) || row.billedCostUsd < 0) throw new ValidationError(`randomized canary: assignment ${index} billed cost must be nonnegative`);
|
|
1317
|
-
if (row.billingSourceId === null) {
|
|
1318
|
-
if (row.billedCostUsd !== null) throw new ValidationError(`randomized canary: assignment ${index} has billed cost without its source`);
|
|
1319
|
-
} else nonEmpty(row.billingSourceId, `assignment ${index} billing source id`);
|
|
1320
|
-
if (row.turns === null) missingTurns++;
|
|
1321
|
-
else if (!Number.isSafeInteger(row.turns) || row.turns < 0) throw new ValidationError(`randomized canary: assignment ${index} turns must be a nonnegative integer`);
|
|
1322
|
-
if (row.traceSourceId !== null) nonEmpty(row.traceSourceId, `assignment ${index} trace source id`);
|
|
1323
|
-
if (row.noExecutionSourceId !== null) nonEmpty(row.noExecutionSourceId, `assignment ${index} no-execution source id`);
|
|
1324
|
-
if (row.traceSourceId !== null && row.noExecutionSourceId !== null) throw new ValidationError(`randomized canary: assignment ${index} has conflicting trace and no-execution receipts`);
|
|
1325
|
-
const noExecution = row.noExecutionSourceId !== null && row.turns === 0 && row.billedCostUsd === 0 && row.checkedOutcome === 0;
|
|
1326
|
-
if (row.traceSourceId === null && !noExecution) missingTraces++;
|
|
1327
|
-
for (const field of [
|
|
1328
|
-
"servedProfileDigest",
|
|
1329
|
-
"servedCodeRevisionDigest",
|
|
1330
|
-
"outcomeCheckerDigest"
|
|
1331
|
-
]) if (row[field] !== null) nonEmpty(row[field], `assignment ${index} ${field}`);
|
|
1332
|
-
const expectedProfile = row.arm === "control" ? sealed.rule.controlProfileDigest : sealed.rule.candidateProfileDigest;
|
|
1333
|
-
if (row.traceSourceId !== null && (row.servedProfileDigest !== expectedProfile || row.servedCodeRevisionDigest !== sealed.rule.servedCodeRevisionDigest) || row.checkedOutcome !== null && row.outcomeCheckerDigest !== sealed.rule.outcomeCheckerDigest || noExecution && (row.servedProfileDigest !== null || row.servedCodeRevisionDigest !== null)) executionDrift++;
|
|
1334
|
-
arms[row.arm].push(row);
|
|
1335
|
-
const bucket = clusters.get(row.clusterId) ?? [];
|
|
1350
|
+
if (drifted(row, checkObservationRow(row, index, tally), rule)) tally.executionDrift++;
|
|
1351
|
+
tally.arms[row.arm].push(row);
|
|
1352
|
+
const bucket = tally.clusters.get(row.clusterId) ?? [];
|
|
1336
1353
|
bucket.push(row);
|
|
1337
|
-
clusters.set(row.clusterId, bucket);
|
|
1354
|
+
tally.clusters.set(row.clusterId, bucket);
|
|
1338
1355
|
}
|
|
1339
|
-
|
|
1340
|
-
|
|
1356
|
+
return tally;
|
|
1357
|
+
}
|
|
1358
|
+
/** Count the clusters that hold at least one row of the arm. */
|
|
1359
|
+
function clustersWithArm(tally, arm) {
|
|
1360
|
+
return [...tally.clusters.values()].filter((bucket) => bucket.some((r) => r.arm === arm)).length;
|
|
1361
|
+
}
|
|
1362
|
+
/** The decision with every count and total filled in and no interval or pass yet. */
|
|
1363
|
+
function baseDecision(sealed, cohort, rowCount, tally) {
|
|
1364
|
+
const { clusters, arms, missingOutcomes, missingBilling, missingTurns } = tally;
|
|
1365
|
+
const controlClusters = clustersWithArm(tally, "control");
|
|
1366
|
+
const candidateClusters = clustersWithArm(tally, "candidate");
|
|
1341
1367
|
if (sealed.rule.assignmentUnit === sealed.rule.clusterUnit) {
|
|
1342
1368
|
for (const [clusterId, bucket] of clusters) if (bucket.length !== 1) throw new ValidationError(`randomized canary: ${sealed.rule.assignmentUnit} cluster '${clusterId}' has multiple assignments`);
|
|
1343
1369
|
}
|
|
@@ -1358,7 +1384,7 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1358
1384
|
const p0 = outcomesComplete ? sum("control", "checkedOutcome") / n0 : null;
|
|
1359
1385
|
const p1 = outcomesComplete ? sum("candidate", "checkedOutcome") / n1 : null;
|
|
1360
1386
|
const delta = p0 === null || p1 === null ? null : p1 - p0;
|
|
1361
|
-
|
|
1387
|
+
return {
|
|
1362
1388
|
registrationDigest: sealed.digest,
|
|
1363
1389
|
cohortReceiptSourceId: cohort.attestationSourceId,
|
|
1364
1390
|
assignmentRosterDigest: cohort.assignmentRosterDigest,
|
|
@@ -1366,7 +1392,7 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1366
1392
|
method: "cluster-robust-t",
|
|
1367
1393
|
confidence: .95,
|
|
1368
1394
|
familyAdjustedConfidence: 1 - .05 / sealed.rule.confirmatoryFamilySize,
|
|
1369
|
-
assignments:
|
|
1395
|
+
assignments: rowCount,
|
|
1370
1396
|
controlAssignments: n0,
|
|
1371
1397
|
candidateAssignments: n1,
|
|
1372
1398
|
clusters: clusters.size,
|
|
@@ -1376,8 +1402,8 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1376
1402
|
missingOutcomes,
|
|
1377
1403
|
missingBilling,
|
|
1378
1404
|
missingTurns,
|
|
1379
|
-
missingTraces,
|
|
1380
|
-
executionDrift,
|
|
1405
|
+
missingTraces: tally.missingTraces,
|
|
1406
|
+
executionDrift: tally.executionDrift,
|
|
1381
1407
|
controlSuccessRate: p0,
|
|
1382
1408
|
candidateSuccessRate: p1,
|
|
1383
1409
|
delta,
|
|
@@ -1393,32 +1419,33 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1393
1419
|
refusal: null,
|
|
1394
1420
|
successCriterionMet: false
|
|
1395
1421
|
};
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
if (executionDrift > 0)
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1422
|
+
}
|
|
1423
|
+
/** The first reason the evidence cannot support an estimate, or null when it can. */
|
|
1424
|
+
function refusalReason(rule, tally, result) {
|
|
1425
|
+
const { clusters } = tally;
|
|
1426
|
+
const n0 = result.controlAssignments;
|
|
1427
|
+
const n1 = result.candidateAssignments;
|
|
1428
|
+
if (tally.missingOutcomes > 0 || tally.missingBilling > 0 || tally.missingTurns > 0 || n0 === 0 || n1 === 0) return "missing-evidence";
|
|
1429
|
+
if (tally.missingTraces > 0) return "missing-trace";
|
|
1430
|
+
if (tally.executionDrift > 0) return "execution-drift";
|
|
1431
|
+
if (clusters.size < rule.minimumClusters || result.controlClusters < 20 || result.candidateClusters < 20) return "insufficient-clusters";
|
|
1432
|
+
for (const bucket of clusters.values()) if (bucket.filter((r) => r.arm === "control").length / n0 > .1 || bucket.filter((r) => r.arm === "candidate").length / n1 > .1) return "dominant-cluster";
|
|
1433
|
+
return null;
|
|
1434
|
+
}
|
|
1435
|
+
/** Fill the intervals, p-value and passes, or refuse on zero variance. */
|
|
1436
|
+
function estimateRiskDifference(rule, tally, result) {
|
|
1437
|
+
const { clusters } = tally;
|
|
1438
|
+
const p0 = result.controlSuccessRate;
|
|
1439
|
+
const p1 = result.candidateSuccessRate;
|
|
1440
|
+
const delta = result.delta;
|
|
1441
|
+
const n0 = result.controlAssignments;
|
|
1442
|
+
const n1 = result.candidateAssignments;
|
|
1416
1443
|
const scores = [...clusters.values()].map((bucket) => bucket.reduce((score, row) => score + (row.arm === "candidate" ? (row.checkedOutcome - p1) / n1 : -(row.checkedOutcome - p0) / n0), 0));
|
|
1417
1444
|
const G = clusters.size;
|
|
1418
|
-
const variance = G / (G - 1) * (
|
|
1445
|
+
const variance = G / (G - 1) * (result.assignments - 1) / (result.assignments - 2) * scores.reduce((total, score) => total + score * score, 0);
|
|
1419
1446
|
if (!Number.isFinite(variance) || variance <= 0) {
|
|
1420
1447
|
result.refusal = "zero-variance";
|
|
1421
|
-
return
|
|
1448
|
+
return;
|
|
1422
1449
|
}
|
|
1423
1450
|
const se = Math.sqrt(variance);
|
|
1424
1451
|
const t = delta / se;
|
|
@@ -1434,8 +1461,20 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1434
1461
|
};
|
|
1435
1462
|
result.unadjustedPValue = Math.min(1, 2 * (1 - studentTCdf(Math.abs(t), G - 1)));
|
|
1436
1463
|
result.headline95Pass = result.nominal95Interval.low > 0;
|
|
1437
|
-
result.familywisePass = result.familyAdjustedInterval.low >
|
|
1464
|
+
result.familywisePass = result.familyAdjustedInterval.low > rule.minimumLift;
|
|
1438
1465
|
result.successCriterionMet = result.headline95Pass && result.familywisePass;
|
|
1466
|
+
}
|
|
1467
|
+
/** Apply one registered analysis to the entire frozen assignment roster. */
|
|
1468
|
+
function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
1469
|
+
verifyCohortEvidence(sealed, cohort, rows, verifyCohort);
|
|
1470
|
+
const tally = tallyObservations(sealed.rule, rows);
|
|
1471
|
+
const result = baseDecision(sealed, cohort, rows.length, tally);
|
|
1472
|
+
const refusal = refusalReason(sealed.rule, tally, result);
|
|
1473
|
+
if (refusal !== null) {
|
|
1474
|
+
result.refusal = refusal;
|
|
1475
|
+
return result;
|
|
1476
|
+
}
|
|
1477
|
+
estimateRiskDifference(sealed.rule, tally, result);
|
|
1439
1478
|
return result;
|
|
1440
1479
|
}
|
|
1441
1480
|
//#endregion
|