fix/up: take the devcontainer platform key from the Docker daemon's architecture #106

Merged
pti merged 1 commit from fix/up-daemon-arch into main 2026-10-19 23:44:10 +02:00
Owner

Closes #103. The devcontainer runtime derived its harness pool platform key from the host GOARCH, a stand-in the design section 5.1 TODO flagged as wrong for a remote DOCKER_HOST whose daemon architecture differs from the client. wraptool up now asks the daemon with docker version and the Server.Arch format under a five second timeout, maps amd64, x86_64, arm64 and aarch64 onto the glibc platform keys through a new pool.PlatformKeyForArch that HostPlatformKey also uses, and falls back to the host key with a notice naming the cause when the daemon cannot be asked or reports an unsupported architecture. A daemon architecture that differs from the host prints a one line notice naming the chosen platform, same architecture prints nothing. The selection logic is a pure function with a table test, the probe sits behind a stub seam like hasDocker, and a mutation forcing the probed arch to amd64 fails two tests. Docker Sandboxes and the guix runtime are unchanged, both always share the local architecture, a comment in sbxcontainer.go says so. The issue's note about init devcontainer printing a platform specific mount path did not hold, that snippet uses the platform agnostic runtime dir, so nothing changed there. Both TODO comments in up.go are gone, docs/devcontainers.qmd gains a paragraph, CHANGELOG Fixed bullet. 🤖 Generated with Claude Code

Closes #103. The devcontainer runtime derived its harness pool platform key from the host GOARCH, a stand-in the design section 5.1 TODO flagged as wrong for a remote DOCKER_HOST whose daemon architecture differs from the client. wraptool up now asks the daemon with docker version and the Server.Arch format under a five second timeout, maps amd64, x86_64, arm64 and aarch64 onto the glibc platform keys through a new pool.PlatformKeyForArch that HostPlatformKey also uses, and falls back to the host key with a notice naming the cause when the daemon cannot be asked or reports an unsupported architecture. A daemon architecture that differs from the host prints a one line notice naming the chosen platform, same architecture prints nothing. The selection logic is a pure function with a table test, the probe sits behind a stub seam like hasDocker, and a mutation forcing the probed arch to amd64 fails two tests. Docker Sandboxes and the guix runtime are unchanged, both always share the local architecture, a comment in sbxcontainer.go says so. The issue's note about init devcontainer printing a platform specific mount path did not hold, that snippet uses the platform agnostic runtime dir, so nothing changed there. Both TODO comments in up.go are gone, docs/devcontainers.qmd gains a paragraph, CHANGELOG Fixed bullet. 🤖 Generated with Claude Code
fix(up): take the devcontainer platform key from the Docker daemon's architecture
All checks were successful
Lint / lint (pull_request) Successful in 54s
Lint / sonarqube (pull_request) Has been skipped
d701ea31ad
bringUpContainer derived the devcontainer target platform from this host's
GOARCH, so a remote DOCKER_HOST whose daemon has a different architecture made
`up` look for the wrong active pointer and verify the wrong runtime tree.
Design section 5.1 says the daemon's architecture decides.

Add pool.PlatformKeyForArch (amd64/x86_64, arm64/aarch64; case-sensitive,
everything else an error) and a docker version probe with a 5 second timeout.
The pure devcontainerPlatformKey falls back to the host key with a notice when
the daemon cannot be asked or reports an unsupported architecture, and prints
a notice when the daemon key differs from the host's. The sbx and guix
runtimes keep the host key: Docker Sandboxes always use the local daemon.

Fixes #103.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pti merged commit 77ae54ae64 into main 2026-10-19 23:44:10 +02:00
pti deleted branch fix/up-daemon-arch 2026-10-19 23:44:11 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/wraptool!106
No description provided.