{"record":{"id":"ff3add715917c75d","repo":"t8y2/dbx","slug":"bench-candidates-selected-no-candidates","errorCode":null,"errorMessage":"BENCH_CANDIDATES selected no candidates","messagePattern":"BENCH_CANDIDATES selected no candidates","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agents/drivers/argo-go/bench/agent_compare.py","lineNumber":307,"sourceCode":"        artifact = required_path(\"GO_AGENT\")\n        raw_command = os.getenv(\"GO_AGENT_COMMAND\", \"\")\n        command = shlex.split(raw_command) if raw_command else [str(artifact)]\n        candidates.append(\n            Candidate(\"go-native\", command, artifact, os.getenv(\"GO_RSS_COMMAND\", \"\"))\n        )\n    if \"jdbc\" in selected:\n        artifact = required_path(\"JDBC_AGENT_JAR\")\n        raw_command = os.getenv(\"JDBC_AGENT_COMMAND\", \"\")\n        command = (\n            shlex.split(raw_command)\n            if raw_command\n            else [env_default(\"JAVA_BIN\", \"java\"), \"-jar\", str(artifact)]\n        )\n        candidates.append(\n            Candidate(\"jdbc-java\", command, artifact, os.getenv(\"JDBC_RSS_COMMAND\", \"\"))\n        )\n    if not candidates:\n        raise ValueError(\"BENCH_CANDIDATES selected no candidates\")\n    return candidates\n\n\ndef connection_params() -> dict:\n    return {\n        \"host\": env_default(\"HIVE_HOST\", \"127.0.0.1\"),\n        \"port\": env_int(\"HIVE_PORT\", 10000),\n        \"database\": env_default(\"HIVE_DATABASE\", \"dbx_agent_bench\"),\n        \"username\": os.getenv(\"HIVE_USERNAME\", \"\"),\n        \"password\": os.getenv(\"HIVE_PASSWORD\", \"\"),\n        \"url_params\": env_default(\"HIVE_URL_PARAMS\", \"auth=noSasl\"),\n        \"connection_string\": os.getenv(\"HIVE_CONNECTION_STRING\", \"\"),\n        \"ssl\": env_bool(\"HIVE_SSL\", False),\n        \"ca_cert_path\": os.getenv(\"HIVE_CA_CERT_PATH\", \"\"),\n        \"client_cert_path\": os.getenv(\"HIVE_CLIENT_CERT_PATH\", \"\"),\n        \"client_key_path\": os.getenv(\"HIVE_CLIENT_KEY_PATH\", \"\"),\n        \"connect_timeout_secs\": env_int(\"HIVE_CONNECT_TIMEOUT\", 30),\n    }","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/argo-go/bench/agent_compare.py#L289-L325","documentation":"configured_candidates builds the candidate list from BENCH_CANDIDATES (go/java/jdbc tokens); if parsing produces an empty list it raises ValueError because the benchmark has nothing to compare. This is a pure configuration error caught at startup.","triggerScenarios":"Running main() with BENCH_CANDIDATES unset/empty or containing only unrecognized tokens, so no Candidate entries (including the jdbc-java entry gated on its artifact) are appended.","commonSituations":"Forgot to export BENCH_CANDIDATES before running the bench; typo like \"golang\" or \"rust\" instead of the expected token; candidates list intentionally limited to an artifact that doesn't exist so the branch appending it never ran.","solutions":["Export BENCH_CANDIDATES with valid tokens (e.g. `export BENCH_CANDIDATES=go,java,jdbc-java`)","Check the parsing logic in configured_candidates for the exact accepted token names and use one of them","Set the required env vars (artifact paths via required_path) so the candidate branches actually append entries","Add a startup check or help text listing valid BENCH_CANDIDATES values"],"exampleFix":"// before\nBENCH_CANDIDATES= ./agent_compare.py\n// after\nexport BENCH_CANDIDATES=\"go,jdbc-java\"\npython3 agents/drivers/argo-go/bench/agent_compare.py","handlingStrategy":"validation","validationCode":"candidates = os.getenv(\"BENCH_CANDIDATES\", \"\")\nif not candidates:\n    raise SystemExit(\"Set BENCH_CANDIDATES, e.g. export BENCH_CANDIDATES=go,jdbc-java\")","typeGuard":null,"tryCatchPattern":"try:\n    cands = configured_candidates()\nexcept ValueError as e:\n    sys.exit(f\"config error: {e}; valid values: go,java,jdbc-java\")","preventionTips":["Always export BENCH_CANDIDATES in your run script or CI env","Use the exact token spellings accepted by configured_candidates","Keep a wrapper script that sets all benchmark env vars in one place","Fail fast at startup — this error is cheap to catch before spawning agents"],"tags":["configuration","environment-variable","validation"],"backgroundTag":"missing-env-var","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}