Files
skills/tests/e2e/test_review_marks_e2e.py
T
Kevin Veen-BirkenbachandClaude Opus 5.5 0fad1bfae3 feat: hub and skills requirements 032 to 063
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>
2026-11-26 08:44:15 +00:00

78 lines
3.8 KiB
Python

from __future__ import annotations
import json
import os
import shutil
import sys
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
MARKS = """(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 to = row().dataset.to || null;
const lines = () => all("#sheet .review-file[data-path='src/app.py'] tr[data-line]");
const open = async () => {
row().querySelector(".headline").click();
return until(() => lines().length, 8000);
};
if (!(await open())) {
return {error: text(document.getElementById("sheet")), to};
}
const cell = lines()[2].querySelector("td.code");
const box = cell.getBoundingClientRect();
cell.dispatchEvent(new MouseEvent("contextmenu", {bubbles: true, cancelable: true, clientX: box.left + 4, clientY: box.top + 4}));
const field = await until(() => document.querySelector("#sheet tr.match-comment textarea"), 4000);
if (!field) {
return {error: "no inline comment field", to, menu: Boolean(document.querySelector(".ctx-menu:not([hidden])"))};
}
field.value = "c";
all("#sheet tr.match-comment button").find((button) => name(button) === "Save comment").click();
await until(() => document.querySelector("#sheet tr.match-mark"), 4000);
const shown = all("#sheet tr.match-mark").map(text);
document.body.dispatchEvent(new KeyboardEvent("keydown", {key: "Escape", bubbles: true}));
await until(() => document.getElementById("sheet").hidden, 4000);
await open();
const kept = all("#sheet tr.match-mark").map(text);
const via = all("#sheet .deny-split button").find((button) => name(button).startsWith("Deny via"));
if (via) {
via.click();
}
const reason = await until(() => document.querySelector(".sheet-box .deny-reason textarea"), 4000);
return {to, shown, kept, via: Boolean(via), reason: reason ? reason.value : null, wide: document.documentElement.scrollWidth > innerWidth + 1};
})()"""
@unittest.skipUnless(shutil.which(os.environ.get("CHROMIUM", "chromium")), "no Chromium")
class TestReviewMarks(base.OrchestratorE2ECase):
def setUp(self):
super().setUp()
arguments = {**self.arguments(comments.TITLE, "", self.page("marks.html", comments.review_page())), "worktree": "/repo/.worktrees/feature/marks", "branch": "feature/marks"}
result = self.tool("review_request", arguments)
self.assertFalse(result["isError"], result)
self.review = result["structuredContent"]["id"]
def test_chromium_marks_a_line_in_the_review_modal_of_a_card_without_requester_and_keeps_it_for_the_deny_reason(self):
probe = MARKS.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}/?marks#stream/inbox", "wait": 1200, "probe": probe, "shot": self.shot("1366-review-marks")}
data = self.drive([step], None)
(Path(self.shot("1366-review-marks")).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)
self.assertIsNone(found["to"], found)
self.assertEqual((found["shown"], found["kept"], found["via"], found["wide"]), (["c"], ["c"], True, False), found)
self.assertIn("src/app.py:3: c", found["reason"] or "", found)
if __name__ == "__main__":
unittest.main()