Repository navigation
fix(test): main's OCaml test suite compiles and passes again - #868
Merged
Merged
Conversation
test/test_jcs.ml, from #865, did not compile, so dune built no test runner. main's 'build' job has been red since #865, and every later regression was hidden behind it. - a top-level 'let open' with no 'in' becomes 'open Affinescript', which is where Jcs lives; - the canonical_inputs list was missing its ';' separators; - 'tests' is now a flat test_case list, as test_main expects. With the runner building again, #865's canonical key order shows up in one older expectation: eval --json now prints {"diagnostics":..,"success":..,"version":1}. Updated. Two failures remain, not fixed here: #862's continued if/match tests assert the grammar from before #863. That needs an owner call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7Zo5h4xmXVEeSeQEDvw
#863 made a statement if/match end at its closing brace, so the #644 shape (if c { .. } then (u, 2), on the next line or the same line) now type-checks. #862, merged after it, still asserted that shape was StatementContinued, and both tests failed once the runner compiled. The diagnostic is still reachable when a statement's head is a parenthesised if/match that is then called: (if c { () } else { () })(3); The two tests now use that shape. A new test pins that the old #644 shapes type-check. SOUNDNESS.adoc stamp advanced to 28d949f; anchors resealed (test_interp_eval.ml changed in the previous commit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7Zo5h4xmXVEeSeQEDvw
|
Review these changes at https://app.gitnotebooks.com/hyperpolymath/affinescript/pull/868 |
Contributor
|
Caution Review failedThe pull request is closed.
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. |
Owner
Author
|
@coderabbitai review Generated by Claude Code |
Contributor
Action not completed
|
hyperpolymath
marked this pull request as ready for review
December 5, 2026 13:05
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
main's
build,lintandcoverage-visibilityjobs have been red since #865:test/test_jcs.mldoesn't compile, so dune builds no OCaml test runner. Every regression since then has been hidden behind it. This PR gets main's tests compiling and passing again.1.
test/test_jcs.ml(#865)let open Yojson.Basichad noin; it is nowopen Affinescript, whereJcslives.canonical_inputslist was missing its;separators.testsis now a flattest_caselist, astest_mainexpects.2.
test/test_interp_eval.mleval --jsonexpectation now uses Arena/6362b41e affinescript #865's canonical key order ({"diagnostics":..,"success":..,"version":1}).3.
test/test_call_diagnostics.ml(#862 vs #863; owner ruling: #863's grammar wins)if/matchend at its}, so the parser: empty match-arm bodyPat => {}is a parse error #644 shape (if c { .. }then(u, 2)) type-checks. feat(diagnostics): locate E0104, name a continued if/match, add char_to_string #862 still asserted that shape was aStatementContinuederror.if/matchthat is then called ((if c { () } else { () })(3);). The two tests now use that shape, and a new test pins that the old shapes type-check.;after its closing}") no longer fits the remaining shape. That's filed separately, not changed here.docs/SOUNDNESS.adoc: stamp advanced to28d949f, anchors resealed (test_interp_eval.mlis an anchor).No compiler code changes.
Test plan
dune build @runtest --force: 875 tests run, 0 failures.tools/check-soundness-ledger.sh: all 5 properties hold.Unblocks #867 (#848), whose CI is red only because of this.
Generated by Claude Code