Verify Orchestrator
Prerequisites & Dependencies
- Python 3.10+ (or Node.js for config parsing)
- Ability to read
package.json,pyproject.toml,Makefile, CI configs (.github/workflows/*.yml,.gitlab-ci.yml) - Access to test runner binaries:
pytest,ruff,tsc,eslint,npm test, etc. subprocessor equivalent for spawning processes and capturing exit codes
Execution Steps
Discover configuration: Scan the working directory for verification configs in priority order:
package.json→ check fortest,lint,typecheckscriptspyproject.toml→ check forpytest,ruff,mypyconfigurationsMakefile→ check fortest,lint,typechecktargets.github/workflows/*.yml/.gitlab-ci.yml→ extract test commandsREADME.md→ check for verification instructions- Fallback:
npm test/pytestdiscovery if no config found
Select minimal verification command: From discovered configs, choose the smallest, fastest-running command suite that covers the primary validation surface (e.g.,
pytest -x --tb=short,ruff check --select=E,npm run lint,tsc --noEmit).Execute verification: Run the selected command in a subprocess with a short timeout (default 60s). Capture:
- Exit code (
$LASTEXITCODEon Windows,process.exitCodeon node) stdoutandstderrfor assertion output- Any signal termination (TIMEOUT → INDETERMINATE)
- Exit code (
Parse and classify result:
- Exit code 0 →
VERIFIED - Exit code non-zero with assertion/syntax errors in output →
FAILED - Exit code non-zero, no assertions →
INDETERMINATE(partial mutation risk) - Command not found / discovery failure →
UNVERIFIED
- Exit code 0 →
Gate completion: A completion claim is only marked
DONEwhen verification returnsVERIFIED. IfUNVERIFIEDorINDETERMINATE, the agent must explicitly surface the gap and halt the completion claim rather than proceeding silently.
Output Format
{
"status": "VERIFIED|FAILED|INDETERMINATE|UNVERIFIED",
"exit_code": <number>,
"output": "<captured stdout+stderr>",
"verified": <boolean>,
"note": "<optional human-readable note on INDETERMINATE/UNVERIFIED>"
}
Windows PowerShell Notes
- Use
cmd /cor PowerShell&operator to invoke commands; avoid bare&&chaining (unsupported in PS 5.1) - Always capture
$LASTEXITCODEafter each command, as$?reflects the previous command's success, not the current one - If a timeout kills the process, treat as
INDETERMINATEand require a manual re-run or targeted check before proceeding