Skip to content

Allow concurrent authentication reads without weakening credential locks - #74

Merged
Eoic merged 3 commits into
developmentfrom
fix/concurrent-authentication-reads
Nov 13, 2026
Merged

Eoic merged 3 commits into
developmentfrom
fix/concurrent-authentication-reads

Conversation

@Eoic

@Eoic Eoic commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Authenticated requests previously took an exclusive owner lock, serializing unrelated reads. Safe HTTP requests now use a shared owner lock; mutation requests acquire the exclusive lock before reading credentials, so concurrent uploads cannot deadlock while upgrading locks. Credential changes still wait for active reads to finish.

The PostgreSQL regressions prove that two reads overlap, credential changes wait for both reads, and two authenticated mutations serialize without a lock-upgrade deadlock. Also fixes the reviewed block spacing in background-task creation.

Validation: all 589 backend tests passed (2 external provider smoke tests deselected), including 54 focused authentication, verification and user tests; Ruff, formatting and Mypy passed. The acquisition fixture commits setup before crossing into its authenticated HTTP request.

Closes #73.

Copilot AI balanced review requested due to automatic review settings November 13, 2026 00:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T01:00:30.782303Z ec27676 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.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@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: ec276767fa

ℹ️ 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 thread papyrus/api/deps.py Resolved
@Eoic
Eoic force-pushed the fix/concurrent-authentication-reads branch from 44f90e8 to 6ef63cf Compare November 13, 2026 01:08
@Eoic
Eoic merged commit 80000e6 into development Nov 13, 2026
1 check passed
@Eoic
Eoic deleted the fix/concurrent-authentication-reads branch November 13, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow concurrent authentication reads while preserving credential locks

2 participants