Repository navigation
feat(build): select base images by environment, service type and service - #1232
Merged
Merged
Conversation
antoinetoussaint-byte
marked this pull request as ready for review
October 29, 2026 15:45
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.
An environment can currently mirror a registry but cannot choose different base content. Add
build-imageswith digest-preserving registry relocations, image roles by service type (publisher/agent), and per-service (module/service) overrides. Explicit service roles win; explicit image destinations are never relocated again.codefly environment images <env> --file <policy.yaml>writes the policy through the existing coordinate importer, with dry-run and whole-policy replacement/clear. The normal build path asks the running agent for its image inputs, checks its optional contract, and passes the resolved references to the agent. It verifies FROM, external COPY, RUN mount and syntax frontend references before prefetch/build. Agents render recipes; the CLI does not rewrite them.Selected role/variant/digest values enter cache identity and image labels. Policy builds use input-qualified tags, preserving owner release tags and refusing adoption based only on unchanged application source.
Fix at the owner: reuses environment import, live Builder capabilities, recipe verification, build identity and qualified build tags. No static agent compatibility roster, automatic fleet install, deployment, package adaptation or CVE clearance. Depends on Core contract source in codefly-dev/core#874, pinned by normal pseudo-version. Related existing plan: obin-ai/infra-base#1485.
Docs updated:
docs/commands.md, generateddocs/cli-reference.md. MCP: no new parallel policy mutator; the maintained CLI command/import path owns edits.Validation: full local
go test ./...passes; focused policy race tests, vet, golangci-lint and generated reference check pass. Realenvironment images+build servicecommands with private candidate go-grpc bytes produced and executed scratch image 57c1ab4c (type override) and efbe63bc (service override); exact owned containers were removed with absence verified. Registry relocation also changed the default frontend/builder hosts while preserving digests and explicit runtime destinations. The override changed base/full input identity; an unchanged repeat reused the image. An incompatible variant refused before Docker execution. Both real infra catalog export paths pass. All hosted CLI checks pass.Final candidate agent SHA256 87c06c448047a93586d7b57766fd2c7d9aa9923a3c05dbde1d62fdb3d0d53554 was built from clean go-grpc 520c8bc; it is not the public agent bearing the same 0.1.70 label. Qualification uses a private CODEFLY_HOME, with no shared installation. No release/adoption or clean-CVE claim.