From 9204f053ddd20770682fae7bebf14112313e9cdc Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 12 Oct 2026 18:04:19 +0200 Subject: [PATCH] fix(ci): keep the star on a priority row the sweep budget missed cells() awarded the priority glyph only in the branch that has a chunk, so a priority row beyond the budget rendered as a bare disabled mark, indistinguishable from an ordinary row the sweep did not reach. The two need different answers: --offset indexes the regular line only, so it never reaches a missed priority row, which needs a shorter priority line or a run of its own. The status now carries both glyphs and the module docstring says what to do about it. Co-Authored-By: Claude Opus 5 (1M context) --- cli/meta/ci/plan.py | 7 +++++-- tests/unit/python/cli/meta/ci/test_plan.py | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cli/meta/ci/plan.py b/cli/meta/ci/plan.py index 2cfebc64e5..e044b86588 100644 --- a/cli/meta/ci/plan.py +++ b/cli/meta/ci/plan.py @@ -12,7 +12,9 @@ diverge. One row per ``role#variant`` candidate in global query order, with the chunk it falls into and the axes it was assigned. Status per row: ⭐ a priority row, ✅ deployed by this sweep, ❌ beyond the -sweep's budget (raise ``--offset`` to reach it), ✂️ cut as redundant coverage — +sweep's budget (raise ``--offset`` to reach it), ⭐❌ a priority row the budget +did not reach — ``--offset`` indexes the regular line only, so this one needs a +shorter priority line or a run of its own, ✂️ cut as redundant coverage — a clone or a row an earlier one already embeds, which no sweep deploys. ``--cli`` renders fixed-width terminal tables instead of Markdown. @@ -108,7 +110,8 @@ def cells( if instructions.redundant(entry): status, where = _CUT, "" elif chunk is None: - status, where = _OFF, "" + status = f"{_STAR}{_OFF}" if entry["priority"] == "true" else _OFF + where = "" else: status = _STAR if entry["priority"] == "true" else _OK where = str(chunk) diff --git a/tests/unit/python/cli/meta/ci/test_plan.py b/tests/unit/python/cli/meta/ci/test_plan.py index 92bcdf8bcc..5d7f25b692 100644 --- a/tests/unit/python/cli/meta/ci/test_plan.py +++ b/tests/unit/python/cli/meta/ci/test_plan.py @@ -63,6 +63,14 @@ class TestCells(unittest.TestCase): ) self.assertEqual(rows[1][plan._COLUMNS.index("chunk")], "") + def test_a_priority_row_the_budget_missed_keeps_its_star(self) -> None: + rows = plan.cells(_ENTRIES, [_REGULAR]) + status = plan._COLUMNS.index("triggered") + self.assertEqual( + rows[0][status], to_emoji("priority") + to_emoji("disabled") + ) + self.assertEqual(rows[0][plan._COLUMNS.index("chunk")], "") + def test_a_clone_is_named_in_its_own_column(self) -> None: entries = [*_ENTRIES, _entry("web-app-d", "0", "compose", clone=True)] rows = plan.cells(entries, [_PRIORITY, _REGULAR])