[E00-S02-T07] amd64 and arm64 are build targets #388
No Reviewers
Labels
Clear labels
agent/analyst-drafted
agent/analyst-drafted
needs/human-decision
needs/human-decision
needs/security-review
needs/security-review
tier/t0
tier/t1
tier/t2
tier/t3
kind
bug
kind
bug
kind
epic
kind
epic
kind
initiative
EPPP programme initiative
kind
story
kind
story
kind
task
EPPP engineering card/task decomposed from a story
kind
toil
kind
toil
loop
1
loop
1
loop
2
loop
2
loop
3
loop
3
risk
agent-full
risk
agent-full
risk
human-gated
risk
human-gated
risk
human-only
risk
human-only
size
l
size
l
size
m
size
m
size
s
size
s
status
blocked
status
blocked
status
done
Workflow: Done
status
in-progress
status
in-progress
status
proposed
status
proposed
status
ready
status
ready
status
review
status
review
stream
checkout
stream
checkout
stream
onboarding
stream
onboarding
stream
platform
stream
platform
trivial — implementer only, auto-merge
standard — implementer + reviewer + tester
complex — security if triggered, human merge
critical — full chain + security, human merge
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Fabrika/PersonalBlog#388
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What changed
Implements the [E00-S02-T07] amd64 and arm64 are build targets (#174) on top of the [E00-S02-T01..T06] Compose baseline (#59): the application image now has
linux/amd64andlinux/arm64as build targets, sodocker compose buildproduces a multi-arch image.compose.yaml— theappservice's build config now declaresbuild.platforms: [linux/amd64, linux/arm64](Compose Build specplatforms, supported since Compose v2.10).docker compose buildtherefore produces a multi-platform image for both architectures.docker compose upstill builds and runs the host platform (compose clears the multi-platform list forup/run), so local runs and the T01..T06 real-stack probes are unaffected. Header doc updated: T07 is in scope; T08 (secrets) remains a later task. Rollback note: drop theplatformslist from theappbuild config.apps/server/Dockerfile— header doc-accuracy only: T07 is a Compose-level concern (build.platforms). The image needs no change — both stages already build on the official multi-archnode:24.19.0-bookworm-slimbase (which publishes linux/amd64 and linux/arm64 manifests) and the build has no native dependencies (pnpm install + tsc are architecture-independent), so the declared targets are actually buildable.tests/build-targets.test.mjs(new) — locks in both acceptance criteria: static assertions that theappservice'sbuild.platformslists bothlinux/amd64andlinux/arm64and that every Dockerfile stage uses the multi-arch base image; non-vacuous mutation probes (removing either target, replacing arm64 with a non-arm64 platform, dropping or emptying the whole list, or moving platforms onto the image-onlydbservice — all fail); and two Docker-gated probes for machines with Docker:docker compose build --printemits a bake config whose app target lists both platforms (a realdocker compose buildis multi-arch), anddocker buildx imagetools inspecton the base image reports bothlinux/amd64andlinux/arm64manifests (the targets are realizable).Explicitly out of scope per the brief, not touched: read-only root filesystem (E00-S02-T06 — unchanged behavior), secrets not embedded (E00-S02-T08).
Criterion → test table
amd64is a build targettests/build-targets.test.mjs— "compose.yaml declares amd64 and arm64 as build targets (app service build.platforms)" (static: theappservice'sbuild.platformsmust includelinux/amd64). Mutation probes removing the amd64 entry, dropping/emptying the whole platforms list, or moving platforms ontodball fail. Docker-gated bake-config probe:docker compose build --printmust listlinux/amd64in the app target's platforms; imagetools probe:docker buildx imagetools inspect node:24.19.0-bookworm-slimmust report alinux/amd64manifestarm64is a build targettests/build-targets.test.mjs— same static test:build.platformsmust includelinux/arm64. Mutation probes removing the arm64 entry or replacing it with a non-arm64 platform (linux/386) both fail. Docker-gated bake-config probe: the app target must listlinux/arm64; imagetools probe: the base image must report alinux/arm64manifestTest plan executed
node --test tests/build-targets.test.mjs→ 9/9 pass, 2 skipped (the Docker-gated probes skip cleanly where no Docker daemon exists; this sandbox has no Docker). Against a cleanmainworktree the same file gives 7 fail / 2 pass / 2 skip — the criteria genuinely fail without the committed state ✓node --test tests/compose-config.test.mjs tests/build-targets.test.mjs tests/readonly-rootfs.test.mjs tests/non-root-user.test.mjs→ 40/40 pass, 7 skipped — the existing T01..T06 suites still pass with the newbuild.platformskey (the repo's block-YAML parser reads it correctly) ✓node --test tests/*.test.mjs(full suite) → 86 pass / 12 fail / 7 skip, and the identical 12 failures exist on cleanmain(77 pass / 12 fail / 5 skip in a fresh worktree) — frozen-install / root-commands / strict-tsconfig / node-engine / typescript-pin suites needpnpm install+ Node 24, which this environment lacks (nonode_modules, Node 22.23.2 here). My branch adds +9 passing tests and +2 Docker-gated skips, zero new failures ✓docker compose build→ bake config lists both platforms; base image manifest list contains both architectures) and are designed to run on CI/dev machines with Docker + buildx.Risks / notes
build.platformsis the Compose Build spec's declaration of image build targets (docker compose build→ multi-arch image).docker compose updeliberately builds/runs only the host platform (compose clears the multi-platform list forup/run), so the T01..T06 real-stack probes (docker compose up -d) and local dev flows are unaffected — verified against the docker/composeapplyPlatformslogic.node:24.19.0-bookworm-slimbase and the build has no native dependencies, so amd64/arm64 targets need no Dockerfile changes. If a later story adds native modules (e.g. argon2), the multi-stage build may need cross-compile/emulation handling — out of scope here.skipwithout a daemon, so the suite stays green everywhere while giving real build-target validation where Docker exists (same pattern as T01..T06).Refs #174