Skip to content

feat(build): select base images by environment, service type and service - #1232

Merged
antoinetoussaint-byte merged 3 commits into
mainfrom
feat/environment-image-bindings
Oct 29, 2026
Merged

antoinetoussaint-byte merged 3 commits into
mainfrom
feat/environment-image-bindings

Conversation

@antoinetoussaint-byte

@antoinetoussaint-byte antoinetoussaint-byte commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

An environment can currently mirror a registry but cannot choose different base content. Add build-images with 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, generated docs/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. Real environment images + build service commands 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.

@antoinetoussaint-byte
antoinetoussaint-byte marked this pull request as ready for review October 29, 2026 15:45
@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 703d608 Oct 29, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant