Add TIME_PARALLEL config setting (default 3) #248

Merged
time merged 2 commits from time/card-243 into main 2026-10-22 20:07:56 +00:00
Collaborator

TIME_PARALLEL already existed, read inline in promote_next with a default of 1 and no validation. This PR adds parallel() in time.py. It defaults to 3, and any value that isn't a positive integer (0, negative, non-numeric, float) falls back to 3. promote_next now calls it, and the doctor prints the setting. README, SKILL.md and CHANGELOG are updated. New asserts in test_time.py cover the default, an override (5, 1) and invalid input (0, -2, abc, 2.5, empty). python3 .github/time/test_time.py and test_seed.py pass.

Behaviour change: the default goes from 1 to 3, as the card asks. Repos that don't set the TIME_PARALLEL variable will now run up to 3 cards at once.

Closes #243

worker: Claude Sonnet (Anthropic) via Time

`TIME_PARALLEL` already existed, read inline in `promote_next` with a default of 1 and no validation. This PR adds `parallel()` in time.py. It defaults to 3, and any value that isn't a positive integer (0, negative, non-numeric, float) falls back to 3. `promote_next` now calls it, and the doctor prints the setting. README, SKILL.md and CHANGELOG are updated. New asserts in test_time.py cover the default, an override (5, 1) and invalid input (0, -2, abc, 2.5, empty). `python3 .github/time/test_time.py` and `test_seed.py` pass. Behaviour change: the default goes from 1 to 3, as the card asks. Repos that don't set the `TIME_PARALLEL` variable will now run up to 3 cards at once. Closes #243 <sub>worker: Claude Sonnet (Anthropic) via Time</sub>
time added 2 commits 2026-10-22 19:09:16 +00:00
card #243: kept README.md, CHANGELOG.md, .claude/skills/time/SKILL.md, .github/time/time.py, .github/time/test_time.py (generated)
time/worker-run cd .github/time && python3 - <<'E' p='time.py'; s=open(p).read() s=s.replace('''def promote_next() -
ccfcb44a45
card #243: kept .github/time/time.py, .github/time/test_time.py (generated)
ci / test (pull_request) Successful in 45s
heartbeat / tick (pull_request_review) Successful in 1m1s
eeb931a7eb
haiku approved these changes 2026-10-22 20:07:39 +00:00
haiku left a comment
Collaborator

Approve

  1. time.py:783-788: I traced parallel() through every case in the new tests. "5"→5, "1"→1, "0"→3 (the or 3 catches the zero), "-2"→3, "abc"→3 (ValueError), "2.5"→3 (ValueError), ""→3 (falsy, so or 3). The default-when-unset path also returns 3. The logic matches the card's finish line.
  2. time.py:799: promote_next now calls parallel(), so the old inline int(...) that could crash on bad input is gone. This is the right scope.
  3. time.py:1822: the doctor row echoes the raw env value, so an invalid value such as abc shows as set even though the effective value is 3. This is cosmetic and could be improved, but it doesn't block.
  4. Behaviour change: the default moves from 1 to 3, which the card asks for. Live repos that never set the variable will start running three cards at once under auto-merge. The CHANGELOG and README say so. Worth a heads-up to operators, since parallel auto-merges can conflict on shared files.
  5. test_time.py:1396-1402: the test saves and restores TIME_PARALLEL around its checks, so later tests are unaffected. CI (ci / test) is green. The card's finish line is met: the default, the override and the invalid-input cases are all covered.

review by haiku · claude-haiku-5-5 · via Time

**Approve** 1. `time.py:783-788`: I traced `parallel()` through every case in the new tests. "5"→5, "1"→1, "0"→3 (the `or 3` catches the zero), "-2"→3, "abc"→3 (ValueError), "2.5"→3 (ValueError), ""→3 (falsy, so `or 3`). The default-when-unset path also returns 3. The logic matches the card's finish line. 2. `time.py:799`: `promote_next` now calls `parallel()`, so the old inline `int(...)` that could crash on bad input is gone. This is the right scope. 3. `time.py:1822`: the doctor row echoes the raw env value, so an invalid value such as `abc` shows as set even though the effective value is 3. This is cosmetic and could be improved, but it doesn't block. 4. Behaviour change: the default moves from 1 to 3, which the card asks for. Live repos that never set the variable will start running three cards at once under auto-merge. The CHANGELOG and README say so. Worth a heads-up to operators, since parallel auto-merges can conflict on shared files. 5. `test_time.py:1396-1402`: the test saves and restores `TIME_PARALLEL` around its checks, so later tests are unaffected. CI (`ci / test`) is green. The card's finish line is met: the default, the override and the invalid-input cases are all covered. <sub>review by haiku · claude-haiku-5-5 · via Time</sub>
time merged commit af15cf16b0 into main 2026-10-22 20:07:56 +00:00
time deleted branch time/card-243 2026-10-22 20:07:57 +00:00
Sign in to join this conversation.