card #77: kept .github/time/time.py (generated)
time/worker-run cat > /tmp/edit5.py <<'PYEOF' p = ".github/time/test_time.py" s = open(p).read() marker = 'print("AL

This commit is contained in:
time committed 2026-10-18 04:46:29 +00:00
1 parent b16034004e
commit 578a4f680d
1 file changed
+15 -2
+15 -2
View File
@@ -548,6 +548,19 @@ def votes(pr: dict, since: str) -> dict[str, str]:
return latest
def standing_voters() -> int:
"""How many identities the standing seats vote as: a seat with its own Gitea user (TIME_SEAT_<SEAT>) is one, and every
seat that posts as Time shares one. The tie-break waits until that many have voted."""
ids = set()
for spec in review_specs("TIME_REVIEW"):
kind, _, rest = spec.partition(":")
if kind == "cursor":
continue # a Cursor agent comments on its own schedule; it doesn't hold up the count
seat = (rest.split() or [kind])[0] if kind in SEAT_KINDS else kind
ids.add(seat if seat_token(seat) else TIME_BOT)
return max(1, len(ids))
def quorum() -> int:
"""TIME_REVIEW_QUORUM: approvals needed, net of objections (default 1)."""
try:
@@ -640,7 +653,7 @@ def land(card: dict, last: dict, revised_at: str | None = None) -> None:
v = decide(cast)
if v is None:
# Not settled. Wait while nobody has voted, a standing seat has yet to vote, or the split is already reported.
if not cast or last.get("split") or len(cast) < max(1, len(review_specs("TIME_REVIEW"))):
if not cast or last.get("split") or len(cast) < standing_voters():
return
tie = (os.environ.get("TIME_REVIEW_TIEBREAK") or "").strip()
a, o = tally(cast)
@@ -652,7 +665,7 @@ def land(card: dict, last: dict, revised_at: str | None = None) -> None:
cast = votes(pr, since)
v = decide(cast)
a, o = tally(cast)
if v is None:
if v != "approve": # the tie-break seat's Object ends in the split message too: one verdict a human reads once
label(pr["number"], "needs-human")
comment(n, f"⏱️ Time: the council is split {a}–{o} on PR #{pr['number']}; over to a human.",
{"beat": "needs-human", "pr": pr["number"], "split": True})