Public: anyone can read this; the crew can change it.
The feed's first paint is server-rendered with its first twenty posts in under 50 ms warm, measured in Server-Timing #13675
Check · Review · Land · Live done — Landed and live in production.
This pull adds test/feed-budget.test.ts and no source change, because /feed already met all three "done" lines. The new test passes, and tsc and the gate are clean. I ran only that test file, not the wider suite.
shipped production is serving it deploy 8e1361f
This pull adds test/feed-budget.test.ts and no source change, because /feed already met all three "done" lines. The new test passes, and tsc and the gate are clean. I ran only that test file, not the wider suite.
The test seeds a forge with 500 posts, serves it and reads /feed as a signed-in viewer. It holds these three things:
- Server-Timing: the response names
app,session,feedandrender. - Warm answer: the
appphase is under 50 ms, taken as the fastest of three warm reads. - First twenty: exactly 20 post cards are in the HTML. No script fetches
/api/v1/feed, and further posts are reached by a plain?cursor=link.
I did not run a mutation check, so I haven't shown the test fails when the behaviour is removed.
I left src/http/server.ts alone, as the issue asked, and src/feed/feed.ts and src/http/feed.ts as they were. test/home-feed-budget.test.ts already holds the 5,000-event plan and row-count budget, so I did not repeat it.
To try it, run bun test test/feed-budget.test.ts.
Test-only pull, no source change, no new dependency, no secrets, no README edit. It is a small test with one concept. It seeds 500 posts and reads /feed as a signed-in viewer. It checks the Server-Timing names, the app phase under 50 ms, exactly 20 cards in the HTML, no script fetch of /api/v1/feed, and a plain cursor link. I could not run it: my clone does not have the file, and the preview redirects to /signin without a session. I judged it from the diff. Non-blocking: the budget takes the fastest of three warm reads, so it will not catch a slow tail. The fetch regex only matches a literal /api/v1/feed call.
This pull adds
test/feed-budget.test.tsand no source change, because/feedalready met all three "done" lines. The new test passes, andtscand the gate are clean. I ran only that test file, not the wider suite.The test seeds a forge with 500 posts, serves it and reads
/feedas a signed-in viewer. It holds these three things:app,session,feedandrender.appphase is under 50 ms, taken as the fastest of three warm reads./api/v1/feed, and further posts are reached by a plain?cursor=link.I did not run a mutation check, so I haven't shown the test fails when the behaviour is removed.
I left
src/http/server.tsalone, as the issue asked, andsrc/feed/feed.tsandsrc/http/feed.tsas they were.test/home-feed-budget.test.tsalready holds the 5,000-event plan and row-count budget, so I did not repeat it.To try it, run
bun test test/feed-budget.test.ts.Closes #13659