feature: rename --run-cranelift/--cranelift to --jit (clean break)#392
Merged
Conversation
The user-facing JIT opt-in flag now names the concept (JIT) rather than the implementation (Cranelift). Internal Engine::Cranelift variant and the jit_cranelift / compile_cranelift module names are unchanged - the rename is purely a CLI surface change. No back-compat aliases: the old spellings fall through to the unknown-flag guard (#366) and are rejected with the standard 'unrecognised flag' error plus exit code 1. Agents that reach for the old names get a clean signal instead of silent fallthrough.
Mechanical sed sweep across all test files and example programs. regression_default_engine_is_vm.rs: replaced the now-meaningless 'cranelift_alias_matches_run_cranelift' parity check (which compared two identical --jit invocations after the sweep) with a smaller 'jit_flag_runs_numeric' smoke test for the new flag spelling.
SPEC.md updated by hand. ai.txt and the AI-SPEC block in skills/ilo/SKILL.md regenerated by build.rs from SPEC.md on the next cargo build. The manual CLI-example block in SKILL.md (outside the auto-gen markers) was updated separately.
Three-case regression covering the clean-break contract:
1. --jit runs a numeric program through the JIT path and produces the
expected output.
2. --run-cranelift is rejected by the unknown-flag guard with exit 1.
3. --cranelift is rejected the same way.
Without this, a future revert could silently re-introduce the old names
and the unknown-flag guard would happily pass them as known clap args
rather than rejecting them as the contract requires.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
danieljohnmorris
added a commit
that referenced
this pull request
May 18, 2026
The --run-cranelift flag was removed in #392 (rename-cranelift-to-jit) but this test file wasn't updated, leaving all 21 cases failing on main. Picking it up here because it blocks Phase 0's CI-green goal; the actual fix is a one-token rename in the engine list. This is the only stale --run-cranelift reference in the test suite that isn't intentionally exercising the unknown-flag guard.
This was referenced May 18, 2026
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
Renames the user-facing JIT opt-in flag from the implementation name (Cranelift) to the concept (JIT). The internal
Engine::Craneliftvariant and thejit_cranelift/compile_craneliftmodule names are unchanged - the rename is purely a CLI surface change.Clean break, no back-compat aliases.
--run-craneliftand--craneliftare removed entirely; they now fall through to the unknown-flag guard (#366) and are rejected with the standarderror: unrecognised flag '<flag>'message plus exit 1. Agents who reach for the old names get an immediate clean signal instead of silent fallthrough or quiet positional consumption.Rationale: shorter (1 token vs 4 token-pieces), industry-standard (every JIT runtime in the wild is just called "the JIT"), and doesn't lock the spelling to a specific backend - if we ever swap Cranelift for something else, the user surface stays stable.
Repro before/after
Before (#390 baseline):
After this PR:
What is in the diff
cli: rename --run-cranelift/--cranelift to --jit (clean break)- clap arg + dispatcher + help text + struct field (run_cranelift->jit). 5 files insrc/.tests, examples: sweep --run-cranelift/--cranelift to --jit- mechanical sed pass across all tests/ and examples/ (~470 sites). One test inregression_default_engine_is_vm.rswas rewritten because the original (alias parity check) became a no-op after the sweep.docs: sync SPEC + ai.txt + SKILL.md for --jit rename- SPEC.md by hand; ai.txt + SKILL.md auto-gen block via build.rs.test: pin --jit canonical, old spellings rejected- newtests/regression_jit_flag_canonical.rswith three cases: --jit runs; --run-cranelift rejected; --cranelift rejected.Test plan
cargo build --features craneliftpassescargo clippy --features cranelift --all-targets -- -D warningspassescargo fmtcleancargo test --release --features cranelift- full suite green (every prior test that used--run-cranelift/--craneliftgot swept to--jit)--run-craneliftor--craneliftstrings remain insrc/,tests/,examples/,SPEC.md,README.md,ai.txt, orskills/ilo/SKILL.md(onlytests/regression_jit_flag_canonical.rsreferences them as test fixtures asserting rejection)Follow-ups
siterepo has its own changes fordocs/reference/cli.md+docs/reference/benchmarks.md, committed separately (no CI on the site).