Skip to content

Reduce archive rollout lookup CPU - #27276

Merged
etraut-openai merged 1 commit into
mainfrom
etraut/archive-rollout-lookup-cpu
Jun 10, 2026
Merged

etraut-openai merged 1 commit into
mainfrom
etraut/archive-rollout-lookup-cpu

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

Archiving a thread can spike app-server CPU when the state DB does not have a usable rollout path. The archive path falls back to locating the rollout by thread id; because rollout filenames already contain the UUID, the cheap fallback should find the file directly before invoking broader file search.

What Changed

  • In codex-rs/rollout/src/list.rs, try the exact rollout filename lookup before codex-file-search.
  • Keep fuzzy search as the final legacy fallback when no filename match is found.
  • Preserve the legacy fallback when the filename scan hits a traversal error, so an inaccessible stale subtree does not block lookup elsewhere.

Verification

  • just test -p codex-rollout
  • just test -p codex-thread-store
  • just test -p codex-app-server thread_archive

@etraut-openai etraut-openai changed the title [codex] Reduce archive rollout lookup CPU Reduce archive rollout lookup CPU Jun 10, 2026
@etraut-openai
etraut-openai marked this pull request as ready for review June 10, 2026 01:45
@etraut-openai
etraut-openai force-pushed the etraut/archive-rollout-lookup-cpu branch from 75e8279 to c8e01e3 Compare June 10, 2026 01:46
@etraut-openai etraut-openai changed the title Reduce archive rollout lookup CPU [codex] Reduce archive rollout lookup CPU Jun 10, 2026
@etraut-openai
etraut-openai force-pushed the etraut/archive-rollout-lookup-cpu branch from c8e01e3 to 0524e54 Compare June 10, 2026 02:02
@etraut-openai etraut-openai changed the title [codex] Reduce archive rollout lookup CPU Reduce archive rollout lookup CPU Jun 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0524e54194

ℹ️ 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 codex-rs/rollout/src/list.rs Resolved
@etraut-openai
etraut-openai force-pushed the etraut/archive-rollout-lookup-cpu branch from 0524e54 to 4e74b09 Compare June 10, 2026 02:09
@etraut-openai etraut-openai changed the title Reduce archive rollout lookup CPU [codex] Reduce archive rollout lookup CPU Jun 10, 2026
@etraut-openai etraut-openai changed the title [codex] Reduce archive rollout lookup CPU Reduce archive rollout lookup CPU Jun 10, 2026
@etraut-openai
etraut-openai merged commit c365b8a into main Jun 10, 2026
31 checks passed
@etraut-openai
etraut-openai deleted the etraut/archive-rollout-lookup-cpu branch June 10, 2026 16:28
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2026
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.

2 participants