GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(forgejo): Closed lists read long merged histories in bounded slices by only21mil · Pull Request #21657 · pingdotgg/t3code Conversation
|
main 7462f234e8 |
head 5bbb14bcf1 |
merged e66d7b4bbc |
|
|---|---|---|---|
| Web, Closed | Web, main 7462f23, Closed: #1 listed![]() |
Web, head 5bbb14b, Closed: empty first slice with Load more pull requests![]() |
Web, merged e66d7b4bbc, Closed: empty first slice with Load more pull requests![]() |
| Web, after Load more | Web, head 5bbb14b, after Load more: #1 listed![]() |
Web, merged e66d7b4bbc, after Load more: #1 listed![]() |
|
| Android, Closed | Android, main 7462f23 server, Closed: #1 listed![]() |
Android, head 5bbb14b server, Closed: #1 listed![]() |
Android, merged e66d7b4bbc server, Closed: #1 listed![]() |
| iOS, Closed | iOS, main 7462f23 server, Closed: #1 listed![]() |
iOS, head 5bbb14b server, Closed: #1 listed![]() |
iOS, merged e66d7b4bbc server, Closed: #1 listed![]() |
Tests: this head's two test files fail 3 and pass 114 on main's code; all 117 pass on the head and all 121 on the merged tree.
Not checked:
Change detail: the provider loop condition is consumed < input.limit; the cursor keeps the previous boundary, or the read time on the first slice; Load more continues from where the slice stopped.
Tests detail: with this head's two test files on main's code, PullRequestService.test.ts and ForgejoPullRequestProvider.test.ts fail 3 (the two continuation rows and the state-filter assertion) and pass 114.
Revisions were run in this order: main 7462f234e8 (green push CI; main has newer commits that this run did not use), this head 5bbb14bcf1, then the merged tree e66d7b4bbc.
Fixture: a throwaway local Forgejo 17.0.1 seeded with #1 closed without merging, #2 to #101 merged after it, and #102 and #103 open. It serves 50 rows per page. One T3 dev server per revision, as "Test machine", with tea signed in to that Forgejo. The web client ran in the T3 Browser panel and asks for 99 rows. The phones ran today's main app: an iPhone 17 Pro simulator (iOS 26.5) and a Pixel 10 emulator (Android 16, software rendering). The mobile list asks for 30 rows per slice. Before, an empty slice ended the list, which would cut off older matches once the provider stops at its budget; Forgejo resumes from the delivered offset. Forgejo's own request log records every page read. The screen ends the same on all three revisions on the phones.
Before, web, main 7462f234e8:
## web client, main 7462f234e8, Pull requests > Closed opened at 04:30:34
## grep 'pulls?' in the Forgejo log between 04:30:33 and 04:30:46 UTC, lines unedited
2026/11/12 04:30:38 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:58002, 200 OK in 419.8ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:38 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:58012, 200 OK in 418.8ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:38 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:58024, 200 OK in 14.2ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:39 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:58044, 200 OK in 347.4ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:39 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:58052, 200 OK in 355.5ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:39 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:58054, 200 OK in 376.7ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:39 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:58056, 200 OK in 370.9ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:39 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:58058, 200 OK in 13.6ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:30:39 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:58060, 200 OK in 12.6ms @ repo/pull.go:49(repo.ListPullRequests)
After, web, head 5bbb14bcf1, first slice:
## web client, head 5bbb14bcf1, Pull requests > Closed opened at 04:34:04
## grep 'pulls?' in the Forgejo log between 04:34:03 and 04:34:14 UTC, lines unedited
2026/11/12 04:34:08 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:44194, 200 OK in 410.3ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:34:08 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:44210, 200 OK in 379.1ms @ repo/pull.go:49(repo.ListPullRequests)
Head 5bbb14bcf1, Load more:
## web client, head 5bbb14bcf1, Load more pull requests clicked at 04:34:15
## grep 'pulls?' in the Forgejo log between 04:34:14 and 04:34:25 UTC, lines unedited
2026/11/12 04:34:16 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:38244, 200 OK in 345.9ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:34:16 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:38260, 200 OK in 357.2ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:34:16 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:38270, 200 OK in 12.1ms @ repo/pull.go:49(repo.ListPullRequests)
Merged e66d7b4bbc, first slice and Load more:
## web client, merged e66d7b4bbc, Pull requests > Closed opened at 04:37:37
## grep 'pulls?' in the Forgejo log between 04:37:36 and 04:37:47 UTC, lines unedited
2026/11/12 04:37:41 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:39978, 200 OK in 354.1ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:37:41 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:39984, 200 OK in 341.1ms @ repo/pull.go:49(repo.ListPullRequests)
## web client, merged e66d7b4bbc, Load more pull requests clicked at 04:37:48
## grep 'pulls?' in the Forgejo log between 04:37:47 and 04:37:58 UTC, lines unedited
2026/11/12 04:37:49 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:50106, 200 OK in 411.5ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:37:49 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:50108, 200 OK in 421.2ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:37:49 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:50118, 200 OK in 11.0ms @ repo/pull.go:49(repo.ListPullRequests)
Android, main 7462f234e8:
## Android app (main's app) against the main 7462f234e8 server, Closed tapped at 04:31:21
## grep 'pulls?' in the Forgejo log between 04:31:21 and 04:31:36 UTC, lines unedited
2026/11/12 04:31:22 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:49476, 200 OK in 449.3ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:31:22 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:49492, 200 OK in 374.9ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:31:22 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:49494, 200 OK in 13.7ms @ repo/pull.go:49(repo.ListPullRequests)
Android, head 5bbb14bcf1:
## Android app (main's app) against the head 5bbb14bcf1 server, Closed tapped at 04:34:58
## grep 'pulls?' in the Forgejo log between 04:34:58 and 04:35:14 UTC, lines unedited
2026/11/12 04:34:59 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:46140, 200 OK in 408.8ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:00 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:46152, 200 OK in 412.7ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:00 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:46162, 200 OK in 372.9ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:01 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:46170, 200 OK in 315.6ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:01 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:46176, 200 OK in 311.3ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:01 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=1 for 127.0.0.1:46184, 200 OK in 322.7ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:02 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=2 for 127.0.0.1:46188, 200 OK in 305.7ms @ repo/pull.go:49(repo.ListPullRequests)
2026/11/12 04:35:02 ...eb/routing/logger.go:109:func1() [I] router: completed GET /api/v1/repos/sample/project/pulls?state=closed&sort=recentupdate&limit=50&page=3 for 127.0.0.1:46202, 200 OK in 15.5ms @ repo/pull.go:49(repo.ListPullRequests)
iOS logs (main, head, merged) and the Android merged log have the same shape as the Android ones above.
Tests, main with the head's test files:
$ vp test run apps/server/src/pullRequest/PullRequestService.test.ts packages/source-control-forgejo/src/server/ForgejoPullRequestProvider.test.ts # main 7462f234e8 with only the PR head's two test files
[04:18:27.157] ERROR (#6): Error [AssertionError]: expected { …(4) } to deeply equal { items: [], truncated: true, …(2) }
expected: { items: [], truncated: true, continues: true, cursorAdvance: 1 },
× filters listed pull requests by the requested state 8ms
[04:18:30.531] ERROR (#5152): Error [AssertionError]: expected {} to deeply equal { Object (github.com pingdotgg/t3code) }
expected: { 'github.com pingdotgg/t3code': '2026-07-02T00:00:00Z|4|7' },
[04:18:30.569] ERROR (#5546): Error [AssertionError]: expected {} to deeply equal { Object (github.com pingdotgg/t3code) }
expected: { 'github.com pingdotgg/t3code': '2026-07-03T00:00:00.000Z|3|' },
× carries a list on past an empty slice whose host consumed rows 32ms
× carries a list on from its read time when the first slice kept nothing 35ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯
FAIL |t3| src/pullRequest/PullRequestService.test.ts > carries a list on past an empty slice whose host consumed rows
AssertionError: expected {} to deeply equal { Object (github.com pingdotgg/t3code) }
FAIL |t3| src/pullRequest/PullRequestService.test.ts > carries a list on from its read time when the first slice kept nothing
AssertionError: expected {} to deeply equal { Object (github.com pingdotgg/t3code) }
FAIL |root| packages/source-control-forgejo/src/server/ForgejoPullRequestProvider.test.ts > filters listed pull requests by the requested state
AssertionError: expected { …(4) } to deeply equal { items: [], truncated: true, …(2) }
Test Files 2 failed (2)
Tests 3 failed | 114 passed (117)
exit 1
Generated with Claude Opus 5.5 in T3 Code Nightly
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped, well-tested Forgejo list bug fix that corrects merged/closed filtering and preserves pagination through slices containing only filtered rows. It has no schema, deployment, security, billing, default, or static-analysis configuration impact. You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Forgejo lists merged pull requests under state=closed, and the provider returned every row it read, so the Closed and Merged views showed the same list. Keep only rows whose merged flag matches the requested view. The continuation cursor still counts every row read, and the walk reads past pages whose rows were all excluded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A slice that kept few rows read on until it had a full limit of them, so the Closed view of a repository where most closed pull requests were merged read many more pages than before. Stop after about limit rows as before, and read on only while the slice has kept nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Closed slice that kept no rows read on to the end of a merge-only history, so one repository could hold the list for many slow pages. The provider stops at its row budget again, and the service now issues a continuation for an empty slice whose host consumed rows, from the previous boundary or the read time. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ases Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
4d07d58 to
8caefe9
Compare
There was an error while loading. Please reload this page.
|
Note Written by merged current main into the existing head without rebasing at blacksmith live forgejo-to-client verification was not repeated for this merge; the separate verification comment records the earlier real-provider run. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note Written by Verified in a real dev environmentverified unchanged head captured the actual web client's additional authenticated websocket calls with closed still needs load more on the web client with this history. the fix removes wrong-state payloads and preserves continuation; it does not automatically exhaust the history. blacksmith main, closed first page: pr head, same repository and closed first page: pr head, after clicking load more: Not verifiednative ios/android, electron shell, macos/windows, remote/relay/tunnel connections, the fj credential path, and other forgejo versions or slow external hosts. exercised the linux web client and the real forgejo/tea provider path. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…osed-list # Conflicts: # packages/source-control-forgejo/src/server/ForgejoPullRequestProvider.ts
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thorough pagination work! #24772 (cf4514d19f) already filters merged and closed rows on main. Please rebase and cut this down to the remaining bounded-scan and empty-slice continuation fix, which prevents a single request from walking an arbitrarily long history.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…closed-list Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… to it Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Note 🤖 Opus 5.5 replying on behalf of Victor. Thanks, cut down in 5bbb14b. I merged current main (20ef934) instead of rebasing, since our contributor rule doesn't rewrite a pushed branch. The diff on top of main is now 4 files, +64/-5. What's left:
#24772 covers the merged/closed filtering, so I dropped our provider tests for it. The row budget is now one assertion in #24772's own test, and the service keeps its three-row table. Both fail on main. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo Closing. This PR has been open for more than 3 weeks, and |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.