Skip to content

Batch inbox job hydration per project - #259

Merged
kixelated merged 3 commits into
mainfrom
quest/m1/inbox-reads
Oct 28, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m1/inbox-reads

Conversation

@kixelated

@kixelated kixelated commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Loading the inbox hydrated each decision job and each agent-card job with its own three-query readJob batch. Both selectors now hydrate all selected jobs in one three-statement D1 batch, preserving the selection, ordering, attempt state, parsed results, events, questions, answers and approvals. Separate child queries avoid multiplying events by questions. The recent-jobs reader shares the same hydration code.

Validation: pinned Nix just install, just check, and just test passed (538 CLI tests passed, 2 platform skips; 363 Worker tests passed). New real-D1 tests compare all hydrated fields with individual reads for 120 jobs, check project isolation and empty children, and count executed statements including batch members. Each selector uses three statements regardless of job count. The full inbox load stays constant; the same test against base reproduced growth from 18 statements with no jobs to 378 with 120 jobs. Both regressions pass with the fix.

Choices: batch both decision and activity selectors because both run during an inbox load; reuse the helper for recent jobs to keep one list hydration path. No selection or UI behavior changes. Deleted the finished quest and its links, including its inline mention in the history-pass plan. No remaining decisions.

Current-head review: no actionable bugs; Codex added 👍. Required CI passed. The optional Windows ARM job failed the unchanged gate test (expected four admissions, got three); existing kixelated/quest#233 addresses that base failure.

(written by GPT-6)

@kixelated kixelated changed the title Read the inbox's jobs in one query per project Batch inbox job hydration per project Oct 28, 2026
@kixelated
kixelated marked this pull request as ready for review October 28, 2026 06:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T06:01:17.057458Z 305f739 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-28T06:02:50.034219Z 305f739 Draft marked ready
ℹ️ 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.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)
Reviewed commit: 305f739

No actionable bugs found. The shared three-query hydration is a sensible simplification: it preserves project-scoped selection, job and child ordering, parsed results, and question/approval fields without an events×questions join. Reusing it for recent jobs avoids divergent hydration paths. The added regressions check field parity, empty children, project isolation, and statement counts through the full inbox load.

Verification limits: static inspection of the diff and relevant store/inbox code only; I did not run tests, benchmark D1, or validate a deployed Worker.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: all job lists the inbox loads (decision jobs, agent-card jobs, recent jobs) now share one helper that reads them in a fixed three-statement D1 batch, no matter how many jobs there are. Selection, ordering, and UI behavior are unchanged. The finished quest quest/m1/inbox-reads.md and its links are deleted, and quest check --base origin/main passes on head 305f739.

Reviews: Codex code and security reviews of 305f739 completed with no findings. The maintainer-account automated review found no actionable bugs.

CI: all required checks passed. The optional native Windows (windows-11-arm) job failed the gate test this PR doesn't touch (it expected four admissions and got three). That failure is already on base, and #233 tracks it. It doesn't block landing.

No open decisions. Queuing 305f739 for quest land.

(written by Claude Opus 5.5)

@kixelated
kixelated merged commit eac5f78 into main Oct 28, 2026
6 of 7 checks passed
@kixelated
kixelated deleted the quest/m1/inbox-reads branch October 28, 2026 16:33
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