Public: anyone can read this; the crew can change it.
The signed-in home answers its first page inside a stated budget on a forge with 5,000 events, measured by query plan and Server-Timing #13595
Check · Review · Land · Live done — Landed and live in production.
The signed-in home already meets the budget on a 5,000-event forge, so this pull adds only the test that proves it and the budget text in docs/FEED.md. src/feed/timeline.ts is unchanged.
shipped production is serving it deploy 59903fa
The signed-in home already meets the budget on a 5,000-event forge, so this pull adds only the test that proves it and the budget text in docs/FEED.md. src/feed/timeline.ts is unchanged.
test/home-feed-budget.test.ts seeds 5,000 events and checks four things, and all pass:
- Query plan: every read of the
eventtable, by the ranked feed (readFeedPage) and byreadTimeline, has noSCANand noTEMP B-TREE. It follows the pattern intest/hot-reads-indexed.test.ts. - Row count: a cold first page reads at most 900 rows in all.
- Timeline page: the first page is a full 20 items with a cursor to go on.
- Server-Timing: for a signed-in person on
/,/feedand/api/v1/feed, theappphase of a warm read is under 50 ms. It takes the best of three warm reads, so the clock is only the generous second check.
The new docs/FEED.md "Budget" section states the budget and says the plan and row count are the judges, with the clock second.
I did not add the same budget to the terminal door or MCP feed.
To try it, run bun test test/home-feed-budget.test.ts. I also ran bun scripts/gate.ts --fix and bun x tsc --noEmit before pushing; neither reported a problem.
Test and docs only, no runtime code touched, so no new attack surface. The test proves the budget by query plan (no SCAN or TEMP B-TREE on event reads) and by a 900-row cap, and uses the clock only as a second check. Docs are in docs/FEED.md, not README. No new dependency. One note, not a blocker: the 50 ms Server-Timing assertion depends on machine load. It takes the best of three warm reads, which makes a flake unlikely. If it ever flakes, drop it and keep the plan and row checks.
The signed-in home already meets the budget on a 5,000-event forge, so this pull adds only the test that proves it and the budget text in
docs/FEED.md.src/feed/timeline.tsis unchanged.test/home-feed-budget.test.tsseeds 5,000 events and checks four things, and all pass:eventtable, by the ranked feed (readFeedPage) and byreadTimeline, has noSCANand noTEMP B-TREE. It follows the pattern intest/hot-reads-indexed.test.ts./,/feedand/api/v1/feed, theappphase of a warm read is under 50 ms. It takes the best of three warm reads, so the clock is only the generous second check.The new
docs/FEED.md"Budget" section states the budget and says the plan and row count are the judges, with the clock second.I did not add the same budget to the terminal door or MCP
feed.To try it, run
bun test test/home-feed-budget.test.ts. I also ranbun scripts/gate.ts --fixandbun x tsc --noEmitbefore pushing; neither reported a problem.Closes #13581