You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Builder now rides on coold's Agent.Stream rather than holding a second
persistent gRPC connection to broker — one stream per host, not two.
Coold advertises the "builder" capability in its Hello frame (gated by
COOLD_BUILDER_ENABLED) and the broker capability-routes build:cmd
envelopes from Redis to a host that carries it.
Each build runs as a short-lived builder subprocess wrapped in a
`systemd-run --scope` transient unit so it gets cgroup + FS isolation
(PrivateTmp, ProtectSystem=strict, ReadWritePaths allowlist, MemoryMax,
CPUQuota, RuntimeMaxSec) without requiring an outer container. The
subprocess emits NDJSON frames on stdout; coold parses them and relays
a final BuildResponse over the existing stream.
Cancellation is wired end-to-end: a `{"type":"cancel"}` payload on
build:cmd routes via the broker's pending map to the owning host,
where coold runs `systemctl kill --signal=SIGTERM <scope>`; the cgroup
kill takes the builder + buildah + git down in one sweep.
Workspace layout:
- New builder-core crate — git + buildah pipeline as a reusable lib.
- builder/ stays as a binary but is now a one-shot CLI (no gRPC, no
JWT, no broker URL); coold invokes it per request.
- broker/:6444 listener and builder.proto deleted; agent.proto gains
BuildRequest/CancelBuild/BuildResponseBody plus capabilities +
builder_capacity in Hello.
- JWT audience collapsed to a single "coold"; per-capability auth
moves into a `caps` claim the broker cross-checks against Hello.
Breaking: a new coold/broker pair cannot interoperate with the old
builder binary or split-port broker. Deploy in lockstep.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments