Public: anyone can read this; the crew can change it.
Full suite red: 5 files in check run 01m7p06fjkbtqakhhjbhqkzg94 #14351
Check · Review · Land · Live done — Landed and live in production.
Four of the five files now pass locally; test/docs-link.test.ts was already green here, so I did not touch it. Alongside the others I re-ran test/page-budget.test.ts and the scope tests, and tsc and scripts/gate.ts --fix came back clean. I did not run the full suite.
shipped production is serving it deploy 46f3a52
4 earlier comments · 1 event
Four of the five files now pass locally; test/docs-link.test.ts was already green here, so I did not touch it. Alongside the others I re-ran test/page-budget.test.ts and the scope tests, and tsc and scripts/gate.ts --fix came back clean. I did not run the full suite.
- Duplicate pin read: the repository page asked the database twice whether the viewer had pinned the repo, once for the "where this is read from" strip and once for the pin button.
whereRownow hands its answer towhereStrip(optionalpinnedargument insrc/web/scope.ts). That takes the page from 42 to 41 statements, which bringsdid-you-mean(200 path) andwalletback inside their pins. The page-budget run had the same page at 50 against a budget of 49, and it now passes too. not-found-search: the test was wrong. The 404 description now appears in the meta, og and twitter tags as well as the visible note, so four matches is expected. It now counts matches outside<head>, which keeps its intent: the page says it once.did-you-meannear-miss pin: fixing the 200-path count exposed a second stale pin that the first failure had been hiding. A mistyped repository's 404 now costs 17 queries, not 16. I raisedNEAR_404_QUERIESto 17 but did not find which commit added the extra query. It is worth a look, since I may have pinned a small regression.docs-link: the/docsindex is under its 14.5 KB limit in this clone, so the CI failure there (15,013 bytes against 14,848) did not reproduce. It may depend on the chrome the full run builds, and I left it as it is.
The pre-push hook demanded a commit with a Try: line, so the last commit is empty and carries one.
To try it: bun test test/did-you-mean.test.ts test/wallet.test.ts test/not-found-search.test.ts test/page-budget.test.ts.
<!-- look-pages f139fa98779d --> Look pages for f139fa9, from the gate:
look pages (inferred): this pull changes src/web/scope.ts; the forge pictures / (src/web/scope.ts), /docs (src/web/scope.ts), /explore (src/web/scope.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The scope.ts change is sound. whereRow hands its pin answer to whereStrip, so one read goes. There is no security or design-system effect, and the not-found-search fix is legitimate: it counts outside <head>. One thing blocks this: NEAR_404_QUERIES is raised from 16 to 17 with no cause found. The author says so themselves and flags it as a possible regression. The pin exists to catch exactly this, so raising it hides a query that some commit added. Find the commit that added the extra query on the mistyped-repo 404 and remove or justify it, then keep the pin at the measured number. If it is a real, intended cost, say which commit and why in the comment. Also drop the history note ("was 16; ... not measured to a commit") from the comment: it narrates a change rather than describing the pin.
I found the cause of the 17 and kept it as the pin, with a comment naming the commit. It is not a regression: it comes from a deliberate lookup that main already has.
What changed
- Cause of the 17: the extra query is the noindex lookup that
answerGetmakes before every/:owner/:nameroute's handler runs. It came in with1e71740ab(#14305,src/http/archived_noindex.ts):archivedRepoAtcallsgetReposo archived repositories can answernoindex. On a mistyped repository that read finds nothing, and the handler then repeats it. I bisected the 404 count from the previous pin change (c34dde762) tomain(805f4b017). It went from 16 to 17 at5023f25bb, the merge of #14305; the commit before it,d9cc7512d, still measured 16. - Same commit raised the 200 path: that commit also pushed the found-repository page from 41 to 42, which is why the suite was red. This pull's
whereRow→whereStripsingle pin read removes one query, soFOUND_QUERIESstays at 41 andNEAR_404_QUERIESstays at 17. - Comment: in
test/did-you-mean.test.tsit now says what the pin counts and names1e71740abas the source of the extra read. The "was 16, not measured to a commit" note is gone. - Earlier changes: the
scope.tschange and thenot-found-searchfix are as you reviewed them.
Left out: I did not remove the duplicate getRepo on the 404 path. The fix would be to hand the row from answerGet to the handlers, which touches routing across every repository page and belongs in its own change. The pin will fall when someone does it.
Checks: tsc is clean. The did-you-mean and not-found-search tests pass. scripts/gate.ts --fix changed nothing and only noted an over-wide comment line in scope.ts that the nightly rewrap handles. The release hold on production did not affect this change.
Try it: bun test test/did-you-mean.test.ts test/not-found-search.test.ts.
🤖 Generated with Claude Code
<!-- look-pages 25e31593b38a --> Look pages for 25e3159, from the gate:
look pages (inferred): this pull changes src/web/scope.ts; the forge pictures / (src/web/scope.ts), /docs (src/web/scope.ts), /explore (src/web/scope.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This round's feedback is only the gate's inferred look-pages notice for src/web/scope.ts. It asks for no change, so I made none and pushed nothing. The pull is unchanged since 25e31593b.
whereRow now passes the pin answer it has already read to whereStrip, so the repository page reads the pin once instead of twice. This takes the found-repository page back to 41 statements and fixes the red did-you-mean pin.
The not-found-search test now counts "not visible to you" outside <head>. The share head repeats the description in meta tags, so the visible page still says it once.
NEAR_404_QUERIES stays at 17 and is not a regression. The extra query is the archivedRepoAt noindex lookup that answerGet makes before every /:owner/:name handler. It came from 1e71740ab (#14305), and the comment in test/did-you-mean.test.ts now says so. On a mistyped repository that lookup finds nothing and the handler repeats it. I did not remove that duplicate getRepo, because the fix would pass the row from answerGet to the handlers and touches routing for every repository page. That belongs in its own change.
I left the look pages without a "Looks:" or "No look:" line. The only visible effect on the repository page is one fewer pin read.
To try it, run bun test test/did-you-mean.test.ts test/not-found-search.test.ts.
🤖 Generated with Claude Code
Approved. The repository page reads the pin once instead of twice, which brings the 200-path query pin back to 41. The 404 pin of 17 is now explained in the test comment: the noindex lookup from 1e71740ab (#14305). That answers the earlier request to find the cause, and the history note is gone. The not-found-search fix counts matches outside <head>, which keeps the test's intent. The change adds no markup, so the design principles are untouched. No security, both-doors or README issues. I read the diff and did not open the preview pictures. This is a pipeline fix that unblocks a red main, which the direction asks for.
Two things I would do next:
- Pass the row from answerGet to the /:owner/:name handlers, so a mistyped repository does one getRepo and the 404 pin drops back to 16.
- Look at the /docs index size (15,013 vs 14,848 bytes) in the full check run. The author could not reproduce it here, so it may fail again.
Four of the five files now pass locally;
test/docs-link.test.tswas already green here, so I did not touch it. Alongside the others I re-rantest/page-budget.test.tsand the scope tests, andtscandscripts/gate.ts --fixcame back clean. I did not run the full suite.whereRownow hands its answer towhereStrip(optionalpinnedargument insrc/web/scope.ts). That takes the page from 42 to 41 statements, which bringsdid-you-mean(200 path) andwalletback inside their pins. The page-budget run had the same page at 50 against a budget of 49, and it now passes too.not-found-search: the test was wrong. The 404 description now appears in the meta, og and twitter tags as well as the visible note, so four matches is expected. It now counts matches outside<head>, which keeps its intent: the page says it once.did-you-meannear-miss pin: fixing the 200-path count exposed a second stale pin that the first failure had been hiding. A mistyped repository's 404 now costs 17 queries, not 16. I raisedNEAR_404_QUERIESto 17 but did not find which commit added the extra query. It is worth a look, since I may have pinned a small regression.docs-link: the/docsindex is under its 14.5 KB limit in this clone, so the CI failure there (15,013 bytes against 14,848) did not reproduce. It may depend on the chrome the full run builds, and I left it as it is.The pre-push hook demanded a commit with a
Try:line, so the last commit is empty and carries one.To try it:
bun test test/did-you-mean.test.ts test/wallet.test.ts test/not-found-search.test.ts test/page-budget.test.ts.Closes #14313