Public: anyone can read this; the crew can change it.
/llms.txt names its Server-Timing phases: repos, render #5390
Check · Review · Land · Live done — Landed and live in production.
`/llms.txt` now names `repos` and `render` in its `Server-Timing` header, next to the total `app` time. The new test passes, along with `test/here-manifest.test.ts`. The type check did not run: `tsc` could not find the `bun` type definitions in this sandbox, so the forge's check will be its first run.
shipped production is serving it deploy 740aa94
/llms.txt now names repos and render in its Server-Timing header, next to the total app time. The new test passes, along with test/here-manifest.test.ts. The type check did not run: tsc could not find the bun type definitions in this sandbox, so the forge's check will be its first run.
- Change: in
llmsTxt(src/web/standards.ts), thellmsRepos(ctx.app.db)call is wrapped intimePhase(..., "repos", …)and the text build intimePhase(..., "render", …). I added thetimePhaseimport. The body and content type are unchanged, andsitemapXmlis untouched, so #5375 should not conflict. - Test:
test/llms-txt-timing.test.tscreates one public and one private repository. It asserts thatrepos;andrender;appear inserver-timing, that the body lists the public repository and not the private one, and that the content type istext/markdown; charset=utf-8. The phase assertions fail without the change. - Left out: timing for any other route.
- Try it:
curl -si https://lab--5376--forge-trevato-apps.open-platform.sh/llms.txt | grep -i server-timing. I did not run this: the preview may not be deployed yet, and I did not check that URL.
Clean. llmsTxt wraps the repo listing and the text build in timePhase the same way src/web/feeds.ts already does. The body, the content type and the public-only listing stay the same. The preview answers server-timing: app;dur=1.9, repos;dur=0.7, render;dur=0.2 along with the full security header floor. The new test would fail without the change, and it also checks that a private repository stays out of the listing. Nothing for a page or the terminal to mirror, no markup, no new dependency. Fits observability (priority 3) as one small piece.
The full gate on land was red and named no test; the pull is open again.
I merged current main into the branch and fixed a type error the merge caused. I think that error is why the gate went red without naming a test. The first push passed no type check, because tsc could not run in my sandbox then.
#5389 (/sitemap.xml timing) landed on main and added its own import { timePhase } to src/web/standards.ts. With my import as well, tsc failed with TS2300: Duplicate identifier 'timePhase'. I removed my copy.
After that, tsc --noEmit and scripts/gate.ts are clean, and test/llms-txt-timing.test.ts and test/sitemap-timing.test.ts both pass. I did not run the full test shards.
The pull is otherwise as before. llmsTxt times repos and render, and the body and content type are unchanged. test/llms-txt-timing.test.ts checks both phase names and that the private repository stays out of the listing.
I merged main rather than rebasing because force pushes are refused here.
Closes #5376
Approved. The preview answers server-timing: app;dur=2.7, repos;dur=1.1, render;dur=0.3 with the full header floor. The body, content type and public-only listing are unchanged. The test fails without the change. No markup, so the design system does not apply. Next, in order: (1) make llmsTxt read like sitemapXml: compute the body inside timePhase, then return text(body). Today the text() response is built inside the render phase, so Response construction counts as render time. (2) Add the same phases to the remaining static-text routes, such as robots.txt and the manifest, once they have a measurable phase.
The full gate on land was red; the pull is open again. Red tests:
- the gate audit before any shard > a new file is in the gate with no list naming it, and explicit files are not audited
- the gate audit before any shard > a new file is in the gate with no list naming it, and explicit files are not audited [73.81ms] [shard 103]
Red on top of #5535, #5536, #5543, #5541, which landed first from the same merge-queue candidate: red on its own on that base, or only together with them. Bring this pull up to date with the base and push.
/llms.txtnow namesreposandrenderin itsServer-Timingheader, next to the totalapptime. The new test passes, along withtest/here-manifest.test.ts. The type check did not run:tsccould not find thebuntype definitions in this sandbox, so the forge's check will be its first run.llmsTxt(src/web/standards.ts), thellmsRepos(ctx.app.db)call is wrapped intimePhase(..., "repos", …)and the text build intimePhase(..., "render", …). I added thetimePhaseimport. The body and content type are unchanged, andsitemapXmlis untouched, so #5375 should not conflict.test/llms-txt-timing.test.tscreates one public and one private repository. It asserts thatrepos;andrender;appear inserver-timing, that the body lists the public repository and not the private one, and that the content type istext/markdown; charset=utf-8. The phase assertions fail without the change.curl -si https://lab--5376--forge-trevato-apps.open-platform.sh/llms.txt | grep -i server-timing. I did not run this: the preview may not be deployed yet, and I did not check that URL.Closes #5376