Skip to content

Validate loaded plugins outside the cache lock - #47858

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/cb5a5f7ec52cba852e6bb9da03a8e214cc19727d
Sep 24, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/cb5a5f7ec52cba852e6bb9da03a8e214cc19727d

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Validate loaded plugins outside the cache lock

Why

Checking installed plugin roots performs filesystem work while holding the loaded plugins cache mutex, blocking lookups for other cache keys.

What changed

Store cache entries in Arcs and release the mutex before validating installation paths. After reacquiring the lock, check the cache generation and entry identity to reject entries invalidated or replaced during validation. Preserve stale-entry eviction and most-recently-used ordering.

## Why

Checking installed plugin roots performs filesystem work while holding the loaded plugins cache mutex, blocking lookups for other cache keys.

## What changed

Store cache entries in `Arc`s and release the mutex before validating installation paths. After reacquiring the lock, check the cache generation and entry identity to reject entries invalidated or replaced during validation. Preserve stale-entry eviction and most-recently-used ordering.

GitOrigin-RevId: cb5a5f7ec52cba852e6bb9da03a8e214cc19727d
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/cb5a5f7ec52cba852e6bb9da03a8e214cc19727d branch from 10313c5 to 58838df Compare September 24, 2026 14:58
@copyberry
copyberry Bot merged commit 58838df into main Sep 24, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/cb5a5f7ec52cba852e6bb9da03a8e214cc19727d branch September 24, 2026 14:58
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026

This branch was successfully deployed

1 active deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants