reeval 0.8.0 → 0.10.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/README.md +52 -40
- package/THIRD_PARTY_NOTICES.md +218 -11
- package/assets/package.json +1 -1
- package/assets/pnpm-lock.yaml +30 -30
- package/dist/adapter-DWlpOtRn.js +279 -0
- package/dist/adapter-DWlpOtRn.js.map +1 -0
- package/dist/{agent-B72lZ6w5.js → agent-CURAwx_q.js} +6 -6
- package/dist/{agent-B72lZ6w5.js.map → agent-CURAwx_q.js.map} +1 -1
- package/dist/{agent-Cfj1wD4D.js → agent-CaS_2Sce.js} +92 -26
- package/dist/agent-CaS_2Sce.js.map +1 -0
- package/dist/{analysis-BTNnKh1w.js → analysis-Bxub9LMT.js} +4 -4
- package/dist/{analysis-BTNnKh1w.js.map → analysis-Bxub9LMT.js.map} +1 -1
- package/dist/{assemble-BbFVjHeS.js → assemble-B9Alds-z.js} +290 -30
- package/dist/assemble-B9Alds-z.js.map +1 -0
- package/dist/assemble-J5MukZFY.js +1 -0
- package/dist/{client-CwzU9CiW.js → assert-EUIoRdIt.js} +38 -112
- package/dist/assert-EUIoRdIt.js.map +1 -0
- package/dist/bridge/index.mjs +248 -55
- package/dist/{capture-BXhBfmsM.js → capture-CNb9SuU5.js} +204 -39
- package/dist/capture-CNb9SuU5.js.map +1 -0
- package/dist/capture-jquXZBKK.js +1 -0
- package/dist/{cli-BMjTKY-D.js → cli-D303Vj5N.js} +257 -146
- package/dist/cli-D303Vj5N.js.map +1 -0
- package/dist/{cli-spec-DSvKsOK4.js → cli-spec-BPZbQG2p.js} +38 -19
- package/dist/cli-spec-BPZbQG2p.js.map +1 -0
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/client-fcwgwOAD.js +106 -0
- package/dist/client-fcwgwOAD.js.map +1 -0
- package/dist/{command-JPGNzFsA.js → command-BLfT7vnQ.js} +19 -18
- package/dist/command-BLfT7vnQ.js.map +1 -0
- package/dist/{command-BK4kOgkH.js → command-BT9a37ZR.js} +381 -78
- package/dist/command-BT9a37ZR.js.map +1 -0
- package/dist/{command-BqJtFiPy.js → command-Bge8F7Ko.js} +384 -101
- package/dist/command-Bge8F7Ko.js.map +1 -0
- package/dist/command-BkFjijN2.js +1 -0
- package/dist/{command-BdstSEHu.js → command-CMJtHKRa.js} +14 -14
- package/dist/{command-BdstSEHu.js.map → command-CMJtHKRa.js.map} +1 -1
- package/dist/commands-1p-bIWhN.js +1 -0
- package/dist/{commands-B618jg3C.js → commands-BFx16WB8.js} +8 -8
- package/dist/commands-BFx16WB8.js.map +1 -0
- package/dist/config-DEgnUiU-.js +756 -0
- package/dist/config-DEgnUiU-.js.map +1 -0
- package/dist/{context-CvUv7DUb.js → context-C1mxXh80.js} +11 -7
- package/dist/context-C1mxXh80.js.map +1 -0
- package/dist/{db-DFbtGIYy.js → db-CdHizc4_.js} +582 -53
- package/dist/db-CdHizc4_.js.map +1 -0
- package/dist/db-Dm1cRJJP.js +2 -0
- package/dist/debug-D7bEv_UV.js +1 -0
- package/dist/{dist-CTzThfu_.js → dist-B8hJImYt.js} +17 -4
- package/dist/dist-B8hJImYt.js.map +1 -0
- package/dist/{docker-2qns7hJ2.js → docker-7b_2SaH7.js} +35 -22
- package/dist/docker-7b_2SaH7.js.map +1 -0
- package/dist/{docker-IFRW8K5f.js → docker-sZrNrr82.js} +3 -3
- package/dist/docker-sZrNrr82.js.map +1 -0
- package/dist/docker-yauK-9X8.js +1 -0
- package/dist/{doctor-B6oYTPoR.js → doctor-BYNok4UO.js} +263 -84
- package/dist/doctor-BYNok4UO.js.map +1 -0
- package/dist/{duration-JsJrIWXq.js → duration-CEOQww97.js} +2 -2
- package/dist/{duration-JsJrIWXq.js.map → duration-CEOQww97.js.map} +1 -1
- package/dist/{egress-IUKdeayc.js → egress-C4PZTSSe.js} +147 -14
- package/dist/egress-C4PZTSSe.js.map +1 -0
- package/dist/environment-DNjRk0nU.js +1133 -0
- package/dist/environment-DNjRk0nU.js.map +1 -0
- package/dist/{errors-yDAEwmZo.js → errors-B6BSMs03.js} +2 -2
- package/dist/errors-B6BSMs03.js.map +1 -0
- package/dist/{errors-C9w_ud7g.js → errors-r025B0Zb.js} +4 -4
- package/dist/errors-r025B0Zb.js.map +1 -0
- package/dist/evaluate-C1UVL21l.d.ts +92 -0
- package/dist/evaluate-D4zeRGBF.js +2351 -0
- package/dist/evaluate-D4zeRGBF.js.map +1 -0
- package/dist/family-D2b7WD10.js +67 -0
- package/dist/family-D2b7WD10.js.map +1 -0
- package/dist/files-BAt0i00X.js +1 -0
- package/dist/{files-CMSUXAEg.js → files-BXUdY8tr.js} +10 -9
- package/dist/{files-CMSUXAEg.js.map → files-BXUdY8tr.js.map} +1 -1
- package/dist/files-BhyltlDB.js +1 -0
- package/dist/files-Bk1mC3AN.js +43 -0
- package/dist/files-Bk1mC3AN.js.map +1 -0
- package/dist/{files-B6aVVGrk.js → files-DQmHE7pb.js} +5 -5
- package/dist/{files-B6aVVGrk.js.map → files-DQmHE7pb.js.map} +1 -1
- package/dist/files-ZZPqfAo6.js +1 -0
- package/dist/{git-EmdFJ4DY.js → git-DfG-YJ1u.js} +2 -2
- package/dist/{git-EmdFJ4DY.js.map → git-DfG-YJ1u.js.map} +1 -1
- package/dist/harness-B8QC9u0O.js +323 -0
- package/dist/harness-B8QC9u0O.js.map +1 -0
- package/dist/harness.d.ts +19 -31
- package/dist/harness.js +1 -2
- package/dist/{header-_F0EWob3.js → header-hK-Z_Po9.js} +10 -3
- package/dist/{header-_F0EWob3.js.map → header-hK-Z_Po9.js.map} +1 -1
- package/dist/{images-CscddrJU.js → images-0On0cztu.js} +114 -45
- package/dist/images-0On0cztu.js.map +1 -0
- package/dist/index.d.ts +10 -26
- package/dist/index.js +6 -2108
- package/dist/{init-NQfIvi-0.js → init-B77Rpcqc.js} +26 -8
- package/dist/init-B77Rpcqc.js.map +1 -0
- package/dist/init-BrOWin3W.js +1 -0
- package/dist/{invocations-nPvrlZPj.js → invocations-DbGfBAA_.js} +4 -4
- package/dist/{invocations-nPvrlZPj.js.map → invocations-DbGfBAA_.js.map} +1 -1
- package/dist/{judge-CeYPN8P_.js → judge-DW_GDOmB.js} +11 -19
- package/dist/{judge-CeYPN8P_.js.map → judge-DW_GDOmB.js.map} +1 -1
- package/dist/judge.d.ts +2 -2
- package/dist/judge.js +1 -1
- package/dist/{live-S0qODb6o.js → live-jlfszAbb.js} +9 -20
- package/dist/live-jlfszAbb.js.map +1 -0
- package/dist/matchers-Ddmc2z7H.js +118 -0
- package/dist/matchers-Ddmc2z7H.js.map +1 -0
- package/dist/{model-DEQo3FkZ.js → model-DaVCY3rb.js} +2 -2
- package/dist/{model-DEQo3FkZ.js.map → model-DaVCY3rb.js.map} +1 -1
- package/dist/model-NM3ID0uR.js +1 -0
- package/dist/{model-Cl507trk.js → model-h_cDtcRr.js} +19 -18
- package/dist/model-h_cDtcRr.js.map +1 -0
- package/dist/model-nwWJvaUR.js +1 -0
- package/dist/{model-BndnmcLm.js → model-oqcDplJG.js} +271 -34
- package/dist/model-oqcDplJG.js.map +1 -0
- package/dist/{node-Co7EXge0.js → node-B3ydHo6t.js} +10 -47
- package/dist/node-B3ydHo6t.js.map +1 -0
- package/dist/object-CLf2-tNq.js +9 -0
- package/dist/object-CLf2-tNq.js.map +1 -0
- package/dist/{opencode-providers-ByD85Q0l.js → opencode-providers-J9colP0-.js} +96 -21
- package/dist/opencode-providers-J9colP0-.js.map +1 -0
- package/dist/options-Bh2W63dK.js +1119 -0
- package/dist/options-Bh2W63dK.js.map +1 -0
- package/dist/{pairs-DDsjgm5F.js → pairs-CnInRu-G.js} +76 -2
- package/dist/{pairs-DDsjgm5F.js.map → pairs-CnInRu-G.js.map} +1 -1
- package/dist/{patch-CGCVipPu.js → patch-Zac5aIRM.js} +6 -6
- package/dist/{patch-CGCVipPu.js.map → patch-Zac5aIRM.js.map} +1 -1
- package/dist/{plan-PPc4-6xd.js → plan-C9Cy27Ay.js} +75 -32
- package/dist/plan-C9Cy27Ay.js.map +1 -0
- package/dist/preflight-CPWpQeBI.js +1 -0
- package/dist/{preflight-CddycK92.js → preflight-D7iFPKeK.js} +8 -7
- package/dist/preflight-D7iFPKeK.js.map +1 -0
- package/dist/prepare-BGjePFQl.js +2 -0
- package/dist/{prepare-CsP-057p.js → prepare-doGxaAGR.js} +38 -30
- package/dist/prepare-doGxaAGR.js.map +1 -0
- package/dist/process-CSVO_jsc.js +119 -0
- package/dist/process-CSVO_jsc.js.map +1 -0
- package/dist/{provenance-CsX6PHDR.js → provenance-DmE9uPVt.js} +4 -4
- package/dist/{provenance-CsX6PHDR.js.map → provenance-DmE9uPVt.js.map} +1 -1
- package/dist/provider-DehR4CMN.js +1 -0
- package/dist/providers-gDMko8fl.js +1 -0
- package/dist/providers-tAOD1NQN.js +165 -0
- package/dist/providers-tAOD1NQN.js.map +1 -0
- package/dist/{query-BUcwCYsI.js → query-Bes9Kh6Y.js} +3 -3
- package/dist/{query-BUcwCYsI.js.map → query-Bes9Kh6Y.js.map} +1 -1
- package/dist/query-C_G_svLU.js +1 -0
- package/dist/questions-DjAwMxZ3.js +524 -0
- package/dist/questions-DjAwMxZ3.js.map +1 -0
- package/dist/{record-BRP9vZrj.js → record-BKmMvZ6O.js} +9 -1
- package/dist/{record-BRP9vZrj.js.map → record-BKmMvZ6O.js.map} +1 -1
- package/dist/remote-HDRt16ew.js +378 -0
- package/dist/remote-HDRt16ew.js.map +1 -0
- package/dist/{results-BcSHWbgB.js → results-DuauQI3Z.js} +4 -4
- package/dist/{results-BcSHWbgB.js.map → results-DuauQI3Z.js.map} +1 -1
- package/dist/{resume-DZ9AmfPv.js → resume-BRfa8E_s.js} +10 -10
- package/dist/{resume-DZ9AmfPv.js.map → resume-BRfa8E_s.js.map} +1 -1
- package/dist/{root-CvdRlRZX.js → root-DICDHCtp.js} +4 -4
- package/dist/{root-CvdRlRZX.js.map → root-DICDHCtp.js.map} +1 -1
- package/dist/{runtime-Dfb2r-cS.js → runtime-PX_oXiCS.js} +105 -11
- package/dist/runtime-PX_oXiCS.js.map +1 -0
- package/dist/sandbox-D3A8oUb7.js +70 -0
- package/dist/sandbox-D3A8oUb7.js.map +1 -0
- package/dist/sandbox.d.ts +22 -8
- package/dist/sandbox.js +1 -2
- package/dist/server-C7sg1ndo.js +1 -0
- package/dist/{server-Da60oe4b.js → server-XDleKaF_.js} +11 -11
- package/dist/server-XDleKaF_.js.map +1 -0
- package/dist/shared-DYpIb1BI.js +166 -0
- package/dist/shared-DYpIb1BI.js.map +1 -0
- package/dist/{source-BVOnL3sn.js → source-C8xumIWj.js} +2 -2
- package/dist/{source-BVOnL3sn.js.map → source-C8xumIWj.js.map} +1 -1
- package/dist/source-fGd0SaKP.js +1 -0
- package/dist/{src-TdJuDYqB.js → src-B7treWa8.js} +1597 -292
- package/dist/src-B7treWa8.js.map +1 -0
- package/dist/{src-C1E9HDWO.js → src-C7_1SqDP.js} +3 -3
- package/dist/{src-C1E9HDWO.js.map → src-C7_1SqDP.js.map} +1 -1
- package/dist/{src-DDNXsD9H.js → src-CF17Ug08.js} +5 -4
- package/dist/src-CF17Ug08.js.map +1 -0
- package/dist/{src-D_cXqmnI.js → src-CFp86GtV.js} +60 -60
- package/dist/src-CFp86GtV.js.map +1 -0
- package/dist/src-C_lPtowT.js +2 -0
- package/dist/src-DIL0jST0.js +368 -0
- package/dist/src-DIL0jST0.js.map +1 -0
- package/dist/src-DNnG4e4R.js +2 -0
- package/dist/src-DTbrY1hi.js +2 -0
- package/dist/src-DdyJEh2v.js +2 -0
- package/dist/src-Dj9PAroc.js +2 -0
- package/dist/src-Du8H85Qq.js +2 -0
- package/dist/src-DvCg0NBs.js +324 -0
- package/dist/src-DvCg0NBs.js.map +1 -0
- package/dist/{src-CxTC5kNI.js → src-DvK0EIZx.js} +8 -10
- package/dist/{src-CxTC5kNI.js.map → src-DvK0EIZx.js.map} +1 -1
- package/dist/{src-DVy58-zZ.js → src-FGXhkEkH.js} +5 -5
- package/dist/{src-DVy58-zZ.js.map → src-FGXhkEkH.js.map} +1 -1
- package/dist/src-jzagbuqH.js +2 -0
- package/dist/src-ofUaYbuY.js +3 -0
- package/dist/src-pJZOrYR9.js +1 -0
- package/dist/{src-D95O-Smv.js → src-u8_ixn_F.js} +15 -11
- package/dist/src-u8_ixn_F.js.map +1 -0
- package/dist/{state-B72h_jEw.js → state-C__9swoG.js} +36 -24
- package/dist/state-C__9swoG.js.map +1 -0
- package/dist/state-CeR6oz0k.js +66 -0
- package/dist/state-CeR6oz0k.js.map +1 -0
- package/dist/state-CgjQo29K.js +1 -0
- package/dist/studio-app/assets/index-CwQN3f_h.css +2 -0
- package/dist/studio-app/assets/{index-Bgr-efZm.js → index-DrQc2Yxd.js} +12 -12
- package/dist/studio-app/index.html +2 -2
- package/dist/{summary-k3mhWWXv.js → summary-BLAVLySU.js} +202 -17
- package/dist/summary-BLAVLySU.js.map +1 -0
- package/dist/{summary-CJdxaRdM.js → summary-DgyjUh_l.js} +7 -7
- package/dist/{summary-CJdxaRdM.js.map → summary-DgyjUh_l.js.map} +1 -1
- package/dist/testing.d.ts +3 -2
- package/dist/testing.js +3 -2
- package/dist/{tool-target-BU1JnSE9.js → tool-target-D2mcYlSQ.js} +14 -7
- package/dist/tool-target-D2mcYlSQ.js.map +1 -0
- package/dist/{tools-D0gF2QoV.js → tools-GCyNYSc1.js} +7 -7
- package/dist/tools-GCyNYSc1.js.map +1 -0
- package/dist/transcript-BNNANU8A.js +64 -0
- package/dist/transcript-BNNANU8A.js.map +1 -0
- package/dist/types-C5vI3g1C.js.map +1 -1
- package/dist/{types-_LOFdPUf.d.ts → types-g17bRAzt.d.ts} +578 -49
- package/dist/{usage-DDF_6tkV.js → usage-CleNKkly.js} +4 -2
- package/dist/{usage-DDF_6tkV.js.map → usage-CleNKkly.js.map} +1 -1
- package/dist/view/index.d.ts +83 -17
- package/dist/view/index.js +7 -6
- package/dist/views-BW6oCDUQ.js +2 -0
- package/dist/{views-DZ1YDqey.js → views-BmQF4UCI.js} +13 -8
- package/dist/views-BmQF4UCI.js.map +1 -0
- package/dist/{worker-entry-DXeyWY-m.js → worker-entry-yOchGYYv.js} +16 -225
- package/dist/worker-entry-yOchGYYv.js.map +1 -0
- package/dist/{workspace-DpXdrslo.js → workspace-CgyHEM0l.js} +7 -7
- package/dist/{workspace-DpXdrslo.js.map → workspace-CgyHEM0l.js.map} +1 -1
- package/dist/workspace-D8sSgpiy.js +1 -0
- package/docker/Dockerfile +7 -5
- package/package.json +12 -12
- package/dist/agent-Cfj1wD4D.js.map +0 -1
- package/dist/assemble-BbFVjHeS.js.map +0 -1
- package/dist/assemble-CXiTVyHD.js +0 -2
- package/dist/capture-BXhBfmsM.js.map +0 -1
- package/dist/capture-N7r3yeak.js +0 -2
- package/dist/cli-BMjTKY-D.js.map +0 -1
- package/dist/cli-spec-DSvKsOK4.js.map +0 -1
- package/dist/client-CwzU9CiW.js.map +0 -1
- package/dist/command-BK4kOgkH.js.map +0 -1
- package/dist/command-BqJtFiPy.js.map +0 -1
- package/dist/command-CTVGuH8y.js +0 -2
- package/dist/command-JPGNzFsA.js.map +0 -1
- package/dist/commands-B618jg3C.js.map +0 -1
- package/dist/commands-Duo2ur3r.js +0 -2
- package/dist/config-B-E0xRkf.js +0 -447
- package/dist/config-B-E0xRkf.js.map +0 -1
- package/dist/context-CvUv7DUb.js.map +0 -1
- package/dist/db-CnoUy-FZ.js +0 -3
- package/dist/db-DFbtGIYy.js.map +0 -1
- package/dist/debug-SEmW4w8f.js +0 -2
- package/dist/dist-CTzThfu_.js.map +0 -1
- package/dist/docker-2qns7hJ2.js.map +0 -1
- package/dist/docker-D6t23fZl.js +0 -2
- package/dist/docker-IFRW8K5f.js.map +0 -1
- package/dist/doctor-B6oYTPoR.js.map +0 -1
- package/dist/egress-IUKdeayc.js.map +0 -1
- package/dist/environment-DiCljXMD.js +0 -657
- package/dist/environment-DiCljXMD.js.map +0 -1
- package/dist/errors-C9w_ud7g.js.map +0 -1
- package/dist/errors-yDAEwmZo.js.map +0 -1
- package/dist/fake-instructions-CUI33I_F.js +0 -32
- package/dist/fake-instructions-CUI33I_F.js.map +0 -1
- package/dist/files-BM78_nnF.js +0 -2
- package/dist/files-BpYgF2z0.js +0 -2
- package/dist/files-YCCVaTQC.js +0 -2
- package/dist/harness-iqWeJQMM.js +0 -154
- package/dist/harness-iqWeJQMM.js.map +0 -1
- package/dist/images-CscddrJU.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-DBHyi92L.js +0 -2
- package/dist/init-NQfIvi-0.js.map +0 -1
- package/dist/jiti-BcJHCtrb.js +0 -46
- package/dist/jiti-BcJHCtrb.js.map +0 -1
- package/dist/live-S0qODb6o.js.map +0 -1
- package/dist/model-BbLGRtOs.js +0 -2
- package/dist/model-BndnmcLm.js.map +0 -1
- package/dist/model-Cl507trk.js.map +0 -1
- package/dist/model-DMOraCcm.js +0 -2
- package/dist/node-Co7EXge0.js.map +0 -1
- package/dist/opencode-providers-ByD85Q0l.js.map +0 -1
- package/dist/options-DPUlm4FI.js +0 -735
- package/dist/options-DPUlm4FI.js.map +0 -1
- package/dist/plan-PPc4-6xd.js.map +0 -1
- package/dist/preflight-CddycK92.js.map +0 -1
- package/dist/preflight-Zumy0adT.js +0 -2
- package/dist/prepare-CKdMoC7e.js +0 -3
- package/dist/prepare-CsP-057p.js.map +0 -1
- package/dist/provider-BDbNOQhQ.js +0 -2
- package/dist/providers-DkwiLKDS.js +0 -107
- package/dist/providers-DkwiLKDS.js.map +0 -1
- package/dist/providers-yXZZcPfx.js +0 -2
- package/dist/query-noGbekGF.js +0 -2
- package/dist/questions-BEPj98fZ.js +0 -234
- package/dist/questions-BEPj98fZ.js.map +0 -1
- package/dist/runtime-Dfb2r-cS.js.map +0 -1
- package/dist/sandbox--ZXuscAZ.js +0 -134
- package/dist/sandbox--ZXuscAZ.js.map +0 -1
- package/dist/server-Da60oe4b.js.map +0 -1
- package/dist/server-DiGR4JxK.js +0 -2
- package/dist/source-Dqu0jKwx.js +0 -2
- package/dist/src-BHNiP-5A.js +0 -4
- package/dist/src-BT4dB5CO.js +0 -2
- package/dist/src-BT5pwco0.js +0 -3
- package/dist/src-BrMbt1B2.js +0 -3
- package/dist/src-D13vpMh0.js +0 -3
- package/dist/src-D95O-Smv.js.map +0 -1
- package/dist/src-DDNXsD9H.js.map +0 -1
- package/dist/src-D_cXqmnI.js.map +0 -1
- package/dist/src-DdRlaiRc.js +0 -3
- package/dist/src-TdJuDYqB.js.map +0 -1
- package/dist/src-xczuQbE6.js +0 -3
- package/dist/state-B72h_jEw.js.map +0 -1
- package/dist/state-Bf_Vq_pV.js +0 -2
- package/dist/studio-app/assets/index-CUx6GoL5.css +0 -2
- package/dist/summary-k3mhWWXv.js.map +0 -1
- package/dist/tool-target-BU1JnSE9.js.map +0 -1
- package/dist/tools-D0gF2QoV.js.map +0 -1
- package/dist/views-DZ1YDqey.js.map +0 -1
- package/dist/views-Ds0GXWtX.js +0 -3
- package/dist/worker-entry-DXeyWY-m.js.map +0 -1
- package/dist/workspace-DzNL-3iO.js +0 -2
|
@@ -1,31 +1,42 @@
|
|
|
1
|
-
import { n as UsageError } from "./errors-
|
|
1
|
+
import { n as UsageError } from "./errors-B6BSMs03.js";
|
|
2
2
|
import { a as fromCwd, l as sha256 } from "./ids-Bp6ut7ZD.js";
|
|
3
|
+
import { r as questionShows, t as DEFAULT_QUESTION_STATE } from "./state-CeR6oz0k.js";
|
|
3
4
|
import { n as clip } from "./text-gEcKjAyp.js";
|
|
4
|
-
import { c as resolveAnalysisModel, l as SYSTEM_PROMPT, n as callAnalysisModel, t as analysisModelName } from "./model-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { s as
|
|
15
|
-
import { t as
|
|
5
|
+
import { c as resolveAnalysisModel, l as SYSTEM_PROMPT, n as callAnalysisModel, t as analysisModelName } from "./model-h_cDtcRr.js";
|
|
6
|
+
import { n as formatTokens } from "./usage-CleNKkly.js";
|
|
7
|
+
import { t as ANALYSIS_PROMPT_VERSION } from "./analysis-Bxub9LMT.js";
|
|
8
|
+
import { V as labelledJudgements, yt as compare } from "./model-oqcDplJG.js";
|
|
9
|
+
import { a as familyLiftLabel, o as familyRateLabel, r as familyEffortLabel } from "./family-D2b7WD10.js";
|
|
10
|
+
import { t as runHeader } from "./header-hK-Z_Po9.js";
|
|
11
|
+
import { n as headToHeadLines, r as pairTallies, s as sampleReasons, u as splitsLabel } from "./pairs-CnInRu-G.js";
|
|
12
|
+
import { o as parseRecord, p as scratchDir } from "./files-BXUdY8tr.js";
|
|
13
|
+
import { g as contrastsOf } from "./summary-BLAVLySU.js";
|
|
14
|
+
import { l as writeCached, o as readCached, s as saveAnalysis } from "./files-DQmHE7pb.js";
|
|
15
|
+
import { c as resolveRun, s as pickBaseline, t as RefError } from "./views-BmQF4UCI.js";
|
|
16
|
+
import { c as lines, n as allRuns, t as CommandError, u as reachability } from "./commands-BFx16WB8.js";
|
|
17
|
+
import { i as checkCommand, o as commandSummary } from "./cli-spec-BPZbQG2p.js";
|
|
18
|
+
import { l as TOOL_CLASSES, s as openHistoryDb } from "./db-CdHizc4_.js";
|
|
19
|
+
import { t as author } from "./provenance-DmE9uPVt.js";
|
|
16
20
|
import { basename, join } from "node:path";
|
|
17
21
|
import { readFile } from "node:fs/promises";
|
|
18
22
|
//#region src/analysis/digest.ts
|
|
19
23
|
const RULES = [
|
|
20
|
-
`
|
|
21
|
-
"When sources or the eval fingerprint differ across the compared runs, the pass
|
|
22
|
-
|
|
24
|
+
`Lift (variant pass@1 minus control pass@1) is insufficient (not measured, never a results line) when either side has fewer than 2 counted attempts; otherwise it is an effect only when its 95% interval (Newcombe) excludes 0, and within noise when the interval spans 0, whatever the point estimate.`,
|
|
25
|
+
"When sources or the eval fingerprint differ across the compared runs, the pass@1 difference is not comparable: the eval changed. Never call it an effect. Do not put those mixed counts on a results line. The first line of the analysis says the eval changed. A lift is an effect only when sources match; the two-attempt floor still applies then.",
|
|
26
|
+
`Effort (tool calls, agent time, and tokens when both sides have usage samples) is compared with an exact Mann-Whitney test: "fewer"/"more" at p < 0.05; "insufficient" when the attempt counts can never reach it (2 vs 2 cannot) — never because a harness dropped usage. Attempts without usage are left out of the token sample only. If either side then has no token sample, the token metric is omitted (no line, not insufficient). A Goose cell does not blank tokens on Cursor cells in the same study. Pooled across evals, tokens are an effect only when at least 2/3 of the strata that reported usage agree. Effort's separated (given from 3 vs 3) says, per metric, that the two sides' ranges do not overlap: every attempt on one side beat every attempt on the other. insufficient with separated true is a directional signal: report the ratio, the n and "no overlap, not significant" as directional, never as an effect. separated false is no direction at all.`,
|
|
27
|
+
"A family fact is one pooled evaluate.each: its cases are paired samples of one suite, so its lift (Newcombe paired interval and McNemar at one attempt a case, a t interval over cases otherwise) is the result for those cases; their own pass-rate facts carry no lift. insufficient (fewer than 6 discordant pairs or 6 cases) is not measured. A family's minLift gates the pooled lower bound.",
|
|
23
28
|
"Each factor claim has a tier: controlled (two cells in one run that differ in one factor), pooled (the same contrast over comparable runs, and across evals), observed (a change between runs, which is weaker; \"confounded\" when several parts changed), not_measured (one level only).",
|
|
24
29
|
`A cell with mixed outcomes is flaky only with at least 6 counted attempts over comparable runs; below that it is "insufficient", not flaky.`,
|
|
25
30
|
"Drift marked noise changed only an agent CLI's own runtime state (e.g. ~/.cursor/cli-config.json): not a real change, and those runs stay comparable.",
|
|
26
|
-
"An eval where every cell passes at least 95% is saturated: pass
|
|
31
|
+
"An eval where every cell passes at least 95% is saturated: pass@1 cannot tell cells apart there, effort can.",
|
|
27
32
|
"Judge verdicts carry no recorded reason; an explanation of a failed verdict is your reading of the cited output, and must say so.",
|
|
28
|
-
"
|
|
33
|
+
"A criteria fact lists each check (expect label, judges included) per cell: rows only for labels whose rate differs between cells, or is mixed within one; neverMet labels failed on every counted attempt of every cell, alwaysMet passed on all of them. A neverMet or alwaysMet label is the same in every arm: it can't explain a difference between arms.",
|
|
34
|
+
"frame study means every cell in scope is ungated (gate: 'none'): the run measures how its arms differ, so attempts that fail are data, not a failed gate.",
|
|
35
|
+
"setup, rules and cli give context and are not citable: cite facts, evidence and attempts.",
|
|
36
|
+
"A context-use fact counts each attempt's tool calls by class (context, dependency, web, verify, workspace) and lists which placed files each arm opened: how much an arm leaned on what its environment declared versus digging in installed packages. The classes are a heuristic over tool names and paths; cite them as counts, not as proof of intent.",
|
|
37
|
+
"A contrast fact (kind contrast) is one pair of arms on one harness, a against b, when an eval has two variants or more: pass rate and lift of a over b, the checks that tell them apart (discriminates or mixed; sameOnBoth counts the rest) and effort. It answers how two variants differ from each other, not only from the control; gating stays each variant against its control.",
|
|
38
|
+
"A check (kind checks) whose verdict is both-pass or both-fail passes, or fails, on both the variant and its control: it is no evidence for or against the variant. Only discriminates rows say which requirement separated them.",
|
|
39
|
+
"Compare-question win rates annotate the run: they never change pass, fail or the exit code. Cite them as annotation, never as a result that gates the run. A vote's reason is the model's wording: do not treat it as a check. Each pair is voted in both orders; splits counts pairs whose two orders picked opposite sides (the position decided, not the work), and rates count such a pair as one win each. With more than two arms, read headToHead (a–b wins per pair, splits apart), not the pooled rates. shows lists what each side was shown: a question that shows output or transcript can favour the better-written account rather than the better work, and one that shows artifacts rests on screenshots."
|
|
29
40
|
];
|
|
30
41
|
const pts = (x) => x === null || x === void 0 ? null : `${x >= 0 ? "+" : "−"}${Math.round(Math.abs(x) * 100)}`;
|
|
31
42
|
const liftText = (points, lo, hi) => `${pts(points)} pts (95% ${pts(lo)}…${pts(hi)})`;
|
|
@@ -53,7 +64,7 @@ function evalSourcesChanged(base, head) {
|
|
|
53
64
|
/** Short tags for the evals in scope: the file's base name, numbered when a file has several. */
|
|
54
65
|
function evalTags(evals) {
|
|
55
66
|
const tags = /* @__PURE__ */ new Map();
|
|
56
|
-
const bases = evals.map((e) => basename(e.file).replace(
|
|
67
|
+
const bases = evals.map((e) => basename(e.file).replace(/(?:\.\w+)?\.[jt]s$/, ""));
|
|
57
68
|
evals.forEach((e, i) => {
|
|
58
69
|
const b = bases[i];
|
|
59
70
|
const same = bases.filter((x) => x === b).length;
|
|
@@ -68,7 +79,91 @@ function cellTags(e) {
|
|
|
68
79
|
const prefix = (c) => harnesses.length < 2 ? "" : `${kinds.length === harnesses.length ? c.harnessKind : c.harness}:`;
|
|
69
80
|
return new Map(e.cells.map((c) => [c.key, `${prefix(c)}${c.variant ?? "control"}`]));
|
|
70
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Cell names for facts: each tag, with a compare's control named by its environment
|
|
84
|
+
* (`no-skill (control)`) so a reading can name the arm. Attempt ids keep the tag.
|
|
85
|
+
*/
|
|
86
|
+
function cellNames(e, tags) {
|
|
87
|
+
const compare = e.cells.some((c) => c.role === "variant");
|
|
88
|
+
return new Map(e.cells.map((c) => {
|
|
89
|
+
const tag = tags.get(c.key) ?? c.key;
|
|
90
|
+
const named = compare && c.role === "control" && c.environment && c.environment !== "-";
|
|
91
|
+
return [c.key, named ? tag.replace(/control$/, `${c.environment} (control)`) : tag];
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
71
94
|
const counted = (a) => a.outcome === "pass" || a.outcome === "fail";
|
|
95
|
+
const LABEL_CHARS = 60;
|
|
96
|
+
const round2 = (x) => Math.round(x * 100) / 100;
|
|
97
|
+
const round1 = (x) => Math.round(x * 10) / 10;
|
|
98
|
+
const ratioText = (r) => r == null ? "×–" : `×${Number(r).toFixed(2)}`;
|
|
99
|
+
/** The labels of an attempt's assertions that failed or couldn't answer. */
|
|
100
|
+
const failedLabels = (a) => (a.assertions ?? []).filter((x) => x.status !== "pass").map((x) => clip(x.label, LABEL_CHARS));
|
|
101
|
+
/** Every counted attempt passed (`all`), none did, or some; undefined when none answered. */
|
|
102
|
+
const sideOf = (t) => {
|
|
103
|
+
const answered = t.pass + t.fail + t.error + t.notRun;
|
|
104
|
+
if (answered === 0) return void 0;
|
|
105
|
+
return t.pass === answered ? "all" : t.pass === 0 ? "none" : "some";
|
|
106
|
+
};
|
|
107
|
+
/** Items interleaved by group, groups in order of first appearance: one from each, then the next. */
|
|
108
|
+
function roundRobin(items, key) {
|
|
109
|
+
const groups = /* @__PURE__ */ new Map();
|
|
110
|
+
for (const item of items) groups.set(key(item), [...groups.get(key(item)) ?? [], item]);
|
|
111
|
+
const out = [];
|
|
112
|
+
for (let i = 0; out.length < items.length; i++) for (const g of groups.values()) if (i < g.length) out.push(g[i]);
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
115
|
+
/** `study` when every cell in scope is ungated, so the run compares arms rather than gating them. */
|
|
116
|
+
const frameOf = (evals) => {
|
|
117
|
+
const cells = evals.flatMap((e) => e.cells);
|
|
118
|
+
return cells.length && cells.every((c) => c.gate === "none") ? "study" : "gate";
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* One eval's checks per cell: a row with each cell's rate (and mean judge score) for each label
|
|
122
|
+
* that differs between cells or is mixed within one, and the labels every cell failed, or passed,
|
|
123
|
+
* on every counted attempt.
|
|
124
|
+
*/
|
|
125
|
+
function criteriaOf(e, tag) {
|
|
126
|
+
const cells = e.cells.filter((c) => c.checks?.length);
|
|
127
|
+
const labels = [...new Set(cells.flatMap((c) => (c.checks ?? []).map((k) => k.label)))];
|
|
128
|
+
if (!labels.length) return null;
|
|
129
|
+
const scores = /* @__PURE__ */ new Map();
|
|
130
|
+
for (const a of e.attempts) {
|
|
131
|
+
if (!counted(a)) continue;
|
|
132
|
+
for (const j of labelledJudgements(a)) {
|
|
133
|
+
if (j.check === void 0) continue;
|
|
134
|
+
const id = `${a.cell}\0${j.check}`;
|
|
135
|
+
scores.set(id, [...scores.get(id) ?? [], j.judgement.score]);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const rows = [];
|
|
139
|
+
const neverMet = [];
|
|
140
|
+
const alwaysMet = [];
|
|
141
|
+
for (const label of labels) {
|
|
142
|
+
const tallies = cells.flatMap((c) => {
|
|
143
|
+
const k = c.checks?.find((x) => x.label === label);
|
|
144
|
+
return k ? [{
|
|
145
|
+
c,
|
|
146
|
+
k
|
|
147
|
+
}] : [];
|
|
148
|
+
});
|
|
149
|
+
const sides = new Set(tallies.map(({ k }) => sideOf(k)));
|
|
150
|
+
if (sides.size === 1 && sides.has("none")) neverMet.push(clip(label, LABEL_CHARS));
|
|
151
|
+
else if (sides.size === 1 && sides.has("all")) alwaysMet.push(clip(label, LABEL_CHARS));
|
|
152
|
+
else rows.push({
|
|
153
|
+
label: clip(label, LABEL_CHARS),
|
|
154
|
+
cells: Object.fromEntries(tallies.map(({ c, k }) => {
|
|
155
|
+
const s = scores.get(`${c.key}\0${label}`);
|
|
156
|
+
const mean = s?.length ? ` · ${(s.reduce((x, y) => x + y, 0) / s.length).toFixed(2)}` : "";
|
|
157
|
+
return [tag(c.key), `${k.pass}/${k.pass + k.fail + k.error + k.notRun}${mean}`];
|
|
158
|
+
}))
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
rows,
|
|
163
|
+
neverMet,
|
|
164
|
+
alwaysMet
|
|
165
|
+
};
|
|
166
|
+
}
|
|
72
167
|
/** The digest, and the evidence dropped from it to fit its cap, whole, for tools to read back. */
|
|
73
168
|
async function buildDigestKeepingDropped(input) {
|
|
74
169
|
const { head, base, db } = input;
|
|
@@ -77,6 +172,7 @@ async function buildDigestKeepingDropped(input) {
|
|
|
77
172
|
const needle = input.evalFilter?.toLowerCase() ?? null;
|
|
78
173
|
const inScope = (e) => !needle || e.id.toLowerCase().includes(needle);
|
|
79
174
|
const scopeEvals = head.record.evals.filter(inScope);
|
|
175
|
+
const frame = frameOf(scopeEvals);
|
|
80
176
|
const tags = evalTags(scopeEvals);
|
|
81
177
|
const evalKeys = new Set(scopeEvals.map((e) => e.key));
|
|
82
178
|
const tagOf = (key) => tags.get(key) ?? key;
|
|
@@ -87,25 +183,30 @@ async function buildDigestKeepingDropped(input) {
|
|
|
87
183
|
for (const r of runs) for (const e of r.record.evals) {
|
|
88
184
|
if (!evalKeys.has(e.key)) continue;
|
|
89
185
|
const cells = cellTags(e);
|
|
90
|
-
|
|
186
|
+
const names = cellNames(e, cells);
|
|
187
|
+
for (const [key, name] of names) cellTagOf.set(`${r.record.runId}\0${e.key}\0${key}`, name);
|
|
91
188
|
for (const a of e.attempts) {
|
|
92
189
|
const id = `${short.get(r.record.runId)}/${tagOf(e.key)}/${cells.get(a.cell)}#${a.n}`;
|
|
93
190
|
idOf.set(`${r.record.runId}\0${a.key}`, id);
|
|
94
|
-
const judge = a.judgements[0];
|
|
95
191
|
const any = a.files.transcript ?? a.files.judgeInput ?? a.checks.find((c) => c.log)?.log;
|
|
192
|
+
const assertions = a.assertions ?? [];
|
|
193
|
+
const failed = failedLabels(a);
|
|
194
|
+
const judges = labelledJudgements(a);
|
|
96
195
|
attempts[id] = {
|
|
97
196
|
run: short.get(r.record.runId),
|
|
98
197
|
runId: r.record.runId,
|
|
99
198
|
key: a.key,
|
|
100
199
|
eval: tagOf(e.key),
|
|
101
200
|
evalSlug: e.slug,
|
|
102
|
-
cell:
|
|
201
|
+
cell: names.get(a.cell),
|
|
103
202
|
attempt: a.id,
|
|
104
203
|
outcome: a.outcome,
|
|
105
204
|
tools: a.activity.tools,
|
|
106
205
|
agentS: Math.round(a.timings.agentMs / 1e3),
|
|
107
|
-
...
|
|
108
|
-
|
|
206
|
+
...assertions.length ? { checks: `${assertions.filter((x) => x.status === "pass").length}/${assertions.length}` } : {},
|
|
207
|
+
...failed.length ? { failed } : {},
|
|
208
|
+
...judges.length ? { judges: Object.fromEntries(judges.map((j) => [clip(j.label, LABEL_CHARS), round2(j.judgement.score)])) } : {},
|
|
209
|
+
execs: a.checks.length,
|
|
109
210
|
artifacts: any ? `${r.record.runId}/${any.path.split("/").slice(0, 3).join("/")}` : null
|
|
110
211
|
};
|
|
111
212
|
}
|
|
@@ -121,22 +222,51 @@ async function buildDigestKeepingDropped(input) {
|
|
|
121
222
|
const list = (values) => values.map((v) => `'${v.replace(/'/g, "''")}'`).join(", ");
|
|
122
223
|
const runList = list(runIds);
|
|
123
224
|
const evalList = list([...evalKeys]);
|
|
124
|
-
for (const r of runs)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
225
|
+
for (const r of runs) {
|
|
226
|
+
for (const e of r.record.evals) {
|
|
227
|
+
if (!evalKeys.has(e.key)) continue;
|
|
228
|
+
fact("pass@1", {
|
|
229
|
+
run: short.get(r.record.runId),
|
|
230
|
+
eval: tagOf(e.key),
|
|
231
|
+
cells: e.cells.map((c) => ({
|
|
232
|
+
cell: cellTag(r.record.runId, e.key, c.key),
|
|
233
|
+
pass: `${c.pass}/${c.pass + c.fail}`,
|
|
234
|
+
...c.infraError ? { infraError: c.infraError } : {},
|
|
235
|
+
gated: c.gate !== "none",
|
|
236
|
+
...c.lift && !e.family ? {
|
|
237
|
+
lift: digestLift(c.lift.variant.counted, c.lift.control.counted, c.lift.points, c.lift.interval.lo, c.lift.interval.hi),
|
|
238
|
+
verdict: digestLiftVerdict(c.lift.variant.counted, c.lift.control.counted, c.lift.withinNoise)
|
|
239
|
+
} : {}
|
|
240
|
+
})),
|
|
241
|
+
...e.family ? {
|
|
242
|
+
family: e.family.id,
|
|
243
|
+
case: e.family.case
|
|
137
244
|
} : {}
|
|
138
|
-
})
|
|
139
|
-
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
for (const f of r.record.families ?? []) {
|
|
248
|
+
const member = r.record.evals.find((e) => e.family?.id === f.id && evalKeys.has(e.key));
|
|
249
|
+
if (!member) continue;
|
|
250
|
+
fact("family", {
|
|
251
|
+
run: short.get(r.record.runId),
|
|
252
|
+
family: f.id,
|
|
253
|
+
cases: f.ran === f.cases ? f.cases : `${f.ran} of ${f.cases}`,
|
|
254
|
+
rates: f.rates.map((x) => ({
|
|
255
|
+
cell: cellTag(r.record.runId, member.key, x.cell),
|
|
256
|
+
passAt1: familyRateLabel(x)
|
|
257
|
+
})),
|
|
258
|
+
lifts: f.lifts.map((l) => ({
|
|
259
|
+
cell: cellTag(r.record.runId, member.key, l.variant),
|
|
260
|
+
lift: familyLiftLabel(l),
|
|
261
|
+
verdict: l.verdict === "lift" || l.verdict === "drop" ? "effect" : l.verdict,
|
|
262
|
+
...l.minLift !== void 0 ? {
|
|
263
|
+
minLift: l.minLift,
|
|
264
|
+
gate: l.outcome
|
|
265
|
+
} : {},
|
|
266
|
+
...familyEffortLabel(l) ? { effort: familyEffortLabel(l) } : {}
|
|
267
|
+
}))
|
|
268
|
+
});
|
|
269
|
+
}
|
|
140
270
|
}
|
|
141
271
|
const effort = q(`SELECT * FROM effort_m WHERE run_id IN (${runList}) AND eval_key IN (${evalList}) ORDER BY run_id, rowid`);
|
|
142
272
|
const effortGroups = /* @__PURE__ */ new Map();
|
|
@@ -156,16 +286,27 @@ async function buildDigestKeepingDropped(input) {
|
|
|
156
286
|
medianToolCalls: row.tools_median,
|
|
157
287
|
medianAgentS: row.agent_s_median,
|
|
158
288
|
...row.tokens_median != null ? { medianTokens: row.tokens_median } : {},
|
|
289
|
+
...row.workspace_calls_median != null ? { medianCallsByClass: Object.fromEntries(TOOL_CLASSES.flatMap((k) => {
|
|
290
|
+
const m = row[`${k}_calls_median`];
|
|
291
|
+
return m ? [[k, m]] : [];
|
|
292
|
+
})) } : {},
|
|
159
293
|
...row.control_key ? { vsControl: {
|
|
160
|
-
|
|
161
|
-
|
|
294
|
+
n: `${row.n} vs ${row.control_n}`,
|
|
295
|
+
toolCalls: `${row.tools_median} vs ${row.control_tools_median} (${ratioText(row.tools_ratio)})`,
|
|
296
|
+
agentS: `${row.agent_s_median} vs ${row.control_agent_s_median} (${ratioText(row.agent_s_ratio)})`,
|
|
162
297
|
p: row.tools_p,
|
|
163
298
|
verdict: row.verdict,
|
|
299
|
+
timeVerdict: row.time_verdict,
|
|
164
300
|
...row.tokens_verdict ? {
|
|
165
|
-
tokens: `${row.tokens_median} vs ${row.control_tokens_median} (
|
|
301
|
+
tokens: `${formatTokens(row.tokens_median)} vs ${formatTokens(row.control_tokens_median)} (${ratioText(row.tokens_ratio)})`,
|
|
166
302
|
tokensP: row.tokens_p,
|
|
167
303
|
tokensVerdict: row.tokens_verdict
|
|
168
304
|
} : {},
|
|
305
|
+
...Math.min(Number(row.n), Number(row.control_n)) >= 3 ? { separated: {
|
|
306
|
+
tools: row.separated === 1,
|
|
307
|
+
agentS: row.time_separated === 1,
|
|
308
|
+
...row.tokens_separated != null ? { tokens: row.tokens_separated === 1 } : {}
|
|
309
|
+
} } : {},
|
|
169
310
|
...row.tokens_note ? { unreportedUsage: row.tokens_note } : {}
|
|
170
311
|
} } : {}
|
|
171
312
|
}))
|
|
@@ -183,7 +324,7 @@ async function buildDigestKeepingDropped(input) {
|
|
|
183
324
|
OR (tier = 'observed' AND run_id IN (${runList}) AND eval_key IN (${evalList}))
|
|
184
325
|
OR tier = 'not_measured'
|
|
185
326
|
ORDER BY CASE tier WHEN 'pooled' THEN 0 WHEN 'controlled' THEN 1 WHEN 'observed' THEN 2 ELSE 3 END,
|
|
186
|
-
factor, level, eval_key`).filter((f) => f.tier !== "pooled" || f.factor !== "environment" || harnesses.includes(f.context));
|
|
327
|
+
factor, level, eval_key`).filter((f) => f.tier !== "pooled" || f.factor !== "environment" || f.context !== null && harnesses.includes(f.context));
|
|
187
328
|
for (const f of factors) {
|
|
188
329
|
if (!base && (f.tier === "pooled" || f.tier === "observed")) continue;
|
|
189
330
|
if (f.tier === "not_measured") {
|
|
@@ -263,6 +404,51 @@ async function buildDigestKeepingDropped(input) {
|
|
|
263
404
|
firstReadAtLines: [...c.lines].sort((a, b) => a - b)
|
|
264
405
|
}))
|
|
265
406
|
});
|
|
407
|
+
const classRows = q(`SELECT t.run_id, a.eval_key, a.cell_key, a.n, t.class, COUNT(*) AS calls
|
|
408
|
+
FROM tool_calls t JOIN attempts a ON a.run_id = t.run_id AND a.key = t.attempt_key
|
|
409
|
+
WHERE t.run_id IN (${runList}) AND a.eval_key IN (${evalList}) AND a.outcome IN ('pass', 'fail')
|
|
410
|
+
GROUP BY t.run_id, a.key, t.class ORDER BY t.run_id, a.eval_key, a.cell_key, a.n`);
|
|
411
|
+
const fileRows = q(`SELECT run_id, eval_key, cell_key, path, COUNT(*) AS attempts, SUM(reads > 0) AS read
|
|
412
|
+
FROM skill_files WHERE run_id IN (${runList}) AND eval_key IN (${evalList})
|
|
413
|
+
GROUP BY run_id, eval_key, cell_key, path ORDER BY run_id, eval_key, cell_key, path`);
|
|
414
|
+
const useOf = /* @__PURE__ */ new Map();
|
|
415
|
+
const useEntry = (row) => {
|
|
416
|
+
const id = `${row.run_id}\0${row.eval_key}\0${row.cell_key}`;
|
|
417
|
+
const entry = useOf.get(id) ?? {
|
|
418
|
+
classes: /* @__PURE__ */ new Map(),
|
|
419
|
+
files: []
|
|
420
|
+
};
|
|
421
|
+
useOf.set(id, entry);
|
|
422
|
+
return entry;
|
|
423
|
+
};
|
|
424
|
+
for (const r of classRows) {
|
|
425
|
+
const entry = useEntry(r);
|
|
426
|
+
const per = entry.classes.get(r.class) ?? /* @__PURE__ */ new Map();
|
|
427
|
+
per.set(r.n, r.calls);
|
|
428
|
+
entry.classes.set(r.class, per);
|
|
429
|
+
}
|
|
430
|
+
for (const r of fileRows) useEntry(r).files.push(`${r.path} ${r.read}/${r.attempts}`);
|
|
431
|
+
if (classRows.length) {
|
|
432
|
+
const attemptNs = /* @__PURE__ */ new Map();
|
|
433
|
+
for (const r of classRows) {
|
|
434
|
+
const id = `${r.run_id}\0${r.eval_key}\0${r.cell_key}`;
|
|
435
|
+
attemptNs.set(id, [.../* @__PURE__ */ new Set([...attemptNs.get(id) ?? [], r.n])]);
|
|
436
|
+
}
|
|
437
|
+
fact("context-use", {
|
|
438
|
+
note: "Tool calls per counted attempt by class (context: a placed skill, rules or MCP tool; dependency: node_modules, site-packages, vendor, --help; web; verify: a check command or test/build/lint; workspace: the rest), a heuristic. files: each placed file, opened in k/n attempts.",
|
|
439
|
+
cells: [...useOf].map(([id, u]) => {
|
|
440
|
+
const [runId, evalKey, cellKey] = id.split("\0");
|
|
441
|
+
const ns = (attemptNs.get(id) ?? []).sort((a, b) => a - b);
|
|
442
|
+
return {
|
|
443
|
+
run: short.get(runId),
|
|
444
|
+
eval: tagOf(evalKey),
|
|
445
|
+
cell: cellTag(runId, evalKey, cellKey),
|
|
446
|
+
perAttempt: Object.fromEntries([...u.classes].map(([k, per]) => [k, ns.map((n) => per.get(n) ?? 0).join(" ")])),
|
|
447
|
+
...u.files.length ? { files: u.files } : {}
|
|
448
|
+
};
|
|
449
|
+
})
|
|
450
|
+
});
|
|
451
|
+
}
|
|
266
452
|
const pooled = /* @__PURE__ */ new Map();
|
|
267
453
|
for (const r of runs) for (const e of r.record.evals) {
|
|
268
454
|
if (!evalKeys.has(e.key)) continue;
|
|
@@ -287,46 +473,59 @@ async function buildDigestKeepingDropped(input) {
|
|
|
287
473
|
})),
|
|
288
474
|
saturated
|
|
289
475
|
});
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
476
|
+
const differing = /* @__PURE__ */ new Map();
|
|
477
|
+
for (const r of runs) for (const e of r.record.evals) {
|
|
478
|
+
if (!evalKeys.has(e.key)) continue;
|
|
479
|
+
const criteria = criteriaOf(e, (cell) => cellTag(r.record.runId, e.key, cell));
|
|
480
|
+
if (!criteria) continue;
|
|
481
|
+
differing.set(`${r.record.runId}\0${e.key}`, new Set(criteria.rows.map((x) => x.label)));
|
|
482
|
+
fact("criteria", {
|
|
483
|
+
run: short.get(r.record.runId),
|
|
484
|
+
eval: tagOf(e.key),
|
|
485
|
+
note: "Each check (expect label) per cell: passed/counted, then the mean judge score for a judge.",
|
|
486
|
+
...criteria
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
const judged = runs.flatMap((r) => r.record.evals.filter((e) => evalKeys.has(e.key)).flatMap((e) => e.attempts.flatMap((a) => a.judgements)));
|
|
295
490
|
if (judged.length) fact("judge", {
|
|
296
|
-
models: [...new Set(judged.map((
|
|
297
|
-
threshold: [...new Set(judged.map((
|
|
491
|
+
models: [...new Set(judged.map((j) => j.resolvedModel ?? j.model))],
|
|
492
|
+
threshold: [...new Set(judged.map((j) => j.threshold))],
|
|
298
493
|
verdicts: judged.length,
|
|
299
|
-
pass: judged.filter((
|
|
300
|
-
scoresAtLeast098: judged.filter((
|
|
301
|
-
nearThreshold: judged.filter((
|
|
302
|
-
failures: judged.filter(({ j }) => j.verdict === "fail").map(({ r, a, j }) => ({
|
|
303
|
-
attempt: idOf.get(`${r.record.runId}\0${a.key}`),
|
|
304
|
-
score: j.score
|
|
305
|
-
})),
|
|
494
|
+
pass: judged.filter((j) => j.verdict === "pass").length,
|
|
495
|
+
scoresAtLeast098: judged.filter((j) => j.score >= .98).length,
|
|
496
|
+
nearThreshold: judged.filter((j) => Math.abs(j.score - j.threshold) <= .1).length,
|
|
306
497
|
reasons: "not recorded"
|
|
307
498
|
});
|
|
308
|
-
const failures = runs.slice().reverse().flatMap((r) => r.record.evals.filter((e) => evalKeys.has(e.key)).flatMap((e) => e.attempts.filter((a) => a.outcome === "fail" || a.outcome === "infra_error").map((a) => ({
|
|
499
|
+
const failures = roundRobin(runs.slice().reverse().flatMap((r) => r.record.evals.filter((e) => evalKeys.has(e.key)).flatMap((e) => e.attempts.filter((a) => a.outcome === "fail" || a.outcome === "infra_error").map((a) => ({
|
|
309
500
|
r,
|
|
310
501
|
e,
|
|
311
502
|
a
|
|
312
|
-
}))));
|
|
313
|
-
|
|
314
|
-
|
|
503
|
+
})))), ({ r, e, a }) => `${r.record.runId}\0${e.key}\0${a.cell}`);
|
|
504
|
+
const cellsSeen = /* @__PURE__ */ new Set();
|
|
505
|
+
const failureFacts = frame === "study" ? failures.filter(({ r, e, a }) => {
|
|
506
|
+
const id = `${r.record.runId}\0${e.key}\0${a.cell}`;
|
|
507
|
+
return !cellsSeen.has(id) && !!cellsSeen.add(id);
|
|
508
|
+
}) : failures.slice(0, 8);
|
|
509
|
+
for (const { r, e, a } of failureFacts) {
|
|
510
|
+
const failed = failedLabels(a);
|
|
511
|
+
const judges = labelledJudgements(a).filter((j) => j.judgement.verdict === "fail");
|
|
315
512
|
fact("failure", {
|
|
316
513
|
attempt: idOf.get(`${r.record.runId}\0${a.key}`),
|
|
317
514
|
outcome: a.outcome,
|
|
318
515
|
errorKind: a.error?.kind ?? null,
|
|
319
516
|
message: a.error ? clip(a.error.message.split("\n")[0] ?? "", 300) : null,
|
|
320
517
|
gated: e.cells.find((c) => c.key === a.cell)?.gate !== "none",
|
|
321
|
-
...
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
518
|
+
...failed.length ? { failed } : {},
|
|
519
|
+
...judges.length ? { judges: judges.map((j) => ({
|
|
520
|
+
label: clip(j.label, LABEL_CHARS),
|
|
521
|
+
question: clip(j.judgement.question, 300),
|
|
522
|
+
score: j.judgement.score,
|
|
523
|
+
threshold: j.judgement.threshold
|
|
524
|
+
})) } : {},
|
|
525
|
+
failingExecs: a.checks.map((c, i) => ({
|
|
526
|
+
exec: i + 1,
|
|
328
527
|
exit: c.exitCode,
|
|
329
|
-
command: c.command
|
|
528
|
+
command: clip(c.command, 300)
|
|
330
529
|
})).filter((c) => c.exit !== 0)
|
|
331
530
|
});
|
|
332
531
|
}
|
|
@@ -349,7 +548,7 @@ async function buildDigestKeepingDropped(input) {
|
|
|
349
548
|
eval: tagOf(e.key),
|
|
350
549
|
from: "r1",
|
|
351
550
|
to: "r2",
|
|
352
|
-
note: "not comparable: the eval changed; the pass
|
|
551
|
+
note: "not comparable: the eval changed; the pass@1 difference is not an effect of the thing under test"
|
|
353
552
|
});
|
|
354
553
|
}
|
|
355
554
|
if (base) {
|
|
@@ -379,11 +578,14 @@ async function buildDigestKeepingDropped(input) {
|
|
|
379
578
|
for (const a of e.answers ?? []) {
|
|
380
579
|
const ties = a.votes.filter((v) => v.winner === "tie").length;
|
|
381
580
|
const reasons = sampleReasons(a.votes);
|
|
581
|
+
const splits = splitsLabel(pairTallies(a.votes));
|
|
582
|
+
const headToHead = headToHeadLines(a.votes);
|
|
382
583
|
fact("compare-question", {
|
|
383
584
|
run: short.get(r.record.runId),
|
|
384
585
|
eval: tagOf(e.key),
|
|
385
586
|
question: clip(a.question, 120),
|
|
386
587
|
model: a.resolvedModel ?? a.model,
|
|
588
|
+
shows: questionShows(a.stateOptions ?? DEFAULT_QUESTION_STATE, a.artifacts),
|
|
387
589
|
votes: a.votes.length,
|
|
388
590
|
ties,
|
|
389
591
|
...a.rates.length ? { rates: a.rates.map((x) => ({
|
|
@@ -392,12 +594,73 @@ async function buildDigestKeepingDropped(input) {
|
|
|
392
594
|
wins: x.wins,
|
|
393
595
|
n: x.n
|
|
394
596
|
})) } : {},
|
|
597
|
+
...splits ? { splits } : {},
|
|
598
|
+
...headToHead.length ? { headToHead } : {},
|
|
395
599
|
...a.error ? { error: clip(a.error, 200) } : {},
|
|
396
600
|
...a.votes.length === 0 && a.error === void 0 ? { note: "no pairs to judge: attempts that failed their checks are left out" } : {},
|
|
397
601
|
...reasons.length ? { reasons } : {}
|
|
398
602
|
});
|
|
399
603
|
}
|
|
400
604
|
}
|
|
605
|
+
for (const r of runs) for (const e of r.record.evals) {
|
|
606
|
+
if (!evalKeys.has(e.key)) continue;
|
|
607
|
+
const tag = (key) => cellTag(r.record.runId, e.key, key);
|
|
608
|
+
const contrasts = contrastsOf(e);
|
|
609
|
+
for (const x of contrasts) {
|
|
610
|
+
const apart = x.checks.filter((k) => k.verdict === "discriminates" || k.verdict === "mixed");
|
|
611
|
+
const ef = x.effort;
|
|
612
|
+
fact("contrast", {
|
|
613
|
+
run: short.get(r.record.runId),
|
|
614
|
+
eval: tagOf(e.key),
|
|
615
|
+
a: tag(x.a),
|
|
616
|
+
b: tag(x.b),
|
|
617
|
+
...x.lift ? {
|
|
618
|
+
passRate: `${x.lift.variant.pass}/${x.lift.variant.counted} vs ${x.lift.control.pass}/${x.lift.control.counted}`,
|
|
619
|
+
lift: digestLift(x.lift.variant.counted, x.lift.control.counted, x.lift.points, x.lift.interval.lo, x.lift.interval.hi),
|
|
620
|
+
liftVerdict: digestLiftVerdict(x.lift.variant.counted, x.lift.control.counted, x.lift.withinNoise)
|
|
621
|
+
} : {},
|
|
622
|
+
checks: apart.map((k) => ({
|
|
623
|
+
label: clip(k.label, LABEL_CHARS),
|
|
624
|
+
a: `${k.a.pass}/${k.a.pass + k.a.fail + k.a.notRun}`,
|
|
625
|
+
b: `${k.b.pass}/${k.b.pass + k.b.fail + k.b.notRun}`,
|
|
626
|
+
verdict: k.verdict
|
|
627
|
+
})),
|
|
628
|
+
sameOnBoth: x.checks.length - apart.length,
|
|
629
|
+
...ef ? { effort: {
|
|
630
|
+
n: `${ef.variant.n} vs ${ef.control.n}`,
|
|
631
|
+
toolCalls: `${ef.variant.tools.median} vs ${ef.control.tools.median} (${ratioText(ef.toolsRatio)})`,
|
|
632
|
+
agentS: `${round1(ef.variant.agentMs.median / 1e3)} vs ${round1(ef.control.agentMs.median / 1e3)} (${ratioText(ef.agentMsRatio)})`,
|
|
633
|
+
verdict: ef.verdict,
|
|
634
|
+
timeVerdict: ef.timeVerdict,
|
|
635
|
+
...ef.tokensVerdict && ef.variant.tokens && ef.control.tokens ? {
|
|
636
|
+
tokens: `${formatTokens(ef.variant.tokens.median)} vs ${formatTokens(ef.control.tokens.median)} (${ratioText(ef.tokensRatio)})`,
|
|
637
|
+
tokensVerdict: ef.tokensVerdict
|
|
638
|
+
} : {},
|
|
639
|
+
...Math.min(ef.variant.n, ef.control.n) >= 3 ? { separated: {
|
|
640
|
+
tools: ef.separated,
|
|
641
|
+
agentS: ef.timeSeparated,
|
|
642
|
+
...ef.tokensSeparated !== null ? { tokens: ef.tokensSeparated } : {}
|
|
643
|
+
} } : {}
|
|
644
|
+
} } : {}
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
if (contrasts.length) continue;
|
|
648
|
+
for (const c of e.cells) {
|
|
649
|
+
const rows = (c.checks ?? []).filter((k) => k.control && k.verdict);
|
|
650
|
+
if (!rows.length) continue;
|
|
651
|
+
fact("checks", {
|
|
652
|
+
run: short.get(r.record.runId),
|
|
653
|
+
eval: tagOf(e.key),
|
|
654
|
+
cell: c.key,
|
|
655
|
+
rows: rows.map((k) => ({
|
|
656
|
+
label: clip(k.label, 80),
|
|
657
|
+
variant: `${k.pass}/${k.pass + k.fail + k.notRun}`,
|
|
658
|
+
control: `${k.control?.pass}/${(k.control?.pass ?? 0) + (k.control?.fail ?? 0) + (k.control?.notRun ?? 0)}`,
|
|
659
|
+
verdict: k.verdict
|
|
660
|
+
}))
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
}
|
|
401
664
|
const evidence = [];
|
|
402
665
|
const add = (ref, why, lines, priority) => {
|
|
403
666
|
if (lines.length) evidence.push({
|
|
@@ -424,18 +687,29 @@ async function buildDigestKeepingDropped(input) {
|
|
|
424
687
|
} catch {}
|
|
425
688
|
return [];
|
|
426
689
|
};
|
|
427
|
-
|
|
690
|
+
const discriminating = ({ r, e, a }) => failedLabels(a).some((l) => differing.get(`${r.record.runId}\0${e.key}`)?.has(l));
|
|
691
|
+
const perCell = /* @__PURE__ */ new Map();
|
|
692
|
+
for (const f of failures) {
|
|
693
|
+
const id = `${f.r.record.runId}\0${f.e.key}\0${f.a.cell}`;
|
|
694
|
+
const prev = perCell.get(id);
|
|
695
|
+
if (!prev || !discriminating(prev) && discriminating(f)) perCell.set(id, f);
|
|
696
|
+
}
|
|
697
|
+
for (const [i, { r, e, a }] of [...perCell.values()].slice(0, 6).entries()) {
|
|
428
698
|
const id = idOf.get(`${r.record.runId}\0${a.key}`);
|
|
429
699
|
const lines = await lastText(r.record.runId, a);
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
for (const
|
|
700
|
+
const judges = labelledJudgements(a).filter((j) => j.judgement.verdict === "fail");
|
|
701
|
+
for (const { label, judgement: j } of judges) lines.push(`judge ${clip(label, LABEL_CHARS)}: ${j.question}`, `judge score: ${j.score} (threshold ${j.threshold})`);
|
|
702
|
+
for (const x of a.assertions ?? []) {
|
|
703
|
+
if (x.status === "pass" || /(^|\.)toPass$/.test(x.matcher)) continue;
|
|
704
|
+
lines.push(`check ${x.status}: ${clip(x.label, LABEL_CHARS)}: ${clip(x.message ?? "", 300)}`);
|
|
705
|
+
}
|
|
706
|
+
for (const [n, c] of a.checks.entries()) {
|
|
433
707
|
if (c.exitCode === 0 || !c.log) continue;
|
|
434
708
|
const log = await readFile(join(r.dir, r.record.runId, ...c.log.path.split("/")), "utf8").catch(() => "");
|
|
435
|
-
lines.push(`
|
|
709
|
+
lines.push(`exec ${n + 1} (exit ${c.exitCode}) ${c.command}:`, ...log.trimEnd().split("\n").slice(-15));
|
|
436
710
|
}
|
|
437
|
-
add(`attempt:${id}`, `a failing attempt: its final message${
|
|
438
|
-
if (
|
|
711
|
+
add(`attempt:${id}`, `a failing attempt of ${cellTag(r.record.runId, e.key, a.cell)}: its final message${judges.length ? " and the judge questions it failed" : ""}`, lines, 1);
|
|
712
|
+
if (judges[0] && i < 3) {
|
|
439
713
|
const twin = e.attempts.find((x) => x.cell === a.cell && x.outcome === "pass");
|
|
440
714
|
if (twin) add(`attempt:${idOf.get(`${r.record.runId}\0${twin.key}`)}`, `the passing twin of ${id} (same cell): its final message`, await lastText(r.record.runId, twin), 2);
|
|
441
715
|
}
|
|
@@ -455,13 +729,14 @@ async function buildDigestKeepingDropped(input) {
|
|
|
455
729
|
}
|
|
456
730
|
}
|
|
457
731
|
const digest = {
|
|
458
|
-
digestVersion:
|
|
732
|
+
digestVersion: 10,
|
|
459
733
|
scope: {
|
|
460
734
|
kind: "run",
|
|
461
735
|
head: short.get(head.record.runId),
|
|
462
736
|
base: base ? "r1" : null,
|
|
463
737
|
evals: input.evalFilter
|
|
464
738
|
},
|
|
739
|
+
frame,
|
|
465
740
|
runs: Object.fromEntries(runs.map((r) => [short.get(r.record.runId), {
|
|
466
741
|
runId: r.record.runId,
|
|
467
742
|
commit: r.record.git?.sha.slice(0, 7) ?? null,
|
|
@@ -590,7 +865,7 @@ function renderText(doc) {
|
|
|
590
865
|
}
|
|
591
866
|
//#endregion
|
|
592
867
|
//#region src/analysis/validate.ts
|
|
593
|
-
const
|
|
868
|
+
const EXEC = /^(.+):exec(\d+)$/;
|
|
594
869
|
const LINE = /^(E\d+):L(\d+)$/;
|
|
595
870
|
const TRANSCRIPT = /^transcript:(.+)#L(\d+)$/;
|
|
596
871
|
const normal = (s) => s.replace(/\s+/g, " ").trim().toLowerCase();
|
|
@@ -607,21 +882,21 @@ function citations(digest) {
|
|
|
607
882
|
if (ids.has(c)) return factText.get(c) ?? evidenceText.get(c) ?? JSON.stringify(digest.attempts[c]);
|
|
608
883
|
const line = LINE.exec(c);
|
|
609
884
|
if (line) {
|
|
610
|
-
const [, id, n] = line;
|
|
885
|
+
const [, id = "", n = ""] = line;
|
|
611
886
|
if (!lines.get(id)?.has(Number(n))) return null;
|
|
612
887
|
return digest.evidence.find((e) => e.id === id)?.lines.find((l) => l.startsWith(`L${n} `)) ?? null;
|
|
613
888
|
}
|
|
614
889
|
const transcript = TRANSCRIPT.exec(c);
|
|
615
890
|
if (transcript) {
|
|
616
|
-
const [, attempt, n] = transcript;
|
|
891
|
+
const [, attempt = "", n = ""] = transcript;
|
|
617
892
|
for (const id of evidenceOf(attempt)) if (lines.get(id)?.has(Number(n))) return resolve(`${id}:L${n}`);
|
|
618
893
|
return null;
|
|
619
894
|
}
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
const [, attempt, n] =
|
|
895
|
+
const exec = EXEC.exec(c);
|
|
896
|
+
if (exec) {
|
|
897
|
+
const [, attempt = "", n = ""] = exec;
|
|
623
898
|
const a = digest.attempts[attempt];
|
|
624
|
-
return a && Number(n) >= 1 && Number(n) <= a.
|
|
899
|
+
return a && Number(n) >= 1 && Number(n) <= a.execs ? JSON.stringify(a) : null;
|
|
625
900
|
}
|
|
626
901
|
return null;
|
|
627
902
|
};
|
|
@@ -629,7 +904,7 @@ function citations(digest) {
|
|
|
629
904
|
}
|
|
630
905
|
const ANY_NUMBER = /[−-]?\d+(?:\.\d+)?/g;
|
|
631
906
|
const FRACTION = /(\d+)\/(\d+)/g;
|
|
632
|
-
const ATTEMPT_CITE = /:
|
|
907
|
+
const ATTEMPT_CITE = /:exec\d+$|:L\d+$/;
|
|
633
908
|
/** A decimal in [0, 1]: the form a judge score or threshold takes in the digest. */
|
|
634
909
|
const looksLikeScore = (raw) => {
|
|
635
910
|
if (!raw.includes(".")) return false;
|
|
@@ -641,23 +916,24 @@ const addScore = (scores, n) => {
|
|
|
641
916
|
};
|
|
642
917
|
/**
|
|
643
918
|
* Recorded judge scores (and thresholds) on the cited attempt, fact or evidence. The digest stores
|
|
644
|
-
* them as `
|
|
919
|
+
* them as an attempt's `judges`, a failure's `judges: [{ score, threshold }]`, a criteria row's mean
|
|
920
|
+
* scores, and `judge score:` lines.
|
|
645
921
|
*/
|
|
646
922
|
function citedJudgeScores(cites, digest) {
|
|
647
923
|
const scores = [];
|
|
648
924
|
for (const cite of cites) {
|
|
649
925
|
const id = cite.trim().replace(/^\[|\]$/g, "").replace(ATTEMPT_CITE, "");
|
|
650
|
-
|
|
926
|
+
for (const s of Object.values(digest.attempts[id]?.judges ?? {})) addScore(scores, s);
|
|
651
927
|
const fact = digest.facts.find((f) => f.id === id);
|
|
652
928
|
if (fact) {
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
addScore(scores,
|
|
657
|
-
addScore(scores, j.threshold);
|
|
929
|
+
if (Array.isArray(fact.judges)) for (const row of fact.judges) {
|
|
930
|
+
if (!row || typeof row !== "object") continue;
|
|
931
|
+
addScore(scores, row.score);
|
|
932
|
+
addScore(scores, row.threshold);
|
|
658
933
|
}
|
|
659
|
-
if (Array.isArray(fact.
|
|
660
|
-
|
|
934
|
+
if (Array.isArray(fact.rows)) for (const row of fact.rows) for (const v of Object.values(row?.cells ?? {})) {
|
|
935
|
+
const mean = / · (\d+(?:\.\d+)?)$/.exec(String(v));
|
|
936
|
+
if (mean) addScore(scores, Number(mean[1]));
|
|
661
937
|
}
|
|
662
938
|
if (Array.isArray(fact.threshold)) for (const t of fact.threshold) addScore(scores, t);
|
|
663
939
|
}
|
|
@@ -831,8 +1107,8 @@ async function load(config, entry) {
|
|
|
831
1107
|
bytes
|
|
832
1108
|
};
|
|
833
1109
|
}
|
|
834
|
-
/** The model's input: the
|
|
835
|
-
const promptOf = (d) => `${d.instructions ? `PROJECT INSTRUCTIONS: ${d.instructions}\n\n` : ""}DIGEST:\n${JSON.stringify(d)}`;
|
|
1110
|
+
/** The model's input: the project's own instructions, which set the question, then the digest as JSON. */
|
|
1111
|
+
const promptOf = (d) => `${d.instructions ? `PROJECT INSTRUCTIONS (the question this analysis answers): ${d.instructions}\n\n` : ""}DIGEST:\n${JSON.stringify(d)}`;
|
|
836
1112
|
/** `--context`: the same digest and rules, for the user's own coding agent. */
|
|
837
1113
|
function contextMarkdown(d, head, base) {
|
|
838
1114
|
return [
|
|
@@ -840,6 +1116,13 @@ function contextMarkdown(d, head, base) {
|
|
|
840
1116
|
"",
|
|
841
1117
|
"Analyse this reeval run for the engineer who wrote the evals. The digest below holds facts reeval computed (F…), evidence excerpts (E…, transcript lines as L<n>) and the attempts table. Cite those ids for every claim, keep to the verdicts in the facts, and suggest at most 5 concrete actions, each verified with a reeval command from the CLI list.",
|
|
842
1118
|
"",
|
|
1119
|
+
...d.frame === "study" ? ["This run is a study: every cell is ungated (gate: 'none'), so it measures how the arms differ. Failing attempts are data, not a failed gate.", ""] : [],
|
|
1120
|
+
...d.instructions ? [
|
|
1121
|
+
"## Project instructions (the question this analysis answers)",
|
|
1122
|
+
"",
|
|
1123
|
+
d.instructions,
|
|
1124
|
+
""
|
|
1125
|
+
] : [],
|
|
843
1126
|
"## How reeval decided each verdict",
|
|
844
1127
|
"",
|
|
845
1128
|
...RULES.map((r) => `- ${r}`),
|
|
@@ -871,14 +1154,14 @@ function citedSummary(d, cites) {
|
|
|
871
1154
|
for (const c of cites) {
|
|
872
1155
|
const fact = d.facts.find((f) => f.id === c);
|
|
873
1156
|
const evidence = d.evidence.find((e) => e.id === c || c.startsWith(`${e.id}:`));
|
|
874
|
-
const attempt = d.attempts[c.replace(/:
|
|
1157
|
+
const attempt = d.attempts[c.replace(/:exec\d+$/, "")];
|
|
875
1158
|
if (fact) {
|
|
876
1159
|
const { id: _id, ...rest } = fact;
|
|
877
1160
|
out[c] = clip(JSON.stringify(rest), 400);
|
|
878
1161
|
} else if (evidence) {
|
|
879
1162
|
const line = /:L(\d+)$/.exec(c);
|
|
880
1163
|
out[c] = line ? clip(evidence.lines.find((l) => l.startsWith(`L${line[1]} `)) ?? evidence.ref, 400) : `${evidence.ref}: ${evidence.why}`;
|
|
881
|
-
} else if (attempt) out[c] = `${attempt.runId} · ${attempt.attempt} · ${attempt.outcome} · ${attempt.tools} tool calls`;
|
|
1164
|
+
} else if (attempt) out[c] = `${attempt.runId} · ${attempt.attempt} · ${attempt.outcome} · ${attempt.tools} tool calls${attempt.checks ? ` · checks ${attempt.checks}` : ""}`;
|
|
882
1165
|
}
|
|
883
1166
|
return out;
|
|
884
1167
|
}
|
|
@@ -946,7 +1229,7 @@ async function prepareAnalysis(config, head, base, evalFilter) {
|
|
|
946
1229
|
};
|
|
947
1230
|
}
|
|
948
1231
|
const docBase = async (config, p) => ({
|
|
949
|
-
kind: "
|
|
1232
|
+
kind: "reeval-analysis",
|
|
950
1233
|
schemaVersion: 1,
|
|
951
1234
|
scope: p.scope,
|
|
952
1235
|
anchor: p.head.runId,
|
|
@@ -1096,4 +1379,4 @@ async function analyzeCommand(ctx, args) {
|
|
|
1096
1379
|
//#endregion
|
|
1097
1380
|
export { failedAnalysis as a, defaultBase as i, analyzeCommand as n, prepareAnalysis as o, contextMarkdown as r, promptOf as s, analyseDigest as t };
|
|
1098
1381
|
|
|
1099
|
-
//# sourceMappingURL=command-
|
|
1382
|
+
//# sourceMappingURL=command-Bge8F7Ko.js.map
|