Skip to content

authz: export Mount — registration moves to cloud's composition root - #4

Merged
zeekay merged 1 commit into
mainfrom
refactor/export-mount
Jul 10, 2026
Merged

authz: export Mount — registration moves to cloud's composition root#4
zeekay merged 1 commit into
mainfrom
refactor/export-mount

Conversation

@zeekay

@zeekay zeekay commented Jul 10, 2026

Copy link
Copy Markdown
Member

Part of the cloud composition-root refactor: cloud.Register/cloud.Registry is being deleted in favor of an explicit subsystems.Wire() composition root.

Change (minimal, mechanical): remove the init() that self-registered authz into cloud.Registry at order 70; update the package "Wire shape" doc to describe explicit wiring. The exported Mount(app *zip.App, deps cloud.Deps) error is unchanged. The cloud import stays (used for cloud.Deps).

  • Registration it had: name authz, order 70 (after iam=50), no Shutdown, not a HealthOwner.
  • Exported symbol for cloud to wire: authz.Mount — strongly typed func(*zip.App, cloud.Deps) error, so cloud wires it via cloud.Typed(authz.Mount).
  • Base branch is the v1.x cloud-mount lineage (zap-proto/zip, module path github.com/hanzoai/authz), which cloud consumes as hanzoai/authz v1.10.x. Next tag: v1.10.7.

Verification (local, GOWORK=off): gofmt clean · diff is mount.go-only · go build ./... EXIT 0 · go vet . clean · go test ./... → root package ok github.com/hanzoai/authz.

Pre-existing CI note: go test ./... also reports FAIL 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 pristine main (verified by reverting model/model.go and re-running vet). Not introduced here.

🤖 Generated with Claude Code

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
zeekay merged commit d97e647 into main Jul 10, 2026
1 of 4 checks passed
@zeekay
zeekay deleted the refactor/export-mount branch July 10, 2026 21:27
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>
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