Repository navigation
Tech-debt batch 28: lower-priority checklist — deprecations, menu permissions, flag cleanup, invite errors, audit filters, lease clock (#698) - #706
Merged
Conversation
- Deprecate auth.deps.require_permission (remove_in 0.1.0); the README points at RequiresPermission. - Files and Branding menus are gated on their page permissions, not role names. - Feature-flag tenant overrides are cleared from every worker's registry on TenantDeleted (rest of #639). - Bulk invite no longer shows raw exception text (SQL and parameters). - The audit-log JSON list filters actor and end date like the browse screen and CSV export. - Leases on Postgres lock the slot row (an expired placeholder when missing) before reading the clock, so a lock wait can no longer grant or refresh a lease that already expired. 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: |
d207151
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c8af7a37.simple-module-python.pages.dev |
| Branch Preview URL: | https://tech-debt-b28-low-priority-c.simple-module-python.pages.dev |
…ority-checklist # Conflicts: # CHANGELOG.md
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 28: the lower-priority checklist from the 2026-10-28 scan.
Closes #698
What changed
auth.deps.require_permissionis deprecated.remove_in="0.1.0", listed intest_deprecation_expiry. It meant "any of", bypassed on the literal role name"admin", and skippedRequiresPermission's demoted-mid-request check; no shipped code used it. The auth README now recommendsRequiresPermission./files/but never saw it, and holders ofbranding.managesaw no Branding entry. Both now use their pages' permissions.TenantDeleted. This was the remaining part of tenant deletion leaves tenant-scope settings/branding rows and in-memory flag overrides #639: the durable handler deleted the rows, but each worker's in-memory registry kept the deleted tenant's overrides.GET /api/audit_log/now resolvesuser_idthrough the actor search and treatsto_dateas end-of-day, like the browse screen and CSV export.DbLeaseBackendread the time before taking the slot's row lock, and Postgres computes an UPDATE's new values before waiting on a lock. A lock wait longer than the TTL could therefore grant, or "refresh", a lease that had already expired.SELECT … FOR UPDATEs the row, then reads the clock.Verification
make lint✓ ·make test-js✓ ·make test-py✓ (6443 passed, 41 skipped)test_db_lease_lock_wait.pyholds a row lock for 1.5 s while acquiring or refreshing a 1 s lease; it fails on the old code and passes with the fix.clock_timestamp()was measured not to work.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4