feat(orchestrate): X5 — profile slicing + shared pruning into the up saga (spec 12) - #55
Merged
Merged
Conversation
…e up saga (spec 12)
`up --profile` is now the spec-12 SERVICE-SLICE selector (repeatable &
comma-separated, `-p` shorthand), distinct from the config-driven env-overlay
(`profiles.default`, which still drives `${profile}` in generate).
BuildUp resolves the active set via `profile.Resolve`:
- projects with zero active services drop out of the up entirely;
- each project's compose-up is restricted to its active service names
(`compose up -d <svc...>`), keyed into the phase fingerprint so widening or
narrowing the slice re-runs rather than skips on a stale fingerprint;
- the shared phase + health gate see only `active.Shared` (the shared instances
the active services transitively `uses`), so `up --profile minimal` never
blocks on an unstarted service.
`down` stays whole-project (label-driven) per spec 12 §down. Removed the now-dead
`sharedNamesUsedBy`. Unit-tested with the mock runner: frontend slice ups only
`web` + gates postgres; no-config default ups everything (`all`); a no-match slice
drops the project and its shared.
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.
What
Wires selective-up (spec 12) into the
upsaga.up --profileis now the SERVICE-SLICE selector (repeatable & comma-separated,-pshorthand) — distinct from the config-driven env-overlay (profiles.default, which still drives${profile}in generate).How
BuildUpresolves the active set viaprofile.Resolve(model, --profile):compose up -d <svc...>), and the active slice is folded into the phase fingerprint so widening/narrowing--profilere-runs rather than skips on a stale fingerprint.active.Shared(the shared instances the active services transitivelyuses), soup --profile minimalnever blocks on a service it never started (spec 12 §health, spec 10).downstays whole-project (label-driven) per spec 12 §down — no change. Removed the now-deadsharedNamesUsedBy.Tests
Mock-runner unit tests in
internal/orchestrate:--profile frontendups onlyweband gatespostgres(webusesit).all→ upsweb+worker.make cigreen (fmt + vet + build + test-race).Spec acceptance (spec 12)
up --profile frontendstarts only the tagged services + only the shared they transitively use.defaultProfile→ all profile-less + active-profiled services.--profile a,b≡--profile a --profile b(union; resolver-tested ininternal/profile).downremoves the whole project stack by label, regardless of--profile.🤖 Generated with Claude Code