@tangle-network/agent-eval 0.144.0 → 0.144.3
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 +36 -0
- package/dist/analyst/index.d.ts +88 -23
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +4 -4
- package/dist/{analyze-runs-BScZvqMV.js → analyze-runs-DWIvOAGk.js} +2 -2
- package/dist/{analyze-runs-BScZvqMV.js.map → analyze-runs-DWIvOAGk.js.map} +1 -1
- package/dist/{benchmark-DxaZfy0w.d.ts → benchmark-CP6kWfj8.d.ts} +3 -3
- package/dist/{benchmark-DxaZfy0w.d.ts.map → benchmark-CP6kWfj8.d.ts.map} +1 -1
- package/dist/{benchmark-command-4c7N_rlw.js → benchmark-command-CQPKRUr-.js} +332 -111
- package/dist/benchmark-command-CQPKRUr-.js.map +1 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-05UGZ8sZ.js → benchmarks-CkG1bWFa.js} +4 -4
- package/dist/{benchmarks-05UGZ8sZ.js.map → benchmarks-CkG1bWFa.js.map} +1 -1
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +4 -4
- package/dist/{campaign-BKOtvRAB.js → campaign-DjGFyPxH.js} +74 -40
- package/dist/campaign-DjGFyPxH.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{client-Cgl6KasJ.d.ts → client-Bbht4xxl.d.ts} +4 -4
- package/dist/{client-Cgl6KasJ.d.ts.map → client-Bbht4xxl.d.ts.map} +1 -1
- package/dist/{completion-verifier-D15NHYSk.d.ts → completion-verifier-EJERfFwF.d.ts} +3 -3
- package/dist/{completion-verifier-D15NHYSk.d.ts.map → completion-verifier-EJERfFwF.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +8 -8
- package/dist/contract/index.js +10 -8
- package/dist/contract/index.js.map +1 -1
- package/dist/control.d.ts +2 -2
- package/dist/control.js +1 -1
- package/dist/{default-registry-DfHJEwYh.js → default-registry-SOyHB6qG.js} +2 -2
- package/dist/{default-registry-DfHJEwYh.js.map → default-registry-SOyHB6qG.js.map} +1 -1
- package/dist/{default-registry-D3uqKbo6.d.ts → default-registry-iXfu2trt.d.ts} +5 -5
- package/dist/{default-registry-D3uqKbo6.d.ts.map → default-registry-iXfu2trt.d.ts.map} +1 -1
- package/dist/{dspy-rlm-engine-CBFwlyaY.js → dspy-rlm-engine-IRCG8kdi.js} +61 -105
- package/dist/dspy-rlm-engine-IRCG8kdi.js.map +1 -0
- package/dist/{eval-campaign-YdkpWWoT.js → eval-campaign-lZcDIwQM.js} +3 -3
- package/dist/{eval-campaign-YdkpWWoT.js.map → eval-campaign-lZcDIwQM.js.map} +1 -1
- package/dist/{exact-types-B0lJV3tu.d.ts → exact-types-BygCBR4L.d.ts} +2 -2
- package/dist/{exact-types-B0lJV3tu.d.ts.map → exact-types-BygCBR4L.d.ts.map} +1 -1
- package/dist/{external-optimizer-contracts-iK0yu4AR.d.ts → external-optimizer-contracts-CdmX2K2S.d.ts} +47 -10
- package/dist/external-optimizer-contracts-CdmX2K2S.d.ts.map +1 -0
- package/dist/{feedback-trajectory-BCHqzLh3.d.ts → feedback-trajectory-CSIkRLQX.d.ts} +3 -3
- package/dist/{feedback-trajectory-BCHqzLh3.d.ts.map → feedback-trajectory-CSIkRLQX.d.ts.map} +1 -1
- package/dist/hosted/index.d.ts +3 -3
- package/dist/{index-DgbFl4cv.d.ts → index-BuHs_OnD.d.ts} +17 -12
- package/dist/{index-DgbFl4cv.d.ts.map → index-BuHs_OnD.d.ts.map} +1 -1
- package/dist/{index-D2enbqA0.d.ts → index-CNOCxBLh.d.ts} +2 -2
- package/dist/{index-D2enbqA0.d.ts.map → index-CNOCxBLh.d.ts.map} +1 -1
- package/dist/{index-DFLVtPZ9.d.ts → index-DGIzNtRv.d.ts} +2 -2
- package/dist/{index-DFLVtPZ9.d.ts.map → index-DGIzNtRv.d.ts.map} +1 -1
- package/dist/{index-DtMpBKVF.d.ts → index-D_qTihaQ.d.ts} +5 -5
- package/dist/{index-DtMpBKVF.d.ts.map → index-D_qTihaQ.d.ts.map} +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -17
- package/dist/{insight-report-Bh_8ksel.d.ts → insight-report-D5m1z0_n.d.ts} +3 -3
- package/dist/{insight-report-Bh_8ksel.d.ts.map → insight-report-D5m1z0_n.d.ts.map} +1 -1
- package/dist/ledger-core/index.js +1 -1
- package/dist/{ledger-core-Dxz0Rkwa.js → ledger-core-DXZIqu17.js} +3 -3
- package/dist/ledger-core-DXZIqu17.js.map +1 -0
- package/dist/{llm-client-B3WXSH5Y.js → llm-client-D3EoChAU.js} +7 -7
- package/dist/llm-client-D3EoChAU.js.map +1 -0
- package/dist/meta-eval/index.d.ts +1 -1
- package/dist/{mint-Ctwk079K.js → mint-DD-0oQTA.js} +2 -2
- package/dist/{mint-Ctwk079K.js.map → mint-DD-0oQTA.js.map} +1 -1
- package/dist/multishot/index.d.ts +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{propose-review-control-DLXz4FCX.js → propose-review-control-BciUCZoh.js} +2 -2
- package/dist/{propose-review-control-DLXz4FCX.js.map → propose-review-control-BciUCZoh.js.map} +1 -1
- package/dist/{release-report-B_bQOHM-.d.ts → release-report-BZRWdq_t.d.ts} +3 -3
- package/dist/{release-report-B_bQOHM-.d.ts.map → release-report-BZRWdq_t.d.ts.map} +1 -1
- package/dist/{release-report-B5XPBvAU.js → release-report-Sl0xfkFv.js} +2 -2
- package/dist/{release-report-B5XPBvAU.js.map → release-report-Sl0xfkFv.js.map} +1 -1
- package/dist/{replay-DjUfTrHD.js → replay-CqOsGjzU.js} +2 -9
- package/dist/replay-CqOsGjzU.js.map +1 -0
- package/dist/{replay-BuJM6kLh.d.ts → replay-DQ-55DC_.d.ts} +4 -4
- package/dist/{replay-BuJM6kLh.d.ts.map → replay-DQ-55DC_.d.ts.map} +1 -1
- package/dist/reporting.d.ts +3 -3
- package/dist/reporting.js +1 -1
- package/dist/{researcher-C6lzl-rP.d.ts → researcher-BSiCoM1s.d.ts} +3 -3
- package/dist/{researcher-C6lzl-rP.d.ts.map → researcher-BSiCoM1s.d.ts.map} +1 -1
- package/dist/{reward-hacking-DjTi9HLb.js → reward-hacking-CyuzxKly.js} +2 -2
- package/dist/{reward-hacking-DjTi9HLb.js.map → reward-hacking-CyuzxKly.js.map} +1 -1
- package/dist/{reward-hacking-CEVVmy3h.d.ts → reward-hacking-DFgkEY4p.d.ts} +2 -2
- package/dist/{reward-hacking-CEVVmy3h.d.ts.map → reward-hacking-DFgkEY4p.d.ts.map} +1 -1
- package/dist/rl.d.ts +5 -5
- package/dist/rl.js +4 -4
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +2 -2
- package/dist/{rollout-8nj3mYvx.js → rollout-C2fD1cf4.js} +2 -2
- package/dist/{rollout-8nj3mYvx.js.map → rollout-C2fD1cf4.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C2CthIfY.d.ts → rubric-predictive-validity-C4r4Y-q8.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C2CthIfY.d.ts.map → rubric-predictive-validity-C4r4Y-q8.d.ts.map} +1 -1
- package/dist/{run-evidence-8Ou28QSa.d.ts → run-evidence-H1vRpIdT.d.ts} +3 -3
- package/dist/{run-evidence-8Ou28QSa.d.ts.map → run-evidence-H1vRpIdT.d.ts.map} +1 -1
- package/dist/{run-record-vRgqWmJw.js → run-record-CWN8-VsV.js} +40 -14
- package/dist/{run-record-vRgqWmJw.js.map → run-record-CWN8-VsV.js.map} +1 -1
- package/dist/{run-record-Tb3TTtUn.d.ts → run-record-ooo9FWns.d.ts} +5 -9
- package/dist/{run-record-Tb3TTtUn.d.ts.map → run-record-ooo9FWns.d.ts.map} +1 -1
- package/dist/{semantic-concept-judge-DJQtFr95.js → semantic-concept-judge-Do5aM9wP.js} +3 -3
- package/dist/{semantic-concept-judge-DJQtFr95.js.map → semantic-concept-judge-Do5aM9wP.js.map} +1 -1
- package/dist/{server-Cu4M3NSO.js → server-Df00sdwz.js} +3 -3
- package/dist/{server-Cu4M3NSO.js.map → server-Df00sdwz.js.map} +1 -1
- package/dist/{single-run-lock-t1si1ob7.js → single-run-lock-D5iN0Xzb.js} +719 -187
- package/dist/single-run-lock-D5iN0Xzb.js.map +1 -0
- package/dist/{skill-usage-BiVEU0QY.d.ts → skill-usage-DtpLou9L.d.ts} +28 -9
- package/dist/skill-usage-DtpLou9L.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-Ds8J1_K8.js → skillopt-optimization-method-C4FX42dy.js} +42 -210
- package/dist/skillopt-optimization-method-C4FX42dy.js.map +1 -0
- package/dist/{skillopt-optimization-method-B7o01OdX.d.ts → skillopt-optimization-method-CvSJGdm3.d.ts} +12 -8
- package/dist/{skillopt-optimization-method-B7o01OdX.d.ts.map → skillopt-optimization-method-CvSJGdm3.d.ts.map} +1 -1
- package/dist/{summary-report-o3eJ3gxG.d.ts → summary-report-BOM6dfP7.d.ts} +2 -2
- package/dist/{summary-report-o3eJ3gxG.d.ts.map → summary-report-BOM6dfP7.d.ts.map} +1 -1
- package/dist/{tool-groups-Bqy4A3QB.d.ts → tool-groups-CMmsgTzj.d.ts} +7 -7
- package/dist/{tool-groups-Bqy4A3QB.d.ts.map → tool-groups-CMmsgTzj.d.ts.map} +1 -1
- package/dist/traces.d.ts +4 -4
- package/dist/traces.js +1 -1
- package/dist/types-BjMFz88h.d.ts.map +1 -1
- package/dist/{types-KEqL1pZc.d.ts → types-DcJxgsLy.d.ts} +8 -6
- package/dist/{types-KEqL1pZc.d.ts.map → types-DcJxgsLy.d.ts.map} +1 -1
- package/dist/{types-D3jh6F98.d.ts → types-y8jrxXWd.d.ts} +2 -2
- package/dist/{types-D3jh6F98.d.ts.map → types-y8jrxXWd.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/dist/wire/index.js +1 -1
- package/docs/eval-surface-map.md +4 -0
- package/docs/trace-analysis.md +43 -32
- package/package.json +1 -1
- package/dist/benchmark-command-4c7N_rlw.js.map +0 -1
- package/dist/campaign-BKOtvRAB.js.map +0 -1
- package/dist/dspy-rlm-engine-CBFwlyaY.js.map +0 -1
- package/dist/external-optimizer-contracts-iK0yu4AR.d.ts.map +0 -1
- package/dist/ledger-core-Dxz0Rkwa.js.map +0 -1
- package/dist/llm-client-B3WXSH5Y.js.map +0 -1
- package/dist/replay-DjUfTrHD.js.map +0 -1
- package/dist/single-run-lock-t1si1ob7.js.map +0 -1
- package/dist/skill-usage-BiVEU0QY.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-Ds8J1_K8.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { c as ValidationError, t as AgentEvalError } from "./errors-D-LKuDhb.js";
|
|
2
2
|
import { p as canonicalize, s as buildAgentProfileCell } from "./agent-profile-cell-CbfBm2g6.js";
|
|
3
3
|
import { i as CostLedger, t as CostAccountingIncompleteError } from "./cost-ledger-DMFxsLKr.js";
|
|
4
|
-
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, u as costReceiptFromLlmError } from "./llm-client-
|
|
4
|
+
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, u as costReceiptFromLlmError } from "./llm-client-D3EoChAU.js";
|
|
5
5
|
import { r as canonicalString } from "./canonical-D011XM8r.js";
|
|
6
|
-
import { a as SEARCH_LEDGER_FILE_CONTEXT, c as SearchLedgerIntegrityError, o as SearchLedgerConflictError, s as SearchLedgerError,
|
|
7
|
-
import { t as FileLedgerJournal } from "./ledger-core-
|
|
8
|
-
import { B as surfaceContentHash, E as pairHoldout, F as assertCodeSurfaceIdentity, J as planCampaignRun, Mt as JudgeParseError, St as recoverTruncatedJson, Y as runCampaign, h as labelTrustRank, jt as summarizeBackendIntegrity, kt as assertRealBackend } from "./skillopt-optimization-method-
|
|
6
|
+
import { a as SEARCH_LEDGER_FILE_CONTEXT, c as SearchLedgerIntegrityError, o as SearchLedgerConflictError, s as SearchLedgerError, y as contentHash } from "./single-run-lock-D5iN0Xzb.js";
|
|
7
|
+
import { p as mapConcurrent, t as FileLedgerJournal } from "./ledger-core-DXZIqu17.js";
|
|
8
|
+
import { B as surfaceContentHash, E as pairHoldout, F as assertCodeSurfaceIdentity, J as planCampaignRun, Mt as JudgeParseError, St as recoverTruncatedJson, Y as runCampaign, h as labelTrustRank, jt as summarizeBackendIntegrity, kt as assertRealBackend } from "./skillopt-optimization-method-C4FX42dy.js";
|
|
9
9
|
import { C as mulberry32, E as pairedBootstrap, m as eProcess } from "./statistics-ByxzSiOM.js";
|
|
10
10
|
import { t as comparePairedArms } from "./paired-arms-iZ08VFMN.js";
|
|
11
|
-
import { o as runTaskScore, r as modelHasSnapshot, s as validateRunRecord } from "./run-record-
|
|
11
|
+
import { o as runTaskScore, r as modelHasSnapshot, s as validateRunRecord } from "./run-record-CWN8-VsV.js";
|
|
12
12
|
import { a as scoreAnalystFindings } from "./benchmark-CYtcIF2V.js";
|
|
13
|
-
import { l as campaignCellToRunRecord } from "./reward-hacking-
|
|
13
|
+
import { l as campaignCellToRunRecord } from "./reward-hacking-CyuzxKly.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
@@ -2379,8 +2379,8 @@ function renderScoreboardMarkdown(rows, opts = {}) {
|
|
|
2379
2379
|
* A dispatch that reports zero tokens is indistinguishable from a stub and the
|
|
2380
2380
|
* integrity guard treats it as one.
|
|
2381
2381
|
*/
|
|
2382
|
-
/** Thrown when the matrix is misconfigured (no profiles,
|
|
2383
|
-
*
|
|
2382
|
+
/** Thrown when the matrix is misconfigured (no profiles, missing resolved model evidence,
|
|
2383
|
+
* etc.). Distinct from `BackendIntegrityError`,
|
|
2384
2384
|
* which signals a stub backend at run time. */
|
|
2385
2385
|
var ProfileMatrixError = class extends AgentEvalError {
|
|
2386
2386
|
constructor(message) {
|
|
@@ -2396,25 +2396,33 @@ function sha(input) {
|
|
|
2396
2396
|
function mean(xs) {
|
|
2397
2397
|
return xs.length === 0 ? 0 : xs.reduce((a, b) => a + b, 0) / xs.length;
|
|
2398
2398
|
}
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
if (
|
|
2411
|
-
|
|
2399
|
+
function receiptModels(cell) {
|
|
2400
|
+
const reported = cell.resolvedModels ?? (cell.resolvedModel ? [cell.resolvedModel] : []);
|
|
2401
|
+
return [...new Set(reported.map((model) => model.trim()).filter(Boolean))];
|
|
2402
|
+
}
|
|
2403
|
+
/** Resolve and validate every paid-call model used by one cell. */
|
|
2404
|
+
function recordModel(cell, profileId, declaredModel) {
|
|
2405
|
+
const reported = receiptModels(cell);
|
|
2406
|
+
if (modelHasSnapshot(declaredModel)) {
|
|
2407
|
+
for (const model of reported) if (model !== declaredModel) throw new ProfileMatrixError(`profile '${profileId}' paid-call model '${model}' for cell '${cell.cellId}' does not match its declared exact model '${declaredModel}'`);
|
|
2408
|
+
return declaredModel;
|
|
2409
|
+
}
|
|
2410
|
+
if (reported.length === 0) throw new ProfileMatrixError(`profile '${profileId}' declared a moving model but its dispatch reported no resolved model for cell '${cell.cellId}' — return a snapshot-bearing model in the ctx.cost.runPaidCall receipt`);
|
|
2411
|
+
for (const model of reported) {
|
|
2412
|
+
if (!modelHasSnapshot(model)) throw new ProfileMatrixError(`profile '${profileId}' resolved to model '${model}' for cell '${cell.cellId}', which lacks a snapshot version — pin it in the paid-call receipt`);
|
|
2413
|
+
if (declaredModel !== "default" && !sameMovingModel(declaredModel, model)) throw new ProfileMatrixError(`profile '${profileId}' declared model '${declaredModel}' but cell '${cell.cellId}' reported unrelated snapshot '${model}'`);
|
|
2414
|
+
}
|
|
2415
|
+
if (reported.length !== 1) throw new ProfileMatrixError(`profile '${profileId}' cell '${cell.cellId}' reported multiple paid-call model snapshots: ${reported.join(", ")}`);
|
|
2416
|
+
return reported[0];
|
|
2417
|
+
}
|
|
2418
|
+
function sameMovingModel(declared, resolved) {
|
|
2419
|
+
const resolvedBase = resolved.replace(/@[^/]+$/u, "").replace(/-\d{8}$/u, "").replace(/-\d{4}-\d{2}-\d{2}$/u, "").replace(/-\d{4}$/u, "").replace(/:date-[^/]+$/u, "");
|
|
2420
|
+
return resolvedBase === declared || resolvedBase.endsWith(`/${declared}`) || declared.endsWith(`/${resolvedBase}`);
|
|
2412
2421
|
}
|
|
2413
2422
|
function buildRunRecord(args) {
|
|
2414
2423
|
const { cell, profile, profileHash, configHash, experimentId, splitTag, commitSha, matrixId } = args;
|
|
2415
2424
|
const profileId = agentProfileId(profile);
|
|
2416
|
-
const
|
|
2417
|
-
const model = declaredModel === "default" ? requireResolvedModel(cell, profileId) : declaredModel;
|
|
2425
|
+
const model = recordModel(cell, profileId, agentProfileModelId(profile));
|
|
2418
2426
|
const record = campaignCellToRunRecord(cell, {
|
|
2419
2427
|
runId: `${matrixId}:${profileId}:${cell.cellId}`,
|
|
2420
2428
|
experimentId,
|
|
@@ -2445,7 +2453,11 @@ async function runProfileMatrix(opts) {
|
|
|
2445
2453
|
const seed = opts.seed ?? 42;
|
|
2446
2454
|
const validate = opts.validate ?? true;
|
|
2447
2455
|
const integrityMode = opts.integrity ?? "assert";
|
|
2456
|
+
const maxProfileConcurrency = opts.maxProfileConcurrency ?? 1;
|
|
2448
2457
|
const profileIds = opts.profiles.map(agentProfileId);
|
|
2458
|
+
if (opts.dispatchRef !== void 0 && opts.dispatchRef.trim().length === 0) throw new ProfileMatrixError("dispatchRef must be a non-empty string when provided");
|
|
2459
|
+
const duplicateProfileIds = profileIds.filter((id, index) => profileIds.indexOf(id) !== index);
|
|
2460
|
+
if (duplicateProfileIds.length > 0) throw new ProfileMatrixError(`duplicate agentProfileId values are not allowed: ${[...new Set(duplicateProfileIds)].join(", ")}`);
|
|
2449
2461
|
const experimentId = opts.experimentId ?? `pm_${sha({
|
|
2450
2462
|
profileIds,
|
|
2451
2463
|
scenarios: opts.scenarios.map((s) => s.id)
|
|
@@ -2454,14 +2466,16 @@ async function runProfileMatrix(opts) {
|
|
|
2454
2466
|
experimentId,
|
|
2455
2467
|
profileIds,
|
|
2456
2468
|
seed,
|
|
2457
|
-
splitTag
|
|
2469
|
+
splitTag,
|
|
2470
|
+
commitSha: opts.commitSha,
|
|
2471
|
+
dispatchRef: opts.dispatchRef ?? null
|
|
2458
2472
|
}).slice(0, 16)}`;
|
|
2459
2473
|
const scenarioById = new Map(opts.scenarios.map((s) => [s.id, s]));
|
|
2460
2474
|
for (const profile of opts.profiles) {
|
|
2461
2475
|
const profileHash = agentProfileHash(profile);
|
|
2462
2476
|
const profileId = agentProfileId(profile);
|
|
2463
2477
|
const declaredModel = agentProfileModelId(profile);
|
|
2464
|
-
const model = declaredModel
|
|
2478
|
+
const model = modelHasSnapshot(declaredModel) ? declaredModel : `${declaredModel}@runtime-resolved`;
|
|
2465
2479
|
try {
|
|
2466
2480
|
validateRunRecord({
|
|
2467
2481
|
runId: `${matrixId}:${profileId}:probe`,
|
|
@@ -2494,7 +2508,7 @@ async function runProfileMatrix(opts) {
|
|
|
2494
2508
|
const records = [];
|
|
2495
2509
|
const campaigns = {};
|
|
2496
2510
|
const byProfile = {};
|
|
2497
|
-
|
|
2511
|
+
const columns = await mapConcurrent(opts.profiles, maxProfileConcurrency, async (profile, _index, signal) => {
|
|
2498
2512
|
const profileHash = agentProfileHash(profile);
|
|
2499
2513
|
const profileId = agentProfileId(profile);
|
|
2500
2514
|
const declaredModel = agentProfileModelId(profile);
|
|
@@ -2502,13 +2516,23 @@ async function runProfileMatrix(opts) {
|
|
|
2502
2516
|
profile: profileHash,
|
|
2503
2517
|
judges: (opts.judges ?? []).map((j) => j.name),
|
|
2504
2518
|
seed,
|
|
2505
|
-
splitTag
|
|
2519
|
+
splitTag,
|
|
2520
|
+
dispatchRef: opts.dispatchRef ?? null
|
|
2506
2521
|
});
|
|
2522
|
+
const dispatchRef = `profile-matrix:${sha({
|
|
2523
|
+
commitSha: opts.commitSha,
|
|
2524
|
+
caller: opts.dispatchRef ?? null,
|
|
2525
|
+
profileId,
|
|
2526
|
+
profileHash,
|
|
2527
|
+
configHash
|
|
2528
|
+
})}`;
|
|
2507
2529
|
const dispatch = (scenario, ctx) => opts.dispatch(profile, scenario, ctx);
|
|
2508
2530
|
Object.defineProperty(dispatch, "name", { value: `profile_${sanitize(profileId)}` });
|
|
2509
2531
|
const campaign = await runCampaign({
|
|
2510
2532
|
scenarios: opts.scenarios,
|
|
2511
2533
|
dispatch,
|
|
2534
|
+
dispatchRef,
|
|
2535
|
+
signal,
|
|
2512
2536
|
judges: opts.judges,
|
|
2513
2537
|
seed,
|
|
2514
2538
|
reps: opts.reps,
|
|
@@ -2530,10 +2554,10 @@ async function runProfileMatrix(opts) {
|
|
|
2530
2554
|
model: cellModel,
|
|
2531
2555
|
...axis ? { harness: { id: axis.harness } } : {}
|
|
2532
2556
|
});
|
|
2533
|
-
const sharedCellIdentity = declaredModel
|
|
2557
|
+
const sharedCellIdentity = modelHasSnapshot(declaredModel) ? await buildCellIdentity(declaredModel) : void 0;
|
|
2534
2558
|
const profileRecords = [];
|
|
2535
2559
|
for (const cell of campaign.cells) {
|
|
2536
|
-
const agentProfileCell = sharedCellIdentity ?? await buildCellIdentity(
|
|
2560
|
+
const agentProfileCell = sharedCellIdentity ?? await buildCellIdentity(recordModel(cell, profileId, declaredModel));
|
|
2537
2561
|
const record = buildRunRecord({
|
|
2538
2562
|
cell,
|
|
2539
2563
|
profile,
|
|
@@ -2549,21 +2573,31 @@ async function runProfileMatrix(opts) {
|
|
|
2549
2573
|
});
|
|
2550
2574
|
if (validate) validateRunRecord(record);
|
|
2551
2575
|
profileRecords.push(record);
|
|
2552
|
-
records.push(record);
|
|
2553
2576
|
}
|
|
2577
|
+
const recordedModels = [...new Set(profileRecords.map((record) => record.model))];
|
|
2578
|
+
if (recordedModels.length > 1) throw new ProfileMatrixError(`profile '${profileId}' resolved to multiple model snapshots: ${recordedModels.join(", ")}`);
|
|
2554
2579
|
const costProvenance = campaign.aggregates.cost.costProvenance;
|
|
2555
2580
|
const totalCostUsd = costProvenance.kind === "uncaptured" ? null : costProvenance.usd;
|
|
2556
|
-
|
|
2557
|
-
byProfile[profileId] = {
|
|
2581
|
+
return {
|
|
2558
2582
|
profileId,
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2583
|
+
campaign,
|
|
2584
|
+
records: profileRecords,
|
|
2585
|
+
summary: {
|
|
2586
|
+
profileId,
|
|
2587
|
+
profileHash,
|
|
2588
|
+
model: recordedModels[0] ?? declaredModel,
|
|
2589
|
+
records: profileRecords.length,
|
|
2590
|
+
meanComposite: meanOrNull(profileRecords.map(scoreOf).filter((score) => score !== void 0)),
|
|
2591
|
+
totalCostUsd,
|
|
2592
|
+
costProvenance,
|
|
2593
|
+
integrity: summarizeBackendIntegrity(profileRecords)
|
|
2594
|
+
}
|
|
2566
2595
|
};
|
|
2596
|
+
});
|
|
2597
|
+
for (const column of columns) {
|
|
2598
|
+
campaigns[column.profileId] = column.campaign;
|
|
2599
|
+
byProfile[column.profileId] = column.summary;
|
|
2600
|
+
records.push(...column.records);
|
|
2567
2601
|
}
|
|
2568
2602
|
const integrity = summarizeBackendIntegrity(records);
|
|
2569
2603
|
if (integrityMode === "assert") assertRealBackend(records, { allowMixed: opts.allowMixed ?? true });
|
|
@@ -4042,4 +4076,4 @@ function resolveWorktreePath(surface, worktreeDir) {
|
|
|
4042
4076
|
//#endregion
|
|
4043
4077
|
export { loadEvalFixture as A, agentProfileModelId as B, LabeledScenarioStoreError as C, sequentialPairedGate as D, sequentialDecide as E, traceAnalystQualityJudge as F, createLlmCorrectnessChecker as G, harnessAxisOf as H, CODING_HARNESSES as I, verifyCompletion as J, createTokenRecallChecker as K, HARNESS_NATIVE_MODEL as L, planEvalFixtureRun as M, analyzeCrossSurfaceInteractions as N, neutralizationGate as O, buildTraceAnalystSurfaceDispatch as P, agentProfileHash as R, FsLabeledScenarioStore as S, rolloutArgumentDiff as T, extractProducedState as U, expandProfileAxes as V, completionVerdict as W, renderScoreboardMarkdown as _, autoevalsScorerJudge as a, userStoryScoreboard as b, FileSearchLedger as c, validateSearchLedgerEvent as d, scoreDiscrimination as f, makePlaybackDispatch as g, runProfileMatrix as h, verifyCodeSurface as i, loadEvalFixtureScenarios as j, discoverEvalFixtures as k, SEARCH_LEDGER_SCHEMA as l, ProfileMatrixError as m, gitWorktreeAdapter as n, phoenixEvaluatorJudge as o, selectDiscriminative as p, parseCorrectnessResponse as q, resolveWorktreePath as r, isTransientTransportFailure as s, WorktreeAdapterError as t, openSearchLedger as u, scoreUserStory as v, classifyUngroundedLiterals as w, neutralizeText as x, scoreboardSummary as y, agentProfileId as z };
|
|
4044
4078
|
|
|
4045
|
-
//# sourceMappingURL=campaign-
|
|
4079
|
+
//# sourceMappingURL=campaign-DjGFyPxH.js.map
|