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])