test(ci-trigger): pin the workspace suite rule

The rule lived only in suite_passed's body, and it inverts easily on a
casual read: ask for the suite again when it failed. Under that reading
the retrigger aliases would drop the suite in their most common case,
because they force-cancel the source run before reading it, so a shard
that was still running comes back cancelled rather than red.

Only an all-green suite is retired. Failed, cancelled, skipped, timed
out, still running and never dispatched all keep it on the retrigger,
and each of those now has a test. The two docstrings enumerate them, and
so does the i8ciall description, which is where an operator reads it.
This commit is contained in:
kevinveenbirkenbach committed 2026-09-03 17:37:33 +02:00
1 parent 9c355a85c3
commit 8600f1d9aa
3 files changed
+34 -6

No files matched your search

@@ -464,10 +464,33 @@ class TestConfigFromTitle(unittest.TestCase):
self.assertEqual(runs.config_from_run(title, jobs=jobs)[suite], "true")
def test_a_suite_that_never_ran_is_asked_for_again(self) -> None:
"""No job at all means it never started, which proves nothing."""
title = render({"workspace": "true"})
jobs = [{"name": "🧹 Lint", "status": "completed", "conclusion": "success"}]
self.assertEqual(runs.config_from_run(title, jobs=jobs)["workspace"], "true")
def test_a_shard_that_did_not_run_through_is_asked_for_again(self) -> None:
"""Only a success retires the suite; every other outcome, a mid-run
force-cancel included, leaves it unproven."""
for conclusion in ("cancelled", "skipped", "timed_out"):
with self.subTest(conclusion):
title = render({"workspace": "true"})
jobs = [self._suite_job("workspace", conclusion)]
self.assertEqual(
runs.config_from_run(title, jobs=jobs)["workspace"], "true"
)
def test_a_still_running_shard_is_asked_for_again(self) -> None:
title = render({"workspace": "true"})
jobs = [
{
"name": f"🎛️ Orchestrate CI (manual) / {runs.SUITE_JOB_IDS['workspace']}",
"status": "in_progress",
"conclusion": None,
}
]
self.assertEqual(runs.config_from_run(title, jobs=jobs)["workspace"], "true")
def test_one_failing_shard_keeps_the_whole_suite(self) -> None:
title = render({"workspace": "true"})
jobs = [