Skip to content

Openers report reads stored opener ERDs instead of reducing every opener per request - #403

Merged
ahernsean merged 2 commits into
mainfrom
claude/openers-report-reads-stored-erd
Oct 9, 2026
Merged

ahernsean merged 2 commits into
mainfrom
claude/openers-report-reads-stored-erd

Conversation

@ahernsean

@ahernsean ahernsean commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Openers report took 46–48 s per build on the live queue (2,760 openers), and longer under load. 93% of that was _opener_erd_summaries: on every request it re-partitioned the answers for every opener in pure Python (ResponseCache(score_cache=None), which bypassed the stored decompositions) and looked up all ~311,000 response groups. Its in-memory cache was keyed on the cache file's size and modification time, which the running swarm changes every 0.5–2 s, so it was discarded before a build could finish. Once a build ran past the client's 60 s stuck-request timeout, the client retried while the abandoned server thread kept computing.

  • Finished openers show the row the swarm stored in opener_erd_by_policy (new ScoreCache.stored_opener_erds, one query). A finished opener with no stored row shows no summary; reconcile-opener-erds is what fills it.
  • Unfinished openers have no ERD; they report "N of M response groups solved". A group the queue took is solved once its branch is done. A group the queue did not take is judged by its own cache state, because queue add leaves out groups that are already solved and also groups its filters (--max-branch-size, --pattern) skipped: only an exact group counts as solved, and a loss makes the opener infeasible.
  • Each unfinished word is partitioned once, from its stored response_decomposition, using its direct branch keys (new ERDQueue.opener_direct_branch_keys). The result is kept, and only groups still unsettled are looked up on later polls (none on the live queue today; its 26,425 unqueued multi-answer groups are all exact). A word is partitioned again when its requests take more branches.
  • Removed _OPENER_ERD_SUMMARY_CACHE, _score_cache_file_signature and the split between computing summaries for the whole list and computing them for one page.

On the live queue a build now takes about 6 s (8 s for the first, which partitions every unfinished word), nearly all of it queue reads (opener_rows, the branch totals, the membership rows).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PpacbZRqT46b4Duhxq5QNQ

A finished opener's ERD is stored by the worker that finished it, and an
unfinished opener has none.  The report now reads the stored rows and
takes an unfinished opener's progress from the queue: a response group
the queue never took needs no work, and one it took is solved when that
branch is done.  A word's response-group count is counted once from its
stored decomposition and kept while the answer list is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PpacbZRqT46b4Duhxq5QNQ
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T03:06:58.415821Z 75d34d1 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 75d34d1251

ℹ️ 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 report_model.py Outdated
…em solved

queue add leaves out a word's already-solved groups, but also groups its
filters skipped, and an unqueued group can be a loss.  Each unfinished
word is partitioned once from its stored decomposition; its unqueued
groups are looked up in the cache, and only those still unsettled are
looked up again on a later poll.  A word is re-partitioned when its
requests take more branches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PpacbZRqT46b4Duhxq5QNQ
@ahernsean
ahernsean merged commit 13d2eca into main Oct 9, 2026
5 checks passed
@ahernsean
ahernsean deleted the claude/openers-report-reads-stored-erd branch October 9, 2026 11:45
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.

1 participant