Skip to content

refactor(auth): move to the module layout - #854

Merged
antosubash merged 2 commits into
mainfrom
refactor/layout-auth
Nov 6, 2026
Merged

antosubash merged 2 commits into
mainfrom
refactor/layout-auth

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

Moves-only restructure of modules/auth to docs/module-layout.md, same pattern as #852 (permissions).

  • constants, state -> auth/core/
  • deps, middleware, _route_match -> auth/web/
  • oidc_common/ stays as a declared domain area (DOMAIN_AREAS)
  • Python tests mirror the package, with test_auth_* basenames
  • auth.constants, auth.state, auth.deps and auth.middleware stay as deprecated sys.modules aliases (remove_in 0.0.46)
  • In-repo importers (users, hosting, docs, READMEs) point at the new paths

No logic changes: i18n keys (auth.errors.*), session keys and app.state/request.state attributes are unchanged. The only observable difference is that the require_permission deprecation is now registered as auth.web.deps.require_permission.

Verification

  • On the move commit (before rebasing onto refactor(audit_log): move to the module layout #853): make test-py (8143 passed), make test-js (898), make lint, make doctor, make ci-css-build, make ci-api-types-fresh, make ci-docs-build all pass
  • After the rebase: make lint passes; 376 targeted tests pass
  • Two independent reviews (correctness, maintainability): alias identity checked (auth.constants is auth.core.constants, same for state, deps, middleware); uv run python -W error::DeprecationWarning -c "import host.main" exits 0; moved files byte-identical apart from one import path; two stale doc references fixed in a follow-up commit
  • No browser smoke (moves-only, skipped)

https://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq

constants and state -> core/; deps, middleware and route matching -> web/.
oidc_common/ stays put as a declared domain area (the provider-neutral OIDC
helpers oidc and keycloak share). Tests mirror the package with test_auth_*
basenames. auth.constants, auth.state, auth.deps and auth.middleware stay as
deprecated sys.modules aliases (remove_in 0.0.46).

Claude-Session: https://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-06T00:43:07.120778Z afa4023 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: afa4023
Status: ✅  Deploy successful!
Preview URL: https://ca5ecb14.simple-module-python.pages.dev
Branch Preview URL: https://refactor-layout-auth.simple-module-python.pages.dev

View logs

@antosubash
antosubash merged commit bf7b28d into main Nov 6, 2026
30 of 32 checks passed
@antosubash
antosubash deleted the refactor/layout-auth branch November 6, 2026 01:00
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