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

Losing the runner slows the gate and never blocks a release of a fix #16838

Merged opened this

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

Merged

A check that sits queued for 10 minutes with no runner now settles as "the runner is not answering", not red. Vitals names it, and an admin can land the pull with a recorded reason. A red check is still refused.

Notes

opened this

A check that sits queued for 10 minutes with no runner now settles as "the runner is not answering", not red. Vitals names it, and an admin can land the pull with a recorded reason. A red check is still refused. Everything is already pushed; nothing new this turn.

I ran tsc --noEmit and the four test files that cover this (test/runner-doors.test.ts, test/runner-silent.test.ts, test/vitals.test.ts, test/asks.test.ts). They pass, and gate.ts --fix changed nothing. I did not run the full bun test this turn. origin/main has moved a long way ahead of the branch (7200 commits by git rev-list), so the pull may need another merge.

What changed

  • Detection: src/core/runs.ts and src/checks/service.ts mark a check that stayed queued past the bound as unavailable. The bound only counts when the runner makes no progress, so a busy runner is not called silent.
  • Landing past it: src/core/pulls.ts, src/actions/pulls.ts and src/http/api.ts let an admin land a pull whose check is unavailable, with a required reason written to the pull. A red check is still refused.
  • Where it shows: the pull page (src/web/pages/pull.ts) says "the runner is not answering" and offers the admin land form. The terminal screen (src/tui/screens/pull.ts) does the same.
  • Vitals: src/kernel/vitals.ts counts only settled silent checks and names the runner. It sits alongside the budget-failure read.
  • Tests and docs: test/runner-silent.test.ts and test/runner-doors.test.ts take the runner away and prove both halves: unavailable is landable by an admin with a reason, red is refused. They also cover the web, API and terminal doors. The README says how it works, and scripts/gate.ts gates the two new tests.

Left out: the bound is a fixed 10 minutes, not a setting. There is no automatic retry or re-queue when the runner comes back. A non-admin still cannot land past an unavailable check.

Try it: stop the runner and queue a check. After 10 minutes the pull shows "the runner is not answering", and an admin sees the land-with-reason form. Or run bun test test/runner-doors.test.ts test/runner-silent.test.ts.

Review

[{"go":"/pulls/<a pull whose check never started>","look":"the check banner","expect":"says the runner is not answering, not red; an admin sees the land-with-reason form","ask":"Is 10 minutes the right bound?"}]

🤖 Generated with Claude Code

Closes #1196

Show 17 earlier items

7 earlier comments
commented

<!-- look-pages 0e20f29a1f60 --> Look pages for 0e20f29, from the gate:

  • look pages (named): this pull changes src/web/pages/pull.ts, src/web/studio/words.ts; a commit names /preview-admin/sample/pulls/3
commented

This pull gets one more commit, which fixes the failing check test, "a sentence that sends its reader to someone else goes through the helper, or ends there for a reason". It now passes locally. I didn't run tsc or any other test file.

What changed: The terminal's checks-gate refusal in src/tui/screens/pull.ts, "the runner is not answering, so this head was never checked; an admin can land it past with L and a reason", names a person who must act. The test only lets such a sentence through if it's built by the helper or listed as one that ends there. I listed it in TERMINAL in test/refusals-lead-somewhere.test.ts, with the reason that it names the key (L) and the reason that land it past. I chose listing over routing it through wayTo, since the sentence already names the control. The test's expectations are otherwise unchanged.

Gate output: bun scripts/gate.ts still prints three possible-duplicate notes for helpers in the runner tests (press, openPullScreen, pullAt). I didn't act on them, and they didn't block the push.

To try it: bun test test/refusals-lead-somewhere.test.ts.

🤖 Generated with Claude Code

commented

<!-- look-pages 55b439d48dba --> Look pages for 55b439d, from the gate:

  • look pages (named): this pull changes src/web/pages/pull.ts, src/web/studio/words.ts; a commit names /preview-admin/sample/pulls/3
commented

I addressed the feedback and pushed it as a918e6b. The gate's four rules were already met by the earlier commits, and only the look-pages line and one duplicate remained.

  • Look pages: the new commit has the line Looks: /preview-admin/sample/pulls/3, which is the page the pull changes.
  • Duplicate: test/runner-doors.test.ts had its own copy of the sign-in form post. It now calls the shared signInCookie from test/helpers/studio-signin.ts. I left the other duplicate notes for press, openPullScreen and pullAt alone, because those are similar functions rather than copies.
  • Both doors: bun scripts/gate.ts --explain passes. The terminal screen (src/tui/screens/pull.ts) and the how-to (docs/features/runner-not-answering.md) changed with the page in earlier commits. The new commit is test-only and says No door:.
  • Issue number: every commit line names (#1196).
  • as never: none of the tests this pull adds uses as never.
  • Dead exports: test/unused-exports.test.ts passes.
  • Checks run: bun x tsc --noEmit is clean, and test/runner-doors.test.ts, test/unused-exports.test.ts, test/hollow.test.ts and test/refusals-lead-somewhere.test.ts pass.

I did not run the rest of the suite; the forge's check does that on push.

The pull's earlier description still stands.

commented

<!-- look-pages a918e6bfab61 --> Look pages for a918e6b, from the gate:

  • look pages (named): this pull changes src/web/pages/pull.ts, src/web/studio/words.ts; a commit names /preview-admin/sample/pulls/3
commented

I couldn't find a code cause for the four failures, so I made no fix. I merged main into the branch (84f6eb9) and pushed, so the check runs again.

  • Failing tests: "a cold home answers from the picture", "a template's README sentence appears…", "500 pulls in chapters render…" and "the last ten follows, newest first". They live in test/observability-budget.test.ts, test/templates-tui.test.ts, test/changelog-chapters.test.ts and test/fork-follow-history.test.ts. None of them touches code this pull changes.
  • Not reproduced: run together, all four passed, and test/observability-budget.test.ts passed three more times on its own. Its cold-home test measures time against a baseline, and it failed once at 814 ms against a 702 ms budget while a leftover background test run was using the CPU. The check log shows the same thing: 102 shards ran in parallel and a 2 s per-test budget was exceeded in 25 places. The log also says test/changelog-chapters.test.ts is green on main.
  • After the merge: bun x tsc --noEmit is clean and bun scripts/gate.ts --explain shows 0 failing rules. The runner-doors and runner-silent tests and the four failing files above passed, apart from that one load-induced failure. I did not run the wider set bun scripts/fast.ts named, because it covers 3,830 files and would take hours.

If the cold-home test fails again with the CPU idle, it is a real regression and I'll look at it.

commented

<!-- look-pages 84f6eb95a093 --> Look pages for 84f6eb9, from the gate:

  • look pages (named): this pull changes src/web/pages/pull.ts, src/web/studio/words.ts; a commit names /preview-admin/sample/pulls/3
commented

Nothing needed changing for this feedback. I re-ran each check it named on the current head (84f6eb9), and none fails.

  • Both doors: the gate rule passes. The terminal screen (src/tui/screens/pull.ts) and the how-to (docs/features/runner-not-answering.md) change together with the page. test/runner-doors.test.ts covers the page, the API and the terminal.
  • Tests that build the real input: test/runner-doors.test.ts and test/runner-silent.test.ts contain no as never, and bun x tsc --noEmit is clean.
  • Naming the issue: the gate's "name the issue" rule passes, and the commit lines carry (#1196).
  • Dead code: test/unused-exports.test.ts passes (3 pass, 0 fail).
  • Look pages: the Looks: /preview-admin/sample/pulls/3 commit line is in place for src/web/pages/pull.ts and src/web/studio/words.ts, and the gate notes it as satisfied.

bun scripts/gate.ts --fix rewrapped nothing, so there is nothing new to commit or push. The gate still has two notes, and I left both alone.

  • Comment width: three files have comment lines over 100 columns, which the nightly rewrap handles on main.
  • Similar test helpers: the gate says press, openPullScreen and pullAt in the two new test files resemble helpers in other test files. These are notes only. Each helper is a few lines tied to its own test file, so I did not pull them into a shared module.

The pull is otherwise as before.

  • What it does: a check that sits queued for 10 minutes with no runner now settles as "the runner is not answering" instead of going red. An admin can land the pull past that with a recorded reason. A red check still blocks the merge.
  • How to try it: the how-to is docs/features/runner-not-answering.md. The behaviour is tested in test/runner-silent.test.ts and test/runner-doors.test.ts.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs