Skip to content

feat(install): install Pi when it is missing, ask before replacing it - #3

Merged
lucy-wolfe merged 1 commit into
feature/next_versionfrom
feat/installer-manages-pi
Aug 28, 2026
Merged

feat(install): install Pi when it is missing, ask before replacing it#3
lucy-wolfe merged 1 commit into
feature/next_versionfrom
feat/installer-manages-pi

Conversation

@lucy-wolfe

Copy link
Copy Markdown
Owner

Rides into v0.5.7 via the integration branch. Reviewed as tribes-protocol#17 and tribes-protocol#18; retargeting those was impossible because GitHub requires a cross-fork PR's base to live in the base repository, and this integration branch lives on the fork.

@lucy-wolfe
lucy-wolfe force-pushed the feat/installer-manages-pi branch from 75f46e3 to f73571c Compare August 28, 2026 17:27
The installer printed a command and hoped. It handles Pi now, and the asymmetry
is the decision: an ABSENT Pi is installed with no prompt, because chief cannot
run a single person without it and there is nothing to weigh; an EXISTING Pi
that is merely below the floor belongs to the user, and replacing a working
tool without asking is a different act, so that one prompts with a default of
yes. Declining exits nonzero -- a zero status would tell a calling script the
box is ready when the runtime every person needs is too old.

The floor is read from the release manifest, which the release process already
stamps from the single Rust definition. A version bump needs no edit here, and
the single-definition guard is satisfied rather than worked around.

Two shell facts, both learned by running the branches rather than reading them,
and both of which end the installer silently if got wrong:

A prompt in a script that is piped into sh must read /dev/tty, because stdin is
the script text and reading it would consume the rest of the installer.

And /dev/tty must be tested by OPENING it, inside a SUBSHELL. The node exists
in a container with no controlling terminal, so `[ -r /dev/tty ]` is true and
the redirect then fails; worse, `{ : < /dev/tty; }` uses a POSIX special
built-in, and a redirection error on one is fatal to a non-interactive shell --
it does not evaluate to false, it ENDS THE RUN with status 2 and no message.
Measured both: first as raw shell errors printed to the user, then as a trace
that stopped dead at the call.

npm missing refuses cleanly rather than half-installing, and a Pi that npm
reports as installed is checked against the floor before being called ready.

Verified by running every branch: absent Pi; at floor; above floor; below floor
answering y, bare Enter, and n (exit 1 with a clear message); below floor with
no terminal; below floor with no npm; and a manifest carrying no floor at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lucy-wolfe
lucy-wolfe force-pushed the feat/installer-manages-pi branch from f73571c to 0a53ba2 Compare August 28, 2026 17:40
@lucy-wolfe
lucy-wolfe merged commit a0712c4 into feature/next_version Aug 28, 2026
34 checks passed
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