@tangle-network/agent-eval 0.216.1 → 0.218.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 +137 -57
- package/README.md +2 -2
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-VFcQncbW.d.ts → agent-profile-DTt8uGP9.d.ts} +4 -17
- package/dist/agent-profile-DTt8uGP9.d.ts.map +1 -0
- package/dist/{agent-profile-cell-BK8mlqlq.js → agent-profile-cell-B1V1gUZs.js} +4 -53
- package/dist/agent-profile-cell-B1V1gUZs.js.map +1 -0
- package/dist/{agent-profile-cell-BNp-Js9F.d.ts → agent-profile-cell-BcpFbNd5.d.ts} +2 -22
- package/dist/agent-profile-cell-BcpFbNd5.d.ts.map +1 -0
- package/dist/{agreement-irr-BEWLIF3_.js → agreement-irr-BhAqjluA.js} +5 -5
- package/dist/agreement-irr-BhAqjluA.js.map +1 -0
- package/dist/analyst/index.d.ts +36 -169
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +17 -192
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-D68fd-su.d.ts → analyze-runs-DjlZOVXx.d.ts} +5 -5
- package/dist/{analyze-runs-D68fd-su.d.ts.map → analyze-runs-DjlZOVXx.d.ts.map} +1 -1
- package/dist/{analyze-runs-C84irm4i.js → analyze-runs-DqPJaJ4X.js} +225 -21
- package/dist/analyze-runs-DqPJaJ4X.js.map +1 -0
- package/dist/authenticity/index.d.ts +0 -23
- package/dist/authenticity/index.d.ts.map +1 -1
- package/dist/authenticity/index.js +1 -34
- package/dist/authenticity/index.js.map +1 -1
- package/dist/{benchmark-command-By0vh8q7.js → benchmark-command-BupdHRyf.js} +1225 -661
- package/dist/benchmark-command-BupdHRyf.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -6
- package/dist/benchmarks/index.d.ts.map +1 -1
- package/dist/benchmarks/index.js +4 -4
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/builder-eval/index.d.ts +3 -3
- package/dist/builder-eval/index.js +2 -2
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/campaign/index.d.ts +7 -7
- package/dist/campaign/index.js +15 -15
- package/dist/{campaign-BudZ70zo.js → campaign-CGvUTnmc.js} +324 -800
- package/dist/campaign-CGvUTnmc.js.map +1 -0
- package/dist/{campaign-evidence-Clrn4hBV.js → campaign-evidence-DunzcJGv.js} +10 -18
- package/dist/{campaign-evidence-Clrn4hBV.js.map → campaign-evidence-DunzcJGv.js.map} +1 -1
- package/dist/{canonical-B2RqLofv.js → canonical-Dq2hOQ8L.js} +2 -2
- package/dist/{canonical-B2RqLofv.js.map → canonical-Dq2hOQ8L.js.map} +1 -1
- package/dist/cell-spend-DEWR3nj-.js +90 -0
- package/dist/cell-spend-DEWR3nj-.js.map +1 -0
- package/dist/{chat-client-l-MVDlDk.js → chat-client-B2pXlPdx.js} +2 -2
- package/dist/{chat-client-l-MVDlDk.js.map → chat-client-B2pXlPdx.js.map} +1 -1
- package/dist/{chat-json-call-puMArmtW.js → chat-json-call-Dm9c-b41.js} +3 -2
- package/dist/chat-json-call-Dm9c-b41.js.map +1 -0
- package/dist/{claim-q4HQhK1G.js → claim-BPVuyHuy.js} +3 -3
- package/dist/{claim-q4HQhK1G.js.map → claim-BPVuyHuy.js.map} +1 -1
- package/dist/cli.js +113 -12
- package/dist/cli.js.map +1 -1
- package/dist/{client-BzL9niqi.d.ts → client-hwo3cJjR.d.ts} +3 -16
- package/dist/client-hwo3cJjR.d.ts.map +1 -0
- package/dist/{cluster-bootstrap-qcUWYFl-.js → cluster-bootstrap-DEwwhl0C.js} +3 -3
- package/dist/{cluster-bootstrap-qcUWYFl-.js.map → cluster-bootstrap-DEwwhl0C.js.map} +1 -1
- package/dist/{produced-state-BsDmnwxc.js → completion-verifier-DbLVf3i8.js} +9 -64
- package/dist/completion-verifier-DbLVf3i8.js.map +1 -0
- package/dist/contract/index.d.ts +12 -12
- package/dist/contract/index.js +107 -403
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-BP8V4kUQ.js → cost-ledger-D0352Z4d.js} +4 -8
- package/dist/cost-ledger-D0352Z4d.js.map +1 -0
- package/dist/dataset-DQqhOCPt.d.ts.map +1 -1
- package/dist/{default-registry-COhk9g36.js → default-registry-BJ-Pq6yL.js} +314 -285
- package/dist/default-registry-BJ-Pq6yL.js.map +1 -0
- package/dist/{default-registry-DzHiGruW.d.ts → default-registry-DXgLmoDI.d.ts} +7 -50
- package/dist/default-registry-DXgLmoDI.d.ts.map +1 -0
- package/dist/{define-agent-eval-CNTPzIkp.js → define-agent-eval-BGdFKlrc.js} +170 -110
- package/dist/define-agent-eval-BGdFKlrc.js.map +1 -0
- package/dist/{define-agent-eval-WSck0CZJ.d.ts → define-agent-eval-BlH10zEw.d.ts} +8 -8
- package/dist/define-agent-eval-BlH10zEw.d.ts.map +1 -0
- package/dist/{descriptive-DboxPZrG.js → descriptive-CVNy48rR.js} +2 -2
- package/dist/{descriptive-DboxPZrG.js.map → descriptive-CVNy48rR.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +4 -14
- package/dist/diagnosis/index.d.ts.map +1 -1
- package/dist/diagnosis/index.js +67 -28
- package/dist/diagnosis/index.js.map +1 -1
- package/dist/{dspy-rlm-engine-LRCu61m5.js → dspy-rlm-engine-CSMwudLO.js} +5 -10
- package/dist/dspy-rlm-engine-CSMwudLO.js.map +1 -0
- package/dist/{emitter-HcCmFQl_.d.ts → emitter-DABYYTcH.d.ts} +5 -5
- package/dist/emitter-DABYYTcH.d.ts.map +1 -0
- package/dist/emitter-DbMXUIVP.js.map +1 -1
- package/dist/{engine-3A_4jOlI.d.ts → engine-BvZ0R-36.d.ts} +17 -21
- package/dist/engine-BvZ0R-36.d.ts.map +1 -0
- package/dist/{equal-terms-BtdXayCJ.js → equal-terms-DbPGcVtI.js} +2 -2
- package/dist/equal-terms-DbPGcVtI.js.map +1 -0
- package/dist/{errors-DVZiqS7K.js → errors-BcOs5MKW.js} +2 -8
- package/dist/{errors-DVZiqS7K.js.map → errors-BcOs5MKW.js.map} +1 -1
- package/dist/eval-campaign-BUMIxKTE.js +393 -0
- package/dist/eval-campaign-BUMIxKTE.js.map +1 -0
- package/dist/{evaluation-6Yoi74gM.d.ts → evaluation-BOZ38vOH.d.ts} +7 -7
- package/dist/evaluation-BOZ38vOH.d.ts.map +1 -0
- package/dist/evaluation.d.ts +2 -2
- package/dist/evaluation.js +1 -1
- package/dist/evaluation.js.map +1 -1
- package/dist/{exact-types-ClugMJfI.d.ts → exact-types-CflbJ9f3.d.ts} +2 -2
- package/dist/{exact-types-ClugMJfI.d.ts.map → exact-types-CflbJ9f3.d.ts.map} +1 -1
- package/dist/{exec-ChJ6d5if.js → exec-CpbtOXVt.js} +2 -24
- package/dist/{exec-ChJ6d5if.js.map → exec-CpbtOXVt.js.map} +1 -1
- package/dist/execution-tracks-CpgFPpS5.js.map +1 -1
- package/dist/experiment/index.d.ts +9 -112
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +258 -311
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-X4xwla8A.js → exporters-DWvM16LE.js} +3 -3
- package/dist/exporters-DWvM16LE.js.map +1 -0
- package/dist/{exporters-ChTnR90l.d.ts → exporters-Dk3oEbK_.d.ts} +2 -4
- package/dist/{exporters-ChTnR90l.d.ts.map → exporters-Dk3oEbK_.d.ts.map} +1 -1
- package/dist/{external-optimizer-process-BjMGUuds.js → external-optimizer-process-C3Wm7Vhn.js} +4 -3
- package/dist/external-optimizer-process-C3Wm7Vhn.js.map +1 -0
- package/dist/{external-optimizer-subprocess-BqW0hHcI.js → external-optimizer-subprocess-B5gdLRZv.js} +9 -11
- package/dist/external-optimizer-subprocess-B5gdLRZv.js.map +1 -0
- package/dist/{extract-usage-BrnzRJ6H.js → extract-usage-BZLU01kR.js} +2 -23
- package/dist/{extract-usage-BrnzRJ6H.js.map → extract-usage-BZLU01kR.js.map} +1 -1
- package/dist/{failure-cluster-CbgEDcFJ.d.ts → failure-cluster-DN0t63Z0.d.ts} +4 -43
- package/dist/failure-cluster-DN0t63Z0.d.ts.map +1 -0
- package/dist/{failure-taxonomy-CjabTATj.js → failure-taxonomy-Bx5oWqaW.js} +2 -19
- package/dist/{failure-taxonomy-CjabTATj.js.map → failure-taxonomy-Bx5oWqaW.js.map} +1 -1
- package/dist/{feedback-trajectory-C4EG0nNH.d.ts → feedback-trajectory-BWmhRBGu.d.ts} +7 -9
- package/dist/feedback-trajectory-BWmhRBGu.d.ts.map +1 -0
- package/dist/{semantic-concept-judge-BQF8te0T.js → findings-store-BtTzPL0d.js} +9 -249
- package/dist/findings-store-BtTzPL0d.js.map +1 -0
- package/dist/fuzz.d.ts +19 -62
- package/dist/fuzz.d.ts.map +1 -1
- package/dist/fuzz.js +62 -108
- package/dist/fuzz.js.map +1 -1
- package/dist/{hf-dataset-BR2yhuNn.js → hf-dataset-CKxIJQba.js} +4 -24
- package/dist/hf-dataset-CKxIJQba.js.map +1 -0
- package/dist/hosted/index.d.ts +2 -2
- package/dist/hosted/index.js +2 -2
- package/dist/{index-CyszSg4O.d.ts → index-B16FNdW5.d.ts} +145 -360
- package/dist/index-B16FNdW5.d.ts.map +1 -0
- package/dist/{index-DV-jSzxF.d.ts → index-BLGqZ81N.d.ts} +10 -15
- package/dist/{index-DV-jSzxF.d.ts.map → index-BLGqZ81N.d.ts.map} +1 -1
- package/dist/{index-BO41eGj5.d.ts → index-CX-GAUpw.d.ts} +3 -7
- package/dist/index-CX-GAUpw.d.ts.map +1 -0
- package/dist/{index-DHKEAv3s.d.ts → index-CalAsXMR.d.ts} +8 -68
- package/dist/index-CalAsXMR.d.ts.map +1 -0
- package/dist/{index-BFRO6chs.d.ts → index-CiRwLv2R.d.ts} +5 -69
- package/dist/index-CiRwLv2R.d.ts.map +1 -0
- package/dist/{index-DPcngtwt.d.ts → index-DbMOXYnP.d.ts} +11 -36
- package/dist/index-DbMOXYnP.d.ts.map +1 -0
- package/dist/index.d.ts +211 -218
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +999 -1714
- package/dist/index.js.map +1 -1
- package/dist/{integrity-dLiDe2kD.js → integrity-C8oUeB0g.js} +326 -203
- package/dist/integrity-C8oUeB0g.js.map +1 -0
- package/dist/{integrity-BXOsAb3i.js → integrity-W4CADcFc.js} +3 -7
- package/dist/{integrity-BXOsAb3i.js.map → integrity-W4CADcFc.js.map} +1 -1
- package/dist/{integrity-DAMEDFaC.d.ts → integrity-_qgZLA5p.d.ts} +4 -6
- package/dist/{integrity-DAMEDFaC.d.ts.map → integrity-_qgZLA5p.d.ts.map} +1 -1
- package/dist/{internal-Epl-YBZW.js → internal-BTK91Bqt.js} +3 -3
- package/dist/{internal-Epl-YBZW.js.map → internal-BTK91Bqt.js.map} +1 -1
- package/dist/{interval-CELpye1n.js → interval-Dq9gt7jx.js} +3 -3
- package/dist/{interval-CELpye1n.js.map → interval-Dq9gt7jx.js.map} +1 -1
- package/dist/{journal-DfRz9kps.js → journal-C7om8Gum.js} +157 -147
- package/dist/journal-C7om8Gum.js.map +1 -0
- package/dist/json-BhdsJaOQ.js +111 -0
- package/dist/json-BhdsJaOQ.js.map +1 -0
- package/dist/{judge-calibration-BpCy5XQl.js → judge-calibration-BkXMIWA4.js} +3 -3
- package/dist/{judge-calibration-BpCy5XQl.js.map → judge-calibration-BkXMIWA4.js.map} +1 -1
- package/dist/{judge-gate-iY9s4L44.js → judge-gate-Co5tuh57.js} +4 -27
- package/dist/{judge-gate-iY9s4L44.js.map → judge-gate-Co5tuh57.js.map} +1 -1
- package/dist/{judge-gate-CE7CQAgt.d.ts → judge-gate-DsL0yFcb.d.ts} +8 -9
- package/dist/judge-gate-DsL0yFcb.d.ts.map +1 -0
- package/dist/{kind-factory-BobI5Jy3.js → kind-factory-Gy4fXixd.js} +88 -17
- package/dist/kind-factory-Gy4fXixd.js.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -2
- package/dist/ledger-core/index.js +4 -4
- 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-Gq7yp8lP.js → ledger-core-CAxUdDk0.js} +5 -84
- package/dist/ledger-core-CAxUdDk0.js.map +1 -0
- package/dist/{llm-client-CyBAoYiX.js → llm-client-_Y6ic-tf.js} +243 -355
- package/dist/llm-client-_Y6ic-tf.js.map +1 -0
- package/dist/{llm-judge-CG12SQJq.js → llm-judge-Djxh-Uhs.js} +662 -482
- package/dist/llm-judge-Djxh-Uhs.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 +3 -3
- package/dist/matrix/index.js +3 -2
- package/dist/{matrix-Dm0BQW7U.js → matrix-B8l-Nsxd.js} +3 -88
- package/dist/matrix-B8l-Nsxd.js.map +1 -0
- package/dist/{matrix-DSrSxjjy.d.ts → matrix-CCSBna4q.d.ts} +9 -18
- package/dist/matrix-CCSBna4q.d.ts.map +1 -0
- package/dist/{mean-DHoMiudD.js → mean-BbA_JCzW.js} +39 -5
- package/dist/mean-BbA_JCzW.js.map +1 -0
- package/dist/meta-eval/index.d.ts +5 -5
- package/dist/meta-eval/index.js +10 -10
- package/dist/metrics-BKaPBtIG.js.map +1 -1
- package/dist/{mint-DNU8QPG4.d.ts → mint-BRZXuwRi.d.ts} +4 -4
- package/dist/{mint-DNU8QPG4.d.ts.map → mint-BRZXuwRi.d.ts.map} +1 -1
- package/dist/{mint-QaD5cA0u.js → mint-CbdwjTPW.js} +4 -4
- package/dist/{mint-QaD5cA0u.js.map → mint-CbdwjTPW.js.map} +1 -1
- package/dist/{multi-layer-verifier-BUaQ4C17.d.ts → multi-layer-verifier-DEgMUk6v.d.ts} +2 -2
- package/dist/{multi-layer-verifier-BUaQ4C17.d.ts.map → multi-layer-verifier-DEgMUk6v.d.ts.map} +1 -1
- package/dist/{multiplicity-DQUFcbW4.js → multiplicity-Sg0U7h8j.js} +2 -2
- package/dist/{multiplicity-DQUFcbW4.js.map → multiplicity-Sg0U7h8j.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -23
- package/dist/multishot/golden/index.d.ts.map +1 -1
- package/dist/multishot/golden/index.js +3 -3
- package/dist/multishot/golden/index.js.map +1 -1
- package/dist/multishot/index.d.ts +3 -12
- package/dist/multishot/index.d.ts.map +1 -1
- package/dist/multishot/index.js +4 -3
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +114 -10
- package/dist/{otel-spans-B9tUXRHF.js → otel-spans-CdN909k1.js} +3 -3
- package/dist/{otel-spans-B9tUXRHF.js.map → otel-spans-CdN909k1.js.map} +1 -1
- package/dist/{paired-arms-CwMGJsrS.js → paired-arms-Ct4LTKc1.js} +32 -9
- package/dist/paired-arms-Ct4LTKc1.js.map +1 -0
- package/dist/{paired-binary-CvpFHfKZ.js → paired-binary-B_nejA44.js} +3 -36
- package/dist/paired-binary-B_nejA44.js.map +1 -0
- package/dist/{paired-promotion-decision-DPKz8ZnF.d.ts → paired-promotion-decision-CQMJ5xGN.d.ts} +2 -34
- package/dist/paired-promotion-decision-CQMJ5xGN.d.ts.map +1 -0
- package/dist/{paired-promotion-decision-DsAPYGCm.js → paired-promotion-decision-D0SHb-ZL.js} +3 -3
- package/dist/{paired-promotion-decision-DsAPYGCm.js.map → paired-promotion-decision-D0SHb-ZL.js.map} +1 -1
- package/dist/{pareto-Cm6ndrWN.js → pareto-CTv8vozZ.js} +11 -11
- package/dist/pareto-CTv8vozZ.js.map +1 -0
- package/dist/pipelines/index.d.ts +16 -19
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +4 -68
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{power-and-mde-Hj2ubb4B.js → power-and-mde-N5nU4_Ly.js} +3 -3
- package/dist/{power-and-mde-Hj2ubb4B.js.map → power-and-mde-N5nU4_Ly.js.map} +1 -1
- package/dist/{prime-protocol-CHKgA3a6.js → prime-protocol-BFgGrEMP.js} +3 -3
- package/dist/prime-protocol-BFgGrEMP.js.map +1 -0
- package/dist/{prime-protocol-HiB9HX7E.d.ts → prime-protocol-BWG2DQIk.d.ts} +3 -21
- package/dist/prime-protocol-BWG2DQIk.d.ts.map +1 -0
- package/dist/profile-cell.d.ts +2 -2
- package/dist/profile-cell.js +2 -2
- package/dist/{promotion-gate-BawrdPYr.d.ts → promotion-gate-CxEHRsZW.d.ts} +7 -8
- package/dist/{promotion-gate-BawrdPYr.d.ts.map → promotion-gate-CxEHRsZW.d.ts.map} +1 -1
- package/dist/{promotion-policy-KO57gbyV.js → promotion-policy-6A8osGr_.js} +4 -4
- package/dist/{promotion-policy-KO57gbyV.js.map → promotion-policy-6A8osGr_.js.map} +1 -1
- package/dist/{proposal-findings-CY1xKn_a.js → proposal-findings-n-5WBbEx.js} +3 -3
- package/dist/proposal-findings-n-5WBbEx.js.map +1 -0
- package/dist/{query-BUCZCK7F.js → query-B_RZ36an.js} +5 -5
- package/dist/query-B_RZ36an.js.map +1 -0
- package/dist/{query-DK1nWcmp.d.ts → query-Cmv_U8vf.d.ts} +4 -24
- package/dist/{query-DK1nWcmp.d.ts.map → query-Cmv_U8vf.d.ts.map} +1 -1
- package/dist/{random-ByUSnV9w.js → random-DDDcC7YU.js} +2 -2
- package/dist/{random-ByUSnV9w.js.map → random-DDDcC7YU.js.map} +1 -1
- package/dist/{raw-provider-sink-DoHz4JNG.js → raw-provider-sink-75w4FWBj.js} +2 -2
- package/dist/{raw-provider-sink-DoHz4JNG.js.map → raw-provider-sink-75w4FWBj.js.map} +1 -1
- package/dist/{redact-mtCCcT8z.d.ts → redact-DXdlFb_U.d.ts} +2 -3
- package/dist/redact-DXdlFb_U.d.ts.map +1 -0
- package/dist/{redact-B5xXKqQ3.js → redact-mtkTiJVk.js} +2 -7
- package/dist/{redact-B5xXKqQ3.js.map → redact-mtkTiJVk.js.map} +1 -1
- package/dist/{registry-D7_hm2fK.d.ts → registry-ssNoHzwD.d.ts} +4 -4
- package/dist/{registry-D7_hm2fK.d.ts.map → registry-ssNoHzwD.d.ts.map} +1 -1
- package/dist/{release-confidence-CpuP65S5.js → release-confidence-CYIFH-fp.js} +6 -11
- package/dist/release-confidence-CYIFH-fp.js.map +1 -0
- package/dist/{report-command-SC9nqb4M.js → render-Cs34y0iX.js} +625 -587
- package/dist/render-Cs34y0iX.js.map +1 -0
- package/dist/reporting.d.ts +6 -6
- package/dist/reporting.js +8 -8
- package/dist/{researcher-CEcfku-T.d.ts → researcher-GU1tV4dn.d.ts} +9 -9
- package/dist/{researcher-CEcfku-T.d.ts.map → researcher-GU1tV4dn.d.ts.map} +1 -1
- package/dist/{reward-CpCmAM8L.d.ts → reward-DrZ71vnf.d.ts} +3 -26
- package/dist/reward-DrZ71vnf.d.ts.map +1 -0
- package/dist/{reward-hacking-E0d-WVcP.js → reward-hacking-ByuETaIb.js} +3 -3
- package/dist/{reward-hacking-E0d-WVcP.js.map → reward-hacking-ByuETaIb.js.map} +1 -1
- package/dist/{reward-hacking-RVdZ6Kkt.d.ts → reward-hacking-E52wq86n.d.ts} +5 -18
- package/dist/reward-hacking-E52wq86n.d.ts.map +1 -0
- package/dist/reward-nw2xZGZG.js.map +1 -1
- package/dist/rl.d.ts +117 -295
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +27 -747
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +5 -5
- package/dist/rollout/index.js +7 -8
- package/dist/{rollout-DZV1t2Wg.js → rollout-Dd1ucT_M.js} +88 -13
- package/dist/rollout-Dd1ucT_M.js.map +1 -0
- package/dist/{rubric-predictive-validity-DaFW70y9.js → rubric-predictive-validity-D3_oI72N.js} +3 -3
- package/dist/{rubric-predictive-validity-DaFW70y9.js.map → rubric-predictive-validity-D3_oI72N.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C03EC7ZE.d.ts → rubric-predictive-validity-DiwT8PbL.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C03EC7ZE.d.ts.map → rubric-predictive-validity-DiwT8PbL.d.ts.map} +1 -1
- package/dist/{run-record-C1E24G2A.d.ts → run-record-CaxbLq6Y.d.ts} +4 -10
- package/dist/run-record-CaxbLq6Y.d.ts.map +1 -0
- package/dist/{run-record-C5e7FjhJ.js → run-record-CysKLB93.js} +3 -3
- package/dist/run-record-CysKLB93.js.map +1 -0
- package/dist/{run-record-Boc5IUTp.js → run-record-DhEJgoPz.js} +4 -4
- package/dist/{run-record-Boc5IUTp.js.map → run-record-DhEJgoPz.js.map} +1 -1
- package/dist/sandbox-harness-BlSOu4LX.d.ts.map +1 -1
- package/dist/{schema-CSf6qWgZ.js → schema-Bt2vLFm3.js} +2 -14
- package/dist/schema-Bt2vLFm3.js.map +1 -0
- package/dist/schema-C-ziyJD7.d.ts.map +1 -1
- package/dist/{schema-BuiujZ-g.js → schema-CvhfLjtZ.js} +78 -48
- package/dist/schema-CvhfLjtZ.js.map +1 -0
- package/dist/{schema-2g7trUwH.d.ts → schema-D6EVKzTB.d.ts} +4 -5
- package/dist/schema-D6EVKzTB.d.ts.map +1 -0
- package/dist/search/index.d.ts +3 -31
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{search-kernel-DyNEa6IU.d.ts → search-kernel-p9JB3SmL.d.ts} +10 -27
- package/dist/search-kernel-p9JB3SmL.d.ts.map +1 -0
- package/dist/{search-ledger-CVUGLDZp.js → search-ledger-ClpN4I3e.js} +7 -7
- package/dist/{search-ledger-CVUGLDZp.js.map → search-ledger-ClpN4I3e.js.map} +1 -1
- package/dist/{search-ledger-file-DDQUgvCg.js → search-ledger-file-Bd5Tioq6.js} +4 -4
- package/dist/search-ledger-file-Bd5Tioq6.js.map +1 -0
- package/dist/{search-shipper-BOSD46qv.js → search-shipper-Bg2HW3Uv.js} +4 -4
- package/dist/search-shipper-Bg2HW3Uv.js.map +1 -0
- package/dist/{search-summary-BQCSWf1g.js → search-summary-CrBuvVnf.js} +5 -5
- package/dist/{search-summary-BQCSWf1g.js.map → search-summary-CrBuvVnf.js.map} +1 -1
- package/dist/{sequential-CzK5DarL.js → sequential-BVv1sjsw.js} +2 -32
- package/dist/{sequential-CzK5DarL.js.map → sequential-BVv1sjsw.js.map} +1 -1
- package/dist/{sequential-Bf_pbE50.js → sequential-CimQrbjv.js} +5 -5
- package/dist/sequential-CimQrbjv.js.map +1 -0
- package/dist/{sequential-BhsrMupG.d.ts → sequential-KwGspfeR.d.ts} +2 -9
- package/dist/{sequential-BhsrMupG.d.ts.map → sequential-KwGspfeR.d.ts.map} +1 -1
- package/dist/{sequential-eprocess-DM_qENCl.js → sequential-eprocess-DodI6RoF.js} +2 -2
- package/dist/{sequential-eprocess-DM_qENCl.js.map → sequential-eprocess-DodI6RoF.js.map} +1 -1
- package/dist/{server-e9oWO_bN.js → server-C6M0qR8h.js} +101 -101
- package/dist/server-C6M0qR8h.js.map +1 -0
- package/dist/{single-run-lock-CV9Eyd_q.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-BiwA8nfX.js → skillopt-optimization-method-5dlex7MJ.js} +1386 -1184
- package/dist/skillopt-optimization-method-5dlex7MJ.js.map +1 -0
- package/dist/{spans-BHAUXMGN.d.ts → spans-CVngGij3.d.ts} +2 -2
- package/dist/{spans-BHAUXMGN.d.ts.map → spans-CVngGij3.d.ts.map} +1 -1
- package/dist/{statistical-heldout-CYpGaoDH.d.ts → statistical-heldout-BHfLZHrm.d.ts} +8 -67
- package/dist/statistical-heldout-BHfLZHrm.d.ts.map +1 -0
- package/dist/{statistical-heldout-42NlCNDe.js → statistical-heldout-Bksv92Th.js} +3 -3
- package/dist/statistical-heldout-Bksv92Th.js.map +1 -0
- package/dist/{steps-Bg5-KVx1.d.ts → steps-DlepJPwD.d.ts} +2 -56
- package/dist/steps-DlepJPwD.d.ts.map +1 -0
- package/dist/{store-C4avFjIi.d.ts → store-B3nWRy3B.d.ts} +2 -2
- package/dist/{store-C4avFjIi.d.ts.map → store-B3nWRy3B.d.ts.map} +1 -1
- package/dist/{store-otlp-DJ9dtA5x.js → store-otlp-BteDAbHK.js} +3 -3
- package/dist/{store-otlp-DJ9dtA5x.js.map → store-otlp-BteDAbHK.js.map} +1 -1
- package/dist/{store-tool-spans-CIX5arAG.js → store-tool-spans-D5l_OfTJ.js} +8 -8
- package/dist/store-tool-spans-D5l_OfTJ.js.map +1 -0
- package/dist/{store-tool-spans-DdCSPa7C.d.ts → store-tool-spans-DZS0HWVf.d.ts} +9 -18
- package/dist/store-tool-spans-DZS0HWVf.d.ts.map +1 -0
- package/dist/storyboard/index.d.ts +4 -11
- package/dist/storyboard/index.d.ts.map +1 -1
- package/dist/storyboard/index.js +1 -16
- package/dist/storyboard/index.js.map +1 -1
- package/dist/{summary-report-V_JACR4Y.js → summary-report-BsXJoYX5.js} +88 -10
- package/dist/summary-report-BsXJoYX5.js.map +1 -0
- package/dist/{summary-report-bdFDXq0b.d.ts → summary-report-CkbRcSuu.d.ts} +25 -19
- package/dist/summary-report-CkbRcSuu.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts +60 -28
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +4 -458
- package/dist/supervisor-run/index.js.map +1 -1
- package/dist/{systemone-BomhHr2c.d.ts → systemone-BMzDJb1i.d.ts} +5 -5
- package/dist/{systemone-BomhHr2c.d.ts.map → systemone-BMzDJb1i.d.ts.map} +1 -1
- package/dist/systemone-protocol.js +1 -1
- package/dist/{systemone-review-CUVcQJu6.d.ts → systemone-review-CwE6JGIp.d.ts} +2 -2
- package/dist/{systemone-review-CUVcQJu6.d.ts.map → systemone-review-CwE6JGIp.d.ts.map} +1 -1
- package/dist/{systemone-review-D7sXwsqq.js → systemone-review-DzdOJ8I6.js} +3 -3
- package/dist/{systemone-review-D7sXwsqq.js.map → systemone-review-DzdOJ8I6.js.map} +1 -1
- package/dist/systemone.d.ts +5 -5
- package/dist/systemone.js +5 -5
- package/dist/systemone.js.map +1 -1
- package/dist/{task-failure-attributes-hEmASjix.js → task-failure-attributes-BMsblaDh.js} +3 -3
- package/dist/task-failure-attributes-BMsblaDh.js.map +1 -0
- package/dist/{terminal-record-DZyQZ3pz.js → terminal-record-D4Rv-j1W.js} +244 -196
- package/dist/terminal-record-D4Rv-j1W.js.map +1 -0
- package/dist/{tool-groups-C3NEcdCM.d.ts → tool-groups-DyNz2JZ_.d.ts} +3 -3
- package/dist/tool-groups-DyNz2JZ_.d.ts.map +1 -0
- package/dist/{tool-waste-BKgvd-TP.d.ts → tool-waste-CkjzWmeY.d.ts} +25 -28
- package/dist/tool-waste-CkjzWmeY.d.ts.map +1 -0
- package/dist/{tool-waste-BlesqTqW.js → tool-waste-DLsjS_p-.js} +5 -5
- package/dist/{tool-waste-BlesqTqW.js.map → tool-waste-DLsjS_p-.js.map} +1 -1
- package/dist/{trace-questions-CM2CAocU.d.ts → trace-questions-xxwgsuMi.d.ts} +4 -9
- package/dist/{trace-questions-CM2CAocU.d.ts.map → trace-questions-xxwgsuMi.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +14 -211
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +865 -981
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +18 -46
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +13 -13
- package/dist/traces.js.map +1 -1
- package/dist/trajectory-replay/index.d.ts +7 -118
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +921 -869
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-C1XYeXvy.js → tree-B5e1uAeL.js} +132 -21
- package/dist/tree-B5e1uAeL.js.map +1 -0
- package/dist/{types-Cbe2fWBa.d.ts → types-BKCzzmit.d.ts} +3 -3
- package/dist/{types-Cbe2fWBa.d.ts.map → types-BKCzzmit.d.ts.map} +1 -1
- package/dist/{types-B3jzCp0p.js → types-BXgASBCL.js} +2 -2
- package/dist/{types-B3jzCp0p.js.map → types-BXgASBCL.js.map} +1 -1
- package/dist/{types-C1tnkEgM.d.ts → types-CW8ewATZ.d.ts} +4 -113
- package/dist/types-CW8ewATZ.d.ts.map +1 -0
- package/dist/{types-BqkVmHfv.d.ts → types-CmXY0PQf.d.ts} +2 -4
- package/dist/types-CmXY0PQf.d.ts.map +1 -0
- package/dist/{types-C02qtnG8.d.ts → types-D-mgRzlh.d.ts} +7 -28
- package/dist/types-D-mgRzlh.d.ts.map +1 -0
- package/dist/{types-IXD2HJzu.js → types-DqFMNTgK.js} +2 -4
- package/dist/types-DqFMNTgK.js.map +1 -0
- package/dist/{types-Cq8mSbq8.d.ts → types-DtkO1G9L.d.ts} +7 -9
- package/dist/{types-Cq8mSbq8.d.ts.map → types-DtkO1G9L.d.ts.map} +1 -1
- package/dist/{verdict-Dl0tiT1X.js → verdict-BGQmxQ8A.js} +3 -3
- package/dist/verdict-BGQmxQ8A.js.map +1 -0
- package/dist/{verdict-E4eRNf7-.d.ts → verdict-C24NELtN.d.ts} +2 -15
- package/dist/{verdict-E4eRNf7-.d.ts.map → verdict-C24NELtN.d.ts.map} +1 -1
- package/dist/{verdict-cache-Bm8EKL2s.js → verdict-cache-CL_7tePD.js} +2 -2
- package/dist/verdict-cache-CL_7tePD.js.map +1 -0
- package/dist/wire/index.d.ts +31 -410
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +2 -2
- package/docs/changes/jev-evidence-review.md +1 -1
- package/docs/changes/jev-product-adoption.md +1 -1
- package/docs/changes/jev-recorded-evidence.md +1 -1
- package/docs/design/statistics-decisions.md +18 -18
- package/docs/design.md +1 -1
- package/docs/eval-surface-map.md +1 -0
- package/docs/evaluation-integrity.md +1 -1
- package/docs/profile-json-identity.md +1 -2
- package/docs/proofs/campaign-attempt-retention-20261001/README.md +2 -2
- package/docs/public-api.md +158 -538
- package/docs/rollout.md +1 -1
- package/docs/trace-repair-admission.md +1 -1
- package/docs/wire-protocol.md +1 -1
- package/package.json +7 -2
- package/dist/active-curriculum-B_Lc9kfO.js +0 -61
- package/dist/active-curriculum-B_Lc9kfO.js.map +0 -1
- package/dist/agent-profile-VFcQncbW.d.ts.map +0 -1
- package/dist/agent-profile-cell-BK8mlqlq.js.map +0 -1
- package/dist/agent-profile-cell-BNp-Js9F.d.ts.map +0 -1
- package/dist/agreement-irr-BEWLIF3_.js.map +0 -1
- package/dist/analyze-runs-C84irm4i.js.map +0 -1
- package/dist/baseline-Udi_PLuT.js +0 -259
- package/dist/baseline-Udi_PLuT.js.map +0 -1
- package/dist/benchmark-CXmVVHH2.js +0 -562
- package/dist/benchmark-CXmVVHH2.js.map +0 -1
- package/dist/benchmark-command-By0vh8q7.js.map +0 -1
- package/dist/campaign-BudZ70zo.js.map +0 -1
- package/dist/chat-json-call-puMArmtW.js.map +0 -1
- package/dist/claude-jsonl-dZir12m6.js +0 -86
- package/dist/claude-jsonl-dZir12m6.js.map +0 -1
- package/dist/client-BzL9niqi.d.ts.map +0 -1
- package/dist/cost-ledger-BP8V4kUQ.js.map +0 -1
- package/dist/counterfactual-CPaWN99-.d.ts +0 -60
- package/dist/counterfactual-CPaWN99-.d.ts.map +0 -1
- package/dist/counterfactual-Dn3veueY.js +0 -98
- package/dist/counterfactual-Dn3veueY.js.map +0 -1
- package/dist/default-registry-COhk9g36.js.map +0 -1
- package/dist/default-registry-DzHiGruW.d.ts.map +0 -1
- package/dist/define-agent-eval-CNTPzIkp.js.map +0 -1
- package/dist/define-agent-eval-WSck0CZJ.d.ts.map +0 -1
- package/dist/dspy-rlm-engine-LRCu61m5.js.map +0 -1
- package/dist/effect-sizes-BhzEpXMc.js +0 -82
- package/dist/effect-sizes-BhzEpXMc.js.map +0 -1
- package/dist/emitter-HcCmFQl_.d.ts.map +0 -1
- package/dist/engine-3A_4jOlI.d.ts.map +0 -1
- package/dist/equal-terms-BtdXayCJ.js.map +0 -1
- package/dist/eval-campaign-90jeaCAI.js +0 -343
- package/dist/eval-campaign-90jeaCAI.js.map +0 -1
- package/dist/evaluation-6Yoi74gM.d.ts.map +0 -1
- package/dist/exporters-X4xwla8A.js.map +0 -1
- package/dist/external-optimizer-process-BjMGUuds.js.map +0 -1
- package/dist/external-optimizer-subprocess-BqW0hHcI.js.map +0 -1
- package/dist/failure-cluster-CbgEDcFJ.d.ts.map +0 -1
- package/dist/feedback-trajectory-C4EG0nNH.d.ts.map +0 -1
- package/dist/hf-dataset-BR2yhuNn.js.map +0 -1
- package/dist/index-BFRO6chs.d.ts.map +0 -1
- package/dist/index-BO41eGj5.d.ts.map +0 -1
- package/dist/index-CyszSg4O.d.ts.map +0 -1
- package/dist/index-DHKEAv3s.d.ts.map +0 -1
- package/dist/index-DPcngtwt.d.ts.map +0 -1
- package/dist/integrity-dLiDe2kD.js.map +0 -1
- package/dist/journal-DfRz9kps.js.map +0 -1
- package/dist/judge-gate-CE7CQAgt.d.ts.map +0 -1
- package/dist/kind-factory-BobI5Jy3.js.map +0 -1
- package/dist/ledger-core-Gq7yp8lP.js.map +0 -1
- package/dist/llm-client-CyBAoYiX.js.map +0 -1
- package/dist/llm-judge-CG12SQJq.js.map +0 -1
- package/dist/matrix-DSrSxjjy.d.ts.map +0 -1
- package/dist/matrix-Dm0BQW7U.js.map +0 -1
- package/dist/mean-DHoMiudD.js.map +0 -1
- package/dist/normal-DsJZtrJc.js +0 -25
- package/dist/normal-DsJZtrJc.js.map +0 -1
- package/dist/paired-arms-CwMGJsrS.js.map +0 -1
- package/dist/paired-binary-CvpFHfKZ.js.map +0 -1
- package/dist/paired-promotion-decision-DPKz8ZnF.d.ts.map +0 -1
- package/dist/pareto-Cm6ndrWN.js.map +0 -1
- package/dist/prime-protocol-CHKgA3a6.js.map +0 -1
- package/dist/prime-protocol-HiB9HX7E.d.ts.map +0 -1
- package/dist/produced-state-BsDmnwxc.js.map +0 -1
- package/dist/proposal-findings-CY1xKn_a.js.map +0 -1
- package/dist/query-BUCZCK7F.js.map +0 -1
- package/dist/redact-mtCCcT8z.d.ts.map +0 -1
- package/dist/release-confidence-CpuP65S5.js.map +0 -1
- package/dist/report-command-SC9nqb4M.js.map +0 -1
- package/dist/reward-CpCmAM8L.d.ts.map +0 -1
- package/dist/reward-hacking-RVdZ6Kkt.d.ts.map +0 -1
- package/dist/rollout-DZV1t2Wg.js.map +0 -1
- package/dist/run-record-C1E24G2A.d.ts.map +0 -1
- package/dist/run-record-C5e7FjhJ.js.map +0 -1
- package/dist/schema-2g7trUwH.d.ts.map +0 -1
- package/dist/schema-BuiujZ-g.js.map +0 -1
- package/dist/schema-CSf6qWgZ.js.map +0 -1
- package/dist/search-kernel-DyNEa6IU.d.ts.map +0 -1
- package/dist/search-ledger-file-DDQUgvCg.js.map +0 -1
- package/dist/search-shipper-BOSD46qv.js.map +0 -1
- package/dist/semantic-concept-judge-BQF8te0T.js.map +0 -1
- package/dist/sequential-Bf_pbE50.js.map +0 -1
- package/dist/server-e9oWO_bN.js.map +0 -1
- package/dist/single-run-lock-CV9Eyd_q.js.map +0 -1
- package/dist/skillopt-optimization-method-BiwA8nfX.js.map +0 -1
- package/dist/statistical-heldout-42NlCNDe.js.map +0 -1
- package/dist/statistical-heldout-CYpGaoDH.d.ts.map +0 -1
- package/dist/steps-Bg5-KVx1.d.ts.map +0 -1
- package/dist/store-tool-spans-CIX5arAG.js.map +0 -1
- package/dist/store-tool-spans-DdCSPa7C.d.ts.map +0 -1
- package/dist/student-t-DVPW7CdL.js +0 -39
- package/dist/student-t-DVPW7CdL.js.map +0 -1
- package/dist/summary-report-V_JACR4Y.js.map +0 -1
- package/dist/summary-report-bdFDXq0b.d.ts.map +0 -1
- package/dist/task-failure-attributes-hEmASjix.js.map +0 -1
- package/dist/terminal-record-DZyQZ3pz.js.map +0 -1
- package/dist/tool-groups-C3NEcdCM.d.ts.map +0 -1
- package/dist/tool-waste-BKgvd-TP.d.ts.map +0 -1
- package/dist/trajectory-Y1fmdlw7.d.ts +0 -24
- package/dist/trajectory-Y1fmdlw7.d.ts.map +0 -1
- package/dist/tree-C1XYeXvy.js.map +0 -1
- package/dist/types-BqkVmHfv.d.ts.map +0 -1
- package/dist/types-C02qtnG8.d.ts.map +0 -1
- package/dist/types-C1tnkEgM.d.ts.map +0 -1
- package/dist/types-IXD2HJzu.js.map +0 -1
- package/dist/usage-receipt-Cx3xNeyB.js +0 -76
- package/dist/usage-receipt-Cx3xNeyB.js.map +0 -1
- package/dist/verdict-Dl0tiT1X.js.map +0 -1
- package/dist/verdict-cache-Bm8EKL2s.js.map +0 -1
- package/docs/design/self-improvement-evidence-audit.md +0 -263
package/dist/experiment/index.js
CHANGED
|
@@ -1,104 +1,22 @@
|
|
|
1
|
-
import { n as CaptureIntegrityError, s as ValidationError } from "../errors-
|
|
2
|
-
import { a as hashCanonical, t as LEDGER_HASH_PATTERN } from "../canonical-
|
|
3
|
-
import {
|
|
4
|
-
import { t as mulberry32 } from "../random-
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { i as pairedBootstrap, n as BOOTSTRAP_GATE_MIN_N } from "../mean-
|
|
9
|
-
import { a as requiredSampleSize, i as requiredPairedSampleSize, n as mcnemarRequiredN, r as pairedMde, t as mcnemarPower } from "../power-and-mde-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { D as FinalEvidenceError, E as FinalEvidenceConflictError, O as openFinalEvidenceLedger, T as powerPreflight, a as verifyEvidenceReceipt, i as isIndependentEvidence, n as EVIDENCE_RECEIPT_VERSION, r as createEvidenceReceipt, t as createCampaignEvidenceReceipt } from "../campaign-evidence-Clrn4hBV.js";
|
|
1
|
+
import { n as CaptureIntegrityError, s as ValidationError } from "../errors-BcOs5MKW.js";
|
|
2
|
+
import { a as hashCanonical, t as LEDGER_HASH_PATTERN } from "../canonical-Dq2hOQ8L.js";
|
|
3
|
+
import { d as signManifest, f as verifyManifest, l as hashJson, u as manifestContentDigest } from "../agent-profile-cell-B1V1gUZs.js";
|
|
4
|
+
import { t as mulberry32 } from "../random-DDDcC7YU.js";
|
|
5
|
+
import { n as pairArms, r as pairRunRecords, t as comparePairedArms } from "../paired-arms-Ct4LTKc1.js";
|
|
6
|
+
import { n as bonferroni, r as holm, t as benjaminiHochberg } from "../multiplicity-Sg0U7h8j.js";
|
|
7
|
+
import { a as pairedRiskDifferenceScore, i as pairedRiskDifferenceExact, r as pairedRiskDifference, s as wilson, t as mcnemar } from "../paired-binary-B_nejA44.js";
|
|
8
|
+
import { c as studentTCdf, i as pairedBootstrap, l as studentTQuantile, n as BOOTSTRAP_GATE_MIN_N } from "../mean-BbA_JCzW.js";
|
|
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
|
+
import { t as eProcess } from "../sequential-eprocess-DodI6RoF.js";
|
|
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-DunzcJGv.js";
|
|
14
13
|
import { n as evaluatePredicate, r as readField, t as compareValues } from "../predicate-FdKmElA_.js";
|
|
15
|
-
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "../claim-
|
|
16
|
-
import { n as pairedEvalueSequence
|
|
17
|
-
import { n as intervalSpecProblems, r as computeEstimand, t as computeInterval } from "../interval-
|
|
18
|
-
import { n as paretoPolicy, r as paretoSignificanceGate, t as buildEvidenceVector } from "../promotion-policy-
|
|
19
|
-
import { n as sequentialPairedGate, t as sequentialDecide } from "../sequential-
|
|
14
|
+
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "../claim-BPVuyHuy.js";
|
|
15
|
+
import { n as pairedEvalueSequence } from "../sequential-BVv1sjsw.js";
|
|
16
|
+
import { n as intervalSpecProblems, r as computeEstimand, t as computeInterval } from "../interval-Dq9gt7jx.js";
|
|
17
|
+
import { n as paretoPolicy, r as paretoSignificanceGate, t as buildEvidenceVector } from "../promotion-policy-6A8osGr_.js";
|
|
18
|
+
import { n as sequentialPairedGate, t as sequentialDecide } from "../sequential-CimQrbjv.js";
|
|
20
19
|
import { z } from "zod";
|
|
21
|
-
//#region src/experiment/ast/budget.ts
|
|
22
|
-
function evaluateHaltRule(halt, gates) {
|
|
23
|
-
const seen = new Map(gates.map((g) => [g.id, g]));
|
|
24
|
-
const missing = halt.when.gates.filter((id) => !seen.has(id));
|
|
25
|
-
if (missing.length > 0) throw new ValidationError(`evaluateHaltRule: halt references gates that were not evaluated: [${missing.join(", ")}]`);
|
|
26
|
-
const failed = halt.when.gates.filter((id) => !seen.get(id).passed);
|
|
27
|
-
return failed.length > 0 ? {
|
|
28
|
-
fired: true,
|
|
29
|
-
action: halt.action,
|
|
30
|
-
failedGates: failed
|
|
31
|
-
} : {
|
|
32
|
-
fired: false,
|
|
33
|
-
action: null,
|
|
34
|
-
failedGates: []
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Execute the uniform-pass schedule against measured pass costs. Pass 1 always
|
|
39
|
-
* runs; each later pass runs only when the cumulative spend plus the last
|
|
40
|
-
* measured pass cost stays at or under the registered ceiling. The registered
|
|
41
|
-
* ledger is the pre-spend the ceiling counts.
|
|
42
|
-
*/
|
|
43
|
-
function runUniformPassBudget(rule, measuredPassCosts) {
|
|
44
|
-
let cumulative = rule.ledger.reduce((sum, entry) => sum + entry.usd, 0);
|
|
45
|
-
const decisions = [];
|
|
46
|
-
let uniformN = 0;
|
|
47
|
-
for (let pass = 1; pass <= rule.maxPasses; pass++) {
|
|
48
|
-
if (pass === 1) {
|
|
49
|
-
if (measuredPassCosts[0] === void 0) break;
|
|
50
|
-
cumulative += measuredPassCosts[0];
|
|
51
|
-
uniformN = 1;
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
const projected = measuredPassCosts[pass - 2];
|
|
55
|
-
if (projected === void 0) break;
|
|
56
|
-
const go = cumulative + projected <= rule.ceilingUsd;
|
|
57
|
-
decisions.push({
|
|
58
|
-
pass,
|
|
59
|
-
cumulativeBefore: cumulative,
|
|
60
|
-
projected,
|
|
61
|
-
go
|
|
62
|
-
});
|
|
63
|
-
if (!go || measuredPassCosts[pass - 1] === void 0) break;
|
|
64
|
-
cumulative += measuredPassCosts[pass - 1];
|
|
65
|
-
uniformN = pass;
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
decisions,
|
|
69
|
-
uniformN
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Walk the registered n-ladder and pick the first affordable step. When no
|
|
74
|
-
* step fits the ceiling, the rule refuses and reports the projection instead
|
|
75
|
-
* of shrinking the row set — "never subset rows" is the registered invariant.
|
|
76
|
-
*/
|
|
77
|
-
function projectNLadderBudget(rule, measured) {
|
|
78
|
-
const projections = rule.steps.map((n) => {
|
|
79
|
-
const projectedUsd = measured.unitCostUsd * measured.rows * n;
|
|
80
|
-
return {
|
|
81
|
-
n,
|
|
82
|
-
projectedUsd,
|
|
83
|
-
affordable: projectedUsd <= rule.ceilingUsd
|
|
84
|
-
};
|
|
85
|
-
});
|
|
86
|
-
const first = projections.find((p) => p.affordable);
|
|
87
|
-
if (first) return {
|
|
88
|
-
chosenN: first.n,
|
|
89
|
-
projections,
|
|
90
|
-
refusal: null
|
|
91
|
-
};
|
|
92
|
-
return {
|
|
93
|
-
chosenN: null,
|
|
94
|
-
projections,
|
|
95
|
-
refusal: {
|
|
96
|
-
onExhaust: rule.onExhaust,
|
|
97
|
-
reason: `no ladder step fits the ${rule.ceilingUsd} USD ceiling at ${measured.rows} rows x ${measured.unitCostUsd} USD per unit`
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
20
|
//#region src/experiment/ast/decision.ts
|
|
103
21
|
/** A decision rule's branches did not cover the evidence. */
|
|
104
22
|
var DecisionTableNotTotalError = class extends ValidationError {};
|
|
@@ -137,67 +55,6 @@ function executeDecisionRule(rule, evidence) {
|
|
|
137
55
|
throw new DecisionTableNotTotalError("executeDecisionRule: decision table is not total — no branch matched the evidence");
|
|
138
56
|
}
|
|
139
57
|
//#endregion
|
|
140
|
-
//#region src/experiment/ast/reissue.ts
|
|
141
|
-
/**
|
|
142
|
-
* Classify one rollout event under the registered reissue policy. A carrier
|
|
143
|
-
* event within the issue budget is reissued; a model outcome always stands;
|
|
144
|
-
* a carrier event past `maxIssues` is exhausted and reported, never retried.
|
|
145
|
-
*/
|
|
146
|
-
function classifyReissue(policy, event, issuesSoFar) {
|
|
147
|
-
if (!policy.carrierEvents.includes(event)) return "stands";
|
|
148
|
-
return issuesSoFar < policy.maxIssues ? "reissue" : "exhausted";
|
|
149
|
-
}
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/experiment/ast/selection.ts
|
|
152
|
-
/**
|
|
153
|
-
* Execute a selection rule.
|
|
154
|
-
*
|
|
155
|
-
* Round-robin walks groups in lexicographic order and takes ids in
|
|
156
|
-
* within-group order until `take` ids are chosen. Filter-of keeps the ids of
|
|
157
|
-
* `bases[rule.base]` whose record satisfies the predicate, in the registered
|
|
158
|
-
* order. Ids absent from `records` are evaluated on their id alone (fields
|
|
159
|
-
* derived from the id via `idFields`), so a sealed base outlives its source
|
|
160
|
-
* records.
|
|
161
|
-
*/
|
|
162
|
-
function runSelectionRule(rule, records, options) {
|
|
163
|
-
if (rule.kind === "round-robin") {
|
|
164
|
-
const allowed = new Set(rule.reads);
|
|
165
|
-
for (const field of [rule.groupBy, rule.withinOrder.field]) if (!allowed.has(field)) throw new ValidationError(`runSelectionRule: round-robin reads '${field}' but its closed read set is [${rule.reads.join(", ")}]`);
|
|
166
|
-
const byGroup = /* @__PURE__ */ new Map();
|
|
167
|
-
for (const record of records) {
|
|
168
|
-
const group = String(readField(record, rule.groupBy));
|
|
169
|
-
const id = String(readField(record, rule.withinOrder.field));
|
|
170
|
-
const bucket = byGroup.get(group);
|
|
171
|
-
if (bucket) bucket.push(id);
|
|
172
|
-
else byGroup.set(group, [id]);
|
|
173
|
-
}
|
|
174
|
-
for (const ids of byGroup.values()) {
|
|
175
|
-
ids.sort();
|
|
176
|
-
if (rule.withinOrder.dir === "desc") ids.reverse();
|
|
177
|
-
}
|
|
178
|
-
const groups = [...byGroup.keys()].sort();
|
|
179
|
-
const chosen = [];
|
|
180
|
-
let cursor = 0;
|
|
181
|
-
while (chosen.length < rule.take && groups.some((g) => byGroup.get(g).length > 0)) {
|
|
182
|
-
const group = groups[cursor % groups.length];
|
|
183
|
-
const ids = byGroup.get(group);
|
|
184
|
-
if (ids.length > 0) chosen.push(ids.shift());
|
|
185
|
-
cursor += 1;
|
|
186
|
-
}
|
|
187
|
-
return chosen;
|
|
188
|
-
}
|
|
189
|
-
const base = options.bases?.[rule.base];
|
|
190
|
-
if (!base) throw new ValidationError(`runSelectionRule: filter-of base '${rule.base}' was not provided`);
|
|
191
|
-
const index = new Map(records.map((r) => [String(readField(r, options.idField)), r]));
|
|
192
|
-
const sorted = [...base.filter((id) => {
|
|
193
|
-
const record = index.get(id) ?? options.idFields?.(id);
|
|
194
|
-
if (!record) throw new ValidationError(`runSelectionRule: base id '${id}' has no record and no idFields derivation`);
|
|
195
|
-
return evaluatePredicate(rule.keep, record);
|
|
196
|
-
})].sort();
|
|
197
|
-
if (rule.order.dir === "desc") sorted.reverse();
|
|
198
|
-
return sorted;
|
|
199
|
-
}
|
|
200
|
-
//#endregion
|
|
201
58
|
//#region src/experiment/ast/validity.ts
|
|
202
59
|
/**
|
|
203
60
|
* Replicate-flip counting over graded states. A state whose replicates split
|
|
@@ -355,6 +212,137 @@ function assertMatchedBudgets(rule, arms) {
|
|
|
355
212
|
return verdict;
|
|
356
213
|
}
|
|
357
214
|
//#endregion
|
|
215
|
+
//#region src/experiment/ast/budget.ts
|
|
216
|
+
function evaluateHaltRule(halt, gates) {
|
|
217
|
+
const seen = new Map(gates.map((g) => [g.id, g]));
|
|
218
|
+
const missing = halt.when.gates.filter((id) => !seen.has(id));
|
|
219
|
+
if (missing.length > 0) throw new ValidationError(`evaluateHaltRule: halt references gates that were not evaluated: [${missing.join(", ")}]`);
|
|
220
|
+
const failed = halt.when.gates.filter((id) => !seen.get(id).passed);
|
|
221
|
+
return failed.length > 0 ? {
|
|
222
|
+
fired: true,
|
|
223
|
+
action: halt.action,
|
|
224
|
+
failedGates: failed
|
|
225
|
+
} : {
|
|
226
|
+
fired: false,
|
|
227
|
+
action: null,
|
|
228
|
+
failedGates: []
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Execute the uniform-pass schedule against measured pass costs. Pass 1 always
|
|
233
|
+
* runs; each later pass runs only when the cumulative spend plus the last
|
|
234
|
+
* measured pass cost stays at or under the registered ceiling. The registered
|
|
235
|
+
* ledger is the pre-spend the ceiling counts.
|
|
236
|
+
*/
|
|
237
|
+
function runUniformPassBudget(rule, measuredPassCosts) {
|
|
238
|
+
let cumulative = rule.ledger.reduce((sum, entry) => sum + entry.usd, 0);
|
|
239
|
+
const decisions = [];
|
|
240
|
+
let uniformN = 0;
|
|
241
|
+
for (let pass = 1; pass <= rule.maxPasses; pass++) {
|
|
242
|
+
if (pass === 1) {
|
|
243
|
+
if (measuredPassCosts[0] === void 0) break;
|
|
244
|
+
cumulative += measuredPassCosts[0];
|
|
245
|
+
uniformN = 1;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
const projected = measuredPassCosts[pass - 2];
|
|
249
|
+
if (projected === void 0) break;
|
|
250
|
+
const go = cumulative + projected <= rule.ceilingUsd;
|
|
251
|
+
decisions.push({
|
|
252
|
+
pass,
|
|
253
|
+
cumulativeBefore: cumulative,
|
|
254
|
+
projected,
|
|
255
|
+
go
|
|
256
|
+
});
|
|
257
|
+
if (!go || measuredPassCosts[pass - 1] === void 0) break;
|
|
258
|
+
cumulative += measuredPassCosts[pass - 1];
|
|
259
|
+
uniformN = pass;
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
decisions,
|
|
263
|
+
uniformN
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Walk the registered n-ladder and pick the first affordable step. When no
|
|
268
|
+
* step fits the ceiling, the rule refuses and reports the projection instead
|
|
269
|
+
* of shrinking the row set — "never subset rows" is the registered invariant.
|
|
270
|
+
*/
|
|
271
|
+
function projectNLadderBudget(rule, measured) {
|
|
272
|
+
const projections = rule.steps.map((n) => {
|
|
273
|
+
const projectedUsd = measured.unitCostUsd * measured.rows * n;
|
|
274
|
+
return {
|
|
275
|
+
n,
|
|
276
|
+
projectedUsd,
|
|
277
|
+
affordable: projectedUsd <= rule.ceilingUsd
|
|
278
|
+
};
|
|
279
|
+
});
|
|
280
|
+
const first = projections.find((p) => p.affordable);
|
|
281
|
+
if (first) return {
|
|
282
|
+
chosenN: first.n,
|
|
283
|
+
projections,
|
|
284
|
+
refusal: null
|
|
285
|
+
};
|
|
286
|
+
return {
|
|
287
|
+
chosenN: null,
|
|
288
|
+
projections,
|
|
289
|
+
refusal: {
|
|
290
|
+
onExhaust: rule.onExhaust,
|
|
291
|
+
reason: `no ladder step fits the ${rule.ceilingUsd} USD ceiling at ${measured.rows} rows x ${measured.unitCostUsd} USD per unit`
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/experiment/ast/selection.ts
|
|
297
|
+
/**
|
|
298
|
+
* Execute a selection rule.
|
|
299
|
+
*
|
|
300
|
+
* Round-robin walks groups in lexicographic order and takes ids in
|
|
301
|
+
* within-group order until `take` ids are chosen. Filter-of keeps the ids of
|
|
302
|
+
* `bases[rule.base]` whose record satisfies the predicate, in the registered
|
|
303
|
+
* order. Ids absent from `records` are evaluated on their id alone (fields
|
|
304
|
+
* derived from the id via `idFields`), so a sealed base outlives its source
|
|
305
|
+
* records.
|
|
306
|
+
*/
|
|
307
|
+
function runSelectionRule(rule, records, options) {
|
|
308
|
+
if (rule.kind === "round-robin") {
|
|
309
|
+
const allowed = new Set(rule.reads);
|
|
310
|
+
for (const field of [rule.groupBy, rule.withinOrder.field]) if (!allowed.has(field)) throw new ValidationError(`runSelectionRule: round-robin reads '${field}' but its closed read set is [${rule.reads.join(", ")}]`);
|
|
311
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
312
|
+
for (const record of records) {
|
|
313
|
+
const group = String(readField(record, rule.groupBy));
|
|
314
|
+
const id = String(readField(record, rule.withinOrder.field));
|
|
315
|
+
const bucket = byGroup.get(group);
|
|
316
|
+
if (bucket) bucket.push(id);
|
|
317
|
+
else byGroup.set(group, [id]);
|
|
318
|
+
}
|
|
319
|
+
for (const ids of byGroup.values()) {
|
|
320
|
+
ids.sort();
|
|
321
|
+
if (rule.withinOrder.dir === "desc") ids.reverse();
|
|
322
|
+
}
|
|
323
|
+
const groups = [...byGroup.keys()].sort();
|
|
324
|
+
const chosen = [];
|
|
325
|
+
let cursor = 0;
|
|
326
|
+
while (chosen.length < rule.take && groups.some((g) => byGroup.get(g).length > 0)) {
|
|
327
|
+
const group = groups[cursor % groups.length];
|
|
328
|
+
const ids = byGroup.get(group);
|
|
329
|
+
if (ids.length > 0) chosen.push(ids.shift());
|
|
330
|
+
cursor += 1;
|
|
331
|
+
}
|
|
332
|
+
return chosen;
|
|
333
|
+
}
|
|
334
|
+
const base = options.bases?.[rule.base];
|
|
335
|
+
if (!base) throw new ValidationError(`runSelectionRule: filter-of base '${rule.base}' was not provided`);
|
|
336
|
+
const index = new Map(records.map((r) => [String(readField(r, options.idField)), r]));
|
|
337
|
+
const sorted = [...base.filter((id) => {
|
|
338
|
+
const record = index.get(id) ?? options.idFields?.(id);
|
|
339
|
+
if (!record) throw new ValidationError(`runSelectionRule: base id '${id}' has no record and no idFields derivation`);
|
|
340
|
+
return evaluatePredicate(rule.keep, record);
|
|
341
|
+
})].sort();
|
|
342
|
+
if (rule.order.dir === "desc") sorted.reverse();
|
|
343
|
+
return sorted;
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
358
346
|
//#region src/experiment/funnel.ts
|
|
359
347
|
/**
|
|
360
348
|
* The denominator chain as a first-class object.
|
|
@@ -890,86 +878,6 @@ const evidenceRegistryRecordSchema = z.strictObject({
|
|
|
890
878
|
supersedes: z.array(z.string().regex(idPattern)).optional(),
|
|
891
879
|
notes: z.string().min(1).optional()
|
|
892
880
|
});
|
|
893
|
-
/** Parse one record; throws with the zod issue list on any violation. */
|
|
894
|
-
function parseEvidenceRegistryRecord(raw) {
|
|
895
|
-
return evidenceRegistryRecordSchema.parse(raw);
|
|
896
|
-
}
|
|
897
|
-
var EvidenceRegistryError = class extends Error {};
|
|
898
|
-
/**
|
|
899
|
-
* Validate a set of records as one registry: every record parses, ids are
|
|
900
|
-
* unique, and every `supersedes` target exists. Returns records sorted in
|
|
901
|
-
* the registry's canonical order (trust ladder, then date desc, then id).
|
|
902
|
-
*/
|
|
903
|
-
function validateEvidenceRegistry(raws) {
|
|
904
|
-
const records = raws.map((raw) => parseEvidenceRegistryRecord(raw));
|
|
905
|
-
const seen = /* @__PURE__ */ new Set();
|
|
906
|
-
for (const record of records) {
|
|
907
|
-
if (seen.has(record.id)) throw new EvidenceRegistryError(`duplicate evidence record id: ${record.id}`);
|
|
908
|
-
seen.add(record.id);
|
|
909
|
-
}
|
|
910
|
-
for (const record of records) for (const target of record.supersedes ?? []) if (!seen.has(target)) throw new EvidenceRegistryError(`record ${record.id} supersedes unknown record: ${target}`);
|
|
911
|
-
const stateRank = new Map(EVIDENCE_STATES.map((state, index) => [state, index]));
|
|
912
|
-
return [...records].sort((a, b) => {
|
|
913
|
-
const byState = (stateRank.get(a.evidenceState) ?? 0) - (stateRank.get(b.evidenceState) ?? 0);
|
|
914
|
-
if (byState !== 0) return byState;
|
|
915
|
-
if (a.date !== b.date) return a.date < b.date ? 1 : -1;
|
|
916
|
-
return a.id < b.id ? -1 : 1;
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
function mdEscape(text) {
|
|
920
|
-
return text.replace(/\|/g, "\\|").replace(/\n/g, " ");
|
|
921
|
-
}
|
|
922
|
-
function formatCost(costUsd) {
|
|
923
|
-
if (costUsd === null) return "not captured";
|
|
924
|
-
return `$${costUsd.toFixed(2)}`;
|
|
925
|
-
}
|
|
926
|
-
function formatN(n) {
|
|
927
|
-
const base = `${n.value} ${n.unit}`;
|
|
928
|
-
return n.detail ? `${base} (${n.detail})` : base;
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* Render the registry's human index from records. Deterministic: identical
|
|
932
|
-
* records always produce identical output, so a byte diff against the
|
|
933
|
-
* committed index is the freshness check. No clocks, no environment.
|
|
934
|
-
*/
|
|
935
|
-
function renderEvidenceIndex(raws) {
|
|
936
|
-
const records = validateEvidenceRegistry(raws);
|
|
937
|
-
const lines = [
|
|
938
|
-
"# Evidence index",
|
|
939
|
-
"",
|
|
940
|
-
"<!-- GENERATED by scripts/render-evidence-index.ts from evidence/records/*.json.",
|
|
941
|
-
" Edit the records, run `pnpm run evidence:render`, and commit both.",
|
|
942
|
-
" `pnpm run evidence:check` (inside verify:package) fails when this file drifts. -->",
|
|
943
|
-
"",
|
|
944
|
-
`${records.length} records. States: ${EVIDENCE_STATES.join(" > ")}.`,
|
|
945
|
-
"",
|
|
946
|
-
"| state | date | id | claim | result |",
|
|
947
|
-
"| --- | --- | --- | --- | --- |"
|
|
948
|
-
];
|
|
949
|
-
for (const r of records) lines.push(`| ${r.evidenceState} | ${r.date} | [\`${r.id}\`](#${r.id}) | ${mdEscape(r.claim)} | ${mdEscape(r.result)} |`);
|
|
950
|
-
for (const r of records) {
|
|
951
|
-
lines.push("", `## ${r.id}`, "");
|
|
952
|
-
lines.push(`**${r.evidenceState}** · ${r.date} · ${r.domain} · source repo \`${r.sourceRepo}\``);
|
|
953
|
-
lines.push("", `**Claim.** ${r.claim}`, "", `**Result.** ${r.result}`, "");
|
|
954
|
-
lines.push(`- **Instrument**: ${r.instrument}`);
|
|
955
|
-
lines.push(`- **Command**: ${r.command === null ? "not preserved" : `\`${r.command}\``}`);
|
|
956
|
-
lines.push(`- **Arms**: ${r.arms.length === 0 ? "single-arm" : r.arms.join(" vs ")}`);
|
|
957
|
-
lines.push(`- **n**: ${formatN(r.n)}`);
|
|
958
|
-
lines.push(`- **Cost**: ${formatCost(r.costUsd)}`);
|
|
959
|
-
if (r.experimentDigest) lines.push(`- **Experiment seal**: \`${r.experimentDigest}\``);
|
|
960
|
-
lines.push(`- **Artifacts**:`);
|
|
961
|
-
for (const artifact of r.artifacts) lines.push(` - ${artifact}`);
|
|
962
|
-
if (r.confounds.length === 0) lines.push("- **Confounds**: none recorded");
|
|
963
|
-
else {
|
|
964
|
-
lines.push("- **Confounds**:");
|
|
965
|
-
for (const confound of r.confounds) lines.push(` - ${confound}`);
|
|
966
|
-
}
|
|
967
|
-
if (r.supersedes && r.supersedes.length > 0) lines.push(`- **Supersedes**: ${r.supersedes.map((s) => `\`${s}\``).join(", ")}`);
|
|
968
|
-
if (r.notes) lines.push(`- **Notes**: ${r.notes}`);
|
|
969
|
-
}
|
|
970
|
-
lines.push("");
|
|
971
|
-
return lines.join("\n");
|
|
972
|
-
}
|
|
973
881
|
//#endregion
|
|
974
882
|
//#region src/experiment/power.ts
|
|
975
883
|
/**
|
|
@@ -1353,8 +1261,8 @@ function sealRandomizedCanaryRule(rule) {
|
|
|
1353
1261
|
algo: "sha256-rfc8785"
|
|
1354
1262
|
};
|
|
1355
1263
|
}
|
|
1356
|
-
/**
|
|
1357
|
-
function
|
|
1264
|
+
/** Check the registration seal, the cohort receipt, the frozen roster and the independent verifier. */
|
|
1265
|
+
function verifyCohortEvidence(sealed, cohort, rows, verifyCohort) {
|
|
1358
1266
|
if (sealed.algo !== "sha256-rfc8785") throw new ValidationError("randomized canary: unsupported registration digest scheme");
|
|
1359
1267
|
validateRule(sealed.rule);
|
|
1360
1268
|
if (hashCanonical(sealed.rule) !== sealed.digest) throw new ValidationError("randomized canary: registration digest mismatch");
|
|
@@ -1379,57 +1287,83 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1379
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");
|
|
1380
1288
|
if (randomizedCanaryRosterDigest(rows) !== cohort.assignmentRosterDigest) throw new ValidationError("randomized canary: assignment roster digest mismatch");
|
|
1381
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) {
|
|
1382
1297
|
const cutoff = Date.parse(sealed.rule.analysisCutoff);
|
|
1383
1298
|
const closedAt = Date.parse(cohort.closedAt);
|
|
1384
1299
|
const frozenAt = Date.parse(cohort.observationFrozenAt);
|
|
1385
1300
|
const attestedAt = Date.parse(cohort.attestedAt);
|
|
1386
1301
|
const expectedFreezeAt = cutoff + sealed.rule.outcomeMaturityMs;
|
|
1387
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");
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
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
|
|
1395
1348
|
};
|
|
1396
|
-
let missingOutcomes = 0;
|
|
1397
|
-
let missingBilling = 0;
|
|
1398
|
-
let missingTurns = 0;
|
|
1399
|
-
let missingTraces = 0;
|
|
1400
|
-
let executionDrift = 0;
|
|
1401
1349
|
for (const [index, row] of rows.entries()) {
|
|
1402
|
-
if (row
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
if (row.checkedOutcome !== null) throw new ValidationError(`randomized canary: assignment ${index} has an outcome without its source`);
|
|
1406
|
-
} else nonEmpty(row.outcomeSourceId, `assignment ${index} outcome source id`);
|
|
1407
|
-
if (row.billedCostUsd === null) missingBilling++;
|
|
1408
|
-
else if (!Number.isFinite(row.billedCostUsd) || row.billedCostUsd < 0) throw new ValidationError(`randomized canary: assignment ${index} billed cost must be nonnegative`);
|
|
1409
|
-
if (row.billingSourceId === null) {
|
|
1410
|
-
if (row.billedCostUsd !== null) throw new ValidationError(`randomized canary: assignment ${index} has billed cost without its source`);
|
|
1411
|
-
} else nonEmpty(row.billingSourceId, `assignment ${index} billing source id`);
|
|
1412
|
-
if (row.turns === null) missingTurns++;
|
|
1413
|
-
else if (!Number.isSafeInteger(row.turns) || row.turns < 0) throw new ValidationError(`randomized canary: assignment ${index} turns must be a nonnegative integer`);
|
|
1414
|
-
if (row.traceSourceId !== null) nonEmpty(row.traceSourceId, `assignment ${index} trace source id`);
|
|
1415
|
-
if (row.noExecutionSourceId !== null) nonEmpty(row.noExecutionSourceId, `assignment ${index} no-execution source id`);
|
|
1416
|
-
if (row.traceSourceId !== null && row.noExecutionSourceId !== null) throw new ValidationError(`randomized canary: assignment ${index} has conflicting trace and no-execution receipts`);
|
|
1417
|
-
const noExecution = row.noExecutionSourceId !== null && row.turns === 0 && row.billedCostUsd === 0 && row.checkedOutcome === 0;
|
|
1418
|
-
if (row.traceSourceId === null && !noExecution) missingTraces++;
|
|
1419
|
-
for (const field of [
|
|
1420
|
-
"servedProfileDigest",
|
|
1421
|
-
"servedCodeRevisionDigest",
|
|
1422
|
-
"outcomeCheckerDigest"
|
|
1423
|
-
]) if (row[field] !== null) nonEmpty(row[field], `assignment ${index} ${field}`);
|
|
1424
|
-
const expectedProfile = row.arm === "control" ? sealed.rule.controlProfileDigest : sealed.rule.candidateProfileDigest;
|
|
1425
|
-
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++;
|
|
1426
|
-
arms[row.arm].push(row);
|
|
1427
|
-
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) ?? [];
|
|
1428
1353
|
bucket.push(row);
|
|
1429
|
-
clusters.set(row.clusterId, bucket);
|
|
1354
|
+
tally.clusters.set(row.clusterId, bucket);
|
|
1430
1355
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
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");
|
|
1433
1367
|
if (sealed.rule.assignmentUnit === sealed.rule.clusterUnit) {
|
|
1434
1368
|
for (const [clusterId, bucket] of clusters) if (bucket.length !== 1) throw new ValidationError(`randomized canary: ${sealed.rule.assignmentUnit} cluster '${clusterId}' has multiple assignments`);
|
|
1435
1369
|
}
|
|
@@ -1450,7 +1384,7 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1450
1384
|
const p0 = outcomesComplete ? sum("control", "checkedOutcome") / n0 : null;
|
|
1451
1385
|
const p1 = outcomesComplete ? sum("candidate", "checkedOutcome") / n1 : null;
|
|
1452
1386
|
const delta = p0 === null || p1 === null ? null : p1 - p0;
|
|
1453
|
-
|
|
1387
|
+
return {
|
|
1454
1388
|
registrationDigest: sealed.digest,
|
|
1455
1389
|
cohortReceiptSourceId: cohort.attestationSourceId,
|
|
1456
1390
|
assignmentRosterDigest: cohort.assignmentRosterDigest,
|
|
@@ -1458,7 +1392,7 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1458
1392
|
method: "cluster-robust-t",
|
|
1459
1393
|
confidence: .95,
|
|
1460
1394
|
familyAdjustedConfidence: 1 - .05 / sealed.rule.confirmatoryFamilySize,
|
|
1461
|
-
assignments:
|
|
1395
|
+
assignments: rowCount,
|
|
1462
1396
|
controlAssignments: n0,
|
|
1463
1397
|
candidateAssignments: n1,
|
|
1464
1398
|
clusters: clusters.size,
|
|
@@ -1468,8 +1402,8 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1468
1402
|
missingOutcomes,
|
|
1469
1403
|
missingBilling,
|
|
1470
1404
|
missingTurns,
|
|
1471
|
-
missingTraces,
|
|
1472
|
-
executionDrift,
|
|
1405
|
+
missingTraces: tally.missingTraces,
|
|
1406
|
+
executionDrift: tally.executionDrift,
|
|
1473
1407
|
controlSuccessRate: p0,
|
|
1474
1408
|
candidateSuccessRate: p1,
|
|
1475
1409
|
delta,
|
|
@@ -1485,32 +1419,33 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1485
1419
|
refusal: null,
|
|
1486
1420
|
successCriterionMet: false
|
|
1487
1421
|
};
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
if (executionDrift > 0)
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
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;
|
|
1508
1443
|
const scores = [...clusters.values()].map((bucket) => bucket.reduce((score, row) => score + (row.arm === "candidate" ? (row.checkedOutcome - p1) / n1 : -(row.checkedOutcome - p0) / n0), 0));
|
|
1509
1444
|
const G = clusters.size;
|
|
1510
|
-
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);
|
|
1511
1446
|
if (!Number.isFinite(variance) || variance <= 0) {
|
|
1512
1447
|
result.refusal = "zero-variance";
|
|
1513
|
-
return
|
|
1448
|
+
return;
|
|
1514
1449
|
}
|
|
1515
1450
|
const se = Math.sqrt(variance);
|
|
1516
1451
|
const t = delta / se;
|
|
@@ -1526,11 +1461,23 @@ function decideRandomizedCanary(sealed, cohort, rows, verifyCohort) {
|
|
|
1526
1461
|
};
|
|
1527
1462
|
result.unadjustedPValue = Math.min(1, 2 * (1 - studentTCdf(Math.abs(t), G - 1)));
|
|
1528
1463
|
result.headline95Pass = result.nominal95Interval.low > 0;
|
|
1529
|
-
result.familywisePass = result.familyAdjustedInterval.low >
|
|
1464
|
+
result.familywisePass = result.familyAdjustedInterval.low > rule.minimumLift;
|
|
1530
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);
|
|
1531
1478
|
return result;
|
|
1532
1479
|
}
|
|
1533
1480
|
//#endregion
|
|
1534
|
-
export { BOOTSTRAP_GATE_MIN_N,
|
|
1481
|
+
export { BOOTSTRAP_GATE_MIN_N, EVIDENCE_STATES, FinalEvidenceConflictError, FinalEvidenceError, amendExperiment, assertDesignAdequate, assertMatchedBudgets, benjaminiHochberg, bonferroni, buildEvidenceVector, buildFunnel, clusteredPower, comparePairedArms, composeFunnels, computeInterval, createCampaignEvidenceReceipt, createEvidenceReceipt, decideRandomizedCanary, defineEvaluationClaim, defineExperiment, eProcess, evaluateCondition, evaluatePowerFloorGate, evidenceRegistryRecordSchema, executeAdmissionRule, executeDecisionRule, hashJson, heldoutSignificance, holm, isIndependentEvidence, joinProspectiveCanaryReceipts, manifestContentDigest, mcnemar, mcnemarPower, mcnemarRequiredN, mulberry32, openFinalEvidenceLedger, openSealedExperiment, pairArms, pairHoldout, pairRunRecords, pairedBootstrap, pairedEvalueSequence, pairedMde, pairedRiskDifference, pairedRiskDifferenceExact, pairedRiskDifferenceScore, paretoPolicy, paretoSignificanceGate, powerPreflight, randomizedCanaryObservationDigest, randomizedCanaryRosterDigest, readField, renderFunnelTable, requiredPairedSampleSize, requiredSampleSize, sealExperiment, sealRandomizedCanaryRule, sequentialDecide, sequentialPairedGate, signManifest, summarizeEvaluationUnits, verifyEvidenceReceipt, verifyManifest, verifyMatchedBudgets, verifySealedExperiment, wilson };
|
|
1535
1482
|
|
|
1536
1483
|
//# sourceMappingURL=index.js.map
|