Skip to content

Tech-debt batch 4: sqlmodel col() sweep, shared user-directory SQL helpers (#591 #596) - #607

Merged
antosubash merged 3 commits into
mainfrom
fix/debt-batch-4
Oct 23, 2026
Merged

antosubash merged 3 commits into
mainfrom
fix/debt-batch-4

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • typing: replace ~86 ty: ignore[invalid-argument-type] on column comparisons with sqlmodel.col() #591: SQLModel column comparisons and orderings across ~38 shipped files now use sqlmodel.col(...), which removes 99 # ty: ignore[invalid-argument-type] suppressions. Shipped-code ty: ignore count goes from 174 to 75 (invalid-argument-type from 132 to 33). One ignore stays on selectinload(User.roles), a relationship false positive. No behaviour change.
  • keycloak/users: deduplicate the user-directory helpers #596: the LIKE-escaped name/email predicate and the row→DirectoryUser conversion live once, in simple_module_db.user_directory_sql, used by both users and keycloak. A framework test covers %, _ and backslash escaping and the unknown-vs-empty roles semantics. Keycloak's UUID-as-text shim stays local.

Internal refactors only; no CHANGELOG entry.

Verification

  • Browser-verified at /admin/users and /admin/audit-log on port 8215: literal %/_ search, active/disabled filters, sorting; no console errors, no 5xx
  • Local CI: make lint, make test-py (5691 passed), make test-js (748 passed), full e2e suite (49 passed); users, keycloak and framework/db on Postgres (1128 passed)
  • Code review: Sonnet and Codex, both clean
  • Verification report: https://claude.ai/artifact/RLpVUBY33W1qTboinkJqcV

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

  • Search % on /admin/users: no rows
  • CI is green (including the Postgres workflow)

Closes #591
Closes #596

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: cfdcede
Status: ✅  Deploy successful!
Preview URL: https://cf6defae.simple-module-python.pages.dev
Branch Preview URL: https://fix-debt-batch-4.simple-module-python.pages.dev

View logs

@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-23T09:33:56.150248Z cfdcede 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 1f79821 into main Oct 23, 2026
17 checks passed
@antosubash
antosubash deleted the fix/debt-batch-4 branch October 23, 2026 09:41
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