Skip to content

Public module APIs: in_delivery, forget_resource, render_error_page, worker_tenancy (#682 #683 #684 #685) - #705

Merged
antosubash merged 1 commit into
mainfrom
tech-debt/b27-public-module-apis
Oct 30, 2026
Merged

antosubash merged 1 commit into
mainfrom
tech-debt/b27-public-module-apis

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Public module APIs requested by smpy_modules (images), replacing private-name workarounds it currently pins in tests/test_framework_pins.py.

Closes #682
Closes #683
Closes #684
Closes #685

What changed

Verification

  • make lint ✓ · make test-js ✓ · make test-py ✓ (6439 passed, 39 skipped)
  • New tests:
    • delivery context inside a handler and its child task, false elsewhere, reset after failure and cancellation, and the inline dispatch path;
    • forget_resource is tenant-scoped and accepts a single id or an iterable;
    • render_error_page negotiates JSON vs. the Inertia page and keeps status and headers;
    • worker_tenancy returns None when unconfigured, plus single- and multi-tenant snapshots.
  • Code review: clean, after adding the inline-dispatch case.

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

…, error page, worker tenancy (#682, #683, #684, #685)

Replace private-name workarounds smpy_modules pins:
- simple_module_core.durable_events.in_delivery() / IN_DELIVERY: true while a
  durable handler runs (outbox deliver_one and inline dispatch), inherited
  by tasks it spawns (#682).
- sharing.contracts.forget_resource(db, resource_type, resource_id(s)):
  delete a purged resource's shares in the caller's tenant and
  transaction (#683).
- simple_module_hosting.render_error_page(request, status, detail,
  headers=None): JSON for API clients, the Inertia Error page for
  browsers (#684).
- background_tasks.sync_db.worker_tenancy() -> WorkerTenancy | None: the
  worker's tenancy, None when never configured (#685).

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

cloudflare-workers-and-pages Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: d00abf2
Status: ✅  Deploy successful!
Preview URL: https://dc90131e.simple-module-python.pages.dev
Branch Preview URL: https://tech-debt-b27-public-module.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-10-30T08:20:33.094028Z d00abf2 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.

@antosubash
antosubash merged commit b3f141e into main Oct 30, 2026
17 checks passed
@antosubash
antosubash deleted the tech-debt/b27-public-module-apis branch October 30, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant