Repository navigation
fix(code-fixer): content-addressed prepared image; no base pull when held - #809
Merged
Merged
Conversation
…, no pull when held The prepared image tag `b4-code-fixer:fixture-v1` was fixed in source and shared by every install on a host, so re-preparing one checkout re-pointed the image other installs and sessions were running. `sandbox:prepare` also always ran `docker pull node:24-slim`, which wedges on Docker Desktop's registry proxy. - The Dockerfile pins `node:24-slim` by digest. - `src/project/image.ts` derives the tag from the Dockerfile, `.dockerignore` and the sample's package.json and lockfile. `sandboxImage` is that tag. - `sandbox:prepare` reuses an existing tag, pulls the base only when it is missing, builds with `--pull=false`, and labels the image with its project. `B4_CODE_FIXER_REBUILD=1` rebuilds an existing tag. - `pnpm code-fixer:prepare` prepares one image per historical sample through the example's own script; the replay worker and cleanup read the tag of the installation they run in. - The managed-workspace Docker tests in @b4run/sandbox and @b4run/cli find the prepared cli-flags image by label (or `B4_TEST_MANAGED_IMAGE`). Co-Authored-By: Claude Opus 5.5 <[email protected]>
blove
enabled auto-merge (squash)
September 23, 2026 15:24
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
temporarily deployed
to
vercel-preview
September 23, 2026 15:25 — with
GitHub Actions
Inactive
…et stays exact The homepage narrative mirrors src/project/workspace.ts and links lines 14-31 at a pinned commit. Define the content-addressed tag in image.ts and re-export it on the line the old constant used, so those lines are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
blove
temporarily deployed
to
vercel-preview
September 23, 2026 16:04 — with
GitHub Actions
Inactive
This was referenced Sep 23, 2026
blove
added a commit
that referenced
this pull request
Sep 23, 2026
…814) Requalified against published 0.11.0: an archive install and the guide followed literally with [email protected] both passed check, build, typecheck, 27 unit tests, 3 Docker acceptance tests, and the built-server smoke. At the source commit the repository suite also passed test:code-fixer, the sandbox lane, both historical replays, qualify, and consumer --packed. - Source commit 89b95af (PR #809 merge on main): content-addressed prepared image tag and a digest-pinned base that is not pulled when held. - The 0.11.0 basic scaffold's demo route is src/app/hello/ (no (public)). - The guide no longer names a fixed image tag and describes the reuse and pull-when-missing behaviour of sandbox:prepare. - New runbook: 2026-09-23-code-fixer-0.11.0-qualification.md. Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes two gaps the 0.10.0 code-fixer requalification recorded
(
docs/superpowers/runbooks/2026-09-22-code-fixer-0.10.0-qualification.md):sandbox:preparealways randocker pull node:24-slim, which hung 6 to 10 minutes on Docker Desktop's registry proxy. The Dockerfile now pinsnode:24-slimby digest (sha256:0e0ff40c…, the base used for the 0.10.0 qualification). Prepare pulls the base only when it is missing, builds with--pull=false, and reuses an existing prepared tag without building. Because the base is pinned by digest, reusing a local copy cannot silently change content.B4_CODE_FIXER_REBUILD=1rebuilds an existing tag on request.b4-code-fixer:fixture-v1was fixed in source and shared by every install on a host, so re-preparing re-pointed it for other sessions.src/project/image.tsnow derivesb4-code-fixer:<32 hex>from the Dockerfile (which includes the base digest),.dockerignore, and the sample'spackage.jsonand lockfile. A unit test checks that the context allowlist admits exactly those hashed files and that changing any input changes the tag.Consumers updated:
pnpm code-fixer:preparenow builds one image per historical sample through the example's own prepare script. It used to write a combined image under the example's tag.@b4run/sandboxand@b4run/clifind the prepared cli-flags image by theorg.b4run.code-fixer.projectlabel, or byB4_TEST_MANAGED_IMAGE.sandbox-dockerjob already runspnpm code-fixer:preparebefore these lanes.The blueprint is not changed here. A follow-up PR re-pins it to this PR's merge commit and requalifies it against published 0.11.0.
Test plan
Run locally on macOS with Docker Desktop 27.4.0 and Node 24.20.0:
pnpm --filter @b4-example/code-fixer-server sandbox:prepare: builtb4-code-fixer:bf0155748a6fccb097d89a5deb4c75fdfrom the held base in about 2 s with no pull. A second run printedReusing prepared image …(0.7 s).pnpm code-fixer:prepare: cli-flags reused the same tag; nullable-inputs builtb4-code-fixer:d6917b75…testpassed 27 tests; exampletest:sandboxpassed 3 tests in 2 filespnpm test:code-fixerpassed 30 tests;pnpm test:code-fixer:sandboxpassed 7 tests in 4 filespnpm code-fixer:replay: both samplespassed: truewith all six criteria. Each receipt records its own image.pnpm code-fixer:qualify:cli-flagsandnullable-inputsqualifiedpnpm code-fixer:consumer --packed: passed (install, lint, check, build, typecheck, test, test:sandbox, eval --record, built HTTP run with approval and exact export)B4_TEST_DOCKER=1@b4run/sandboxmanaged-workspace (26 tests) and@b4run/climanaged-workspace-process (1 test)pnpm lint,pnpm typecheck,node scripts/check-docs.mjs🤖 Generated with Claude Code