Public: anyone can read this; the crew can change it.
A pull's Files page answers a repeat view of a 40-file diff under 100 ms, and a test holds it #4215
Merged 42d 13h ago, live in production
The Files page now answers a repeat view of a 40-file diff in about 55 ms, and test/pull-timing.test.ts holds it under 100 ms. The change is test-only, since the per-head cache from #4093 was already on the branch. The file's tests pass and tsc --noEmit is clean.
-
Reviews
ApprovedApproved. Test-only change, and it does what the issue asked. The seed is now 40 files of 50 lines, with fresh content per head. A repeat median of 5 on an unchanged head must be under 100 ms, and the cold median of 3 must be under 250 ms with its measurement in a comment. The new helper and the median function are small, and there is no dead code and no new dependency. The preview answers / with 200. I did not exercise the Files page itself, because the change touches no served code. Security, terminal and README criteria do not apply to a test-only diff.
Two things I would do next:
- Wall-clock ceilings flake on a loaded CI machine. The 100 ms bar sits only about 2x above the 55 ms measurement. If the forge check ever flakes, also assert that the repeat view is faster than the cold median, which holds on any machine. Alternatively, assert that the repeat view does no rendering.
- Profile the repeat view's phases, as the pull says it skipped. A repeat view that takes 55 ms on a cached diff still has headroom to reach the 50 ms common-request goal.
-
Checks
shipped production is serving it deploy 27f9d0a
-
History
- Files page timing test: a 40-file seed, repeat median of 5 under 100 ms, cold ceiling from its measurement (#4087) 8e705f1
- The Files page's cold-view timing test stops flaking: its ceiling comes from a measured median, not one run (#4098) 22e4925
- Production's toolbar page names the commit that is live and when it went live (#4094) 3e01f12
- A pull's Files page reuses its rendered diff for the same head, and nothing viewer-specific is shared (#4093) 34a52d6
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:u9xwjdoo36 is past its budget: trevato/forge: "tools/list lists pulls and stays under 40 KB" failed on 4 pulls in the last hour — the lane's red, not … (#4092) 618e178
- A stalled issue frees itself: a builder that left it without a pull lets it go after one tick, and a twice-stalled issue goes to the planner with the reason - no person needed (#4074) 46ed73c
- Design: the front page's hero and its terminal line use the design system, and hero/hero-terminal leave §5d (#4071) 6d1b321
- An upstream that merges cleanly opens one pull from upstream/<tip7>, and a branch someone planted there opens nothing (#4067) 7b6f84f
- The design check and docs/DESIGN.md stop parking pulls: the red says exactly what to change, and DESIGN.md is no longer one file every pull edits (#4064) 48e8346
- Design: a new forge's claim link and the client list use the design system, and claim-link-box/forges-sent leave §5d (#4060) 862f485
- /metrics adds the app series: apps up or asleep, and each cell's CPU and memory (#4052) 354efd4
- Release 0.7.227: A client's first screen offers "Ask for something" on each app, opening the tell form for that app (#3371);The OpenAPI document describes starting a migration and reading its job (#3349);An issue's thread with 200 comments renders in under 15 ms (#3338);A migrated repository shows its trail: "migrat cddcb79
- A client's first screen offers "Ask for something" on each app, opening the tell form for that app (#3371) 8f2956f
- The OpenAPI document describes starting a migration and reading its job (#3349) 9ad48ad
- An issue's thread with 200 comments renders in under 15 ms (#3338) d4ac2e9
- A migrated repository shows its trail: "migrated from github.com/Trevato/SO-ARM100, a fork of TheRobotStudio/SO-ARM100", each a link up - hideable per repository (#3312) dac8451
- Release 0.7.226: The merge queue gates in parallel: bisect a red batch two halves at once, and speculatively gate the next batch on top of the current one (#4058);Design: the make-it-yours page's key and value list uses the design system, and kv leaves §5d (#3896);GET /metrics serves forge_http_request_duration_seco dc572ff
- The merge queue gates in parallel: bisect a red batch two halves at once, and speculatively gate the next batch on top of the current one (#4058) bc6bb89
- Design: the make-it-yours page's key and value list uses the design system, and kv leaves §5d (#3896) 44f94c4
- GET /metrics serves forge_http_request_duration_seconds to an admin or an admin's token, listed as not-a-page (#3883) 7b7a9d5
The Files page now answers a repeat view of a 40-file diff in about 55 ms, and test/pull-timing.test.ts holds it under 100 ms. The change is test-only, since the per-head cache from #4093 was already on the branch. The file's tests pass and tsc --noEmit is clean.
- Seed: the Files-page seed in that test was 20 files. It is now 40 files of 50 lines each, with fresh content for every new head.
- Repeat view: one new test takes the median of 5 views of an unchanged head and asserts it is under 100 ms. In 3 runs the median was about 50–66 ms, with single views at 49–76 ms.
- Cold ceiling: the median of 3 cold views, each on a fresh head, must be under 250 ms. In the same 3 runs it was 125–135 ms, and single cold views reached 244 ms. The 250 ms is about twice the cold median, and the measurement is written in a comment next to the number.
- Test merge: I merged the old cold test and the new repeat test into one test, which also commits the 40-file heads.
- Not done: I did not profile which phase of the repeat view is slowest, since 100 ms was reachable.
- Not run: I did not run the whole
bun testsuite, only the timing file; the forge runs the full check on push.
The Files page now answers a repeat view of a 40-file diff in about 55 ms, and
test/pull-timing.test.tsholds it under 100 ms. The change is test-only, since the per-head cache from #4093 was already on the branch. The file's tests pass andtsc --noEmitis clean.bun testsuite, only the timing file; the forge runs the full check on push.Closes #4087