Install required runtime and create/verify the required file first
When a task requires a runtime and a fixed file path (an implementation file like /app/ars.R or a generated answer file like /app/out.txt), satisfy those requirements before doing unrelated setup or running verifier tests.
Procedure:
- Check for the required runtime and install it if missing:
Adapt the package/install command to the named runtime (python, node, R, etc.).command -v Rscript || { apt-get update && apt-get install -y r-base-core; } - For a required implementation file, create it immediately and write the implementation into that exact path:
mkdir -p /app touch /app/ars.R - For a required generated output file, produce it from the implementation and verify it exists before spending remaining time on optional dependencies or verifier runs:
mkdir -p /app # run the solution, then: test -s /app/out.txt && wc -l /app/out.txt - Only after the required runtime and file exist should you perform optional setup such as installing curl, openssl, or uv, or run the verifier.
Why: verifier failures are often simply No ars.R file found, FileNotFoundError: Rscript, or /app/out.txt missing. In gcode-to-text the verifier failed both tests with reward 0.0 because /app/out.txt was never produced while time was spent installing packages and running pytest. Create required implementation files and verify generated output files before running the verifier.
Supporting evidence: gcode-to-text (this batch).