fix(res-to-affine): restore the five test fixtures deleted by f766dcb - #741
fix(res-to-affine): restore the five test fixtures deleted by f766dcb#741hyperpolymath wants to merge 1 commit into
Conversation
f766dcb ("chore: remove rescript example configuration") deleted tools/res-to-affine/test/fixtures/*.res as ReScript artefacts. They are not artefacts: they are the *inputs* to the res-to-affine migration tool's own test suite -- synthetic anti-pattern files, each headed "Not a real ReScript program", against which the expected/*.affine goldens are compared. The deletion was silent. test/dune declares the inputs as (glob_files fixtures/*.res); a glob over a directory that does not exist matches zero files and does not fail the build, so the suite kept building and every test died at runtime on Sys_error("fixtures/sample.res: No such file or directory"). Effect: 35 of 35 res-to-affine tests failed, i.e. the tool that performs the ReScript-to-AffineScript migration has had no working correctness check since 2026-08-18. Restoring the six files takes the repo from `dune runtest` rc=1 to rc=0. Refs f766dcb Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (4)
🔇 Additional comments (3)
📝 SummarySummary by CodeRabbit
WalkthroughThe PR adds five Changesres-to-affine test fixtures
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The restored fixtures match the migration tool's tested behavior and introduce no actionable merge risk. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



What
Restores
tools/res-to-affine/test/fixtures/{partial1,phase2c,phase3,phase3b,phase3c}.res,deleted by f766dcb "chore: remove rescript example configuration" (2026-08-18).
sample.reswas restored on main previously; these five were not.Why they are not "rescript example configuration"
They are the inputs to the res-to-affine migration tool's own test suite —
synthetic anti-pattern files, each headed "Not a real ReScript program" — against
which
expected/*.affineis compared. They are the only correctness check theReScript→AffineScript migration tool has.
Why it was silent
Two independent failure-to-signal mechanisms:
test/dunedeclares the inputs as(glob_files fixtures/*.res). A glob over adirectory that does not exist matches zero files and does not fail the build,
so the suite kept compiling and each test died at runtime on
Sys_error("fixtures/<f>.res: No such file or directory").test_walker.ml'sskip_unless_ready ()callsAlcotest.skip ()when thetree-sitter grammar is not built. In an environment without the grammar all 32
walker cases SKIP and alcotest reports
Test Successful … 0 test run, exit 0 —so the suite is green precisely when it is testing nothing.
Evidence
With the grammar built and the fixtures absent: 32 of 32 walker tests fail.
With the fixtures restored: 32 of 32 pass, and repo-wide
dune runtestgoesrc=1 → rc=0.
Not fixed here
Mechanism (2) above — the fail-open skip — is left as-is deliberately; turning a
skip into a hard failure is a policy change for the maintainer, not part of a
restore. Filed as a follow-up.