| name | verify-r-command |
| description | Execute the frozen validation cases in an independent R implementation and emit normalized, reproducible results. Use as the R leg of Python-Stata-R validation after command specification, or when R package versions, mappings, defaults, or output extraction need verification. |
Verify R Command
Run R as an independent result engine. Execution and normalization are the only responsibilities of this skill.
Inputs
- Frozen
manifest.yaml and cases.yaml.
validation/commands/<command>/r/run.R or permission to create it.
- Identical input data and expected SHA256 values.
- Project
renv.lock and required R package/function mappings.
- Run ID and current Git commit.
Outputs
Write only inside the run directory:
validation/runs/<command>/<run_id>/r/results.json
validation/runs/<command>/<run_id>/r/environment.json
validation/runs/<command>/<run_id>/r/raw/ for logs or package-native artifacts
The normalized JSON must include schema version, command, case ID, engine, sample hash, included-row hash, convergence state, warnings, coefficient names/order, every required metric, missing metrics, elapsed time, and error details. Preserve full numeric precision.
Workflow
- Check
Rscript, renv.lock, required package versions, and package availability without changing the environment.
- Verify input bytes and row IDs against the frozen hash before fitting.
- Invoke explicit R functions and options from the manifest; never accept package defaults unless the manifest records them.
- Capture warnings, convergence codes, rank, omitted parameters, sample membership, and all required statistics.