{"record":{"id":"18b2f6e88e7816d8","repo":"aaif-goose/goose","slug":"trials-must-be-at-least-1","errorCode":null,"errorMessage":"--trials must be at least 1","messagePattern":"--trials must be at least 1","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"evals/harbor/runner.py","lineNumber":130,"sourceCode":"    return {key: index_url for key in PACKAGE_INDEX_ENV_VARS}\n\n\ndef dataset_config(dataset_ref: str, tasks: list[str]) -> dict[str, Any]:\n    name, sep, ref = dataset_ref.rpartition(\"@\")\n    dataset_name = name if sep else dataset_ref\n    dataset: dict[str, Any] = {\"name\": dataset_name}\n    if sep:\n        dataset[\"ref\" if \"/\" in name else \"version\"] = ref\n    if tasks:\n        dataset[\"task_names\"] = tasks\n    return dataset\n\n\ndef build_harbor_config(args: argparse.Namespace) -> dict[str, Any]:\n    if \"/\" not in args.model:\n        raise ValueError(\"--model must be in provider/model form, e.g. anthropic/claude-sonnet-4-6\")\n    if args.trials < 1:\n        raise ValueError(\"--trials must be at least 1\")\n    if args.concurrency < 1:\n        raise ValueError(\"--concurrency must be at least 1\")\n    if args.timeout_multiplier <= 0:\n        raise ValueError(\"--timeout-multiplier must be positive\")\n\n    goose_binary = args.goose_binary.expanduser().resolve()\n    if not goose_binary.is_file():\n        raise ValueError(f\"--goose-binary does not exist or is not a file: {args.goose_binary}\")\n\n    config_yaml, extension_entries = render_goose_config(args.extensions)\n\n    provider = args.model.split(\"/\", 1)[0]\n    missing_secrets = [\n        key for key in PROVIDER_SECRETS.get(provider, []) if not os.environ.get(key)\n    ]\n    if missing_secrets:\n        raise ValueError(\n            f\"Missing env vars for provider '{provider}': {', '.join(missing_secrets)}. \"","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/evals/harbor/runner.py#L112-L148","documentation":"Raised by build_harbor_config in the harbor benchmark runner when --trials is less than 1. Trials is the number of repetitions per task; zero or negative trials would produce empty result sets, so the runner rejects the value immediately. Pure argument validation before any config is rendered or any job submitted.","triggerScenarios":"Running with --trials 0; a negative value like --trials -2; a shell loop that computes trials and can yield 0.","commonSituations":"Smoke-testing with '--trials 0' intending 'run nothing, just validate'; arithmetic on dataset size producing 0; typoing an intended --trials 10 as part of another flag.","solutions":["Use --trials 1 for the smallest valid run (one pass per task)","If trials came from a script, guard the value: only invoke the runner when trials >= 1","For pure config validation without runs, rely on a dry validation path rather than zeroing trials"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert args.trials >= 1, f'--trials must be at least 1, got {args.trials}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use --trials 1 for the smallest valid run","Clamp computed trial counts: max(1, n)","Treat 0/negative trials as a bug in the calling script, not a valid smoke test"],"tags":["cli","validation","harbor","benchmark"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}