Summary
agentv validate does not validate local file paths referenced by workspace lifecycle hook commands, so an eval can pass validation and still fail immediately at runtime when before_all executes.
Repro
From an eval file directory, define a workspace hook like:
workspace:
path: ${{ EVAL_EDIPROD_WORKSPACE_PATH }}
hooks:
before_all:
command:
- node
- ../../../scripts/eval-config/copy-local-skills.mjs
before_each:
reset: fast
In this case the relative path is wrong and should have been ../../scripts/eval-config/copy-local-skills.mjs.
agentv validate eval.yaml reports the file as valid.
agentv eval eval.yaml then fails at runtime with:
Error: Cannot find module 'D:\GitHub\WiseTechGlobal\scripts\eval-config\copy-local-skills.mjs'
code: 'MODULE_NOT_FOUND'
Why this seems like a validation gap
AgentV already:
- resolves hook
cwd relative to the eval file directory during parsing
- defaults hook execution
cwd to the eval directory at runtime when cwd is omitted
- validates some workspace semantics such as
hooks.after_each.reset
So there is already a concrete execution base for hook validation, but validate does not currently stat/check the referenced local paths in hook commands.
Expected behavior
One of these would be sufficient:
agentv validate should detect obviously local missing paths referenced by workspace hook commands and mark the eval invalid.
- If full command interpretation is too broad,
validate should at least warn/error for common interpreter patterns where a local script path is passed as an arg, for example:
node ./script.mjs
bun run ./script.ts
python ./script.py
- Validation should use the same base directory as runtime hook execution (
config.cwd ?? evalDir) so the result matches actual behavior.
Notes
This came up in a real eval where the only bug was a bad relative path in workspace.hooks.before_all.command. Static validation passed, but the run failed before any test executed.
Summary
agentv validatedoes not validate local file paths referenced by workspace lifecycle hook commands, so an eval can pass validation and still fail immediately at runtime whenbefore_allexecutes.Repro
From an eval file directory, define a workspace hook like:
In this case the relative path is wrong and should have been
../../scripts/eval-config/copy-local-skills.mjs.agentv validate eval.yamlreports the file as valid.agentv eval eval.yamlthen fails at runtime with:Why this seems like a validation gap
AgentV already:
cwdrelative to the eval file directory during parsingcwdto the eval directory at runtime whencwdis omittedhooks.after_each.resetSo there is already a concrete execution base for hook validation, but
validatedoes not currently stat/check the referenced local paths in hook commands.Expected behavior
One of these would be sufficient:
agentv validateshould detect obviously local missing paths referenced by workspace hook commands and mark the eval invalid.validateshould at least warn/error for common interpreter patterns where a local script path is passed as an arg, for example:node ./script.mjsbun run ./script.tspython ./script.pyconfig.cwd ?? evalDir) so the result matches actual behavior.Notes
This came up in a real eval where the only bug was a bad relative path in
workspace.hooks.before_all.command. Static validation passed, but the run failed before any test executed.