Skip to content

refactor: Staff permissions in codebase - #836

Merged
aXenDeveloper merged 3 commits into
feat/seo_settingsfrom
refactor/codebase-design
Oct 1, 2026
Merged

aXenDeveloper merged 3 commits into
feat/seo_settingsfrom
refactor/codebase-design

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@github-actions github-actions Bot added the 🧱 Refactor A code change that neither fixes a bug nor adds a feature label Oct 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4618e32ecf

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +190 to +193
await Promise.all(
affectedUserIds.map(
async userId => await invalidateSessionCacheForUser(c, userId),
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Batch session-cache invalidation when deleting roles

When a role has many primary or secondary holders, this launches one invalidateSessionCacheForUser call per user without a concurrency limit; each call performs two database queries before deleting cache keys. Deleting a widely assigned role can therefore enqueue thousands of concurrent queries, exhaust the database pool, and return a 500 after the role transaction has already committed. Load the affected sessions in batched queries and delete their cache keys in bulk, or at least process users with bounded concurrency.

Useful? React with 👍 / 👎.

@aXenDeveloper
aXenDeveloper added this pull request to stack #837 October 1, 2026 20:11
@aXenDeveloper
aXenDeveloper merged commit 6461c95 into canary Oct 1, 2026
2 checks passed
@aXenDeveloper
aXenDeveloper deleted the refactor/codebase-design branch October 1, 2026 20:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de1787fe16

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -112,32 +112,34 @@ export const signUp = async (
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid serializing every post-bootstrap signup

Every registration acquires the same transaction-scoped advisory lock before counting users, including after bootstrap when the first-user race no longer exists. Concurrent signups across all application instances are therefore forced through one database transaction at a time, unnecessarily capping registration throughput and increasing latency. Perform an unlocked existence check first, and only acquire this lock and recheck when the database may still be empty.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 Refactor A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant