diff --git a/.github/time/test_time.py b/.github/time/test_time.py index d43d0ac..53c342a 100644 --- a/.github/time/test_time.py +++ b/.github/time/test_time.py @@ -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"]) diff --git a/.github/time/venture.py b/.github/time/venture.py index dd8088c..95eabc6 100644 --- a/.github/time/venture.py +++ b/.github/time/venture.py @@ -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} diff --git a/.github/workflows/venture.yml b/.github/workflows/venture.yml index 6f8ab2c..59fe43e 100644 --- a/.github/workflows/venture.yml +++ b/.github/workflows/venture.yml @@ -9,6 +9,7 @@ permissions: contents: write issues: write pages: write + statuses: write concurrency: group: venture cancel-in-progress: false