diff --git a/.github/time/test_time.py b/.github/time/test_time.py index 363a69d..1486c29 100644 --- a/.github/time/test_time.py +++ b/.github/time/test_time.py @@ -683,3 +683,16 @@ p27 = vt.normalize_plan({"pricing": [{"tier": "Free", "price": "$0"}, {"tier": " {"tier": "Team", "price": "$19/mo per repo — nothing charged today"}]}, {}) assert [t["price"] for t in p27["pricing"]] == ["$0", "$5/mo founding price", "$19/mo per repo"], p27["pricing"] print("ALL OK 19") + +# 28 the second fix round escalates to a stronger worker (cost cascade) +W = VWorld() +c28 = W.add(f"Venture {vt.today()}", labels=["venture"]) +W.say(c28, f"x\n\n{tm.MARK}" + json.dumps({"venture": True, "beat": "built", "winner": w16, "plan": plan16, "fixes": 1}) + " -->") +W.files["ventures/mdecks/index.html"] = "thin" +specs = [] +def spy(card, done, spec): + specs.append(spec); return {"pr": -1, "steps": 3, "seat": "grok", "model": "grok-4-7"} +vt._build_on_pages = spy +vtick() +assert specs == ["venice:grok 4.7"] and "(grok-4-7)" in W.text(c28), (specs, W.text(c28)[-200:]) +print("ALL OK 20") diff --git a/.github/time/venture.py b/.github/time/venture.py index a699fdd..c835f29 100644 --- a/.github/time/venture.py +++ b/.github/time/venture.py @@ -1101,11 +1101,13 @@ def advance(card: dict, comments: list[dict], beats: list[dict], heavy_ok: bool) return "wait" say(f"🔧 The checks found {len(problems)} problem(s); fix round {fixes + 1}:\n\n{bullets}", {"beat": "built", **keep, "fixes": fixes, "problems": problems}) + # cost cascade: the cheap worker gets the first round; a failed round escalates to a stronger model + spec = worker_spec() if fixes == 0 else env("TIME_VENTURE_ESCALATE", "venice:grok 4.7") r = _build_on_pages({"number": n, "title": f"Fix the {w['name']} launch page", "body": FIX_BODY.format(name=w["name"], slug=w["slug"], problems=bullets, page=w.get("page", ""), join=w["join"], signal=signal_url(w))}, - "every check above passes", worker_spec()) - say(f"🔧 `{r['seat']}` worked on the fixes in {r['steps']} steps. Re-checking.", + "every check above passes", spec) + say(f"🔧 `{r['seat']}` ({r['model']}) worked on the fixes in {r['steps']} steps. Re-checking.", {"beat": "built", **keep, "fixes": fixes + 1}) return "heavy" plan = {**plan, "launch_channels": true_drafts(w, plan, chair)}