{"record":{"id":"6e0ee7ca3a84b328","repo":"can1357/oh-my-pi","slug":"verifier-script-tests-test-sh-is-missing","errorCode":null,"errorMessage":"Verifier script /tests/test.sh is missing","messagePattern":"Verifier script /tests/test\\.sh is missing","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/metaharness/src/tb/trial.ts","lineNumber":221,"sourceCode":"\t\tawait writeArtifact(opts.trialDir, \"transcript.json\", transcript);\n\t\tunsubscribe();\n\t\tawait client.stop().catch(() => {});\n\t\tclient = null;\n\t\tcheckDeadline();\n\n\t\topts.log?.(\"verify\");\n\t\t// Docker's default capability set denies CAP_SYS_TIME, but root inside a\n\t\t// microVM can change its clock. Restore host UTC before verification so\n\t\t// agent certificate workarounds cannot poison verifier networking.\n\t\tconst hostEpoch = Math.floor(Date.now() / 1_000);\n\t\tawait vm.exec(`date -u -s @${hostEpoch} >/dev/null 2>&1 || true`, { timeoutSec: 10 });\n\t\tconst verifierStartedAt = performance.now();\n\t\tlet verifierExitCode: number | null = null;\n\t\tlet verifierFailure: string | null = null;\n\t\ttry {\n\t\t\tawait vm.copyDirectory(path.join(opts.task.dir, \"tests\"), \"/tests\");\n\t\t\tconst script = await vm.exec(\"test -f /tests/test.sh\");\n\t\t\tif (script.exitCode !== 0) throw new Error(\"Verifier script /tests/test.sh is missing\");\n\t\t\tconst chmod = await vm.exec(\"chmod +x /tests/test.sh\");\n\t\t\tif (chmod.exitCode !== 0) throw new Error(`Could not make verifier executable: ${chmod.stderr.trim()}`);\n\t\t\tconst verifier = await vm.exec(\"bash /tests/test.sh > /logs/verifier/test-stdout.txt 2>&1\", {\n\t\t\t\ttimeoutSec: opts.task.verifierTimeoutSec,\n\t\t\t\tenv: opts.task.verifierEnv,\n\t\t\t\tcwd: vm.workdir,\n\t\t\t});\n\t\t\tverifierExitCode = verifier.exitCode;\n\t\t} catch (error) {\n\t\t\tverifierFailure = errorMessage(error);\n\t\t} finally {\n\t\t\tverifierMs = elapsedMs(verifierStartedAt);\n\t\t}\n\t\tcheckDeadline();\n\n\t\tconst rewardText = await vm.readFile(\"/logs/verifier/reward.txt\");\n\t\tconst parsedReward = rewardText === null ? Number.NaN : Number.parseFloat(rewardText.trim());\n\t\tconst reward = Number.isFinite(parsedReward) && parsedReward >= 0 && parsedReward <= 1 ? parsedReward : null;","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/src/tb/trial.ts#L203-L239","documentation":"runTrial copies the task's tests/ directory into the VM at /tests and then verifies that /tests/test.sh exists before executing it. This error means the verifier entrypoint script was not found at the expected path, i.e. the task directory has no tests/test.sh.","triggerScenarios":"Calling runTrial with opts.task.dir containing no `tests` subdirectory, or the tests directory lacking a test.sh file, so the copied /tests tree has no test.sh.","commonSituations":"Authoring a new task fixture and forgetting the test.sh entrypoint; typo'd directory name (test/ vs tests/); the task dir path pointing to the wrong fixture.","solutions":["Create the missing tests/test.sh in the task directory referenced by opts.task.dir","Verify opts.task.dir points at the intended task root (it should contain a tests/ subdir)","Check for naming typos: file must be exactly test.sh and directory exactly tests"],"exampleFix":"// task layout before (broken)\nmy-task/task.yaml\n// after\nmy-task/task.yaml\nmy-task/tests/test.sh","handlingStrategy":"validation","validationCode":"const testSh = path.join(opts.task.dir, \"tests\", \"test.sh\");\nif (!existsSync(testSh)) {\n  throw new Error(`Task ${opts.task.dir} lacks tests/test.sh before starting trial`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runTrial(opts);\n} catch (err) {\n  if (err.message === \"Verifier script /tests/test.sh is missing\") {\n    // skip or flag the task fixture instead of crashing the batch\n    reportBrokenTask(opts.task.dir);\n    return;\n  }\n  throw err;\n}","preventionTips":["Add a task-fixture linter that requires tests/test.sh in every task directory","Validate all task fixtures in CI before running trial batches","Keep a canonical template task with tests/test.sh to copy from"],"tags":["task-config","verifier","missing-file"],"backgroundTag":"verifier-script-missing","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}