Public: anyone can read this; the crew can change it.

/sitemap.xml names its Server-Timing phases: repos, render #5389

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`/sitemap.xml` now reports `repos` and `render` in `Server-Timing`, alongside the existing `app` total. I pushed the branch. The new test and the existing `standards` and `route-timing-coverage` tests pass. I couldn't run the type check here: `tsc` fails on a missing `bun` type definition, so it is unchecked.

shipped production is serving it deploy 4915f35

opened this

/sitemap.xml now reports repos and render in Server-Timing, alongside the existing app total. I pushed the branch. The new test and the existing standards and route-timing-coverage tests pass. I couldn't run the type check here: tsc fails on a missing bun type definition, so it is unchecked.

  • Change: in sitemapXml (src/web/standards.ts), sitemapRepos is wrapped in timePhase(ctx.request, "repos", …). The origin escaping, URL list and XML join are wrapped in timePhase(ctx.request, "render", …). The body and the application/xml; charset=utf-8 content type are unchanged.
  • Test: test/sitemap-timing.test.ts creates two public repositories and one private one. It asserts both phase names in the header, that the body lists the two public repositories, and that it doesn't contain the private one. I didn't run it against the old code to watch the phase assertion fail.
  • #4109: the edit stays inside that one function, but the XML build moved into the render wrap. If #4109 adds /explore there, it will need a small merge fix.

I added no dependencies and did not touch the cache or the other well-known files.

🤖 Generated with Claude Code

Closes #5375

commented

/sitemap.xml now reports repos and render in Server-Timing, alongside the existing app total. I pushed the branch. The new test and the existing standards and route-timing-coverage tests pass. I couldn't run the type check here: tsc fails on a missing bun type definition, so it is unchecked.

  • Change: in sitemapXml (src/web/standards.ts), sitemapRepos is wrapped in timePhase(ctx.request, "repos", …). The origin escaping, URL list and XML join are wrapped in timePhase(ctx.request, "render", …). The body and the application/xml; charset=utf-8 content type are unchanged.
  • Test: test/sitemap-timing.test.ts creates two public repositories and one private one. It asserts both phase names in the header, that the body lists the two public repositories, and that it doesn't contain the private one. I didn't run it against the old code to watch the phase assertion fail.
  • #4109: the edit stays inside that one function, but the XML build moved into the render wrap. If #4109 adds /explore there, it will need a small merge fix.

I added no dependencies and did not touch the cache or the other well-known files.

🤖 Generated with Claude Code

Approved

The preview serves server-timing: app;dur=1.8, repos;dur=0.8, render;dur=0.1 on /sitemap.xml. The body, content type and security headers are unchanged. The change is small and stays in one function, and the test covers both phase names and the private-repo exclusion. No design or security surface is touched. I did not run the tests or the type check. Two things to do next: (1) in the test, assert server-timing also keeps app;dur=, and check that the phase assertions fail against the base; the pull says that was not tried. (2) Put the new timePhase import next to the other ../core/ imports in standards.ts, and run the type check somewhere that has the bun types.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs