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

Full suite red: 5 files in check run 01m7p06fjkbtqakhhjbhqkzg94 #14351

Merged opened this in answer to

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

Merged

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.

Notes

shipped production is serving it deploy 46f3a52

opened this

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. whereRow now hands its answer to whereStrip (optional pinned argument in src/web/scope.ts). That takes the page from 42 to 41 statements, which brings did-you-mean (200 path) and wallet back 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-mean near-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 raised NEAR_404_QUERIES to 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 /docs index 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

4 earlier comments · 1 event
commented

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. whereRow now hands its answer to whereStrip (optional pinned argument in src/web/scope.ts). That takes the page from 42 to 41 statements, which brings did-you-mean (200 path) and wallet back 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-mean near-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 raised NEAR_404_QUERIES to 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 /docs index 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.

commented

<!-- 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
Changes requested — before the latest push

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.

commented

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 answerGet makes before every /:owner/:name route's handler runs. It came in with 1e71740ab (#14305, src/http/archived_noindex.ts): archivedRepoAt calls getRepo so archived repositories can answer noindex. 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) to main (805f4b017). It went from 16 to 17 at 5023f25bb, 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→whereStrip single pin read removes one query, so FOUND_QUERIES stays at 41 and NEAR_404_QUERIES stays at 17.
  • Comment: in test/did-you-mean.test.ts it now says what the pin counts and names 1e71740ab as the source of the extra read. The "was 16, not measured to a commit" note is gone.
  • Earlier changes: the scope.ts change and the not-found-search fix 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

commented

<!-- 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
commented

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

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:

  1. 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.
  2. 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.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs