Repository navigation
Conversation
The prs stream sourced the issues endpoint, whose PR objects carry no
draft/merged/merged_at, so first-sight PRs were stored draft=0/merged=0
forever. Source the stream from repos/{repo}/pulls instead; pulls rows
also heal previously materialized false-default rows via the store's
null-preserving update. Derive merged from merged_at when the pulls
LIST shape omits the merged boolean. Regression tests for
draft-first-sight, merged-first-sight and heal-after-gap.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
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: b549d052f3
ℹ️ 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".
| const pq = since | ||
| ? `since=${encodeURIComponent(since)}&per_page=100&state=all` | ||
| : "per_page=100&state=all"; | ||
| const prs = await listResource<Record<string, any>>(auth, `repos/${repo}/pulls?${pq}`, fetchFn); |
There was a problem hiding this comment.
Preserve incremental fetching when switching to the pulls endpoint
For repositories with substantial PR history, every reconciliation now downloads and upserts every historical PR, even when nothing has changed: the List pull requests endpoint does not support since, and listResource follows every pagination link without applying a local cutoff. Unlike the previous issues-endpoint query, the saved cursor therefore no longer bounds the work. Each returned PR also incurs two sequential database operations in upsertItem, adding history-sized database traffic to the 15-minute poll configured in nixos/services/pm-stack/default.nix. Use supported updated-time sorting with cursor-aware pagination and filtering, or fetch pull-shaped details only for PRs identified as changed.
Useful? React with 👍 / 👎.
|
Closing as duplicate of PR #4597 (task 6483, lane code-d). Per protocol, the full diff was compared against the canonical PR first: this PR's one unique correctness item — deriving |
Fixes #4528 (task 6483).
The prs reconcile stream sourced the issues endpoint, whose PR objects carry no draft/merged/merged_at, so first-sight PRs were stored draft=0/merged=0 forever. This sources the stream from
repos/{repo}/pullsinstead; pulls rows also heal previously materialized false-default rows via the store's null-preserving update.mergedis derived frommerged_atwhen the pulls LIST shape omits the merged boolean.Tests (prior checkpoint, laptop):
bun test test/reconcile.test.ts5 pass; full suite 78 pass 0 fail, including 2 new regression tests (draft-first-sight, merged-first-sight, heal-after-gap). tsc not run locally (no local typescript) — CI to confirm.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.