Skip to content

fixture-composition is multi-provider by design: the composition supplies the merge - #1200

Merged
antoinetoussaint-byte merged 3 commits into
mainfrom
fixture/multi-provider-group
Oct 27, 2026
Merged

antoinetoussaint-byte merged 3 commits into
mainfrom
fixture/multi-provider-group

Conversation

@antoinetoussaint-byte

@antoinetoussaint-byte antoinetoussaint-byte commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Compositions with several modules providing fixture-composition now use Authority's fragment merger through the CLI's shared delivery reader. An explicit workspace document still overrides fragments. Ordinary configuration groups keep Core's existing ambiguity rules.

This fixes provider selection at the CLI composition boundary: local and pinned modules contribute together, conflicting duplicate declarations are refused even when identical, and no fragments produce a valid empty document. It reuses Core's profile loading and Authority's merge/schema implementation; it adds no second fixture format or merger. Direct consumers of Core's ordinary configuration lookup do not gain this CLI merge behavior.

Updated docs/orchestration.md describes precedence, scope and the direct-Core limitation. The change is an owner fix, not a workaround. A timing-sensitive delivery deadline test now captures a real gRPC refusal before exercising the scheduler with Go's virtual clock, retaining its readiness and last-refusal assertions.

Validation: fixturefragments, orchestration, cmd, cmd/generate and gitops packages passed; full cmd/run passed after the deterministic deadline correction. Repository-pinned golangci-lint v2.14.0 reports zero issues. Independent architecture/code reviews reproduced the provider bugs before the fix, accepted the regressions, and ran the three delivery refusal tests 30 times. GitHub checks must pass before merge. This PR does not qualify the separate container-attribution fix in #1201 or a running product deployment.

antoinetoussaint-byte and others added 3 commits October 27, 2026 14:57
… and the composition resolves it

Since #1197 every composed module ships a fixture-composition fragment and the
run merges them. Core's single-provider rule then refuses the composition: two
composed modules defining one group differently is ambiguity with no principled
winner — right for every group whose value one module owns, wrong for this one,
where each module is EXPECTED to carry its own part and the parts combine. The
moment a composition composes a second fragment-shipping module,
`codefly doctor workspace` reported

  required workspace configuration "fixture-composition" is ambiguous
  (required by authority/local): provided by composed modules "documents" and
  "authority"; declare it in the solution workspace to resolve the ambiguity

and refused a composition a run handles happily — platform-core#117, moving the
documents pin to v0.2.0, which is the hosted render's last wall. The suggested
remedy is also a refusal now: `codefly generate fixture-composition` will not
overwrite a hand-written document, and the local authority reads the merge, not
one module's part.

The group now has a provider: the shared WorkspaceConfigurationReader supplies
the merge of every composed module's fragment, exactly as it already supplies
hop-routes. Nothing is exempted from the single-provider rule — a group with a
provider is not ambiguous — and because that reader is the one loader a run, CI,
a deployment and the readiness check share, none of them can disagree about this
group. A workspace that answers for itself keeps its answer, so a developer's
generated file and the file a run writes before it loads any configuration both
win as before, through core's own precedence.

`AmbiguousWorkspaceConfigurations` drops every name the reader supplies, and the
doctor does the same for the groups this invocation supplies. Both are keyed on
what was supplied, not on a name, so a second generated group needs no second
exemption.

Tests: two modules shipping fixture-composition is ready and merges, through
the reader and through the readiness check; the workspace's own document still
wins; and an ordinary group two modules disagree on is still ambiguous and still
refused with the same diagnostic.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit bcf5d5b Oct 27, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant