feat(control-plane): af install support for Go agent nodes#745
Merged
Conversation
PackageMetadata gains an explicit language field with go.mod detection fallback (additive to config v1; Python manifests unchanged). entrypoint.build compiles the node at install time via a resolved Go toolchain (pyinterp-style discovery with actionable missing/too-old errors); af run launches the built binary with identical port, healthcheck, secret, and env semantics. Out-of-tree replace directives are refused with vendoring guidance, with an AGENTFIELD_GO_REPLACE override for dev installs. Service-layer install/start paths route through the shared dispatcher so both code paths stay in lockstep. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
Contributor
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
5 tasks
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.
Summary
The package installer was hardwired to Python (venv + pip +
python -mentrypoints). This adds first-class Go node support:PackageMetadata.Language(go/python) withgo.moddetection fallback; additive to config v1 (golden fixture extended per the maintenance contract), Python manifests byte-for-byte unaffected.entrypoint.buildcompiles the node at install time (go build -o <start> <build>); Go toolchain discovery mirrorspyinterp.gowith actionable missing/too-old errors; vendored modules build with-mod=vendor.af runlaunches the built binary with identical port/healthcheck/secret/env semantics to Python nodes; the service-layer install/start paths route through a shared dispatcher so both code paths stay in lockstep.replacedirectives are refused pre-build with vendoring guidance (recommended), plus anAGENTFIELD_GO_REPLACEoverride for dev installs.docs/installing-agent-nodes.mdgains the Go manifest shape and build model.Test plan
GOFLAGS=-buildvcs=false go build ./...,go vetclean; no new golangci-lint findings in changed filesgo test ./internal/packages/ ./internal/core/services/green — new suite covers manifest parse + back-compat, go.mod detection, StartCommand forms (binary /go run/ default), build-step via stubbed toolchain, missing/too-old toolchain errors, replace-directive guard (refusal, in-tree, vendored, override), and ValidatePackage with go.mod-only nodesTestDevServiceRunDevport-discovery timeout confirmed identical on untouched HEAD (sandbox-environmental, unrelated)First consumer: the SWE-AF Go port (Agent-Field/SWE-AF#94), whose
agentfield-package.yamlfor the Go node builds./cmd/swe-planner.🤖 Generated with Claude Code