Repository navigation
fix(bootstrap): build migrate from maintained PostgreSQL-only source - #203
Merged
antoinetoussaint-byte merged 1 commit intoOct 28, 2026
Conversation
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.
Bootstrap recipes through agent v0.0.147 download checksum-pinned upstream migrate v4.19.1 executables. Those binaries retain vulnerable dependencies even when this repository updates its own Go module or rebuilds consumers. This change builds migrate from the agent's maintained module graph with the PostgreSQL/file drivers, using a digest-pinned Go 1.27.3 builder and cross-compiling for linux/amd64 and linux/arm64.
Classification: fix in service-postgres, the owner of the bootstrap recipe. It reuses the existing bootstrap lock, atomic context stager, recipe/provenance interface, and parent
go.mod/go.sum. No new migration implementation, engine, companion, or independent module graph. Core's Python/proto changes and PostgreSQL #193 are separate and untouched. Existing #173 patched parent dependencies, #190 removed curl, and #197 corrected runtime musl; none replaced the migrate archives. #170 is already merged; this is a successor PR in the same existing branch/workspace.The source stage verifies the embedded module-file hashes before compiling with
-mod=readonly,GOTOOLCHAIN=local, and CGO disabled. Provenance includes the exact builder digest, source version, driver set, and both module-file hashes; the normal recipe/context digest includes the staged inputs. The final image receives only the executable and cleaned bootstrap artifacts, excluding the compiler and unused parent module manifests. The existing TARGETARCH fallback is preserved. Migration SQL, advisory locks, ledgers, budgets, and dirty-state behavior are unchanged.The source-only resolver updates migrate's portion of
bootstrap-image.jsonwithout Docker; the existing full resolver calls it when refreshing all bootstrap inputs. No lock digest is hand-authored. The new builder isgolang:1.27.3-alpine3.24@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb, resolved from registry bytes and verified for both architectures.Evidence and tests:
2ac648fbd1b127b69ab5a7b33cf96212178f71e22379fc50573630c6f4c7ce18. Actual build metadata records Go 1.25.4, x/crypto 0.45.0, x/net 0.47.0, pgx/v5 5.5.4, grpc 1.74.2, go-jose/v4 4.0.5, and OpenTelemetry 1.37.0/SDK 1.36.0. Its binarygovulncheckreports 92 vulnerabilities from 12 modules and the standard library.govulncheck -mode=binaryreports No vulnerabilities found for each candidate.go build ./...,go vet ./...,go mod tidy -diff, focused bootstrap/builder/release/dev/context/conformance tests, resolver re-resolution,shellcheck, andgit diff --check.Docs updated:
docs/bootstrap-migrate.md,AGENTS.md, and.claude/skills/bootstrap-image-lock/SKILL.mddescribe source maintenance, exact provenance, dependency evidence, and image verification.Not verified locally: no Docker/engine commands were run; multi-architecture container builds, bootstrap/database parity, the full container-dependent suite, full Alpine package refresh, and the 11 actual migration-image scans require an allocated interval. Binary vulnerability clearance is not image clearance. Runtime/base/package pins are unchanged. Consumers must adopt the corrected agent and rebuild their migration images; old agent releases still emit the vulnerable archive recipe. Hosted CI and independent review are required before merge; Root coordinates merge and Blue owns actual consumer image build/scan evidence.