Repository navigation
Tech-debt batch 25: INSERT…SELECT into tenant tables; Inertia once() custom keys (#693 #694) - #702
Merged
Merged
Conversation
…exclusion (#693, #694) - insert(TenantModel).from_select(...) under a bound tenant raised InvalidRequestError: the guard appended .values(tenant_id=...) to an INSERT…SELECT. It now adds tenant_id to the column list and the bound tenant as a literal in the projection; an explicit tenant column must be a bound literal matching the tenant (cross-tenant copies need all_tenants()), and strict mode with no tenant still refuses. - Inertia once() props with a custom key were announced under that key but skipped only by prop name; exclusion now uses the once key. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying simple-module-python with
|
| Latest commit: |
c81dc0a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f5c708dc.simple-module-python.pages.dev |
| Branch Preview URL: | https://tech-debt-b25-db-inertia-edg.simple-module-python.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tech-debt batch 25 (from the 2026-10-28 scan).
Closes #693
Closes #694
What changed
MultiTenantMixintable (db: INSERT…SELECT into a MultiTenantMixin table raises InvalidRequestError #693). Under a bound tenant this raisedInvalidRequestError: This construct already inserts from a SELECT, because the insert guard appended.values(tenant_id=…).insert_guard._guard_from_selectnow handles the shape:tenant_idamong the target columns, it addstenant_idto the column list and the bound tenant as a literal in the projection.tenant_idcolumn, the value must be a bound literal equal to the bound tenant, across compound selects too. Cross-tenant copies needall_tenants().MissingTenantError.once()with a custom key (inertia: once() props with a custom key are not skipped when the client excludes that key #694). The prop was announced under its key but skipped only by its prop name; exclusion now usesprop.once_key or name.Verification
make lint✓ ·make test-js✓ ·make test-py✓ (6393 passed, 39 skipped)test_db_core_nested_scope.pyalso pass on Postgres (41 passed).https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4