T4 — Linux ZCODE_BIN .cjs direct-use, skip the AppImage mount
Parent: spec #26 (.scratch/pr139-review/spec.md)
Status: ready-for-agent
Blocked by: None — can start immediately.
Decision of record: ADR-0010 Decision 1 (amends ADR-0007).
What to build
The Linux invoke branch (in both the next and cli invoke files) always runs
mountZcodeAppImage(resolveZcodeBin()) and then uses the mounted
<mountPoint>/resources/glm/zcode.cjs. But resolveZcodeBin() can also return a
.cjs (a ZCODE_BIN override — the detect tests set ZCODE_BIN=<…>.cjs and
assert available=true). For a .cjs, the mount spawns <.cjs> --appimage-mount,
which fails (a JS file is not an executable AppImage). Detect promises ZCode is
available; every turn then fails at mount. Branch on the resolved path's shape so
the documented ZCODE_BIN=.cjs escape hatch actually works, and reconcile the
docs with ADR-0007 (Linux = AppImage-only; PATH/.deb/AUR is not a supported
install).
Scope decision (from grill): implement the .cjs direct-use branch ONLY. Do
NOT invent a new spawn path for a hypothetical non-AppImage, non-.cjs PATH
zcode binary — such a package is not known to exist and contradicts ADR-0007.
Acceptance criteria
Blocked by
- None — can start immediately.
T4 — Linux ZCODE_BIN
.cjsdirect-use, skip the AppImage mountParent: spec #26 (
.scratch/pr139-review/spec.md)Status: ready-for-agent
Blocked by: None — can start immediately.
Decision of record: ADR-0010 Decision 1 (amends ADR-0007).
What to build
The Linux invoke branch (in both the
nextandcliinvoke files) always runsmountZcodeAppImage(resolveZcodeBin())and then uses the mounted<mountPoint>/resources/glm/zcode.cjs. ButresolveZcodeBin()can also return a.cjs(aZCODE_BINoverride — the detect tests setZCODE_BIN=<…>.cjsandassert
available=true). For a.cjs, the mount spawns<.cjs> --appimage-mount,which fails (a JS file is not an executable AppImage). Detect promises ZCode is
available; every turn then fails at mount. Branch on the resolved path's shape so
the documented
ZCODE_BIN=.cjsescape hatch actually works, and reconcile thedocs with ADR-0007 (Linux = AppImage-only; PATH/
.deb/AUR is not a supportedinstall).
Scope decision (from grill): implement the
.cjsdirect-use branch ONLY. DoNOT invent a new spawn path for a hypothetical non-AppImage, non-
.cjsPATHzcodebinary — such a package is not known to exist and contradicts ADR-0007.Acceptance criteria
nextandcliinvoke files, the Linux branch uses theresolved path directly (no mount) when it ends in
.cjs; everything elsekeeps the current AppImage self-mount flow. The non-Linux branch is
unchanged. (The primary AppImage install is untouched.)
platform=linux+ZCODE_BIN=/opt/zcode/override.cjs→ exactly ONE spawn, argv[/opt/zcode/override.cjs, "app-server"], and NO spawn argv contains--appimage-mount.zcodeon PATH"(ZCode's only official Linux distribution is the AppImage — ADR-0007).
resolveZcodeBin()doc-comment that advertises "Linux.deb/AUR" issoftened to match ADR-0007 (the
resolveOnPath("zcode")probe may stay, butis not over-advertised as supported).
reflects this — verify it is consistent; do NOT commit CONTEXT.md (it is a
local untracked note). Same for ADR-0010.
Blocked by