fix/up!: refuse an existing dev container that lacks the harness-pool runtime mount #114

Merged
pti merged 2 commits from fix/up-refuse-stale-container into main 2026-10-20 10:10:38 +02:00
Owner

Closes #111. On the devcontainer runtime a container created before devcontainer.json declared the read-only runtime/ mount is reused as-is by devcontainer up, since a container's mounts are fixed at creation. wraptool up used to print a notice and proceed, so a wraptool:0 container kept running its per-image binary and a wraptool:1 container that predates the declaration ran with no harness at all. The notice is now a refusal, devcontainerStaleRuntimeMountError, checked in the preflight before the token, the bind and the server, and re-checked in the bring-up before devcontainer up. The docker inspect probe sits behind a package var seam for tests, and no container or an unreadable docker still counts as not stale. Tests cover the refusal before the server, the bring-up re-check, the preflight ordering where a missing declaration wins, and the no-container happy path. Mutation checks done. Design section 12.2, CLAUDE.md, a troubleshooting entry and a Breaking CHANGELOG bullet are updated, TODO.md ticks the last Before 1.0 sub-item. Reviewer pass done, nits fixed in the second commit. Generated with Claude Code.

Closes #111. On the devcontainer runtime a container created before devcontainer.json declared the read-only runtime/ mount is reused as-is by devcontainer up, since a container's mounts are fixed at creation. wraptool up used to print a notice and proceed, so a wraptool:0 container kept running its per-image binary and a wraptool:1 container that predates the declaration ran with no harness at all. The notice is now a refusal, devcontainerStaleRuntimeMountError, checked in the preflight before the token, the bind and the server, and re-checked in the bring-up before devcontainer up. The docker inspect probe sits behind a package var seam for tests, and no container or an unreadable docker still counts as not stale. Tests cover the refusal before the server, the bring-up re-check, the preflight ordering where a missing declaration wins, and the no-container happy path. Mutation checks done. Design section 12.2, CLAUDE.md, a troubleshooting entry and a Breaking CHANGELOG bullet are updated, TODO.md ticks the last Before 1.0 sub-item. Reviewer pass done, nits fixed in the second commit. Generated with Claude Code.
A container's mounts are fixed at creation, so devcontainer up reuses a
container built before the runtime/ declaration unchanged and the harness
keeps running its per-image install. The notice-and-proceed path
contradicted the no-fallback rule of #102/#107; up now refuses in the
preflight (and again before devcontainer up), telling the developer to
run wraptool down --rm && wraptool up. No container or unreadable docker
is still not stale. Adds the devcontainerMountDestinations test seam.

Closes #111.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fix(up): review fixes for the stale-container refusal
All checks were successful
Lint / lint (pull_request) Successful in 1m5s
Lint / sonarqube (pull_request) Has been skipped
425784665c
The error text and the troubleshooting entry no longer claim a per-image
install for every stale container: a wraptool:0 container keeps one, a
wraptool:1 container that predates the mount declaration has no harness
binary at all. Pin the preflight ordering with a subtest (a missing
declaration wins over a stale container), document the flat mount-list
limit on devcontainerRuntimeMountStale, use "Dev Container" in the docs
heading per the terminology table, and move the CLAUDE.md clause into its
own sentence.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pti merged commit b08dc2a3df into main 2026-10-20 10:10:38 +02:00
pti deleted branch fix/up-refuse-stale-container 2026-10-20 10:10:38 +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!114
No description provided.