Skip to content

Commit 5a7d054

Browse files
docs(render): carry core#694's invariant beside the characterization test
core#693 is fixed in codefly-dev/core#694 (open, green, cut from v0.7.1 and not yet released), so the handshake it owes this PR is recorded where whoever pins the release will need it rather than only in a comment thread. TestAPartialRootOverrideReplacesAComposedModuleGroupWhole now names core#694 and states the exact invariant to flip to over its own fixture: CONFIG_DIR keeps the module's value, CONFIG_MODE's undischarged ${profile} survives and makes Load FAIL by name, an emptied required key and an undeclared key are refused by name (ErrEmptyProfileValue / ErrUndeclaredProfileKey), and the group stays composed — which removes consequence (3), the truncated group widening its delivery to every service of the composition. docs/orchestration.md stops presenting the interim operator rule as open-ended. It applies today, because the CLI pins v0.7.1; once core#694's release is pinned it NARROWS rather than disappears, because core#694 deliberately leaves a group inherited from a composed WORKSPACE (the product model) replacing whole — that precedence has to be decided per key for the product model first. An operator's --set is unchanged either way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 2013b3e commit 5a7d054

2 files changed

Lines changed: 42 additions & 5 deletions

File tree

‎docs/orchestration.md‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,24 @@ and this package then injects the truncated group into **every** service of the
394394
composition rather than only the ones that declared it. A partial override
395395
narrows a group's contents and widens its delivery at the same time.
396396

397-
This is filed as [codefly-dev/core#693](https://github.com/codefly-dev/core/issues/693),
398-
with the reproduction and the per-key semantics it should get. Until it lands,
399-
declare **every** key of a composed module's group when overriding it, or
400-
override none of them.
397+
This is filed as [codefly-dev/core#693](https://github.com/codefly-dev/core/issues/693)
398+
and **fixed in [core#694](https://github.com/codefly-dev/core/pull/694)**, which
399+
is open and green but not yet released, so the CLI still pins `v0.7.1` and the
400+
behaviour above is what a composition meets today.
401+
402+
Until that release is pinned here: declare **every** key of a composed module's
403+
group when overriding it, or override none of them.
404+
405+
When it is pinned, three of the four statements above stop being true for a
406+
**module's** group — an override becomes exactly a partial override, an
407+
undischarged `${profile}` is reported rather than discarded, and the group stays
408+
composed, so its delivery stays scoped to the services that declared it instead
409+
of widening to every service of the composition. The interim rule then narrows
410+
rather than disappearing: core#694 deliberately leaves a group inherited from a
411+
composed **workspace** (the product model) replacing whole, because the
412+
precedence there has to be decided per key for the product model first. An
413+
operator's `--set` is unchanged either way — still attributed to the run, still
414+
composition-root even on a composed name.
401415
`TestAPartialRootOverrideReplacesAComposedModuleGroupWhole`
402416
(`pkg/orchestration`) pins the current behaviour and names the core function, so
403417
the CLI's expectations move when core's do. The semantics it should get already

‎pkg/orchestration/composed_group_override_test.go‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,30 @@ func groupKeys(infos []*basev0.ConfigurationInformation, group string) []string
6363
// the ones that declared it. A partial override thus narrows the group's
6464
// contents and widens its delivery at once.
6565
//
66-
// Filed as codefly-dev/core#693, with this reproduction and the three losses.
66+
// Filed as codefly-dev/core#693, with this reproduction and the three losses,
67+
// and FIXED in codefly-dev/core#694 (open and green, branch
68+
// issue-693-fix-configurations-a-workspace-override-of-a-composed, cut from
69+
// v0.7.1 — so the release carrying it is the next tag after v0.7.1).
70+
//
71+
// This test will fail the moment that release is pinned here, which is what it
72+
// was written to do. The invariant to flip it to, over this same fixture:
73+
//
74+
// - CONFIG_DIR keeps the module's /etc/app — a key the root does not supply
75+
// is no longer discarded;
76+
// - CONFIG_MODE's undischarged ${profile} survives the override and is
77+
// reported in Unsupplied, so Load FAILS naming app-config/CONFIG_MODE where
78+
// it returns nil below;
79+
// - a root value that empties a ${profile} key is refused by name
80+
// (configurations.ErrEmptyProfileValue), and a key the module's group does
81+
// not declare is refused by name (configurations.ErrUndeclaredProfileKey);
82+
// - the group STAYS composed: ComposedBy keeps the name and it is absent from
83+
// CompositionRootWorkspaceConfigurationNames, so consequence (3) below
84+
// disappears — a partial override no longer widens the truncated group's
85+
// delivery to every service of the composition.
86+
//
87+
// core#694 leaves a group inherited from a composed WORKSPACE replacing whole,
88+
// so the operator rule in docs/orchestration.md narrows to that case rather
89+
// than going away.
6790
//
6891
// What it must become, and where: core should overlay the consuming workspace's
6992
// values onto the module's group per key, the way `profileOverlay.add` already

0 commit comments

Comments
 (0)