085 calm Match deck: no header hourglass, centred bare empty state, the release card as a deck card (Cancel, Skip, Release), fixed card height. 086 motion: vanish() fade everywhere with a lint test, view transitions, a lub-dub heartbeat for working objects, confetti that lands and fades. 087 time readout under the pivot of every analog clock. 088 prune dialog grouped by prefix with tri-state boxes, search, stepper and sticky footer. 089 one-row task toolbar with Filter and Actions menus and a filter chip. 090 card border by state colour with a soft glow and owner avatars. 091 draggable limit lines with staged changes and one Save, a Limits menu with the matrix, View toggles, the GPU cause in its tooltip. 093 request chips Open, Expired, Stale, Failed, All and a signed Delete. 094 closed cards leave the deck within 5 s; open in Claude stamps. 095 compact agent message box with Post/Call, attach, mic and Send in the field. 096 Reject on an expired card drops it silently as Drop (expired). 097 Show filter in Match's right-click menu. 098 docked speech bubbles carry the speaker's avatar and a skip button. 099 Match card headlines cut to 120 characters with the full title in the tooltip; the code box keeps the whole command. tests/test_hub_path_links.py: a unicode fixture without German. Full make test green through the queue (2605 tests, ruff, shellcheck, markdownlint). Gate missed on the operator's word: break 7 %, the E2E specs (13 new, 15 updated) run next. 🎯 Fix: 92 % 💥 Break: 7 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 86 🚦 Gate: ⛔ break 7 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.8 KiB
Python
43 lines
1.8 KiB
Python
"""Exercise requirement 099: a Match card's headline is cut to 120 characters, its command and hash stay whole."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import unittest
|
|
|
|
from kvb_orchestrator import payloads
|
|
from kvb_orchestrator.matching import HEADLINE, headline
|
|
from test_hub_match import MatchCase
|
|
|
|
LONG = "gh workflow run entry-manual-steer.yml --repo kevinveenbirkenbach/infinito-nexus-core " + " ".join(f"-f priority{index}=drv-intel#0@host+clearnet%debian:amd64" for index in range(15))
|
|
|
|
|
|
class TestHeadline(unittest.TestCase):
|
|
def test_a_title_that_fits_stays_unchanged(self):
|
|
card = {"title": "x" * HEADLINE}
|
|
self.assertIs(headline(card), card)
|
|
|
|
def test_a_long_title_is_cut_at_the_last_word_boundary_and_keeps_its_full_text(self):
|
|
cut = headline({"title": LONG})
|
|
self.assertLessEqual(len(cut["title"]), HEADLINE)
|
|
self.assertTrue(cut["title"].endswith("…"))
|
|
self.assertTrue(LONG.startswith(cut["title"][:-1]))
|
|
self.assertEqual(LONG[len(cut["title"]) - 1], " ")
|
|
self.assertEqual(cut["title_full"], LONG)
|
|
|
|
def test_a_single_word_longer_than_the_limit_is_cut_inside_the_word(self):
|
|
cut = headline({"title": "a" * 500})
|
|
self.assertEqual(cut["title"], "a" * (HEADLINE - 1) + "…")
|
|
|
|
|
|
class TestHeadlineCard(MatchCase):
|
|
def test_a_long_command_card_carries_the_cut_title_the_full_command_and_the_uncut_hash(self):
|
|
self.operator_row("operator/steer", LONG, str(self.work))
|
|
card = self.card("operator:operator/steer")
|
|
self.assertLessEqual(len(card["title"]), HEADLINE)
|
|
self.assertEqual((card["command"], card["title_full"]), (LONG, LONG))
|
|
self.assertEqual(card["hash"], payloads.payload_hash(LONG, str(self.work), card["files"]))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|