Repository navigation
Openers report scales with unfinished work: recorded totals for finished words, unfinished-only default, 100 per page - #404
Conversation
…on unfinished words, 100 per page A request records, when it completes, the word's branch totals over every one of its requests. opener_rows reads those for a word whose requests are all complete and counts only words with unfinished work from their memberships, so a build no longer grows with every opener the sweep has finished. The cross-word branch totals count unfinished words only, and their open branches are gathered in one pass. The Openers list now defaults to queued and active words, 100 per page. Ticking every state, or none, shows them all; a named word's view has no state default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpacbZRqT46b4Duhxq5QNQ
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b021de3ac
ℹ️ 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".
| MIN(s.requested_at) AS requested_at, | ||
| NULL AS started_at, | ||
| MAX(s.requested_priority) AS requested_priority, | ||
| MAX(s.completed_at) AS completed_at, |
There was a problem hiding this comment.
Preserve read-only compatibility with pre-upgrade queues
If the report server opens an existing queue before any writable swarm or CLI process has migrated it, this unconditional reference to completed_at fails with no such column and the Openers report returns a queue-source error. _open_report_queue() deliberately uses initialize_schema=False, so a stopped-swarm/report-only deployment cannot add the columns itself; retain a schema-aware fallback like the previous started_at handling or otherwise ensure the read works against the prior schema.
AGENTS.md reference: AGENTS.md:L518-L521
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not adopting this. The code is always updated before anything reads the queue: the deploy stops the swarm, pulls, and starts it, and erd_search.py start starts the supervisor (whose writable open migrates the queue) before the report server. A report server that ever did read an unmigrated queue would show a queue-source error on the Openers page until the swarm's next start, and the report opens the queue per request, so it recovers on its own with no restart.
…the opener page size out of shared state A queue from before completion totals were recorded gets them, and the moment each request completed, from its retained memberships when the migration adds the columns. The Openers report's default page size is applied where its request and pager read it, never written into the shared limit, so a word report opened from an opener card no longer inherits a cap on its response groups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpacbZRqT46b4Duhxq5QNQ
Summary
The Openers report rescanned every membership the queue had ever recorded (1.2M rows at 2,760 openers, ~556 per finished opener) on every poll, and the client rendered every opener. Projected to 10,000 openers that was about 20 s per build, 6.4 MB per poll and ~250,000 DOM nodes. This change makes a build depend on the queue's unfinished work, not on everything the sweep has finished.
opener_workgainscompleted_at,completed_branch_count,completed_direct_branch_countandcompleted_direct_done_branch_count. Both paths that complete a request (mark_openers_complete, now in its ownBEGIN IMMEDIATE, and the withdrawal path_finish_opener_work_ids) record the word's totals over every one of its requests in the same transaction.opener_rowsreads them for a word whose requests are all complete, and counts from memberships only the words with an unfinished request.opener_state=allfor every state. Ticking every state or none shows them all, a named word's view has no state default, and switching into Openers from another view returns to the default. The page size is the report's own default, applied where its request and pager read it and never written into the sharedlimit, so a word report opened from an opener card is not capped at 100 response groups.Measured on a snapshot of the live queue after migration and backfill: all 2,760 words report the same totals as before, a full build takes ~2.2 s (was 5–6 s), and the default page takes ~2.2 s for a 112 kB response (was ~6 s for 1.6 MB). What remains is the live membership read and rollups, which grow with unfinished openers.
Deploy: this is a queue migration, so stop the swarm, pull and start it. The migration that adds the columns also records the totals of every request already complete, from its retained memberships (1.7 s for 2,006 words on a snapshot of the live queue).
🤖 Generated with Claude Code
https://claude.ai/code/session_01PpacbZRqT46b4Duhxq5QNQ