Skip to content

chore: gatekeeper fix race condition in JSON DB#1022

Merged
Bushstar merged 1 commit into
mainfrom
bush/gk-json-race
Sep 10, 2025
Merged

chore: gatekeeper fix race condition in JSON DB#1022
Bushstar merged 1 commit into
mainfrom
bush/gk-json-race

Conversation

@Bushstar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a race condition in the JSON database implementation by adding mutex-like concurrency control and improves error handling for malformed DIDs.

  • Added exclusive execution wrapper to prevent concurrent database operations
  • Extracted DID validation logic into a dedicated method with better error handling
  • Added test coverage for malformed DID edge case

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/gatekeeper/src/db/abstract-json.ts Implements concurrency control with runExclusive method and improves DID validation
tests/gatekeeper/utils.test.ts Adds test case for malformed DID with no suffix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Bushstar Bushstar merged commit 8cb95bf into main Sep 10, 2025
14 checks passed
@Bushstar Bushstar deleted the bush/gk-json-race branch September 10, 2025 13:24
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.

Fix race condition in Gatekeeper JSON DB

3 participants