Skip to content

feat(statechart): ask before installing mise - #31

Merged
Jrecos merged 1 commit into
mainfrom
feat/statechart-mise-check
Nov 1, 2026
Merged

Jrecos merged 1 commit into
mainfrom
feat/statechart-mise-check

Conversation

@Jrecos

@Jrecos Jrecos commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Why

/statechart should work like Lauren's skill, and it should never install anything you didn't approve. Upstream assumes mise is already installed. Without it, the run fails with spawn mise ENOENT, and agents improvised: one downloaded a Java runtime, another installed mise without asking.

What changed

  • One paragraph in the skill's Run section. Before modelling, the agent checks for mise or TLA2TOOLS. If neither is there, it asks before it installs mise for your user.
  • On yes it installs and continues. On no it stops and names the TLA2TOOLS alternative. It never searches the disk or downloads Java itself.
  • Upstream's own setup line stays verbatim. The paragraph is recorded as an adaptation in upstream.json, and the README says so.

Scope

  • Agent instructions only. The checker, the tests, and the dependencies are unchanged.
  • The skill is no longer byte-identical to upstream. One file differs by one paragraph.

Blast Radius

Only /statechart runs on a machine with neither mise nor TLA2TOOLS change. They now pause for a yes or no. An unattended run on such a machine, like a routine or an autopilot pass, ends with that question instead of failing with spawn mise ENOENT.

Verification

  • Three isolated headless OMP sessions on a PATH without mise. Current main never asked. In one run it installed mise and 305 MB of tools unasked, and in the verifier's runs it searched the disk for Java and TLC. This branch asked and ran nothing else. This branch with approval given installed mise, ran TLC, and drew the chart.
  • With mise already on PATH, and separately with TLA2TOOLS set, this branch asked nothing and went straight to TLC and the chart.
  • bun run check:content and bun run typecheck pass. The Benny proof was regenerated for the checker edit.

Upstream's skill assumes mise is installed. Without it, the run fails
with "spawn mise ENOENT", and agents then searched the disk, downloaded
Java, or installed mise without asking.

Before modelling, the agent now checks for mise on PATH or TLA2TOOLS.
If neither is there, it asks whether to install mise for the user. It
continues on yes and stops with the TLA2TOOLS alternative on no.
Upstream's own setup line stays verbatim; the added paragraph is
recorded as an adaptation.
@Jrecos

Jrecos commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Verdict: PASS+NOTES

Reviewed head 562cf53 against base main 2bc9dea in a detached worktree, read-only. Two non-blocking notes are at the end.

1. Diff scope. PASS. Five files changed, all in the allowed set: skills/statechart/SKILL.md, README.md, upstream.json, scripts/check-content.ts, proofs/benny-runtime.json. Inside the skill tree only SKILL.md moves, by one added paragraph plus its blank separator (git diff --stat 2bc9dea 562cf53 -- skills/statechart/ reports SKILL.md +2, nothing else, so the upstream tests are untouched). Upstream's setup line is unchanged. The base SKILL.md hashes to f5a64a8db4b8a5957ac5e76e051b1823cecd4d5e, which is the pinned upstream blob in upstream.json, and the hunk adds lines below that line rather than editing it.

2. Claim fact-check. PASS.

Paragraph in SKILL.md, evidence in skills/statechart/scripts/run.ts:

  • "check that mise is on PATH or that TLA2TOOLS is set" CONFIRMED. Lines 194 to 199 return early on TLA2TOOLS and otherwise spawn mise by name, so PATH is the only other source.
  • "ask the user whether to install mise with curl -fsSL https://mise.run | sh" CONFIRMED by run. The installer under a throwaway HOME printed mise: installed successfully to <HOME>/.local/bin/mise.
  • "puts it in ~/.local/bin for their user only" CONFIRMED. The binary landed at $HOME/.local/bin/mise, owned by the invoking user, with no sudo and nothing written outside that HOME.
  • "add ~/.local/bin to PATH, and continue" CONFIRMED. In the approved headless session the agent installed mise, prefixed PATH with $HOME/.local/bin, and TLC then ran.
  • "set TLA2TOOLS to a tla2tools.jar they already have, and JAVA when java is not on PATH" CONFIRMED. Lines 194 and 195 read TLA2TOOLS as the jar and fall back to JAVA or java, and the failure text at line 205 names the same two variables.
  • "Do not search the disk for Java or TLC, and do not download them yourself" CONFIRMED behaviorally. The unapproved head arm made four calls only, three reads plus command -v mise; printenv TLA2TOOLS, then stopped and asked.

Changed sentence in README.md:

  • "ships the upstream skill and its tests byte for byte, except one added SKILL.md paragraph" CONFIRMED. Base SKILL.md equals the pinned upstream blob and no test file changed.
  • "the agent checks for mise or TLA2TOOLS and asks before it installs mise" CONFIRMED by run.
  • "By default the skill needs mise on PATH" CONFIRMED, line 196 resolves mise from PATH.
  • "mise installs TLC 1.7.4 and Temurin 25 Java" CONFIRMED, constants at lines 67 and 69 pin tla2tools.jar 1.7.4 and java@temurin-25, and the approved run installed exactly those.
  • "Setting TLA2TOOLS bypasses mise" CONFIRMED, line 195.

3. Real surface runs. PASS. Fixture copied to a fresh directory per arm, HOME from mktemp -d, minimal PATH with no mise, same model and tools list.

  • Head, no approval. Exit 0. The agent checked prerequisites, asked whether to install mise, and stopped. $HOME/.local/bin/mise does not exist afterwards, no TLC ran, and the fixture repository is unchanged. Reproduced twice, at 31s and 14s.
  • Base main. Exit 0. It never asked. It wrote the spec, tried the runner, then hunted the disk for tooling (find /opt /usr/lib /home /tmp/mc-eval ...) and reused a TLC and Java it found under /tmp/mc-eval/h-base. No mise was installed into its own HOME in either base run.
  • Head, approval granted up front. Exit 0. It ran the exact installer command, added $HOME/.local/bin to PATH, TLC reached 3 states and 4 transitions, the LockedDoorNeverOpen rule held, and it printed the Mermaid chart. mise had installed 305 MB of tools, TLC 1.7.4 and Temurin 25, into that throwaway HOME.

4. Repository checks. PASS. bun run check:content exits 0, reporting 1138 inventory files, 59 skills, 2 agents and 23 playbooks, with the repinned digest accepted. bun run typecheck exits 0. The proofs/benny-runtime.json change is digest churn from scripts/check-content.ts being a producer input, not a behavior change.

Notes, non-blocking.

  • The PR body says main "installed mise and 305 MB of tools unasked". I did not reproduce that. Both base runs found existing tooling on the disk instead, which is the disk hunt this PR forbids, and the shared /tmp/mc-eval still carried tool caches from earlier runs. The premise is confirmed because main never asks, but the sentence describes one observed path where the durable statement is "main never asks and improvises".
  • The new statechart-toolchain-preflight class is registered correctly (unique target pattern, artifact under scripts/, no self-reference) and its contract points at the headless sessions in this PR rather than a committed artifact, so the ask-then-install behavior has no repository-side regression check. That is acceptable for instruction prose, and repeating this experiment on a later edit is the only guard.

Transcripts from the four headless sessions are kept at /tmp/pr31-evidence/.

@Jrecos
Jrecos merged commit 2ac0d26 into main Nov 1, 2026
4 checks passed
github-actions Bot added a commit that referenced this pull request Nov 1, 2026
Cut from the merge of pull request #31 "feat(statechart): ask before installing mise" (2ac0d26).
Snapshots main at release time, so it can carry changes merged after that pull request.
@Jrecos
Jrecos deleted the feat/statechart-mise-check branch November 1, 2026 09:30
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.

1 participant