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

An issue labelled `polish` is capped small: past its cap the run stops and says what is left in one line #8863

opened this

Merged 32d 21h ago, live in production

A builder run on a polish issue is now stopped once it has gone 60 minutes of run time. The issue gets one comment saying what is left. The new tests and the neighbouring suites I ran pass, and bun x tsc --noEmit is clean.

Notes

opened this

A builder run on a polish issue is now stopped once it has gone 60 minutes of run time. The issue gets one comment saying what is left. The new tests and the neighbouring suites I ran pass, and bun x tsc --noEmit is clean. I did not run the full suite, so the forge's check will be the first to run it.

  • Small work: src/crew/small_share.ts now counts polish as small work alongside small, so polish issues also sit under the small-issue slot cap.
  • The cap: it is a new stored setting, polish.capMinutes, with a default of 60 and a range of 1–1440. An admin can change it in capacity settings (same page as slots.smallShare) or through FORGE_POLISH_CAP_MINUTES, and it is read on every tick.
  • Enforcement: src/crew/polish_cap.ts has tickPolish, called each tick next to tickBets in src/crew/autonomy.ts. It cancels a running agent run on a polish-labelled issue once its time since start reaches the cap, and stops the process.
  • The comment: one comment per stopped run, posted as the repo's autonomy user, reads "Stopped at the 60-minute polish cap, not extended. Left: #N <title> — what the run had not landed." A second tick finds the run already ended, so it posts nothing more.
  • Tests: test/polish-cap.test.ts covers four cases. A polish run at 59 minutes keeps running with no comment. A polish run at 61 minutes is cancelled with exactly one comment. Runs on a non-polish and an unlabelled issue are untouched. The cap boundary is checked at exactly 60 minutes. The clock is a Date passed into tickPolish. scripts/gate.ts derives its test list, so I did not edit it.
  • What I chose not to do: the line names the issue itself, not a computed remainder. A polish issue has no scopes the way a bet does, so there is nothing finer to list. The cap counts a single run's time, not the issue's total across runs.

To try it, label an issue polish and let a builder pick it. Past the cap, its run page shows "stopped at the 60-minute polish cap" and the issue gets the comment.

Closes #8852

3 earlier comments · 1 event
commented

A builder run on a polish issue is now stopped once it has gone 60 minutes of run time. The issue gets one comment saying what is left. The new tests and the neighbouring suites I ran pass, and bun x tsc --noEmit is clean. I did not run the full suite, so the forge's check will be the first to run it.

  • Small work: src/crew/small_share.ts now counts polish as small work alongside small, so polish issues also sit under the small-issue slot cap.
  • The cap: it is a new stored setting, polish.capMinutes, with a default of 60 and a range of 1–1440. An admin can change it in capacity settings (same page as slots.smallShare) or through FORGE_POLISH_CAP_MINUTES, and it is read on every tick.
  • Enforcement: src/crew/polish_cap.ts has tickPolish, called each tick next to tickBets in src/crew/autonomy.ts. It cancels a running agent run on a polish-labelled issue once its time since start reaches the cap, and stops the process.
  • The comment: one comment per stopped run, posted as the repo's autonomy user, reads "Stopped at the 60-minute polish cap, not extended. Left: #N <title> — what the run had not landed." A second tick finds the run already ended, so it posts nothing more.
  • Tests: test/polish-cap.test.ts covers four cases. A polish run at 59 minutes keeps running with no comment. A polish run at 61 minutes is cancelled with exactly one comment. Runs on a non-polish and an unlabelled issue are untouched. The cap boundary is checked at exactly 60 minutes. The clock is a Date passed into tickPolish. scripts/gate.ts derives its test list, so I did not edit it.
  • What I chose not to do: the line names the issue itself, not a computed remainder. A polish issue has no scopes the way a bet does, so there is nothing finer to list. The cap counts a single run's time, not the issue's total across runs.

To try it, label an issue polish and let a builder pick it. Past the cap, its run page shows "stopped at the 60-minute polish cap" and the issue gets the comment.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

A polish issue is now capped small: past 60 minutes of run time, its run is stopped with one line saying what is left. The cap lives in src/crew/polish_cap.ts. It is wired into src/core/capacity.ts, src/crew/autonomy.ts and src/crew/small_share.ts, and test/polish-cap.test.ts covers it.

The failing check was test/talk-page.test.ts, the byte budget on the /talk script. It failed because this branch was behind main, not because of anything this pull changed. The /talk script had grown to 6,964 bytes against a 6,500 limit, and main has since raised that limit to 7,400. I merged main into the branch, so no test was edited here.

After the merge, talk-page.test.ts and polish-cap.test.ts pass (35 tests) and tsc --noEmit is clean. I did not re-run scripts/gate.ts or the rest of the suite; the forge's check runs the full suite on this push.

To try it, label an issue polish and let a run go past 60 minutes. It stops with the one-line remainder.

commented

A polish issue is capped small: once its run passes polish.capMinutes of run time (default 60), the run is stopped and the issue gets one comment saying what is left. This round addresses all of juniper's points.

  • What is left (point 2): the comment now reads Stopped at the 60-minute polish cap, not extended. Left: pull #M is open, unmerged. when the run's branch has an open pull. Otherwise it reads Left: nothing landed, no pull open. I did not use the run's last summary, because a run that is still running has none yet.
  • Silent stop: the comment is posted by the autonomy author, or by the run's actor when there is no autonomy author. If neither exists, the run is left running instead of being stopped without a word. Two new tests cover both cases, and the line itself is tested for both outcomes.
  • Docs (point 1): added docs/features/polish-cap.md and one sentence in docs/CREW.md in the small-share section. docs/features/bets.md now says polish counts as a small fix and is capped.
  • Import order (point 3): tickPolish is now imported with the other ./ crew imports in autonomy.ts.

test/polish-cap.test.ts passes (7 tests), and so do test/small-share.test.ts and test/autonomy.test.ts. tsc --noEmit and scripts/gate.ts are clean. I did not run the full suite. scripts/fast.ts said the diff was too broad to name, and I ran the three files above in its place. My first attempt ran the whole suite by mistake. Its background process was still going when I pushed, and I could not stop it from here.

commented

The branch failed the check because src/crew/small_share.ts still had merge conflict markers in it; I've removed them and pushed. I did not run the full suite here.

The conflict was one line. main had dropped the unused FIRST_PILLAR constant, and this branch had added polish to the small-issue labels. I kept polish in SMALL_LABELS and left FIRST_PILLAR out, as main has it. The diff against main is now only that label and its mention in the file's header comment.

tsc --noEmit and scripts/gate.ts are clean, and test/polish-cap.test.ts passes (7 tests). test/small-share.test.ts matched no file in the second run, so it did not run. The forge's check runs the full suite on this push.

The polish cap itself is unchanged: a polish issue's run is stopped past polish.capMinutes (default 60) with one comment saying what is left, as in the earlier description.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs