The worker builds where the card says (Base: <branch>) and finishes what it starts (the cap gates launches, not runs) #117

Closed
opened 2026-10-18 04:24:57 +00:00 by teahubxyz · 3 comments
Owner

Two engine gaps found in today's wave, both in the worker loop:

  1. Every worker branched from main whatever the card said. The ventures live on gh-pages (an orphan branch; the two share no history), so #60 and #63 ran out of turns searching, #95 died at 43 steps ("find the build reference"), and #109 opened the right three files against the wrong branch. Fix: a Base: <branch> line in a card. Hands cuts the worker's branch from that base, names it time/card-N-<base> (so a stale branch cut from main is never resumed by mistake), the worker's rules say where the files live, and open_pr targets the base. Cards without the line behave exactly as before.
  2. The daily spend cap killed runs mid-flight. #87's worker was launched at $3.80 of $5 and stopped at step 27 when the cap crossed: the whole run's spend was lost and nothing came of it. Fix: the cap gates launches; a run that began within budget finishes, up to TIME_CAP_SLACK x the cap (default 1.5), and a PR that is already open gets its review on a capped day too. The monthly cap stays hard everywhere. TIME_CAP_SLACK=1 restores the old stop.

Also: the tick takes the oldest ready card first (the API lists newest first), the same order promote_next uses, so a card promoted first is built first.

Tests: 14b (the base) and 57 (the slack, the launch gate, the monthly cap inside a run, the review on a capped day, the order), both offline against World. CHANGELOG under Added.

PR: #121

DONE: PR open with the Base: support, the slack and the oldest-first order; python3 .github/time/test_time.py prints ALL OK 57; CI green.

Two engine gaps found in today's wave, both in the worker loop: 1. **Every worker branched from `main` whatever the card said.** The ventures live on `gh-pages` (an orphan branch; the two share no history), so #60 and #63 ran out of turns searching, #95 died at 43 steps ("find the build reference"), and #109 opened the right three files against the wrong branch. Fix: a `Base: <branch>` line in a card. `Hands` cuts the worker's branch from that base, names it `time/card-N-<base>` (so a stale branch cut from `main` is never resumed by mistake), the worker's rules say where the files live, and `open_pr` targets the base. Cards without the line behave exactly as before. 2. **The daily spend cap killed runs mid-flight.** #87's worker was launched at $3.80 of $5 and stopped at step 27 when the cap crossed: the whole run's spend was lost and nothing came of it. Fix: the cap gates *launches*; a run that began within budget finishes, up to `TIME_CAP_SLACK` x the cap (default 1.5), and a PR that is already open gets its review on a capped day too. The monthly cap stays hard everywhere. `TIME_CAP_SLACK=1` restores the old stop. Also: the tick takes the oldest `ready` card first (the API lists newest first), the same order `promote_next` uses, so a card promoted first is built first. Tests: 14b (the base) and 57 (the slack, the launch gate, the monthly cap inside a run, the review on a capped day, the order), both offline against `World`. CHANGELOG under Added. PR: #121 DONE: PR open with the `Base:` support, the slack and the oldest-first order; `python3 .github/time/test_time.py` prints ALL OK 57; CI green.
teahubxyz added the planned label 2026-10-18 04:24:57 +00:00
teahubxyz added ready and removed planned labels 2026-10-18 04:40:51 +00:00

⏱️ Time: adopted PR #121, built outside the worker. haiku reviewed it on the PR.

⏱️ Time: adopted PR #121, built outside the worker. `haiku` reviewed it on the PR. <!-- time {"beat":"pr","pr":121,"adopted":true,"launched":false,"review":"venice","seat":"haiku","as":"seat"} -->

⏱️ Time: approved, but checks are failing on PR #121. Waiting for a fix.

⏱️ Time: approved, but checks are failing on PR #121. Waiting for a fix. <!-- time {"beat":"checks-failed","pr":121} -->
time closed this issue 2026-10-18 04:59:24 +00:00

⏱️ Time: approved and green, merged PR #121. Card done.

⏱️ Time: approved and green, merged PR #121. Card done. <!-- time {"beat":"merged","pr":121} -->
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: teahubxyz/time#117