Repository navigation
authority: ship the module's package, the hop's Version declares its policy, the hop declares authority 0.3.3 - #33
Merged
Conversation
…he hop A run admits every module-identity workload but the host's own. Since #28 made authority/hop module-identity, a run on a host other than the local authority (a saas host) admits the authority module and needs its release, and every module behind the hop failed before start: "module authority declares no package manifest, so it names no release". modules/authority/module.package.codefly.yaml names the release (codefly/authority 0.1.0) and the services the interface exports (local, hop, edge). Each service's api-contracts, contracts/api and the catalog are written by `codefly generate contracts authority`; contracts.codefly.yaml maps the local authority's grpc listener to the seven services it serves, since that listener spans packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are fresh tools/packagegate loads each module's package manifest and contract catalog with core's own loaders and validators, requires a manifest wherever a service declares module-identity (what a run admits), and compares each contract with the sources codefly generate contracts writes it from: the service's proto tree for a protobuf contract, its OpenAPI document for an OpenAPI one. A proto change without regenerated contracts is red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hop registers its admission key (RegisterAdmissionKey, authority 0.3.3) but admitted any authority from 0.2.0, so a host below 0.3.3 rendered and then had every module's verifier refuse every call. The range now starts at 0.3.3, so an older host is refused at render instead of at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A host that implements codefly.dev/composition receives every method a module it fronts publishes and refuses one with no policy. The hop's own Version declared none, so the authority module was refused on a saas host once its package existed. It now declares any_checked_caller, as the console's Version does; the policy option is vendored next to the proto the console's way, with its drift test, and api.proto is buf.gen.yaml's one input so the vendored option's bindings stay the hop library's. Bindings by `codefly generate proto`; contracts, catalog and manifest digests by `codefly generate contracts authority`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/packagegate now reads the published contracts the way the CLI's delivery reads them (codefly-dev/cli#1189's HostMethodPolicies): each served procedure, its google.api.http routes and each OpenAPI operation, a gateway route inheriting the policy of the proto method that binds it, and a service that stands in for a host (no module identity, an endpoint implementing a Codefly interface) left out. Any other method with no policy is refused by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p bindings codefly generate proto rewrote api.pb.go, api_grpc.pb.go and genconnect/api.connect.go for the hop's policy option; the review found the option's import and descriptor bytes and Version's doc comment, nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
that referenced
this pull request
Oct 27, 2026
… harden/review-followups Conflicts were only generated artefacts: the authority-client library's contract.binpb, catalog digest and library.codefly.yaml digest. Each side recorded the contract of its own proto tree; neither digest is right for the merged tree, so none was hand-picked: both are regenerated. Regenerated with codefly v0.1.216 (built from tag d3af5843, which carries cli#1189): - generate proto in services/local: no change, the auto-merged bindings (#32's authority/v1, #34's installation/v1) are what the merged protos give. - generate contracts authority: the local grpc contract carries #32's RegisterAdmissionKeyRequest.proof and #34's InstallationService.Current; the catalog, module.package.codefly.yaml and the vendored authority.proto copy follow. --check is clean. - generate client --no-facade for authority-client: contract, catalog and library digest; its bindings are unchanged. Its contract is byte-identical to the module's local grpc contract, as on main. Kept from #33: the hop's range codefly.dev/authority@>=0.3.3 <0.4.0 (a 0.3.3 authority ignores the additive proof, so the floor still holds) and the package version 0.1.0 (#34 moved the contract under it unreleased too). Kept from #32: the authority interface at 0.3.4 and the module implementing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crisfiorini-oss
pushed a commit
to crisfiorini-oss/cli
that referenced
this pull request
Oct 27, 2026
…t stand in for it, and a gateway route carries its proto method's policy (codefly-dev#1189) The strict permission preflight (render, run cluster, deploy module/service, ci deploy) refused the authority module on a saas host once it ships a package (codefly-dev/authority#33): its local service, which implements the host interfaces and never runs on a saas host, put 32 unmarked methods into the table the manifest carries; and marking the hop's Version made it worse, "conflicting policies for GET /version", because the hop's http face publishes the REST gateway's OpenAPI rendering of the same route, which cannot carry the policy option. - HostMethodPolicies is the table a module's manifest carries to env's host: the package's table less the services that stand in for that host (an exported endpoint implementing a Codefly interface the host.delivery service implements, and no module-identity). The preflight holds it, the native composition delivery sends it, and a caller's binding resolves against it. A module-identity service is always in it; require_method_policies still holds the whole package. - Conflicts are refused per table (ServedMethodPolicies.Table), not across services that never meet in one. - Within a service, an OpenAPI route that declares nothing and that one of the service's proto methods binds (google.api.http) carries that method's policy; a differing declaration is still refused. Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com> 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 this fixes
On a saas host, every module behind the hop stopped before start:
#28 made
authority/hopmodule-identity: true. The CLI's run admission admits every identity module except the host's own. On a saas host that includes the authority module, which shipped no package manifest.The change
The package.
modules/authority/module.package.codefly.yamlnames the releasecodefly/authority0.1.0and the services the interface exports (local,hop,edge).codefly generate contracts authoritywrote each service'sapi-contracts,contracts/api/**and the catalog.--checkis clean.contracts.codefly.yamlandservices/local/contract-surfaces.jsonare the inventory for the local authority's grpc listener, which spans packages. They follow the console's pattern.The hop's
Versiondeclares a policy. It isany_checked_caller, as the console'sVersionis.codefly.dev/compositionreceives the policy of every method of a module it fronts, and refuses a method with none.hop/proto/authority/hop/v1/policy.protothe console's way, withVENDORED.mdand a drift test (code/vendored_test.go).buf.gen.yamltakesapi.protoas its one input, so the option's bindings stay the hop library's.codefly generate protowrote the bindings andcodefly generate contractswrote the contracts. The no-proxy gate's provenance manifest records the reviewed digests: the only changes are the option's import and descriptor bytes, and the doc comment.The hop's range. The hop declares
codefly.dev/authority@>=0.3.3 <0.4.0, becauseRegisterAdmissionKeyonly exists from 0.3.3. Accounts at #114's saas pin implements 0.3.3.tools/packagegate, the package gate. It refuses:HostMethodPoliciesdoes: each served procedure, itsgoogle.api.httproutes, and each OpenAPI operation. A gateway route inherits the policy of the proto method that binds it. A service that stands in for a host is left out: one that runs as no module identity and exports an endpoint implementing a Codefly interface, which here islocal.The refusal cases are a missing manifest, a moved/added proto, a moved OpenAPI document, an edited contract, the hop's
Versionunmarked, an unbound route unmarked, and a host-interface service that runs as the module.Fix or hack: fix. Each piece is at its owner: the release in the module, the policy on the hop's method, the host-stand-in rule in the CLI (#1189).
Reused:
generate contractsandgenerate protoThe gate restates the CLI's policy read in about 200 lines because authority cannot import the CLI. It cites #1189 as its reference.
Proof
Strict preflight. Harness:
gitops.CheckCompositionPermissions(strict=true), the callcodefly deploy gitopsmakes. Workspace: platform-core #114 head29e8d28, envlocal, hostsaas/accounts/connect, authority overridden incodefly.local.yamlto this branch.420c4f63ed10966w-clipolicy-proofharness script)89c76fdeed10966conflicting policies for GET /version89c76fde49101aeSaas-hosted run. CLI #1189, platform-core
29e8d28, scopeapkg50, same roots asscripts/composition-check.sh. There was nocannot admit serviceand nonames no release. With the hop's policy declared, the run also printed no permission-preflight warning:The run then stopped for a local reason: tracing's gRPC port was already taken on this machine (
bind: address already in use), from port-hash collisions with other runs here. An earlier run (apkg31, before the policy) had annotations Running too.Not in this PR (audit D3 and D4), and why
>=0.2.0). Accounts at #114's pin implements installation 0.1.0. With the narrowed range the whole platform-core workspace fails to load (workspace_invalid … saas/accounts provides no version in range). It can narrow once accounts implements installation 0.2.0.OfferService/ArtifactServicein an interface. Declaring them is a contract move: it needs a version, shared cases and a home. It belongs in a separate proposal. They stay inlocal's inventory, because that is what the listener serves. On a saas hostlocalis left out as a host stand-in.Interaction with #32
#32 changes
services/local/proto/host/authority/v1/authority.proto, so whichever lands second must re-runcodefly generate contracts authority.packagegateturns that drift red.🤖 Generated with Claude Code