Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdv-toolkit/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sdv-toolkit",
"version": "0.26.0",
"version": "0.26.1",
"description": "SportsDataverse engineering toolkit -- 25 skills and 10 agents shared across the ~40 SDV repos (Python + R). A SessionStart router detects the repo archetype and emits a routing card, so conventions load on arrival instead of being recalled. Skills: /sdv-add-source, /sdv-api-sync, /sdv-assuring-data-pipelines, /sdv-building-data-pipelines, /sdv-conventions, /sdv-data-pipeline, /sdv-dataset-lifecycle, /sdv-document, /sdv-guide, /sdv-learn, /sdv-metric-parity, /sdv-model-build, /sdv-modeling, /sdv-polars, /sdv-port, /sdv-python-performance-optimization, /sdv-r-coverage, /sdv-regen-docs, /sdv-repo-audit, /sdv-reprocess, /sdv-research-paper, /sdv-review-pr, /sdv-ship, /sdv-triage, /sdv-working-in-notebooks.",
"author": {
"name": "Saiem Gilani",
Expand Down
2 changes: 1 addition & 1 deletion sdv-toolkit/skills/sdv-ship/scripts/ci_wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def finish(verdict, snap, notes, threads=()):
and now() - copilot_asked_at < a.bots_grace
):
waiting.append("Copilot")
if bots["Copilot"][0] == "no-credits" and copilot_asked_at is not None:
if bots.get("Copilot", ("",))[0] == "no-credits" and copilot_asked_at is not None: # {} under --sha
# we asked, and Copilot answered with a quota refusal: no review is coming
return finish(
"self-review",
Expand Down
14 changes: 14 additions & 0 deletions sdv-toolkit/tools/test_ci_wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,20 @@ def test_a_usage_error_is_exit_6_not_conflicts_2(self):
cw.run(["sportsdataverse/sportsdataverse-py"]) # neither --pr nor --sha
self.assertEqual(cm.exception.code, 6)

def test_sha_mode_without_a_pr_reaches_a_verdict(self):
# --sha reads no PR, so bot_states is {}: it once raised KeyError 'Copilot' on its first poll.
# Only the ready case reaches that lookup; the failed case returns before it.
for checks_, rc_want, verdict in ((GREEN, 0, "ready"), (checks(run_("pytest", conclusion="failure")), 1, "failed")):
with self.subTest(verdict):
table = routes(PY, checks_=checks_)
clock, out, fake = Clock(T0), io.StringIO(), FakeGh(table)
gh = cw.Gh(fake, now=clock.now, sleep=clock.sleep)
rc = cw.run([PY, "--sha", SHA, "--interval", "60s"], gh=gh, now=clock.now, sleep=clock.sleep, env={}, out=out)
self.assertEqual(rc, rc_want, out.getvalue())
self.assertIn("bots: n/a", out.getvalue())
self.assertTrue(out.getvalue().rstrip().endswith("VERDICT: " + verdict))
self.assertEqual([g for g in fake.gets if "/pulls/" in g or "/issues/" in g], []) # no PR reads

def test_conflict_with_zero_check_runs(self):
table = routes(PY, pr_=pr("dirty"), checks_=checks())
rc, out, _, _ = go(PY, table)
Expand Down