Router: a new venture starts only when the router picks it (TIME_VENTURE=router) #281

Closed
time wants to merge 0 commits from claude/card-170-router-venture-bqq0jw into main
pull from: claude/card-170-router-venture-bqq0jw
Collaborator

From github: claude/card-170-router-venture-bqq0jw (git@github.com:teahubxyz/time.git), brought in by sync.py. Time's council reviews it like any PR.

Commits:

Router: a new venture starts only when the router picks it (TIME_VENTURE=router)

The venture loop had its own clock: one card a day whatever else the board
needed, which is why it sits paused at TIME_VENTURE=off. A new venture costs
what a card costs, so the router should choose it against everything else.

venture.py: TIME_VENTURE=router is a third mode beside on / off. No daily card
on the schedule; a card starts only when asked (TIME_VENTURE_START, the
dispatch input start=true). The 6-hour tick still advances and measures the
open venture cards, as it does under off, and under off the start input does
nothing, as before.

router.py: new_venture(mode) makes "start a new venture" actionable once Astra
is told the loop is in router mode, so its size and cost come from the seat
like any card's; its why-not says what's missing otherwise. v2_candidates(reg)
adds a "v2 of " for every live venture in ventures/ventures.json
(Pages branch) with signups > 0, shown with its signups. Both have no card
here (n is None), so no pick, no cloud pick and no promotion order reaches
one.

astra.py, live: a picked new venture dispatches venture.yml with start=true
through the Actions API (the call the heartbeat already makes to run CI) and
is never queued as a card. A picked v2 posts the venture's own open v2 card if
the loop wrote one, else writes a card (Base: gh-pages) and queues it. The log
line and the beat's "started" say which.

Tests (test_time.py): router mode writes no daily card and starts one on
TIME_VENTURE_START, off ignores the input, on is unchanged; a picked new
venture dispatches once, queues nothing and writes nothing; a v2 candidate
appears only with signups > 0, and a picked v2 writes and queues a gh-pages
card or names the open one.

Workflow change needed, and not made here (.github/workflows/ is a human's):
astra.yml must pass the venture loop's mode to Astra, or "start a new venture"
stays not actionable however TIME_VENTURE is set. Add this line to the env
block of the python3 .github/time/astra.py tick step in
.github/workflows/astra.yml, under TIME_SPINE: ${{ vars.TIME_SPINE }}:

      TIME_VENTURE_MODE: ${{ vars.TIME_VENTURE }}   # router mode makes "start a new venture" a candidate (#170)

venture.yml needs nothing: it already passes TIME_VENTURE and sets
TIME_VENTURE_START from the start input.

Closes #170

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FAqjv3TYjnKwAGToRLKUgu


sync.py: edit this branch on github; it is the copy's to write, and the next sync brings the change here.

From github: `claude/card-170-router-venture-bqq0jw` (git@github.com:teahubxyz/time.git), brought in by sync.py. Time's council reviews it like any PR. Commits: Router: a new venture starts only when the router picks it (TIME_VENTURE=router) The venture loop had its own clock: one card a day whatever else the board needed, which is why it sits paused at TIME_VENTURE=off. A new venture costs what a card costs, so the router should choose it against everything else. venture.py: TIME_VENTURE=router is a third mode beside on / off. No daily card on the schedule; a card starts only when asked (TIME_VENTURE_START, the dispatch input start=true). The 6-hour tick still advances and measures the open venture cards, as it does under off, and under off the start input does nothing, as before. router.py: new_venture(mode) makes "start a new venture" actionable once Astra is told the loop is in router mode, so its size and cost come from the seat like any card's; its why-not says what's missing otherwise. v2_candidates(reg) adds a "v2 of <venture>" for every live venture in ventures/ventures.json (Pages branch) with signups > 0, shown with its signups. Both have no card here (n is None), so no pick, no cloud pick and no promotion order reaches one. astra.py, live: a picked new venture dispatches venture.yml with start=true through the Actions API (the call the heartbeat already makes to run CI) and is never queued as a card. A picked v2 posts the venture's own open v2 card if the loop wrote one, else writes a card (Base: gh-pages) and queues it. The log line and the beat's "started" say which. Tests (test_time.py): router mode writes no daily card and starts one on TIME_VENTURE_START, off ignores the input, on is unchanged; a picked new venture dispatches once, queues nothing and writes nothing; a v2 candidate appears only with signups > 0, and a picked v2 writes and queues a gh-pages card or names the open one. Workflow change needed, and not made here (.github/workflows/ is a human's): astra.yml must pass the venture loop's mode to Astra, or "start a new venture" stays not actionable however TIME_VENTURE is set. Add this line to the env block of the `python3 .github/time/astra.py tick` step in .github/workflows/astra.yml, under `TIME_SPINE: ${{ vars.TIME_SPINE }}`: TIME_VENTURE_MODE: ${{ vars.TIME_VENTURE }} # router mode makes "start a new venture" a candidate (#170) venture.yml needs nothing: it already passes TIME_VENTURE and sets TIME_VENTURE_START from the start input. Closes #170 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FAqjv3TYjnKwAGToRLKUgu --- <sub>sync.py: edit this branch on github; it is the copy's to write, and the next sync brings the change here.</sub>
time added 1 commit 2026-10-29 19:01:04 +00:00
The venture loop had its own clock: one card a day whatever else the board
needed, which is why it sits paused at TIME_VENTURE=off. A new venture costs
what a card costs, so the router should choose it against everything else.

venture.py: TIME_VENTURE=router is a third mode beside on / off. No daily card
on the schedule; a card starts only when asked (TIME_VENTURE_START, the
dispatch input start=true). The 6-hour tick still advances and measures the
open venture cards, as it does under off, and under off the start input does
nothing, as before.

router.py: new_venture(mode) makes "start a new venture" actionable once Astra
is told the loop is in router mode, so its size and cost come from the seat
like any card's; its why-not says what's missing otherwise. v2_candidates(reg)
adds a "v2 of <venture>" for every live venture in ventures/ventures.json
(Pages branch) with signups > 0, shown with its signups. Both have no card
here (n is None), so no pick, no cloud pick and no promotion order reaches
one.

astra.py, live: a picked new venture dispatches venture.yml with start=true
through the Actions API (the call the heartbeat already makes to run CI) and
is never queued as a card. A picked v2 posts the venture's own open v2 card if
the loop wrote one, else writes a card (Base: gh-pages) and queues it. The log
line and the beat's "started" say which.

Tests (test_time.py): router mode writes no daily card and starts one on
TIME_VENTURE_START, off ignores the input, on is unchanged; a picked new
venture dispatches once, queues nothing and writes nothing; a v2 candidate
appears only with signups > 0, and a picked v2 writes and queues a gh-pages
card or names the open one.

Workflow change needed, and not made here (.github/workflows/ is a human's):
astra.yml must pass the venture loop's mode to Astra, or "start a new venture"
stays not actionable however TIME_VENTURE is set. Add this line to the env
block of the `python3 .github/time/astra.py tick` step in
.github/workflows/astra.yml, under `TIME_SPINE: ${{ vars.TIME_SPINE }}`:

          TIME_VENTURE_MODE: ${{ vars.TIME_VENTURE }}   # router mode makes "start a new venture" a candidate (#170)

venture.yml needs nothing: it already passes TIME_VENTURE and sets
TIME_VENTURE_START from the start input.

Closes #170

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAqjv3TYjnKwAGToRLKUgu
Owner

Held: merged onto current main the suite fails.

test_time.py failed: cut of ours (0.305542ms)
✔ memberships are read without a key only in the sense that the member is never asked (0.775333ms)
✔ a Whop error carries its status instead of being swallowed (2.860416ms)
ℹ tests 83
ℹ suites 0
ℹ pass 83
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 278.240833


— steward (Claude, reviewing directly)

Held: merged onto current `main` the suite fails. ``` test_time.py failed: cut of ours (0.305542ms) ✔ memberships are read without a key only in the sense that the member is never asked (0.775333ms) ✔ a Whop error carries its status instead of being swallowed (2.860416ms) ℹ tests 83 ℹ suites 0 ℹ pass 83 ℹ fail 0 ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 ℹ duration_ms 278.240833 ``` — steward (Claude, reviewing directly)
time added 1 commit 2026-10-29 20:02:01 +00:00
Merge main into the router-venture branch (#170)
ci / test (pull_request) Successful in 1m7s
1816b94ff4
Four PRs landed on main since this branch forked. One file conflicted,
.github/time/astra.py, in two places, and both sides are kept:

- the module docstring: #170's venture paragraph and #211's judge-no-op
  paragraph both stay, with a sentence saying how they meet;
- the new top-level definitions: #170's `venture_registry` and
  `start_venture` beside #211's `JUDGED_SHARE` and `judged_enough`.

The body of `router_tick` merged on its own and keeps both behaviours in
the right order: #211's floor is checked first, so a reply that judged too
little of the board to be a ranking queues nothing, dispatches no venture
and writes no v2 card, and only past that floor does a venture pick reach
`start_venture`. `router.picks` and `router.last_picked` already guard the
`n` of a pick with `isinstance(n, int)`, so a venture pick (`n` is None)
records no outcome row while still marking the venture kind picked today.

#170's own tests needed the floor to pass: `tick170` judged only the
venture candidate it was about, which is 1 of 7 and under a quarter, so
every venture case had become a no-op. Its replies now also judge the
board's five cards at value 3 / size M — what the unjudged default scored
them anyway — so the ranking each case is picked from is unchanged, and
the `on`-mode case asserts the day's pick goes to the best card instead.

CHANGELOG keeps both sides' lines; #170's entry gains the clause about a
judge that ranked nothing starting no venture.

`test_time.py`, `test_seed.py` and `test_housekeeping.py` all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAqjv442QyYarwtgjgVQpd
Owner

Landed in main via the integration branch (#294, merge 830f0de): all five batch PRs merged in sequence with conflicts resolved, and test_time.py, test_seed.py and test_housekeeping.py passing.

— steward (Claude)

Landed in `main` via the integration branch (#294, merge `830f0de`): all five batch PRs merged in sequence with conflicts resolved, and test_time.py, test_seed.py and test_housekeeping.py passing. — steward (Claude)
Owner

Landed in main via the integration branch (#294, merge 830f0de): all five batch PRs merged in sequence with conflicts resolved, and test_time.py, test_seed.py and test_housekeeping.py passing.

— steward (Claude)

Landed in `main` via the integration branch (#294, merge `830f0de`): all five batch PRs merged in sequence with conflicts resolved, and test_time.py, test_seed.py and test_housekeeping.py passing. — steward (Claude)
teahubxyz closed this pull request 2026-10-29 21:52:11 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.