RtoCodex is an R package designed as a small, controlled testbed for understanding how GPT-5 Codex behaves when working with R projects locally and inside OpenAI’s universal container. The repository focuses on how differences in environment, toolchains, and package installation can affect compilation and testing of R packages that include native code.
- R package skeleton intended for experimentation, not production.
- Initial focus: detecting compilation issues across environments.
- Future focus: accumulating small, targeted examples of environment-sensitive behavior discovered while developing with GPT-5 Codex.
RtoCodex is meant to be cloned and used as a working directory rather than installed from CRAN.
# from the project root
R CMD INSTALL --preclean -l build-lib/unit .
Rscript tests/run_unit_tests.R --lib=build-lib/unit
R CMD check RtoCodexThe Makefile includes a test target that automates the install + harness
invocation if you prefer make test.
make fuzz-all(orRscript scripts/run_fuzz.R --n=9999) tells the fuzz harness to cover the entire(USE_CPP20, USE_OPENMP)grid while logging underartifacts/fuzz/run_<timestamp-id>/combo/. Themake matrixtarget now simply aliasesmake fuzz-allfor compatibility.make fuzz(orRscript scripts/run_fuzz.R) samples a handful of rows from the same deterministic grid, installs/tests them with the shared helpers, and records the results underartifacts/fuzz/run_<timestamp-id>/.make fuzz-oncerequests a single random combo. PassARGS="--n=8 --seed=123"with any fuzz target to control the sample size and RNG seed; artifacts always includeconfig.rds(host profile, runtime metadata, seed) andsummary.csv(matrix toggles, expected vs observed statuses,expectation_match, and log paths).make fuzz-cleanremovesbuild-lib/fuzzandartifacts/fuzzif you need to reclaim space or reset between fuzz campaigns.
Complex or potentially problematic changes (e.g., a problem partially resolved by changes to the project but discovered due to PEBKAC) are logged under event-narratives/ (see AGENTS.md for the format); event-narratives/event_11_25_Path.md shows the current template in practice for a deliberately trivial example.