Skip to content

fix(test): main's OCaml test suite compiles and passes again - #868

Merged
hyperpolymath merged 3 commits into
mainfrom
fix/main-test-suite-compiles
Dec 5, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
fix/main-test-suite-compiles

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

main's build, lint and coverage-visibility jobs have been red since #865: test/test_jcs.ml doesn'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)

  • The top-level let open Yojson.Basic had no in; it is now open Affinescript, where Jcs lives.
  • The canonical_inputs list was missing its ; separators.
  • tests is now a flat test_case list, as test_main expects.

2. test/test_interp_eval.ml

3. test/test_call_diagnostics.ml (#862 vs #863; owner ruling: #863's grammar wins)

docs/SOUNDNESS.adoc: stamp advanced to 28d949f, anchors resealed (test_interp_eval.ml is 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

HoTT-stuff and others added 2 commits December 5, 2026 13:03
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
@gitnotebooks

gitnotebooks Bot commented Dec 5, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Copy link
Copy Markdown
Owner Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited. More included reviews will be available in 52 minutes.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hyperpolymath
hyperpolymath marked this pull request as ready for review December 5, 2026 13:05
@hyperpolymath
hyperpolymath merged commit a15989e into main Dec 5, 2026
8 checks passed
@hyperpolymath
hyperpolymath deleted the fix/main-test-suite-compiles branch December 5, 2026 13:05
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants