venture: answer haiku's review: a title counts only on a body the form wrote; the judge seat's review; PagesHands takes **_
ci / test (pull_request) Failing after 34s

This commit is contained in:
teahubxyz committed 2026-10-18 17:13:40 +00:00
1 parent 5426f32c61
commit 8d1f03fa19
1 file changed
+15 -6
+15 -6
View File
@@ -1094,11 +1094,20 @@ def signup_issues(state: str) -> tuple:
return tuple(out)
def from_form(body: str) -> bool:
"""Did the early-access form write this body? It renders every field as a `### <Label>` heading, answered or not."""
return all(re.search(rf"^###\s*{re.escape(label)}\s*$", body or "", re.M) for label in FIELDS.values())
def signup_for(i: dict, w: dict) -> bool:
"""Is this early-access issue for venture `w`? The form's Venture field, or the prefilled title."""
f = form_fields(i.get("body") or "")
return (f["venture"].strip().lower() == w["slug"]
or _s(i.get("title")).lower() == f"early access: {_s(w.get('name'))}".lower())
"""Is this early-access issue for venture `w`? The form's Venture field, or, when that was left empty, the title the
join link prefilled. The title counts only on a body the form wrote: an issue someone typed by hand with the same
title is not a signup. Either way it is one account, counted once, like a 👍 on the signal issue."""
body = i.get("body") or ""
f = form_fields(body)
if f["venture"].strip():
return f["venture"].strip().lower() == w["slug"]
return from_form(body) and _s(i.get("title")).lower() == f"early access: {_s(w.get('name'))}".lower()
def count_signups(w: dict, since: str | None = None) -> tuple[int, list[str]]:
@@ -1168,7 +1177,7 @@ def venture_cards(state: str = "open", n: int = 30) -> list[dict]:
CARD_BODY = ("The venture loop runs this card by itself: scout the repos trending on GitHub → seats pitch → the board picks → "
"board seats write launch plans and the chair synthesizes one → a seat builds the launch page → checks "
"(deterministic, then headless Chrome where the runner has it, then the chair's review) → Teahub Pages "
"(deterministic, then headless Chrome where the runner has it, then the judge seat's review of the code) → Teahub Pages "
"ships it at its own subdomain → seven days of signups decide. Progress is posted here as it happens.\n\n"
"DONE: a launched venture linked from this card, or a digest saying where it stuck.")
@@ -1863,7 +1872,7 @@ def _build_on_pages(card: dict, done: str, spec: str, root: str = "") -> dict:
With a root (ventures/<slug>/) the hands write only inside it: the Pages branch also carries the studio's own site and
every other venture, and a fix round once wrote its page over the site's front page."""
class PagesHands(tm.Hands): # one class per build: parallel builds each keep their own folder
def __init__(self, n, branch, base=None): # venice_work passes the card's Base: line; the Pages branch is it
def __init__(self, n, branch, **_): # venice_work may pass the card's base; a venture's base is the Pages branch
super().__init__(n, PAGES_BRANCH)
def call(self, name, a):