Skip to content

fix(auth): prevent deadlock and race condition (#37)#38

Merged
randomm merged 1 commit intodevfrom
fix/auth-race-condition
Jan 26, 2026
Merged

fix(auth): prevent deadlock and race condition (#37)#38
randomm merged 1 commit intodevfrom
fix/auth-race-condition

Conversation

@randomm
Copy link
Owner

@randomm randomm commented Jan 26, 2026

Fixes #37 - Critical fix for auth.json race condition causing provider credentials to disappear.

Changes

  • Read file directly in set()/remove() instead of calling all()
  • Eliminates nested lock acquisition deadlock
  • Maintains file locking for cross-call synchronization

Testing

  • Typecheck passes
  • Adversarial review identified deadlock, now fixed

…37)

- Read file directly in set()/remove() instead of calling all()
- Eliminates nested lock acquisition deadlock
- Maintains file locking for cross-call synchronization
- Validates data with Info.safeParse() on read
@randomm randomm merged commit 0a9411c into dev Jan 26, 2026
@randomm randomm deleted the fix/auth-race-condition branch January 26, 2026 13:16
@github-actions
Copy link

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

randomm added a commit that referenced this pull request Feb 3, 2026
…37) (#38)

- Read file directly in set()/remove() instead of calling all()
- Eliminates nested lock acquisition deadlock
- Maintains file locking for cross-call synchronization
- Validates data with Info.safeParse() on read
randomm added a commit that referenced this pull request Feb 3, 2026
…37) (#38)

- Read file directly in set()/remove() instead of calling all()
- Eliminates nested lock acquisition deadlock
- Maintains file locking for cross-call synchronization
- Validates data with Info.safeParse() on read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant