MCPcopy Create free account
hub / github.com/cli/cli / effectiveAgentBudget

Function effectiveAgentBudget

evals/src/core/executor.ts:33–41  ·  view source on GitHub ↗
(
  override: string | undefined,
  configured: number | undefined,
  timeout: number,
)

Source from the content-addressed store, hash-verified

31
32/** The agent's working budget: a development override, the stimulus constraint, or the whole trial timeout. */
33export function effectiveAgentBudget(
34 override: string | undefined,
35 configured: number | undefined,
36 timeout: number,
37): number {
38 const budget = override?.trim() ? parseDuration(override) : configured ?? timeout;
39 if (budget <= 0) throw new InfrastructureError("GH_EVAL_AGENT_BUDGET must be a positive duration");
40 return budget;
41}
42
43/** Validates a stimulus's `tags.variant` against the variants its suite accepts. */
44export function stimulusVariant(value: unknown, variants: readonly string[]): string {

Callers 3

harness.test.tsFile · 0.85
setupMethod · 0.85
trialMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected