Skip to content

[codex] let later shared reads join a running read window#21525

Open
xli-oai wants to merge 1 commit into
mainfrom
xli-codex/join-running-shared-reads
Open

[codex] let later shared reads join a running read window#21525
xli-oai wants to merge 1 commit into
mainfrom
xli-codex/join-running-shared-reads

Conversation

@xli-oai
Copy link
Copy Markdown
Contributor

@xli-oai xli-oai commented May 7, 2026

Summary

  • replace fixed shared-read batches with per-key queue state in the app-server scheduler
  • allow later shared reads to start while earlier shared reads are still running when no writer is queued
  • preserve writer fairness once an exclusive request is waiting

Why

The existing scheduler only formed one batch of leading shared reads, then waited for that whole batch to finish before looking at the queue again. That meant a later plugin/list arriving behind an already-running skills/list still waited even though both requests were safe shared reads.

Behavior change

A shared read now joins the active read window immediately when there is no running writer and no queued writer. Exclusive requests still wait for all active reads to finish, and once a writer is queued, later reads stay behind it.

Validation

  • just fmt
  • just fix -p codex-app-server
  • cargo test -p codex-app-server
    • scheduler unit coverage passed, including the new regression test
    • the broader crate run still hit existing environment-sensitive failures in this local setup (sandbox-exec command-exec tests, one skills watcher timeout, and one websocket-dependent turn interrupt test)
  • manual dev desktop verification: later plugin/list requests completed while an earlier long skills/list was still in flight, which is the behavior this change is intended to enable

@xli-oai xli-oai added the oai PRs contributed by OpenAI employees label May 7, 2026 — with ChatGPT Codex Connector
@xli-oai xli-oai marked this pull request as ready for review May 7, 2026 10:43
@xli-oai xli-oai requested a review from euroelessar May 7, 2026 22:27
@xli-oai
Copy link
Copy Markdown
Contributor Author

xli-oai commented May 7, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

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

@xli-oai xli-oai requested a review from owenlin0 May 7, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant