feat(hub): deny reason chips, patterned Match card heads and copyable place pills

The deny sheet shows the last five distinct deny reasons as chips (recent_reasons in denying.py, served as reasons in /api/state); a click fills the reason field. Match cards get a per-card pattern (dots, stripes, waves, grid, rings) and a two-hue gradient head, the repo, branch and worktree become copyable pills, Match keeps the last comments and peeks in local storage, and Home gets a slot label.

Rebased from its lane base 2754568 onto 96d332a: the scan copy's diff against 2aea6d1 would have reverted the release-flash fix, so the bundle was re-exported against 2754568; the one conflict in page-match.js keeps matchView.epoch next to the new COMMENTS_KEPT and PATTERNS. node --check passes.

Tests: test_deny_reason_chips_e2e plus Match review and waiting e2e and test_hub_deny, test_hub_state updates. Written, not run: the full suite runs once on master after all bundles (operator order).

Security: MEDUSA over the staged tree on master: 100, no findings; index.html.j2, style-home.css and style-match.css are not covered and were read by hand (style rules only, no url or import).

🎯 Fix: 90 %
💥 Break: 5 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-22 12:34:05 +00:00
1 parent 96d332a7cd
commit f95196ca82
15 files changed
+369 -24

No files matched your search

+13 -2
View File
@@ -11,7 +11,7 @@ from unittest import mock
from hub_case import HubCase
from hub_support import ASK, CLIENT, PAGE, Key, key, signing, verifier
from kvb_orchestrator import batches, skill_scripts
from kvb_orchestrator import batches, denying, skill_scripts
PUSH = "git push"
PLANTED = {"work/a0/claim.json": {"office": "work/a0", "session": "s1", "runtime": "claude", "name": "Villain session", "since": "2026-11-05T08:00:00+00:00", "beat": 0, "work": "x"}}
@@ -106,7 +106,9 @@ class TestHubDeny(HubCase):
self.assertEqual(sorted(sent[:3] for sent in self.radio()), [["post", "--to", "Skills session"]] * 3)
self.assertTrue(all("Denied by the operator: " in sent[-1] for sent in self.radio()), self.radio())
self.assertIn("Denied by the operator: commit feat: deny me", next(sent[-1] for sent in self.radio() if "Reason: rebase first" in sent[-1]))
self.assertFalse({ask_id, review_id} & {item["id"] for item in self.snapshot()["inbox"]})
state = self.snapshot()
self.assertFalse({ask_id, review_id} & {item["id"] for item in state["inbox"]})
self.assertEqual(state["reasons"], ["rebase first"])
def test_every_class_but_mayday_reaches_the_agent_or_all(self):
session = "s9"
@@ -242,5 +244,14 @@ class TestHubDeny(HubCase):
return verifier.Trust(approvers=self.approvers, replay=self.replay / "hook.json", origin=self.origin)
class TestRecentReasons(unittest.TestCase):
def test_the_last_five_distinct_reasons_come_newest_first(self):
said = ["a", "", "b", "a", "c", "d", "e", "f", "c"]
denials = [{"denial": {"reason": reason}, "created_ts": float(at)} for at, reason in enumerate(said)]
messages = [{"text": "hi", "created_ts": 99.0}, {"denial": None, "created_ts": 98.0}, *reversed(denials)]
self.assertEqual(denying.recent_reasons(messages), ["c", "f", "e", "d", "a"])
self.assertEqual(denying.recent_reasons([{"text": "hi", "created_ts": 1.0}]), [])
if __name__ == "__main__":
unittest.main()