Skip to content

fix(run): build recipe images for local container runtimes - #934

Merged
antoinetoussaint-byte merged 25 commits into
mainfrom
issue-932-a-local-run-of-a-container-only-service
Oct 28, 2026
Merged

antoinetoussaint-byte merged 25 commits into
mainfrom
issue-932-a-local-run-of-a-container-only-service

Conversation

@antoinetoussaint-byte

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

Copy link
Copy Markdown
Contributor

Local container runs now build verified agent recipes and hand their canonical immutable image to Runtime.Init. Disposable CI commands use invocation-scoped outputs and reject unsupported selected build prerequisites before fresh or replay dispatch. Runnable generation acquires the selected module publication principal and refuses uncovered destinations or conflicting operation audiences.

This existing carrier also includes reviewed Core receipt-based process/container recovery and the foreign-method service selector integration. It selects published Core v0.19.10 with GOWORK=off and no replacement. These are fixes at their owning CLI orchestration, acquisition and command boundaries, reusing Core graphs, configuration/publication readers, recovery receipts and the existing build pipeline. No new compatibility roster, shared-tag cleanup, alternate generator or fabricated dependency version.

Docs updated: docs/development-loop.md, docs/agent-ci-port-isolation.md, docs/runnable.md, docs/commands.md, docs/cli-reference.md, docs/orchestration.md and docs/supported-matrix.md.

Validation

Exact head 48a517c:

  • Independent audience review and full cmd/generate race suite passed; removing the audience input reproduces the wrong-principal failure.
  • Replay and scheduler admission regressions pass, including zero actions on refusal and ordinary/unselected controls. Full affected ci and validation race suites pass; scoped orchestration/process-peer tests and lint pass.
  • Maintained real-engine TestDisposableImagesEngineQualification passed in 39.079s from a clean detached checkout: actual CLI-to-Flow-to-manager paths, sequential and overlapping concurrent builds, fresh/reused image subjects, and retained images after intentional post-load/SBOM errors. Both protected ordinary references were identical before, after every phase and at completion. All command outputs, requests and reports retained.
  • Exact built CLI SHA256 b6338f9d0c559308c36d94193cb9a58eadd044d731e67b03ce04aec065029669; VCS revision matches and modified=false. Synthetic inventory validates SBOM subject plumbing, not genuine package scanning.

Fresh independent reviews closed both image-admission findings, evidence retention, and audience acquisition. Prior recovery/lifecycle/converter evidence remains separately attributed to its tested revisions; no new whole-product readiness claim follows from it.

Remaining delivery checks

Required remote CI and current-main integration must pass. Full selected Product/Robin browser acceptance and Blue deployment are subsequent qualification. Core module-artifact integration is separately in progress and is not included in this head. No service state, shared images, or unrelated dirty owner source is adopted by this push.

@antoinetoussaint-byte antoinetoussaint-byte added the working Claimed by a lazybox agent; cleared when the session ends. label Oct 19, 2026
@antoinetoussaint-byte

antoinetoussaint-byte commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

A lazybox agent is working on this. claude (Opus 5) started at 2026-10-28 15:28 UTC, last renewed the claim at 2026-10-29 08:44 UTC, and the claim lapses at 2026-10-29 09:44 UTC unless it is renewed again. A claim is an assertion with an expiry, not proof that a process is alive.

claim detail
Lazybox-Claim-Device: effacd542b611010656e
Lazybox-Claim-Session: 4963bbd55d
Lazybox-Claim-Workspace: github-codefly-dev-cli-934
Lazybox-Claim-Agent: claude
Lazybox-Claim-Model: Opus 5
Lazybox-Claim-Started: 2026-10-28T15:28:46Z
Lazybox-Claim-Heartbeat: 2026-10-29T08:44:01Z
Lazybox-Claim-Expires: 2026-10-29T09:44:01Z

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor Author

Closing this draft for a re-cut. Nothing superseded it — pkg/orchestration/local_runtime_image.go does not exist on main and #932 is open — but by its own evidence it does not reach the goal, and the two reasons are both outside the CLI.

From the verification section here: the real target (a released converter booting from a locally built recipe image) is blocked by amd64-only recipes for LibreOffice, PDF and XLSX on an arm64 engine, and by a core defect — runners/dockerrun/docker_runner.go:2050 ImageExists compares only RepoTags against the full image name and ignores RepoDigests, so getImageIfNotPresent pulls docker.io/codefly-local/runtime@sha256:… and gets pull access denied for an image that is already loaded. Until that is fixed in core, a canonical repository@sha256: handoff cannot start a container-only service, which is the whole point of #932.

The branch is also 19 days stale and CONFLICTING across pkg/orchestration/{builder,runner}.go, which #977 (7a33ba12) and #994 (5dce584c) both rewrote.

Re-cut order: the core ImageExists digest fix first (file and line above; no owner work was found for it when this PR was written, and none has appeared since), then the handoff. Branch issue-932-a-local-run-of-a-container-only-service is kept and #932 stays open as the record.

gael-obin and others added 3 commits October 27, 2026 14:29
codefly-dev/core#856 merged as b71ee8cd, so the `service:` field this
branch consumes is available from an upstream module revision. Replace
the pre-merge pin, which left every compiling job failing on
`method.Service undefined (type module.ForeignMethod has no field or
method Service)`.

Verified with GOWORK=off: `go build ./...` and `go vet ./...` clean
across the module, and the three packages this branch changes pass
`go test -count=1` — pkg/gitops, pkg/orchestration and cmd/generate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… policy walk

golangci-lint v2.14.0 refused the selector work in three places, all of
them new in this branch:

  pkg/gitops/method_policies.go:276        rangeValCopy, 136 bytes (gocritic)
  pkg/orchestration/hop_configurations.go:284  rangeValCopy, 152 bytes (gocritic)
  pkg/gitops/method_policies.go:201        cyclomatic complexity 32 > 30 (gocyclo)

Extracting publishesProtobuf answers two of them at once: the manifest
walk stops copying a Service per iteration, and ServiceMethodPolicies
sheds the branches that pushed it over the complexity ceiling. The hop's
shadow check indexes its endpoints rather than copying a RouteEndpoint
per iteration.

No behaviour changes: same predicates, same refusal messages, same order.

Verified with GOWORK=off: `golangci-lint run` reports 0 issues across
pkg/gitops, pkg/orchestration and cmd/generate on the same linter
version CI pins, `go build ./...` is clean, and all three packages pass
`go test -count=1`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
antoinetoussaint-byte and others added 17 commits October 27, 2026 19:56
…lan-phase reuse decision

Main's build path moved since this branch was cut: buildFromPlan takes the
proxies Plan prefetched and the reuse decisions it took, buildRecipe decides
reuse through recipeAsBuilt + decideImageReuse before any build work, and
Runner.Init gathers its inputs before the port guard. The RuntimeImage
handoff is re-threaded through those seams rather than copied over them:

- recipeAsBuilt shapes a local runtime build (one engine-native platform, a
  placeholder name so the identity is not its own input); the agent's recipe
  is left as emitted.
- decideImageReuse names the image by its input identity through the
  decision's `image` (the seam an override build already uses) and refuses an
  entry recorded under another name; an input that cannot be bound is a
  refusal for a local image, not a rebuild.
- buildRecipe keeps the recipe as built, verifies the context held still and
  the image loaded before recording it; buildLocalRuntimeImage archives the
  as-built recipe and hands Init the canonical repository@sha256.
- Runner.Init asks for the image after the first-Init port guard, with main's
  Overrides and inputs intact.

go.sum is tidied. Core stays at main's pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The run's log names the canonical reference Init receives and the tag it was
loaded under, so a local run's handoff is readable without --output-env.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte marked this pull request as ready for review October 28, 2026 14:56
@antoinetoussaint-byte antoinetoussaint-byte added working Claimed by a lazybox agent; cleared when the session ends. and removed working Claimed by a lazybox agent; cleared when the session ends. labels Oct 28, 2026
@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit c569bce Oct 28, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

working Claimed by a lazybox agent; cleared when the session ends.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants