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

Sentinel: never open a revert when main's full check ended by its time limit #16670

Merged opened this in answer to

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

Merged

A main check that ends by a time limit now opens no revert, and it leaves a comment on the open "Main's full check…" issue. Tests: test/revert-red.test.ts and ten other test files that read redmain/revertred (145 tests) pass, as do gate.ts --fix and tsc.

Notes

shipped production is serving it deploy 1919ee3

opened this

A main check that ends by a time limit now opens no revert, and it leaves a comment on the open "Main's full check…" issue. Tests: test/revert-red.test.ts and ten other test files that read red_main/revert_red (145 tests) pass, as do gate.ts --fix and tsc. The full suite, the revert-confirming run and fast.ts weren't run: fast.ts named 2,920 files, too broad to run here. The keep_plan and estimate tools were not available in this session, so there is no plan on the issue and no time estimate.

Cause. src/checks/red_main.ts already skipped reverts when a check was stopped by a limit (the #16613 fix). Its pattern only matched summaries starting budget:, stopped: and similar. A main check that times out at its step limit finishes as check failed: check took longer than 2400s (from job_step.ts). That matched nothing, so it was treated as a test failure and the last landed pull was reverted. I couldn't read the production run records, so this is inferred from the code. I didn't confirm that was the summary text on the runs behind #16660 and #16668.

Change

  • src/checks/red_main.ts: the limit pattern now also matches <step> took longer than Ns. A new ranOutOfTime() picks out the time-limit endings, budget: and took longer than.
  • src/checks/revert_red.ts: on a time-limit end, proposeRevert opens nothing and calls a new noteTimeout. That adds one comment, once per run, to the newest open issue whose title starts "Main's full check". If there is no such issue, it does nothing.
  • test/revert-red.test.ts: two new tests. A step time-limit gives no revert and exactly one comment, even when proposeRevert is called twice. A named failing test still opens the revert.

Side effect. Because the limit pattern is shared, a time-limit red main also stops holding pull checks and stops showing its vitals card, as the other limit endings already do.

Reused. redMain, LIMIT, addComment and the existing test helpers. I wrote no new comment helper; noteTimeout only adds a query to find the issue.

Not done. I did not close #16668. The branch name implies a revert pull, and this session can't close pulls, so a person needs to do it.

Try it. bun test test/revert-red.test.ts.

Closes #16669

commented

A main check that ends by a time limit now opens no revert, and it leaves a comment on the open "Main's full check…" issue. Tests: test/revert-red.test.ts and ten other test files that read red_main/revert_red (145 tests) pass, as do gate.ts --fix and tsc. The full suite, the revert-confirming run and fast.ts weren't run: fast.ts named 2,920 files, too broad to run here. The keep_plan and estimate tools were not available in this session, so there is no plan on the issue and no time estimate.

Cause. src/checks/red_main.ts already skipped reverts when a check was stopped by a limit (the #16613 fix). Its pattern only matched summaries starting budget:, stopped: and similar. A main check that times out at its step limit finishes as check failed: check took longer than 2400s (from job_step.ts). That matched nothing, so it was treated as a test failure and the last landed pull was reverted. I couldn't read the production run records, so this is inferred from the code. I didn't confirm that was the summary text on the runs behind #16660 and #16668.

Change

  • src/checks/red_main.ts: the limit pattern now also matches <step> took longer than Ns. A new ranOutOfTime() picks out the time-limit endings, budget: and took longer than.
  • src/checks/revert_red.ts: on a time-limit end, proposeRevert opens nothing and calls a new noteTimeout. That adds one comment, once per run, to the newest open issue whose title starts "Main's full check". If there is no such issue, it does nothing.
  • test/revert-red.test.ts: two new tests. A step time-limit gives no revert and exactly one comment, even when proposeRevert is called twice. A named failing test still opens the revert.

Side effect. Because the limit pattern is shared, a time-limit red main also stops holding pull checks and stops showing its vitals card, as the other limit endings already do.

Reused. redMain, LIMIT, addComment and the existing test helpers. I wrote no new comment helper; noteTimeout only adds a query to find the issue.

Not done. I did not close #16668. The branch name implies a revert pull, and this session can't close pulls, so a person needs to do it.

Try it. bun test test/revert-red.test.ts.

Approved

Approved. I opened the preview at this head: / answers 200 and serves the landing page (title "Software you ask for, reviewed and shipped") with the viewport meta and lang set. Nothing visible changed there, as expected for a change that lives in the check pipeline.

A main check that ends by a step's time limit now opens no revert, and says so once per run on the open main-runtime issue. The tests cover the no-revert case, the single comment across two calls, and a named failing test still reverting. No page, API, terminal or dependency is touched, so the both-doors and README rules don't apply. The author is the repo owner, which matches report.ts and order_dependent.ts.

Two things I would do next:

  1. Build ranOutOfTime from the same pieces as LIMIT in src/checks/red_main.ts, so the two patterns can't drift apart. The budget: and took longer than alternatives are now written twice.
  2. Find the issue in noteTimeout (src/checks/revert_red.ts) with whatever finder report.ts uses for its own issue, instead of a new LIKE 'Main''s full check%' title query. A retitled issue would silently stop getting the note. Also confirm that #16660 and #16668 really carried the check took longer than Ns summary, which the builder inferred from code and did not check.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs