venture: statuses permission for the worker's test run; dedupe board rankings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpT7eWzeLhRwuYmsSQnbRb
This commit is contained in:
claude committed 2026-10-11 14:14:30 -07:00
1 parent fd23310271
commit bae0bdc0ef
3 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -273,7 +273,7 @@ answers = {"qwen": '{"slug": "Star Checker!", "title": "Star checker", "one_line
vt.tm.think = lambda seat, model, effort, system, user: answers.get(seat, "not json")
ps = vt.pitch(repos, ["qwen", "kimi", "grok"])
assert [p["slug"] for p in ps] == ["star-checker", "other"] and ps[0]["by"] == "qwen"
votes = {"grok": '{"ranking": ["other", "star-checker"], "reason": "r"}', "kimi": '{"ranking": ["star-checker"], "reason": "r"}',
votes = {"grok": '{"ranking": ["other", "other", "star-checker"], "reason": "r"}', "kimi": '{"ranking": ["star-checker"], "reason": "r"}',
"qwen": '{"ranking": ["other"], "reason": "r"}'}
vt.tm.think = lambda seat, model, effort, system, user: votes[seat]
w, meta = vt.board(ps, ["grok", "kimi", "qwen"])
+6 -3
View File
@@ -108,9 +108,12 @@ def board(pitches: list[dict], seats: list[str]) -> tuple[str | None, dict]:
if not v:
continue
votes[s] = v
for pts, slug in zip((3, 2, 1), v.get("ranking", [])):
if slug in score:
score[slug] += pts
seen: list[str] = []
for slug in v.get("ranking", []): # a seat listing the same slug thrice gets one vote for it
if slug in score and slug not in seen:
seen.append(slug)
for pts, slug in zip((3, 2, 1), seen):
score[slug] += pts
if not any(score.values()):
return None, votes
return max(score, key=lambda k: (score[k], -[p["slug"] for p in pitches].index(k))), {"votes": votes, "score": score}
+1
View File
@@ -9,6 +9,7 @@ permissions:
contents: write
issues: write
pages: write
statuses: write
concurrency:
group: venture
cancel-in-progress: false