Skip to content

refactor(tenants): follow the module layout (moves only) - #856

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

antosubash merged 2 commits into
mainfrom
refactor/layout-tenants

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

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

  • constants/service/errors -> tenants/core/
  • resolver, host_resolver -> tenants/resolution/; invitation service and mail -> tenants/invitations/ (new domain areas in DOMAIN_AREAS); the invitation template moves to invitations/templates/ (INVITATION_TEMPLATE updated, wheel verified)
  • deps, endpoints -> tenants/web/; page components and hooks -> ui/{components,hooks}, page and tests-js imports rewritten
  • Python tests mirror the areas, with test_tenants_* basenames
  • tenants.{constants,resolver,service,deps,errors} stay as deprecated sys.modules aliases (remove_in 0.0.46) because smpy_modules imports them.

No logic changes: permission names, i18n keys, invalidation channels (tenants.membership, tenants.hosts, tenants.seats), app.state attributes and the durable names tenants.user_cleanup.purge_user_memberships / tenants.send_invitation_email are unchanged; host/tests/test_durable_wire_names.py is untouched.

Verification

  • make lint (re-run after rebasing onto refactor(auth): move to the module layout #854), make doctor, make ci-api-types-fresh, make ci-docs-build, make ci-css-build pass
  • make test-py (8143 passed) and make test-js (898) pass on the pre-rebase commit; after the rebase 177 targeted tests pass and python -W error::DeprecationWarning -c 'import host.main' works
  • Two independent reviews (correctness, maintainability): alias identity for the five shims, invitation template loading and unchanged wire names confirmed; no logic changes
  • No browser smoke (moves-only, skipped)

https://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq

constants/settings/services/errors, the tenant service with its membership,
owner-guard and deletion helpers, and user cleanup -> core/; resolver, host
resolver and token tenant -> resolution/; invitations and the invitation mail
with its template -> invitations/; deps, shared props and endpoints -> web/;
components and hooks -> ui/. Tests mirror the areas with test_tenants_*
basenames. tenants.{constants,resolver,service,deps,errors} stay as deprecated
sys.modules aliases (remove_in 0.0.46). Durable handler names, permission
names and invalidation channels are unchanged.

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-06T01:09:25.315242Z 2ed9026 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.

docs/modules/tenants.md documented importing make_host_invalidator from it.

Claude-Session: https://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9d02e87
Status: ✅  Deploy successful!
Preview URL: https://2bfce519.simple-module-python.pages.dev
Branch Preview URL: https://refactor-layout-tenants.simple-module-python.pages.dev

View logs

@antosubash
antosubash merged commit bfa9867 into main Nov 6, 2026
17 checks passed
@antosubash
antosubash deleted the refactor/layout-tenants branch November 6, 2026 01:19
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