authz: export Mount — registration moves to cloud's composition root - #4
Merged
Conversation
Remove the init() that self-registered authz into cloud.Registry at order 70. The exported Mount(app *zip.App, deps cloud.Deps) error is unchanged; cloud's composition root now wires it explicitly (via cloud.Typed, since Mount is strongly typed). Update the package "Wire shape" doc to describe explicit wiring. The cloud import stays (used for cloud.Deps). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zeekay
added a commit
that referenced
this pull request
Jul 26, 2026
…ot (#4) Remove the init() that self-registered authz into cloud.Registry at order 70. The exported Mount(app *zip.App, deps cloud.Deps) error is unchanged; cloud's composition root now wires it explicitly (via cloud.Typed, since Mount is strongly typed). Update the package "Wire shape" doc to describe explicit wiring. The cloud import stays (used for cloud.Deps). Co-authored-by: Hanzo Dev <dev@hanzo.ai>
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.
Part of the cloud composition-root refactor:
cloud.Register/cloud.Registryis being deleted in favor of an explicitsubsystems.Wire()composition root.Change (minimal, mechanical): remove the
init()that self-registeredauthzintocloud.Registryat order 70; update the package "Wire shape" doc to describe explicit wiring. The exportedMount(app *zip.App, deps cloud.Deps) erroris unchanged. Thecloudimport stays (used forcloud.Deps).authz, order 70 (after iam=50), no Shutdown, not a HealthOwner.authz.Mount— strongly typedfunc(*zip.App, cloud.Deps) error, so cloud wires it viacloud.Typed(authz.Mount).zap-proto/zip, module pathgithub.com/hanzoai/authz), which cloud consumes ashanzoai/authz v1.10.x. Next tag: v1.10.7.Verification (local, GOWORK=off):
gofmtclean · diff ismount.go-only ·go build ./...EXIT 0 ·go vet .clean ·go test ./...→ root packageok github.com/hanzoai/authz.Pre-existing CI note:
go test ./...also reportsFAIL github.com/hanzoai/authz/model [build failed]—model/model.go:429: non-constant format string in call to fmt.Errorf. This is casbin-engine code untouched by this PR; it reproduces on pristinemain(verified by revertingmodel/model.goand re-running vet). Not introduced here.🤖 Generated with Claude Code