You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove the ReScript CLI; the Elixir escript is the sole CLI (#76)
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 imports `cli/` or `lib/ocaml/`, and
no CI compiles ReScript (the `.res.js` were committed and run directly).
`lib/ocaml/*.res` was a **byte-identical dead duplicate** of `cli/*.res`
(`diff -q` confirms all 5 shared modules identical).
## What changed (−5,109 lines)
**Deleted:** `cli/*.res` (+ compiled `.res.js`), `lib/ocaml/*` (+
`.cmj`, `rescript.lock`), and `rescript.json` / `deno.json` /
`deno.lock` — the last three existed solely to build/run that CLI
(`deno.json` exported `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` + `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` → `build-escript`; `lint` → `mix compile --warnings-as-errors`
(credo isn't a dep, and `just lint` is a mandatory Mustfile check that
must actually run).
- `k9iser.toml`: removed the `deno.json` `[[source]]` + `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, real toolchain here)
- `mix escript.build` succeeds; **`./opsm --help` runs** (the CLI works)
- `mix compile --warnings-as-errors` clean; `just toolchain-check` clean
- Full dangling-reference sweep across config/CI/manifests — no leftover
pointers to the deleted files (`opsm_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 in `STATE.a2ml`
next-actions. This PR is the CLI-scope slice.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C)_
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments