Radio footer, rules page, schedules editor (System timers and Claude tasks through signed runner jobs), account usage bar, usage explorer with a streamed usage.jsonl, queue Controls tab and override, running tasks on the board, stale task prune with the generic dial, greyed card stamps, commit-tree diffs from the runner preview, VS Code path links, expired asks and decisions that stay as EXPIRED cards (asks keyed by a call digest; an async PostToolUse hook closes those answered in the terminal), the Match refresh hourglass, attachments by paste, drop and paperclip in every text field (page CSP gains img-src blob: for the thumbnails) and the limits board with profiles and a passkey to loosen. Fixes: one red accept on a red-gate commit and no release while a risk is open, the send bar footer segments share one height, the mic button survives a redraw, new Match cards queue before the release card. E2E specs were still running at commit time (operator order); their failures follow as separate fixes. 🎯 Fix: 88 % 💥 Break: 8 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 81 🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5 (committed on the operator's word) Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.9 KiB
Python
50 lines
1.9 KiB
Python
from __future__ import annotations
|
|
|
|
import json
|
|
import shutil
|
|
import subprocess
|
|
import unittest
|
|
|
|
from hub_support import HUB
|
|
|
|
CLOCK = HUB / "templates" / "matchclock.js"
|
|
PROBE = """
|
|
const C = require(process.argv[1]);
|
|
const start = 1_000_000;
|
|
const clicked = start + 700;
|
|
console.log(JSON.stringify({
|
|
ends: [C.MIN, C.MAX, C.PAGE, C.SECOND],
|
|
next: [C.next(start, 2), C.next(start, 10), C.next(start, 60)],
|
|
wait: [C.wait(start, start, 2), C.wait(start + 1500, start, 2), C.wait(start + 2000, start, 2), C.wait(start + 9000, start, 2)],
|
|
due: [C.due(start + 1999, start, 2), C.due(start + 2000, start, 2), C.due(start + 5000, start, 2)],
|
|
restart: {before: C.wait(clicked, start, 2), after: C.wait(clicked, clicked, 2), next: C.next(clicked, 2)},
|
|
bounded: [0, 1, 2, 10.4, 10.6, 60, 61, -5].map(C.bounded),
|
|
clamped: [C.next(start, 0), C.next(start, 600)],
|
|
}));
|
|
"""
|
|
|
|
|
|
@unittest.skipUnless(shutil.which("node"), "no node")
|
|
class TestMatchClock(unittest.TestCase):
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
done = subprocess.run(["node", "-e", PROBE, str(CLOCK)], capture_output=True, text=True, timeout=60, check=True)
|
|
cls.data = json.loads(done.stdout)
|
|
|
|
def test_the_next_fetch_is_due_one_interval_after_the_last_fetch_started(self):
|
|
self.assertEqual(self.data["ends"], [1, 60, 5, 1000])
|
|
self.assertEqual(self.data["next"], [1_002_000, 1_010_000, 1_060_000])
|
|
self.assertEqual(self.data["wait"], [2000, 500, 0, 0])
|
|
self.assertEqual(self.data["due"], [False, True, True])
|
|
|
|
def test_a_click_fetches_at_once_and_the_cycle_restarts_from_the_click(self):
|
|
self.assertEqual(self.data["restart"], {"before": 1300, "after": 2000, "next": 1_002_700})
|
|
|
|
def test_the_interval_is_held_to_whole_seconds_from_1_to_60(self):
|
|
self.assertEqual(self.data["bounded"], [1, 1, 2, 10, 11, 60, 60, 1])
|
|
self.assertEqual(self.data["clamped"], [1_001_000, 1_060_000])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|