Repository navigation
fix(authority): run the local host on the authority core - #25
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t runs with every go test
…142); core at b57347f0
…r's foreign answer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ontract grants roles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…equests Identify module installations from their durable record, preserve lifecycle store errors, and give roleless members the foreign answer across role calls. Exercise anonymous requests over the generated client and pin the playground directory to a real commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on-core Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete the public unsigned manifest path and require both the signed carrier and delivery workload credential before host installation work. Reuse owner-aware scope coverage for all artifact approval operations, bind identities to the installation namespace, and refuse unresolvable resource-id restrictions before storage. Preserve the review probes as generated Connect/gRPC regressions, including independent approve/read/revoke refusal, valid delivery replay, response equivalence, and revocation races. Both blockers reproduced before the fix; all ten Go modules pass vet/race, both transport conformance suites and core's kit pass, pytest passes 231 tests, and npm test passes 89. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accept the existing immutable org-directory pin as a playground-only dependency repair: the prior 0.0.0 reference did not resolve during the reported load smoke check. Record its independent rationale and playground-maintainer ownership without selecting another external revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve the core-backed authority and regenerate the combined LocalService contract; retain the transport gate and verify generated provenance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve generated loopback credential forwarding alongside the core-backed local authority. Record the conflict resolutions and complete local validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AntoineToussaint
pushed a commit
that referenced
this pull request
Oct 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AntoineToussaint
pushed a commit
that referenced
this pull request
Oct 26, 2026
Run 17 encoding variants through Go stamped and bare authentication and the public hop verifier, sharing the existing Python and TypeScript fixture. Pin core PR #850 and synchronize its resource-owner vectors. Retain the saved merge of main after PR #25. 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 trying to do
This is the last step of the solution-principal work (spec #11, #14) for the local authority. The local authority becomes a thin host over the generic authority core (#18, #19, #20, #21; main through #24 merged), and it serves the solution-principal contract:
The old model is deleted:
GrantToTeam,team_ids,agent_principal_id, the<installation>/agentprincipal, and team-entitled scopes with no owner. The conformance target is now the contract, and it runs with everygo test.The change
The local authority over the core (
modules/authority/services/local/code)pkg/business/stateis the host half. It holds:LeaveTeamandLeaveOrganization, which call the core'sPersonChanged);Modules, installations, role grants, delegations, revisions and seals are the core's. The scope algebra, issuance, seal sources, installation access checks and solution-role logic that used to live here are deleted (-2,352 Go lines).
pkg/business/issueris the wire. A session bearer resolves to the core'sPersonand a credential to itsWorkload;Issue,Check,ListResources,AuthorizeTransferand delegations call the core. A core refusal keeps its code and is classified asErrRefusedorErrUnknownfor callers that test the family.plugins/installationservesInstall,GrantRole,RevokeRole,ListRoleGrantsandListthrough the core, as the signed-in caller.plugins/authorityaddsAuthorizeTransfer, andListResourcescarriesresource_owner_id.Composition ingest (r132 m3): a delivery that names
resource_owner_idin a scope ceiling, a binding, a role, a method requirement or what it serves is refused by name.owner_aware(AuthorityManifestV1field 7) is read from the signed document.fixture-composition/v1keeps its shape and its meaning in the new model, so composing workspaces do not change:roleis the installation's own role (the agent's);ownerinstalled it and is granted the installer role;teamsis grantedrole.Contract (
modules/authority/services/local/proto,interfaces/)codefly.dev/installation0.2.0:GrantRole,RevokeRoleandListRoleGrantsare added;GrantToTeamis deleted;Installationgainsprincipal_idandroles, and reservesteam_idsandagent_principal_id.codefly.dev/authority0.3.0:AuthorizeTransferis added, andResourceGrant.resource_owner_id(field 5).codefly.dev/composition0.2.0:AuthorityManifestV1.owner_aware(field 7).WorkScopeV1.resource_owner_idtakes core's rule exactly (max_bytes = 512,^[!-)+-~]*$). Core is pinned atb57347f0in all eight Go modules.installation@>=0.1.0 <0.3.0(it callsListonly); edge, hop and console takeauthority@>=0.2.0 <0.4.0.codefly generate protoandcodefly generate client(Go, Python, TypeScript).Request and host installation authority (r152)
InstallandUninstalltake aPersonvalue and check current stored authority. The nil-caller convention is deleted. Trusted fixture setup/teardown uses distinctInstallAsHostandUninstallAsHostmethods in the core and local state.ModuleNamedlookup. Store errors encountered by lifecycle operations pass through unchanged.GrantRole,RevokeRole, andListRoleGrantsreturn the same foreign-installation answer for present and absent installations when a member is neither administrator nor installer. The stale-session fallback is removed from role decisions.Core behaviour this PR settles, as the merged spec requires
FailedPreconditionnaming its state. The spec's lifecycle case now expects that, matching the target's "not installed".PermissionDenied.Checknames a revocation ("the capability was revoked: …") wherever core reports one.InvalidArgument(r124 f12). The target case now expects that.Conformance (
libraries/conformance/go)solutionPrincipal()), theGrantToTeamexposure, theteam_idschecks,agent_principal_id, andFixture.UnexposedTeam.Runasserts the solution-principal model. The target'suninstallhelper now names the uninstalled installation while it is disabled; before, it reinstalled it first, so the target never ran green.RunSolutionPrincipalTargetwith everygo test, and the membership hooks are real (LeaveTeam,LeaveOrganization).workcontext/testdata/resource_owner_vectors.jsonis vendored, byte-checked against the pinned core, and run by the Go, Python and TypeScript readers.Docs
README.md(installation interface and administration),libraries/conformance/go/README.md, andmodules/authority/services/local/README.md(a host over the core, and the composition document's meaning).Size
1,118 hand-written non-test Go lines added, 2,396 removed versus current main. The r152 follow-up adds about 100 non-test Go lines, reusing the core lifecycle and refusal logic; it introduces no new store or resolver.
Reuse and classification
Fleet consumers
I searched every local mirror (the latest 25 refs of each repo). No fleet code calls
GrantToTeamor readsteam_idsoragent_principal_idfromcodefly.dev/installation. These need to move:owner_awareonly once it compares owners:authority.go:307identity.go:337/528operations.go:188executionrecorderowner_awarein their authority document. Solutions must declare it to receive their own roles' scopes.cmd/generate/contract_surface_test.go:159counts 3 methods onhost.installation.v1.InstallationService. It needs 5 once it reads this contract.fixture-compositioninstallations, so their documents keep working:feat/runnable-tool-exposureandauthority/interface(df3ca1e);authority/wiki-on-the-authority;authority/behind-the-hop;authority/robin-wiki-only.saas.accounts.v1installation service and is untouched. It adopts the core separately.Tests
go vetandgo test -race -count=1 ./...withGOWORK=offpass in all 10 Go modules.registry_testrunsRunandRunSolutionPrincipalTargetagainst the local authority over gRPC, and both are green.Smoke check
0.0.0pin with commitc6b5cb39350a2d9fd6b17c56e34864811409fae8from its default branch.codefly run service authority/local --load-only --headless --temporary-portsresolves the commit and loads the composed service successfully. This is a load check, not a live journey; Codefly still reports the existingdocument-formatscomposition disagreement.feat/runnable-tool-exposurechat pins the hop library at06d0d3b, from authority'sauthority/visionline. Itsinternal/authoritycallshop.Read, which is not on authority main, so it does not build against main's hop with or without this PR. With this branch's hop and client, robin chat's only build error is that onehop.Read(18 packages importinternal/authorityand fail to build). The other 7 packages pass.🤖 Generated with Claude Code