agentv 3.9.0 → 3.9.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.
@@ -14472,6 +14472,17 @@ function extractTargetsFromSuite(suite) {
14472
14472
  }
14473
14473
  return void 0;
14474
14474
  }
14475
+ function extractWorkersFromSuite(suite) {
14476
+ const execution = suite.execution;
14477
+ if (!execution || typeof execution !== "object" || Array.isArray(execution)) {
14478
+ return void 0;
14479
+ }
14480
+ const workers = execution.workers;
14481
+ if (typeof workers === "number" && Number.isInteger(workers) && workers >= 1 && workers <= 50) {
14482
+ return workers;
14483
+ }
14484
+ return void 0;
14485
+ }
14475
14486
  function extractTargetsFromTestCase(testCase) {
14476
14487
  const execution = testCase.execution;
14477
14488
  if (!execution || typeof execution !== "object" || Array.isArray(execution)) {
@@ -16735,6 +16746,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
16735
16746
  tests,
16736
16747
  trials: extractTrialsConfig(parsed),
16737
16748
  targets: extractTargetsFromSuite(parsed),
16749
+ workers: extractWorkersFromSuite(parsed),
16738
16750
  cacheConfig: extractCacheConfig(parsed),
16739
16751
  totalBudgetUsd: extractTotalBudgetUsd(parsed),
16740
16752
  ...metadata !== void 0 && { metadata },
@@ -28331,14 +28343,22 @@ async function runEvaluation(options) {
28331
28343
  const usePool = poolEnabled !== false && !!suiteWorkspace?.repos?.length && !isPerTestIsolation && !useStaticWorkspace;
28332
28344
  const resolvedRetainOnSuccess = retainOnSuccess ?? (keepWorkspaces ? "keep" : "cleanup");
28333
28345
  const resolvedRetainOnFailure = retainOnFailure ?? (cleanupWorkspaces ? "cleanup" : "keep");
28334
- const requestedWorkers = options.maxConcurrency ?? target.workers ?? 1;
28335
- const workers = hasSharedWorkspace && !usePool ? 1 : requestedWorkers;
28346
+ const workers = options.maxConcurrency ?? target.workers ?? 1;
28336
28347
  setupLog(
28337
- `sharedWorkspace=${hasSharedWorkspace} perTestIsolation=${isPerTestIsolation} usePool=${usePool} requestedWorkers=${requestedWorkers} effectiveWorkers=${workers}`
28348
+ `sharedWorkspace=${hasSharedWorkspace} perTestIsolation=${isPerTestIsolation} usePool=${usePool} workers=${workers}`
28338
28349
  );
28339
- if (hasSharedWorkspace && !usePool && requestedWorkers > 1) {
28350
+ if (hasSharedWorkspace && !usePool && workers > 1) {
28340
28351
  console.warn(
28341
- `Warning: Shared workspace requires sequential execution. Overriding workers from ${requestedWorkers} to 1.`
28352
+ [
28353
+ `Warning: This eval uses a shared workspace with ${workers} workers.`,
28354
+ "If the agent under test makes file edits, concurrent runs may corrupt each other.",
28355
+ "To limit concurrency, add this to your eval YAML:",
28356
+ "",
28357
+ " execution:",
28358
+ " workers: 1",
28359
+ "",
28360
+ "Or pass --workers 1 on the command line."
28361
+ ].join("\n")
28342
28362
  );
28343
28363
  }
28344
28364
  const limit = pLimit(workers);
@@ -30878,6 +30898,7 @@ export {
30878
30898
  loadConfig,
30879
30899
  extractTargetFromSuite,
30880
30900
  extractTargetsFromSuite,
30901
+ extractWorkersFromSuite,
30881
30902
  extractTargetsFromTestCase,
30882
30903
  extractTrialsConfig,
30883
30904
  extractCacheConfig,
@@ -30992,4 +31013,4 @@ export {
30992
31013
  OtelStreamingObserver,
30993
31014
  createAgentKernel
30994
31015
  };
30995
- //# sourceMappingURL=chunk-TXDPYXHY.js.map
31016
+ //# sourceMappingURL=chunk-X24J6HCV.js.map