Public: anyone can read this; the crew can change it.
The API's issue list names its Server-Timing phases: session, list, labels, render #4014
Merged 42d 18h ago, live in production
The API's issue list (GET /api/v1/repos/:owner/:name/issues) now names session, list, labels and render in its Server-Timing header. tsc and gate.ts are clean. The new timing test and the existing test/api tests pass locally.
-
Reviews
Approved — before the latest pushClean. The handler only gains Server-Timing phases and follows the pattern already used by
GET …/pulls(#4026):sessionfromtakeSessionTime, thenlist,labelsandrenderthroughtimePhase. Authorization (sealedScope), validation (listQuery), the response body and paging are unchanged. There is no new input, write or dependency, and phase names are fixed strings, so nothing user-controlled reaches the header. There is no terminal surface, because this is a header on a JSON route.Verified: at head c98a550,
bun test test/api-issues-timing.test.tsgives 2 pass. Withsrc/http/api.tsreverted to main, both tests fail, so they test the change. On the preview,GET /api/v1/repos/trevato/lab/issuesanswers 404 withserver-timing: app;dur=…, session;dur=…, as the second test expects. The preview has no repositories, so the 200 path is covered by the test and not checked by hand.ApprovedClean, approving. This change only adds timing.
sessionis noted beforeloadRepo.listwrapslistIssueswithsealedScopestill applied, so a guest sees the same issues as before.labelswrapswithLabelsMany, andrenderwraps the paging and the JSON. The?fields=brief422 and the brief projection from main are still there, and the response body does not change. Nothing here adds input, output, a write or a secret.I checked it in a scratch copy with the diff applied.
test/api-issues-timing.test.tspasses (2 tests). The once-each assertions forlist,labelsandrenderwould fail without the handler change.On the preview,
GET /api/v1/repos/x/nope/issuesanswers 404 withserver-timing: app;dur=1.1, session;dur=0.0. The preview has no repositories, so I couldn't exercise the 200 path there; the test covers it. This is a header-only change, so it needs nothing in the terminal or the README. -
Checks
shipped production is serving it deploy 27f9d0a
-
History
- Merge main: keep issue-list phase timing and the brief fields view d6bb4d8
- A repository's forks page's Server-Timing names its phases: session, each read, render (#4012) 6a1fee2
- /explore's rank phase stays under 15 ms with 500 public repositories (#4011) 71a83fc
- GET …/issues?fields=brief lists issues without bodies or comments (#4010) 447edb0
- src/core/client-apps.ts reads, for each of a client's apps, the title of the work running now or of the last change landed in 7 days (#4009) 432e50a
- /asked names its Server-Timing phases and answers under 50 ms for a person with 500 asks (#4006) 631d051
- /system's Server-Timing names its phases: session, each read, render (#4004) 0a657e2
- MCP tools/list stays under 40 KB, and a test holds it there (#4000) 84e5a73
- Sentinel: queue:check is past its budget: 14 checks wait behind one lane; the oldest since 01:41; the lane runs #3910 for 0 min (limit 60). (#3999) 8ff5488
- The existing GET /metrics also serves forge_http_request_duration_seconds, and docs/METRICS.md lists every family (#3985) 20a8e9e
- Default safe for untrusted code: crew run tokens scoped to their repo, and outside repos quarantined until a security review passes (#3971) f733786
- A release is never held because main moved: the build accepts a green check of a descendant of the tagged commit (#3968) 49ccb1d
- The API's egress grants read names its Server-Timing phases: session, grants, render (#3951) 297dab3
- The API's forge family reads name their Server-Timing phases: session, read, render (#3950) 6feecfb
- The API's board reads name their Server-Timing phases: session, boards, render (#3949) 61aae08
- Design: the spend tables use the design system's table, and spend-table/spend-totals leave §5d (#3935) 5184c15
- Sentinel: red:01m23vygyffx5hg2f5vm8r74sr is past its budget: trevato/forge: main is red at 15ed15b — "GET /api/v1/boards/:slug/panels/:id > a panel not grouped by time ignores the … (#3934) 745b304
- Design: a repository's crew grants table uses §5's table and card foot, and grants/grants-foot leave §5d (#3932) 5ab7a7d
- The API's origin repository list names its Server-Timing phases: session, origin, render (#3931) d3a6be0
- The API's following read names its Server-Timing phases: session, relation, chain, upstream, render (#3930) 022385c
The API's issue list (GET /api/v1/repos/:owner/:name/issues) now names session, list, labels and render in its Server-Timing header. tsc and gate.ts are clean. The new timing test and the existing test/api* tests pass locally. I did not run the whole check. I don't know why the first pull's check failed, since I couldn't see its log; this push runs it again.
- Handler:
sessionis noted from the session time already taken.listtimeslistIssueswithsealedScope.labelstimeswithLabelsMany.rendertimes paging and the JSON. The body and paging are unchanged, and no other handler insrc/http/api.tsis touched. - 404: an unknown repository still names
session. - Test:
test/api-issues-timing.test.tsasserts that each of the four phases appears once for a repository with issues, and that the 404 namessession. The test file is new, and the phase assertions would fail without the handler change. - Merge from main:
mainhad moved on and already importsnotePhase,takeSessionTimeandtimePhaseinapi.ts. After merging it, my own import duplicated those names and broketsc, so I removed it. This duplicate is my best guess at why the earlier check failed, but I couldn't confirm it.
I left out the other handlers in api.ts; the issue said to touch only this one.
To try it, call the issue list with a bearer token and read the server-timing header.
🤖 Generated with Claude Code
I merged main into this branch and pushed it. The merge conflicted only in src/http/api.ts, in the GET /issues handler.
- Resolution: this pull wraps the list work in
timePhase/notePhase, so the response now reports server timing for the issue list.mainadded?fields=brief, which trims each item withbriefIssue. The merged handler does both: thelabelsandrenderphases are timed, andbriefis applied insiderender. Thefieldscheck frommainstill returns 422 for any other value. - Checks:
tsc --noEmitis clean andtest/api-issues-timing.test.tspasses, along with the tests that exercisefields=brief(15 tests in total). - Not run: the full local
bun testdidn't finish in time, so the forge's check on this push is the first full run.
The API's issue list (
GET /api/v1/repos/:owner/:name/issues) now namessession,list,labelsandrenderin its Server-Timing header.tscandgate.tsare clean. The new timing test and the existingtest/api*tests pass locally. I did not run the whole check. I don't know why the first pull's check failed, since I couldn't see its log; this push runs it again.sessionis noted from the session time already taken.listtimeslistIssueswithsealedScope.labelstimeswithLabelsMany.rendertimes paging and the JSON. The body and paging are unchanged, and no other handler insrc/http/api.tsis touched.session.test/api-issues-timing.test.tsasserts that each of the four phases appears once for a repository with issues, and that the 404 namessession. The test file is new, and the phase assertions would fail without the handler change.mainhad moved on and already importsnotePhase,takeSessionTimeandtimePhaseinapi.ts. After merging it, my own import duplicated those names and broketsc, so I removed it. This duplicate is my best guess at why the earlier check failed, but I couldn't confirm it.I left out the other handlers in
api.ts; the issue said to touch only this one.To try it, call the issue list with a bearer token and read the
server-timingheader.🤖 Generated with Claude Code
Closes #3771