Repository navigation
fix(accounts): a delivery is composed in the authority core by the pass that applies it - #1260
Merged
Merged
Conversation
…ss that applies it
A composition delivery (ApplyComposition) recorded the carrier, ran a
reconcile pass, and composed the module in the authority core only after
that pass returned. The pass ends by converging the fixture's declared
installations, so each one found its target not yet composed: the core
refused it ("is not a composed solution; a module is installed by
composition"), the solution's core installation and its teams' role grants
never happened, and a member reaching the solution was issued nothing of its
role.
- The reconcile pass composes each binding it applies in the core right
after applying it, from the inbox's exact applied generation and its
signed authority document, before the module registry and the fixture
installations run. It covers every delivery path; ApplyComposition's own
composition after the pass becomes a replay that changes nothing.
- Fixture convergence waits on a target the core has not composed yet,
keeping the row for the next pass, instead of reporting a refusal; a
module's installation remains accounts' own record alone.
The harness delivers a fixture-declared solution to the running host: the
pass that applies it installs it in the core, active at the declaring
organization alone, with the declared team holding its role. It fails
without the change.
Co-Authored-By: Claude Opus 5.5 <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 we are doing
On a composed run against saas
3c530337, every reconcile pass loggedthe authority core: "<solution>" is not a composed solution; a module is installed by composition. A member of the declaring organization reached the solution, but the role they hold there never arrived in the core. Their upload was refused witha child widens what its owner holds through binding "documents" … the person's own grants never flow into it.Root cause
ApplyComposition(pkg/business/authority_delivery.go) records the carrier, runs a reconcile pass, and only after that pass returns composes the module in the authority core (applyCoreModule).AfterEachPass,work.go). That convergence ran before the module had been composed in the core, so each core install was refused (authority-corelifecycle.go:326,install: "not a composed solution").The fix
SolutionHostBindingReconciler.RunOnce(pkg/business/solution_host_bindings.go) composes each binding it applies in the core right after applying it. It reads the inbox's exact applied generation and its signed authority document (composeAppliedDelivery, refactored out ofreconcileAuthorityCore). This happens before the module registry is derived and before the fixture installations converge.ApplyComposition's own composition after the pass becomes a replay that changes nothing.fixtures/installations.go) treats a target the core has not composed yet as something to wait for: it keeps the row for the next pass instead of reporting a refusal. A module's installation stays accounts' own record alone.Tests
viewerrole. It fails without the change.composeAppliedDeliveryreplacesreconcileAuthorityCoreas the site).Not addressed here
pendinguntil the solution's install step is acknowledged by its consumer. Until thenGrantInstallationToTeamrefuses (is not an active installation in this organization,pkg/infra/postgres_installations.go). The core installation and its role grants, which the host interfaces decide with, no longer depend on it.Fix or hack
A fix, at the reconcile pass that applies deliveries. Reused:
applyCoreModule(idempotent on a generation the core holds), the inbox's stored documents, and the fixture's install path.🤖 Generated with Claude Code