Hub: send in the field (032), coherent speak box (033), stream head band (034), Match at full width with its pile (035, 036), Home without the outer box (037), badge to Match (038), rejects that survive a changed or withdrawn card (039), the release card (040), code marks in the review diff (041), why Deny is off (042), the undo window clock (043), widgets without inner boxes (044), the Artifacts head on one line (045), accepting a red gate's risk (046), one code box (047), done rows greyed and folded (048), one control height (049), menus that stay open (050), radio settings in the Device card (051), bubbles beside the modes (052), agent settings on every face and name (053), pin only by menu (054), WASD in Match (055), the flowing card edge (056), Schedules in Controls (057) and the hub poll cost (059). Skills: the coach leaves for its own repository kevinveenbirkenbach/coach (058; test_install pins its four skills in skills-lock.json and stays red until that repository is published and pinned), hooks and timers start fewer processes (060), council files on hot paths stay bounded and mirror by marker instead of mtime (061), scripts and hooks hand agents less output (062), and block.py builds the commit table and message block in one run (063). Requirement documents 032 to 063 with their implementation amendments. MEDUSA false positives accepted after kvb-think-criticize (36 lines): MM-SCAN-058 (pla inside replace or plan), JB-SCAN-616/641 (the local clip helper), CODEGEN-SCAN-001 (drop-in paths), CGS-SCAN-029 (systemctl argv from constants), CGS-SCAN-040 (runner poll loop), FLA-SCAN-055 (feedback), WM-SCAN-354, AI-BACKDOOR-006, GENAI-SCAN-1270, B604 (runner shell path for passkey-verified commands), TC004, EXA002, EXA006, EXA010 and WEB-SSRF. 🎯 Fix: 92 % 💥 Break: 8 % 💸 Tokens: 89 % ⏱️ Velocity: – 🛡️ Security: ~100 % 🏆 Score: 95 🚦 Gate: ⛔ break 8 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
75 lines
3.9 KiB
Python
75 lines
3.9 KiB
Python
from __future__ import annotations
|
|
|
|
import json
|
|
import os
|
|
import shutil
|
|
import sys
|
|
import time
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
sys.path[:0] = [str(HERE.parent), str(HERE)]
|
|
|
|
import hub_e2e_kit as base
|
|
import test_line_comments_e2e as comments
|
|
from hub_support import iso
|
|
|
|
WHY = """(async () => {@HELPERS@@UNLABELLED@
|
|
const row = () => document.querySelector('#main .inbox-list > li[data-ref="@REVIEW@"]');
|
|
if (!(await until(row, 8000))) {
|
|
return {error: text(document.getElementById("main"))};
|
|
}
|
|
const described = (button) => {
|
|
const note = document.getElementById(button.getAttribute("aria-describedby") || "");
|
|
return note ? note.textContent : null;
|
|
};
|
|
const main = all(".deny-split button", row()).find((button) => name(button) === "Deny");
|
|
const split = {disabled: main.disabled, title: main.closest(".why-off").title, described: described(main)};
|
|
all(".deny-split button", row()).find((button) => name(button).startsWith("Deny via")).click();
|
|
const confirm = await until(() => all(".sheet-box .actions button").find((button) => text(button) === "Deny"), 4000);
|
|
const call = document.querySelector('.sheet-box .deny-channels input[value="call"]');
|
|
const look = () => ({disabled: confirm.disabled, title: confirm.closest(".why-off").title, described: described(confirm)});
|
|
const off = {checked: call.checked, ...look()};
|
|
const select = document.querySelector(".sheet-box .deny-recipient select");
|
|
select.value = "Skills";
|
|
select.dispatchEvent(new Event("change", {bubbles: true}));
|
|
await sleep(100);
|
|
return {split, off, on: look(), wide: document.documentElement.scrollWidth > innerWidth + 1};
|
|
})()"""
|
|
|
|
|
|
@unittest.skipUnless(shutil.which(os.environ.get("CHROMIUM", "chromium")), "no Chromium")
|
|
class TestWhyDeny(base.OrchestratorE2ECase):
|
|
def setUp(self):
|
|
super().setUp()
|
|
now = time.time()
|
|
self.write_council({"work/s1/claim.json": {"office": "work/s1", "session": "s1", "runtime": "claude", "name": "Skills", "since": iso(now - 3600), "beat": now, "work": "hub"}})
|
|
arguments = {**self.arguments(comments.TITLE, "", self.page("why.html", comments.review_page())), "worktree": "/repo/.worktrees/feature/why", "branch": "feature/why"}
|
|
result = self.tool("review_request", arguments)
|
|
self.assertFalse(result["isError"], result)
|
|
self.review = result["structuredContent"]["id"]
|
|
|
|
def test_chromium_names_why_deny_is_off_on_hover_and_for_keyboard_users_until_a_recipient_is_picked(self):
|
|
probe = WHY.replace("@HELPERS@", base.HELPERS).replace("@UNLABELLED@", base.UNLABELLED).replace("@REVIEW@", f"review:{self.review}")
|
|
step = {"width": 1366, "height": 768, "url": f"http://localhost:{self.port}/?why#stream/inbox", "wait": 1200, "probe": probe, "shot": self.shot("1366-why-deny")}
|
|
data = self.drive([step], None)
|
|
Path(self.shot("1366-why-deny")).with_suffix(".json").write_text(json.dumps(data, indent=1), encoding="utf-8")
|
|
self.assertEqual([error for error in data["errors"] if "(style-src-elem)" not in error and "/favicon.ico" not in error], [])
|
|
found = data["results"][0]
|
|
self.assertNotIn("error", found, found)
|
|
missing = "No agent to tell: the item names no recipient"
|
|
self.assertTrue(found["split"]["disabled"], found)
|
|
self.assertTrue(found["split"]["title"].startswith(missing) and found["split"]["described"].startswith(missing), found)
|
|
needs = "Pick the agent to tell: a post or call needs a recipient"
|
|
self.assertEqual(found["off"], {"checked": True, "disabled": True, "title": needs, "described": needs}, found)
|
|
self.assertFalse(found["on"]["disabled"], found)
|
|
self.assertNotIn("needs a recipient", found["on"]["title"], found)
|
|
self.assertEqual(found["on"]["title"], found["on"]["described"], found)
|
|
self.assertIn("Skills", found["on"]["title"], found)
|
|
self.assertFalse(found["wide"], found)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|