Skip to content

doctor: bound the docker probe, announce it, and give the start command - #34

Merged
MendixMau merged 2 commits into
masterfrom
claude/doctor-script-tool-install-qgjd5i
Sep 9, 2026
Merged

doctor: bound the docker probe, announce it, and give the start command#34
MendixMau merged 2 commits into
masterfrom
claude/doctor-script-tool-install-qgjd5i

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane (bin/, tests/)

What changed and why (one paragraph):

Onboarding feedback (2026-09-09): project setup was slow and "kept hanging, Docker didn't open". init-project.sh runs doctor.sh last, and doctor's self-verification section ran docker info unbounded. With Docker Desktop installed but not running, that call can sit silent for minutes on macOS and Git Bash, so the whole scaffold read as hung, and the only advice printed afterwards was "Start Docker Desktop". Now the probe is backgrounded and killed at MXTK_DOCKER_PROBE_SECS (default 8 s; portable to bash 3.2, which has no timeout), prints what it is waiting for before waiting, and can be skipped with --no-docker / MXTK_DOCTOR_SKIP_DOCKER=1. A daemon that is down or times out gets the one start command for this platform (open -a Docker / the Windows start line / systemctl start docker), the 30–90 s daemon start-up note, and the exact re-run line. --install on macOS with Docker Desktop present launches it (that flag is already the "do it for me" mode; never elsewhere, because Windows launch paths vary and Linux needs sudo).

Field evidence: the report above (a new builder's first init-project.sh, via Maurits Visser). Local proof: tests/wave2/test-doctor-docker-probe.sh puts three fake docker binaries on PATH (hangs 120 s / answers down / answers up) and asserts doctor finishes in seconds with the bound announced, the timeout reported as not running, the raise-the-bound and re-run lines present, a fast "down" not mislabelled as a timeout, and both skip switches skipping. 13/13.

  • No client data anywhere in the diff
  • Changed instrument: both platforms (no timeout dependency; $PLATFORM from doctor's own detection), layout-independent, bash-3.2 portable (check-portability.sh clean)
  • Golden input: the probe's input is the docker CLI's behaviour, modelled by three fakes covering hang / down / up — no parsed output involved
  • CHANGELOG.md line appended in this PR
  • check-scripts, render-routing --check, portability, leak guard, PR discipline all clean

Not changed, deliberately: doctor still runs in full (not --quick) at the end of init-project.sh, because the once-per-machine sections are the point of the first run. If the rest of the scaffold is also slow on that machine, doctor's spawn-speed section is the instrument that says why.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

…the start command

With Docker Desktop installed but stopped, 'docker info' can sit silent for
minutes; init-project.sh runs doctor last, so the whole scaffold read as hung.
The probe is now backgrounded and killed at MXTK_DOCKER_PROBE_SECS (8 s,
portable to bash 3.2 without 'timeout'), prints a line before waiting, and
--no-docker / MXTK_DOCTOR_SKIP_DOCKER=1 skip it. A daemon that is down gets the
platform's start command and the re-run line; --install on macOS launches
Docker Desktop. Fixture: tests/wave2/test-doctor-docker-probe.sh.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…t-tool-install-qgjd5i

# Conflicts:
#	CHANGELOG.md
@MendixMau
MendixMau merged commit 510df22 into master Sep 9, 2026
1 check 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.

2 participants