Nerudo

Open a pull request that moves hundreds of directories

The page of #449, a pull request that moved hundreds of directories, now opens and lists its 1,415 files: the diff reads missing trees a directory level at a time, lists each move as one renamed file and reads the texts of at most 64 files.

Recorded product walkthrough

On 2026-11-06 the page of pull request #449 in nerudo/nerudo, the change that laid the repository out by role, answered INTERNAL SERVER ERROR in place of the pull request. Nobody could read its files or seal it from the browser. T-377 changes the diff behind the pull request page and Nerudo's other diff views. It landed as #450 (b2b21af) and #451 (c58699f), and production runs both. #449's page now opens and lists its files.

Both figures are signed-out captures of production, taken in headless Chromium on 2026-11-06 at 20:34 UTC. The file and tree counts below come from git's listings of #449's two commits, counted locally; they are not a run of Nerudo's code.

What the page shows now

The top of merged PR #449's page: +230707 -230677 in 2385 files, and the tabs Conversation (0), Commits (1), Checks (3), Files changed (1415) and Context (0)
Signed-out capture of production (nerudo.dev/nerudo/nerudo/pulls/449) in headless Chromium, 2026-11-06 20:34 UTC, viewport only.

Figure 1 is the top of #449's page. The header gives the size from the landing record: +230707 −230677 in 2385 files. The tab reads "Files changed (1415)". That number is the length of the file list in the app API's answer, which exists only when the diff finishes. A failed diff fails the whole answer, which was the error page.

The numbers differ because a move is now one entry. The local count pairs deleted and added files of the same mode and object, as the forge now does, in the listings of the base, 50a38ea, and the head, eb9395c. Of the 2,385 paths that differ, 970 pairs are moves, 15 files changed, 215 were added and 215 deleted: 1,415 entries, the number on the page.

Why the page ran out of reads

On an Artifacts trunk, the forge's copy of trunk for pages reads Git objects one at a time. When a page needs an object the copy lacks, the forge reads it and runs the page again, up to 32 times (UI_READ_ROUNDS). Store::diff stops at the first tree it lacks, so each run got one more tree. In git's listings, a diff of #449's root trees reaches 280 distinct trees below the roots, far more than 32. Loading the page again did not help: a copy that holds more than 16 MB starts again empty at the beginning of a request (trim_ui).

#450 reuses the answer the releases page found for the same limit. probe_trees moves to trunk/views.rs, and changed_files runs it before the diff. It reads both sides of every entry whose ids differ; a missing tree is recorded as a miss, and the walk goes on. One run then asks for every missing tree of the next directory level. #449's changed trees are at most nine directories deep, so by that rule its diff needs about ten runs, not 281.

Every view built on changed_files gets the walk, among them the commit page, which also loaded signed out for eb9395c. A unit test diffs a move of 40 nested directories in a store holding only the two root trees and requires 3 rounds or fewer; the commit message reports 81 without the walk.

The second limit: file texts

With its trees read, #449's page went on to read the text of all 2,385 paths in the trunk's Durable Object. As #451's commit message records, the isolate went over its memory limit and was reset, and the forge was rolled back the same hour. #451 adds two rules.

In diff_entries, a deleted file and an added file with the same object and mode are one "renamed" entry, and neither text is read. A file that moved and was also edited stays a delete and an add. With TextBudget, a view reads the texts of at most 64 files and stops after 4 MiB of text; every later file is listed without its lines. Every try counts, whether or not the text is already in the copy, so every run of a page asks for the same files. #449 has 445 entries that are not moves. The view tries the first 64 in path order, about 1.6 MB by #451's commit message, and lists the other 381 without text.

The pull request list: #451 merged as c58699f in batch 434, #450 as b2b21af in batch 433, #449 as eb9395c in batch 432
Signed-out capture of production (nerudo.dev/nerudo/nerudo/pulls) in headless Chromium, 2026-11-06 20:34 UTC, viewport only.

Figure 2, also a signed-out capture, is the pull request list: #449 merged as eb9395c in batch 432, #450 as b2b21af in batch 433, and #451 as c58699f in batch 434.

Limits

No figure shows the Files changed tab: it is page state with no URL, and the capture tool shoots a page as it loads. What follows is from the code. In the web app, a move shows its new path and the status "renamed", without the old path, and a file past the budget shows "Binary or large file.", the same words as a binary file. The forge's own pages say "renamed from …" and "Not shown".

The budget picks files by path, not by importance. The commit page keeps the first 100 paths before it pairs moves, so there a move whose old path falls past them is listed as added.

The error page from before the fix was not captured. The run counts follow from the code and the git counts, not from production, and the Durable Object's memory was not measured. No Rust toolchain was available here, so the tests named in the commit messages were not rerun; the commit messages report them passing.

Walkthrough details

Signed-out captures of production pages of the public nerudo/nerudo repository, taken in headless Chromium (viewport only) on 2026-11-06. The counts of files and trees in the article come from git ls-tree listings of #449's two commits (50a38ea and eb9395c), counted locally; they are not a run of Nerudo's code. No Rust build ran.

  1. Open https://nerudo.dev/nerudo/nerudo/pulls/449 signed out and read its header and tab labels.
  2. Open https://nerudo.dev/nerudo/nerudo/pulls signed out and read the rows of #449, #450 and #451.
  3. Open the commit page of eb9395c signed out and check that it renders.
  4. From git ls-tree listings of 50a38ea and eb9395c, pair deleted and added files of the same mode and object as views::diff_entries does, and count the entries by status.
  5. From the same listings with trees, count the distinct tree objects a diff of the two root trees reaches, by depth.

Captured · Product view · Verification source