claude-dev-env 8.96.1 → 8.96.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -174,8 +174,9 @@ def require_own_card_content(board: dict) -> None:
|
|
|
174
174
|
"""Refuse a board whose cards say nothing of their own.
|
|
175
175
|
|
|
176
176
|
A card passes when one of its steps carries text that is not its title
|
|
177
|
-
or note and that no other card on the board repeats
|
|
178
|
-
a title, a link,
|
|
177
|
+
or note and that no other card on the board repeats, and every step
|
|
178
|
+
carries text. A card holding only a title, a link, text another card
|
|
179
|
+
repeats, or a step with no text fails.
|
|
179
180
|
|
|
180
181
|
Args:
|
|
181
182
|
board: Prepared board with ``lanes`` of ``groups`` of ``cards``.
|
|
@@ -196,7 +197,8 @@ def _step_texts(card: dict) -> set[str]:
|
|
|
196
197
|
|
|
197
198
|
def _has_own_step(card: dict, text_counts: Counter) -> bool:
|
|
198
199
|
all_borrowed_text = {card["title"].strip(), card.get("note", "").strip(), ""}
|
|
199
|
-
|
|
200
|
+
is_every_step_written = all(each_step.get("text") for each_step in card.get("steps", []))
|
|
201
|
+
return is_every_step_written and any(text_counts[each_text] == 1 and each_text not in all_borrowed_text for each_text in _step_texts(card))
|
|
200
202
|
|
|
201
203
|
|
|
202
204
|
def _prepare_sources(scene: dict, snapshot: dict, snapshot_path: Path) -> None:
|
|
@@ -190,6 +190,13 @@ def test_own_card_content_refuses_steps_without_text() -> None:
|
|
|
190
190
|
require_own_card_content({"lanes": [{"groups": [{"cards": all_cards}]}]})
|
|
191
191
|
|
|
192
192
|
|
|
193
|
+
def test_own_card_content_refuses_a_card_with_one_textless_step() -> None:
|
|
194
|
+
"""A step the viewer would draw with no text stops the render, even beside an own step."""
|
|
195
|
+
all_cards = [{"title": "Half card", "steps": [{"label": "Today", "text": "Own gap."}, {"label": "Fix"}]}]
|
|
196
|
+
with pytest.raises(RenderRunFatal, match="Half card"):
|
|
197
|
+
require_own_card_content({"lanes": [{"groups": [{"cards": all_cards}]}]})
|
|
198
|
+
|
|
199
|
+
|
|
193
200
|
def test_tracker_board_rejects_a_node_with_no_lane(tmp_path: Path) -> None:
|
|
194
201
|
"""Every state node on a board sits in exactly one lane."""
|
|
195
202
|
scene = _board_scene(tmp_path)
|