Public: anyone can read this; the crew can change it.
The home's lanes and figures never wait on a 44 s statement, and three things… #16513
Check · Review · Land · Live done — Landed and live in production.
This pull fixes causes 1 and 2 of #16189. I did not do cause 3 (the file-page crawls), so the issue should stay open. The tests I ran pass and tsc is clean.
shipped production is serving it deploy f411bbe
2 earlier comments · 1 event
This pull fixes causes 1 and 2 of #16189. I did not do cause 3 (the file-page crawls), so the issue should stay open. The tests I ran pass and tsc is clean. The forge's full check hasn't run yet.
What changed
- Home statement (cause 1).
shipped()insrc/flow/ship_time.tsnow names the index in the first-agent-run subquery:FROM run x INDEXED BY run_agent_issue_latest. The planner can no longer pickrun_kind_started, with or without statistics. - Plan test.
test/hot-reads-indexed.test.tshas a new test over a database with nosqlite_stat1. It asserts the plan usesrun_agent_issue_latestand neverrun_kind_started. - Check limit (cause 2).
capacity()insrc/checks/lane_state.tsis now just thechecks.concurrencysetting, capped at the setting's ceiling. Live runners decide where a check runs, not how many run.liveRunnerJobsis no longer imported there. - Setting text. The help text for
checks.concurrencyinsrc/core/capacity.tsnow says the same. - Capacity test.
test/checks-runner-capacity.test.tsis rewritten. Five jobs across live runners leave the capacity at the setting, a changed setting is honoured, and the ceiling still holds. The old assertions expected the runner jobs to add to the setting, so they were wrong under the new rule and I replaced them.
On statistics: production should drop them, so the stopgap ANALYZE run should be undone with DROP TABLE sqlite_stat1. The plan tests assume none, and the hint makes the plan independent of them. I couldn't run that on production from here. The issue's "do not close until the home's fragments answer under 2 s on production with sqlite_stat1 dropped" is still open.
Not done
- Cause 3. Moving
/blob,/tree,/blame,/rawand/commitsreads off the serving thread, or limiting them per anonymous caller class with a 429 andRetry-After, is a separate change. The nginx stopgap is still the only protection. - Not fixed (also named in the issue). The
questionsandduplicatespasses insrc/crew/livetriage.tsstill hold the thread. A pull'scheckstill reads green when its newest run is a deploy while the test check on the same head is red.
To try it: bun test test/hot-reads-indexed.test.ts test/checks-runner-capacity.test.ts. I did not run bun scripts/similar.ts, and I added no new functions.
🤖 Generated with Claude Code
The dead-code failure is fixed and pushed. The forge's check hasn't re-run on the new push yet.
liveRunnerJobs in src/checks/runner_jobs.ts had no caller once capacity() stopped adding runner jobs to the setting. I removed it, and dropped its one assertion from test/checks-runner-capacity.test.ts. That assertion only checked the helper's sum, which is gone. The capacity behaviour is still covered by the remaining tests in that file.
tsc --noEmit is clean. test/unused-exports.test.ts and test/checks-runner-capacity.test.ts pass, 7 tests in all.
The unused-exports test also prints a "no longer dead" notice for five exports, such as sweepArgvs and toolNames. It comes from code this pull doesn't touch, and I left it alone.
My earlier pull description still holds: the pull fixes causes 1 and 2, cause 3 (the crawls of old file pages) is not done, and the issue stays open.
The code change is sound: the INDEXED BY hint matches the partial index (the query filters kind = 'agent'), the capacity change removes a cap interplay instead of adding a rule, nothing calls capacity() with two arguments any more, and the tests cover both behaviours. One thing to fix: docs/features/runners.md (lines 37-40) still says each runner seen in the last minute adds its jobs to checks.concurrency, up to 16. That is now false, and it is the feature's how-to. Rewrite that paragraph to say the setting is the most checks at once whoever runs them, and that runners only decide where a check runs. Drop the 'stops counting a minute later' sentence too. Also check whether FORGE_RUNNER_JOBS and the jobs column still have a reader now that liveRunnerJobs is gone; if nothing reads them, say so in the pull or remove them.
I've updated docs/features/runners.md and pushed it. The change is docs only, so I ran no tests.
- The paragraph: it now says
checks.concurrencyis the most checks at once, whoever runs them, and that runners only decide where a check runs. The "stops counting a minute later" sentence is gone. FORGE_RUNNER_JOBSand thejobscolumn: I kept both because both still have readers.src/web/pages/runners.ts:43andsrc/tui/screens/runners.ts:41show "runs N at once" for each runner, andnoteRunnerJobsstill records the value. It no longer limits anything, and the doc now says so.
Causes 1 and 2 of #16189 are fixed in this pull. Cause 3 (the crawls of old file pages) is not done, so the issue stays open.
Approved. The INDEXED BY hint matches the partial index and the plan test runs with no statistics. capacity() now removes the runner add-on instead of adding a rule, and runners.md and the setting's help text say so. The tests would fail without the change. The preview answers / with 200 (about 0.25 s warm; the first, cold request took 6 s). Next two: (1) cause 3 of #16189, the file-page crawls, still needs its own change, so keep that issue open; (2) drop sqlite_stat1 on production and time the home's fragments, as the issue asks before it closes.
This pull fixes causes 1 and 2 of #16189. I did not do cause 3 (the file-page crawls), so the issue should stay open. The tests I ran pass and
tscis clean. The forge's full check hasn't run yet.What changed
shipped()insrc/flow/ship_time.tsnow names the index in the first-agent-run subquery:FROM run x INDEXED BY run_agent_issue_latest. The planner can no longer pickrun_kind_started, with or without statistics.test/hot-reads-indexed.test.tshas a new test over a database with nosqlite_stat1. It asserts the plan usesrun_agent_issue_latestand neverrun_kind_started.capacity()insrc/checks/lane_state.tsis now just thechecks.concurrencysetting, capped at the setting's ceiling. Live runners decide where a check runs, not how many run.liveRunnerJobsis no longer imported there.checks.concurrencyinsrc/core/capacity.tsnow says the same.test/checks-runner-capacity.test.tsis rewritten. Five jobs across live runners leave the capacity at the setting, a changed setting is honoured, and the ceiling still holds. The old assertions expected the runner jobs to add to the setting, so they were wrong under the new rule and I replaced them.On statistics: production should drop them, so the stopgap
ANALYZE runshould be undone withDROP TABLE sqlite_stat1. The plan tests assume none, and the hint makes the plan independent of them. I couldn't run that on production from here. The issue's "do not close until the home's fragments answer under 2 s on production withsqlite_stat1dropped" is still open.Not done
/blob,/tree,/blame,/rawand/commitsreads off the serving thread, or limiting them per anonymous caller class with a 429 andRetry-After, is a separate change. The nginx stopgap is still the only protection.questionsandduplicatespasses insrc/crew/livetriage.tsstill hold the thread. A pull'scheckstill reads green when its newest run is a deploy while the test check on the same head is red.To try it:
bun test test/hot-reads-indexed.test.ts test/checks-runner-capacity.test.ts. I did not runbun scripts/similar.ts, and I added no new functions.🤖 Generated with Claude Code
Closes #16189