Skip to content

refactor(file_storage): follow the module layout (moves only) - #858

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

antosubash merged 2 commits into
mainfrom
refactor/layout-file_storage

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • Moves modules/file_storage to the docs/module-layout.md layout: core/, files/, multipart/ and backends/ domain areas, web/, and ui/{components,hooks,utils}. tasks.py stays at the root and Celery task names are unchanged.
  • file_storage.{settings,service,deps,scope,downloads,upload_support,tenant_deletion} stay importable as deprecated sys.modules aliases (remove_in 0.0.46). Other old flat paths have no alias (stated in CHANGELOG).
  • TenantStorageCleanupRequested keeps module = "file_storage.tenant_deletion", so its durable event key is unchanged; durable handler names stay pinned.
  • The upload area is named multipart/, not uploads/, because the repo .gitignore entry uploads/ would drop it from the wheel (hatch honours .gitignore).
  • No logic changes. i18n keys, permission names, settings keys and app.state attributes are untouched.

Verification

  • make lint: exit 0
  • PYTEST_WORKERS=8 make test-py: 8143 passed, 47 skipped
  • make test-js: 898 passed
  • Earlier on this branch: make doctor, make ci-css-build, make ci-api-types-fresh, make ci-docs-build
  • Independent review: event_key(TenantStorageCleanupRequested) == file_storage.tenant_deletion.TenantStorageCleanupRequested and it round-trips through the durable serialiser; host/tests/test_durable_wire_names.py unchanged vs origin/main; alias identity holds for all seven shims; the built wheel contains file_storage/multipart/*.py and every source file.

https://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq

constants/settings/services/errors, tenant scope, formatting, health, audit
labels, the tenant cache, durable tenant teardown, the object reaper and
worker access -> core/; the stored-file service and its reads, deletes,
visibility, queries, aggregates, downloads, ranges and thumbnails -> files/;
resumable multipart uploads -> multipart/ (a name the repo's uploads/
.gitignore entry does not hide from the wheel); backend_guard ->
backends/guard.py; deps, body limits, serving, CORS, CSP and endpoints ->
web/. Page components, hook and TS helpers move to ui/. tasks.py stays at the
root and Celery task names are unchanged.

TenantStorageCleanupRequested keeps __module__ = "file_storage.tenant_deletion"
so its durable event key (stored in outbox rows) does not change; handler
names stay pinned. file_storage.{settings,service,deps,scope,downloads,
upload_support,tenant_deletion} 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-06T02:11:40.708582Z d24ea61 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: d24ea61
Status: ✅  Deploy successful!
Preview URL: https://944941b0.simple-module-python.pages.dev
Branch Preview URL: https://refactor-layout-file-storage.simple-module-python.pages.dev

View logs

@antosubash
antosubash merged commit c92814b into main Nov 6, 2026
17 checks passed
@antosubash
antosubash deleted the refactor/layout-file_storage branch November 6, 2026 02:21
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