refactor: remove the ReScript CLI; the Elixir escript is the sole CLI - #76
Merged
Merged
Conversation
OPSM carried two parallel CLIs: the Elixir escript (Opsm.CLI, 807 tests, `mix escript.build`) and a ReScript CLI (cli/Main.res.js, run via Deno). The escript already covered the same surface — trust-pipeline commands and the checky-monkey/oikos/palimpsest clients — so the ReScript copy was redundant. Per the estate "no ReScript" policy, remove it (owner- approved scope: the CLI only; opsm_mobile's ReScript is deferred to a follow-up, recorded in STATE.a2ml next-actions). Deleted: - cli/*.res (+ compiled .res.js) — the ReScript CLI - lib/ocaml/*.res (+ .cmj, rescript.lock) — a byte-identical dead duplicate of cli/ (diff -q confirms 5/5 shared modules identical) - rescript.json, deno.json, deno.lock — existed solely to build/run that CLI (deno.json exports cli/Main.res.js; every task was rescript/ cli). No other main-tree code uses Deno; opsm_mobile has its own. Rewired onto the escript: - Justfile + .machine_readable/contractiles/Justfile: dropped build-cli, build-cli-watch, test-cli, fmt-deno, deno-lint, opsm-cli, the deno clean step, and .res references in loc/todos/doctor. `build` -> just build-escript; `lint` -> `mix compile --warnings-as-errors` (credo is not a dep, and `just lint` is a mandatory Mustfile check that must run) - k9iser.toml: removed the deno.json [[source]] and the deno.imports [[constraint]] (the "Validate K9 contracts" CI job would otherwise fail on the missing file) - echidna-validation.yml: dropped the now-dead `cli/**` push path trigger - .bot_directives/sustainabot.a2ml: dropped deno.json/deno.lock watches - docs/TOOLCHAIN.adoc: Deno's remaining consumer is opsm_mobile, not the root CLI Verified (OTP 28.3.1 / Elixir 1.19.5): `mix escript.build` succeeds and `./opsm --help` runs; `mix compile --warnings-as-errors` clean; `just toolchain-check` clean; no dangling refs to the deleted files in any config/CI/manifest (opsm_mobile and vendored deps excluded). Note: the governance ReScript check stays red on opsm_mobile/src/*.res until the deferred follow-up removes/migrates those — owner-marked for the next version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
hyperpolymath
marked this pull request as ready for review
July 21, 2026 22:29
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.
Removes the redundant ReScript CLI, per the estate "no ReScript" policy. Scope is CLI-only (owner-approved) —
opsm_mobile's ReScript is deferred to a next-version follow-up.Why this is safe
OPSM carried two parallel CLIs: the Elixir escript (
Opsm.CLI, 807 tests,mix escript.build) and a ReScript CLI (cli/Main.res.js, run via Deno). The escript already covers the same surface — trust-pipeline commands and the checky-monkey/oikos/palimpsest clients — so the ReScript copy was redundant. Nothing importscli/orlib/ocaml/, and no CI compiles ReScript (the.res.jswere committed and run directly).lib/ocaml/*.reswas a byte-identical dead duplicate ofcli/*.res(diff -qconfirms all 5 shared modules identical).What changed (−5,109 lines)
Deleted:
cli/*.res(+ compiled.res.js),lib/ocaml/*(+.cmj,rescript.lock), andrescript.json/deno.json/deno.lock— the last three existed solely to build/run that CLI (deno.jsonexportedcli/Main.res.js; every task was rescript/cli). No other main-tree code uses Deno;opsm_mobilehas its own.Rewired onto the escript:
Justfile+contractiles/Justfile: droppedbuild-cli,build-cli-watch,test-cli,fmt-deno, deno-lint,opsm-cli, the denocleanstep, and.resreferences inloc/todos/doctor.build→build-escript;lint→mix compile --warnings-as-errors(credo isn't a dep, andjust lintis a mandatory Mustfile check that must actually run).k9iser.toml: removed thedeno.json[[source]]+deno.imports[[constraint]]— the "Validate K9 contracts" CI job would otherwise fail on the missing file.echidna-validation.yml: dropped the now-deadcli/**push path trigger..bot_directives/sustainabot.a2ml: droppeddeno.json/deno.lockwatches.docs/TOOLCHAIN.adoc: Deno's remaining consumer isopsm_mobile, not the root CLI.Verified (OTP 28.3.1 / Elixir 1.19.5, real toolchain here)
mix escript.buildsucceeds;./opsm --helpruns (the CLI works)mix compile --warnings-as-errorsclean;just toolchain-checkcleanopsm_mobile+ vendored deps excluded)Known / expected
The governance ReScript check stays red on
opsm_mobile/src/*.res(5 files) until the deferred follow-up removes/migrates those — owner-marked for the next version, recorded inSTATE.a2mlnext-actions. This PR is the CLI-scope slice.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
Generated by Claude Code