feat(generate,proxy): emit Caddy proxy labels for routed services (N5 part 1) - #29
Merged
Merged
Conversation
… part 1, spec 05)
Wire the N1 route table into generation: proxy.LabelsForService(m, project,
service) returns the caddy-docker-proxy labels (caddy=<svc>.<proj>.localhost,
caddy.reverse_proxy={{upstreams <port>}}, caddy.tls=internal when httpsLocal)
when the workspace declares a Caddy proxy and the service exposes a port;
buildProjectService merges them onto the service via maps.Copy. No-op (nil) when
the proxy is disabled — so the existing golden + determinism are unchanged and
`up` is unaffected unless the user opts in with network.proxy.engine: caddy.
This makes the proxy routes actually take effect in compose (adding/removing a
service reloads Caddy with no central-config edit). The remaining N5 piece is the
saga trust phase + doctor trust/dns probes.
Test: a proxy-enabled workspace's generated compose carries the caddy labels.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gustavobertoi
added a commit
that referenced
this pull request
Jun 29, 2026
#51) Add the spec-09 phase-7 trust step: when network.proxy.httpsLocal is set, the up saga installs the local CA (trust.Install / mkcert -install). It is FENCED — a missing mkcert or no sudo degrades to a warning detail and NEVER aborts `up` (local HTTPS is opt-in). A no-op when httpsLocal is off. Trust is injectable (UpDeps.Trust) for tests. With the proxy-label generate wiring (PR #29) and the doctor trust/dns probes, this completes the M5 saga integration (N5). Test: httpsLocal on + a failing mkcert → phase returns ok with status=warning (fenced); httpsLocal off → skipped. Re-run treats `trust` as AlwaysRun. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
N5 (part 1) — wire proxy routing into generate
proxy.LabelsForService(m, project, service)returns the caddy-docker-proxy labels (caddy=<svc>.<proj>.localhost,caddy.reverse_proxy={{upstreams <port>}},caddy.tls=internalwhenhttpsLocal) when the workspace declares a Caddy proxy and the service exposes a port.buildProjectServicemerges them onto the service (maps.Copy).No-op when the proxy is disabled → existing golden + determinism unchanged;
upunaffected unless the user opts in withnetwork.proxy.engine: caddy. This makes the N1 route table actually take effect (adding/removing a service reloads Caddy, no central-config edit).Remaining N5 piece: the saga trust phase + doctor trust/dns probes.
Test
A proxy-enabled workspace's generated compose carries the caddy labels.
Gate
make ci+make determinismgreen.🤖 Generated with Claude Code