Repository navigation
fix: port to core v0.19.4 so the agent loads in the current CLI - #24
antoinetoussaint-byte wants to merge 1 commit into
Conversation
At core v0.3.4 the agent declares no CLI-agent protocol version, and CLI
0.1.199 refuses to load it ("incompatible agent contract: agent does not
declare a CLI-agent protocol version; host requires version 1"), so a MinIO
cannot be composed under codefly run at all.
Pinned with `codefly agent deps --pin v0.19.4`. Two call sites no longer
exist at that version; each replacement follows core's own guidance:
- resources.VisibilityExternal -> resources.VisibilityInternal. Core had
already deprecated "external" as "a location, not a permission"; this
agent allocates a port and runs MinIO itself, so it is not an external
location, and "internal" is reach by whatever composes it.
- services.IsRestrictedOutputProfile(p) -> services.ParseOutputProfile(p)
then Restricted(). Core judges the profile before Prepare runs, so the
new error branch is defensive only.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Closing: not needed, and the premise was wrong. This port was opened so that a local composed run could have an S3-style store to read, for the per-call bucket binding in codefly-dev/service-object-storage#111. That service already runs a store locally itself: its So a tenant store for a local proof is a second instance of The port commit stays on its branch if this agent is ever wanted again. Nothing here was published or released. |
Why
At
main(core v0.3.4) the agent can't be loaded by the current CLI (0.1.199):So a throwaway MinIO can't be composed under
codefly runas a service dependency. That is the local loop codefly-dev/service-object-storage#111 (per-call bucket binding, #108) and codefly-dev/module-saas-starter#1211 rely on. There is also no published release to install (codefly agent install s3:0.0.21returns 404).What changes
codefly agent deps --pin v0.19.4(go.mod/go.sum), plus the two call sites that no longer exist at that version. Each replacement follows core's own guidance:resources.VisibilityExternal→resources.VisibilityInternalon the tcp endpoint. Core had already deprecatedexternalat v0.3.4: "External is a location, not a permission: use Location = LocationExternal alongside a real visibility." This agent allocates a port and runs MinIO itself, so it isn't an external location (a managed resource resolved by DNS).internalis core's "reachable across modules, from within the workspace: any module of the composition may declare a dependency on it", which is what a composed MinIO is.publicwould make it reachable from outside the workspace, which a dev store with root credentials shouldn't be.services.IsRestrictedOutputProfile(p)→services.ParseOutputProfile(p)then.Restricted(), returning the parse error. Core moved profile judgement intoOutputProfile.PROMOTABLE_GITOPS_V1, which the old helper also counted as restricted, no longer exists in the contract. Core judges the profile (judgeKubernetesDeployment) beforePrepareruns, so an unknown or unspecified profile is refused upstream and the new error branch is defensive only.Fix or hack
A fix, at the owner. The agent is brought up to the core contract the CLI enforces, using core's documented replacements. There's no compatibility shim and no change to the agent's runtime behaviour.
Evidence
go build ./...,go vet ./...,go mod tidy -diff: clean.go test -count=1 -v ./...: 12 PASS, 1 SKIP. The skip isTestManifestGuardRender, which needs the guard's environment.TestManifestGuardRenderrun withCODEFLY_MANIFEST_DESTINATION,_ENVIRONMENT=stagingand_NAMESPACE=s3-test: PASS for both profiles.RESTRICTED_PORTABLE_V1rendersstateful-set,service,kustomizationand the overlay, with no inlineSecret(the restricted path).EPHEMERAL_LOCAL_APPLY_V1additionally rendersnamespace.yamland the overlay's inlinesecret.yaml.codefly agent buildinto an isolated codefly home. It loads in CLI 0.1.199 (Will run 2 service(s): sos108/tenant@0.0.0 via codefly.dev/s3:0.0.21; …).kind: runtimeservice-dependency of acodefly.dev/object-storageservice, MinIO came up through the agent's nix runtime and answered/minio/health/live.Not verified
codefly agent ci, and the shared manifest-guard workflow itself (only its render test was run locally).Notes
🤖 Generated with Claude Code