Skip to content

Tech-debt batch 8: tenant-filter statement-shape matrix and page tests; frontend cleanup (#597 #601) - #613

Merged
antosubash merged 5 commits into
mainfrom
fix/debt-batch-8
Oct 23, 2026
Merged

antosubash merged 5 commits into
mainfrom
fix/debt-batch-8

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • tests: statement-shape matrix for tenant/soft-delete filtering; thin coverage in sharing, dashboard, mail #597 tests (no production changes):
    • A parametrized statement-shape matrix for tenant and soft-delete filtering in framework/db: select, joins, subqueries, select_from, CTE, union, exists, Core over Model.__table__, update and delete, each crossed with bound tenant vs other tenant and with include_deleted on and off. The suite now includes the shapes that previously leaked.
    • Sharing service tests: grant, revoke, expiry and cross-tenant denial.
    • Page tests for sharing Admin, dashboard Home/Doctor and audit_log Browse. Mail needs no catalog, because it ships no .tsx or templates.
  • frontend cleanup: unused deps, one mutation convention, shared leave-guard/upload helpers, client error reporting #601 frontend:
    • Behaviour change: removed the unused zod, date-fns and @hookform/resolvers (host) and react-hook-form plus the unused shadcn form component (@simple-module-py/ui).
    • Sharing revoke and the dashboard Doctor rerun show a toast on failure (onError, onHttpException, onNetworkError).
    • useLeaveGuard lives in @simple-module-py/ui (permissions and users use it).
    • The background-tasks outbox confirms through the shared ConfirmDialog instead of window.confirm.
    • reportClientError() is the single hook ErrorBoundary reports through.
    • Frontend docs describe the mutation/error-toast rule.
    • The file_storage upload XHR helper is out of scope, as noted on the issue.

Verification

  • Browser-verified on port 8219: 11 pages load with zero console errors (nothing depended on the removed packages), Doctor rerun works, the leave guard prompts on unsaved role/user edits, sharing empty state; no 5xx. Failure toasts and the outbox dialog are covered by the new vitest files (the outbox had no rows; toasts need fault injection)
  • Local CI: make lint, make ci-js-typecheck, make test-py (5941 passed), make test-js (770 passed), full e2e suite (49 passed); framework/db and sharing on Postgres (582 passed)
  • Code review: Sonnet and Codex, clean
  • Verification report: https://claude.ai/artifact/RxHhgZksRh6fB9gXni5Hwu

QA Report

Report links are Claude Artifacts and start private; the author can share them from claude.ai/code/artifacts if reviewers need access.

Test plan

  • CI green (including the Postgres workflow, which runs the new shape matrix)

Closes #597
Closes #601

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T14:42:23.977257Z cbc1e34 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: cbc1e34
Status: ✅  Deploy successful!
Preview URL: https://b941ab2e.simple-module-python.pages.dev
Branch Preview URL: https://fix-debt-batch-8.simple-module-python.pages.dev

View logs

@antosubash
antosubash merged commit 91b9988 into main Oct 23, 2026
17 checks passed
@antosubash
antosubash deleted the fix/debt-batch-8 branch October 23, 2026 14:47
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