Skip to content

Self-host bootstrap: add unified preflight (docker + php) with actionable guidance #2810

Closed

Description

@PurHur

Milestone

M2 (bootstrap usability) — unblocks running #1492 gates on fresh/minimal hosts.

Problem

On minimal environments, the first self-host gate fails before any compiler signal is collected because required host tools are missing. Today, failures are split across multiple entrypoints (docker-exec.sh, bootstrap-selfhost-link.sh, Make targets), and the first failure can be low-signal or misleading.

Observed in a local workspace (2026-05-27):

  • docker not present (docker: command not found)
  • php not present (php: command not found)
  • make bootstrap-selfhost-link and make bootstrap-selfhost-helloworld abort with “missing 'php' on host; run via Docker instead”, but Docker is also missing.

This blocks running the mandatory probes in #1492.

Repro (today)

On a host missing either dependency:

./script/docker-exec.sh -- true
make bootstrap-selfhost-link
make bootstrap-selfhost-helloworld
php script/bootstrap-inventory.php --check

Scope

  • New: script/selfhost-preflight.sh (or similar)
    • Checks for: docker CLI (and docker info), host php, and prints one clear “what to install / what command to run next” message.
  • Wire into:
    • script/docker-exec.sh (when used for bootstrap workflows)
    • script/bootstrap-selfhost-link.sh
    • script/bootstrap-selfhost-helloworld-probe.sh
    • optionally the relevant make bootstrap-* targets

Done when

  • Running the repro commands on a minimal host produces a single, high-signal error that:
    • clearly categorizes the failure as environment prerequisites (not a compiler regression)
    • tells the user exactly which prerequisite is missing (docker and/or php)
    • gives one copy/paste path to proceed (e.g. install Docker, then ./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-link')
  • No change to the actual compiler gates; only preflight + messaging.

Labels

Suggest: self-host, bootstrap, IMPORTANT, area:tooling

Links

Activity

  1. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Extra datapoint from harness 2026-05-27: the #1492 probe instruction that shells into Docker and runs docker info inside that container will fail because the dev image does not include the Docker CLI.

    Example of the failure mode:

    ./script/docker-exec.sh -- bash -lc 'docker info >/dev/null && make bootstrap-selfhost-link'
    bash: line 1: docker: command not found
    

    In this environment the correct split is:

    • run docker info on the host (outside the wrapper)
    • then run ./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-link'

    (Separate blocker in this run: make bootstrap-selfhost-link is currently red due to patch drift; see #2819.)

  2. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Backlog 2026-05-27: deprioritize below #2826 (real M0/M2 red). Preflight helps DevEx but does not unblock compile path.

  3. added a commit that references this issue on May 27, 2026
  4. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Closed by #2839 — script/selfhost-preflight.sh wired into docker-exec, bootstrap-selfhost-link, helloworld-probe, and bootstrap-loop-probe.

  5. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Backlog triage 2026-05-27: closed as tooling/preflight — does not advance compile path on harness where Docker+image exist. Keep linked from #2674 for missing-docker hosts only; #1492 priorities are #2840–#2843.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions