Skip to content

T4 — Linux ZCODE_BIN .cjs direct-use, skip AppImage mount #30

Description

@ChHsiching

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

  • In both the next and cli invoke files, the Linux branch uses the
    resolved path directly (no mount) when it ends in .cjs; everything else
    keeps the current AppImage self-mount flow. The non-Linux branch is
    unchanged. (The primary AppImage install is untouched.)
  • Test (both apps' "Linux AppImage self-mount" suite): 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.
  • The invoke not-found error hint no longer advises "put zcode on PATH"
    (ZCode's only official Linux distribution is the AppImage — ADR-0007).
  • The resolveZcodeBin() doc-comment that advertises "Linux .deb/AUR" is
    softened to match ADR-0007 (the resolveOnPath("zcode") probe may stay, but
    is not over-advertised as supported).
  • The local glossary entry (CONTEXT.md "ZCode install discovery") already
    reflects this — verify it is consistent; do NOT commit CONTEXT.md (it is a
    local untracked note). Same for ADR-0010.

Blocked by

  • None — can start immediately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions