From 1e5aac8a374a7869303fec212a327a03edc33c2e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 13 Nov 2026 19:55:22 +0000 Subject: [PATCH] fix(unify): repair what the night merges broke between lanes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 937c2c0 added the line prefix KEPT to watch.py, which shadowed the state directory path watch.KEPT that gates.py and the queue cleanup use; the prefix is now KEPT_LINE. The receipts page test gets an identity revealed() since page-dom.js wraps names through it after the firewall merge, the operator tasks test expects the Home tab of 008, and the hub view id fixture uses a non-ASCII word the English check accepts. Accepted MEDUSA false positives, re-keyed by the rename: MM-SCAN-058 at watch.py:1417 and WM-SCAN-354 at watch.py:1418. 🎯 Fix: 92 % 💥 Break: 2 % 💸 Cost: – ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 --- skills/kvb-org-organize/scripts/watch.py | 6 +++--- tests/test_hub_operator_tasks.py | 2 +- tests/test_hub_receipts.py | 2 +- tests/test_hub_view.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/skills/kvb-org-organize/scripts/watch.py b/skills/kvb-org-organize/scripts/watch.py index 8fe5367..bb88fdf 100755 --- a/skills/kvb-org-organize/scripts/watch.py +++ b/skills/kvb-org-organize/scripts/watch.py @@ -184,7 +184,7 @@ IN_USE = re.compile( r"image is being used by (?:running|stopped) container \S+$", re.MULTILINE, ) -OK, KEPT = "ok: ", "kept (in use): " +OK, KEPT_LINE = "ok: ", "kept (in use): " GUARD_REFUSED = 3 SHIM = '#!/bin/sh\nexec {python} -I {watch} guard {real} {report} "$@"\n' REFUSALS = { @@ -1415,12 +1415,12 @@ def remove_leftovers(prefix: list[str]) -> list[str]: for image in dict.fromkeys(fields[0] for fields in rows if fields[1:] == [NONE, NONE] and IMAGE_ID.fullmatch(fields[0])): code, _, err = run_step([*prefix, "rmi", image], False) in_use = code != 0 and IN_USE.search(err.decode(errors="replace")) is not None - lines.append(KEPT + shown(prefix, ["rmi", image]) if in_use else result_line(code, shown(prefix, ["rmi", image]))) + lines.append(KEPT_LINE + shown(prefix, ["rmi", image]) if in_use else result_line(code, shown(prefix, ["rmi", image]))) return lines def cleanup_failures(results: list[str]) -> list[str]: - return [line for line in results if not line.startswith((OK, KEPT))] + return [line for line in results if not line.startswith((OK, KEPT_LINE))] def guard_env(directory: Path, report: Path, binaries: dict[str, str | None]) -> dict[str, str]: diff --git a/tests/test_hub_operator_tasks.py b/tests/test_hub_operator_tasks.py index 97ac4f9..6538882 100644 --- a/tests/test_hub_operator_tasks.py +++ b/tests/test_hub_operator_tasks.py @@ -285,7 +285,7 @@ class TestOperatorPage(unittest.TestCase): def test_the_tasks_entry_carries_the_waiting_count_hidden_at_zero_and_no_inbox_entry_exists(self): status = self.data["status"] - self.assertEqual(status["keys"], ["stream", "rules", "agents", "artifacts", "tasks", "resources"]) + self.assertEqual(status["keys"], ["home", "stream", "rules", "agents", "artifacts", "tasks", "resources"]) self.assertEqual((status["text"], status["hidden"], status["urgent"], status["title"]), ("3", False, "badge urgent", "(3) Agent Orchestrator")) self.assertEqual(status["zero"], [True, "Agent Orchestrator"]) diff --git a/tests/test_hub_receipts.py b/tests/test_hub_receipts.py index c36dbef..9a88997 100644 --- a/tests/test_hub_receipts.py +++ b/tests/test_hub_receipts.py @@ -66,7 +66,7 @@ const find = (node, test, out = []) => { return out; }; const sandbox = { - Receipts, RadioSet, Node, NS: "svg", HUMAN: "Operator", DAY: 86400, WEEKDAYS: [], + Receipts, RadioSet, Node, NS: "svg", HUMAN: "Operator", DAY: 86400, WEEKDAYS: [], revealed: String, document: {createElement: (tag) => new Node(tag), createElementNS: (ns, tag) => new Node(tag)}, relative: {format: () => "ago"}, absolute: {format: (date) => `at ${date.getTime() / 1000}`}, Faces: {of: () => ({parts: []}), SIZE: 10}, speech: {current: null}, look: {hidden: new Set()}, PRESENCE: {}, STATUS: {}, diff --git a/tests/test_hub_view.py b/tests/test_hub_view.py index 78b53a4..44e2565 100644 --- a/tests/test_hub_view.py +++ b/tests/test_hub_view.py @@ -161,7 +161,7 @@ const caught = (run) => { const long = "x".repeat(300); console.log(JSON.stringify({ unknown, wide, listSet, local, stored, combined, adopted, rebased, merged, churned, gaveUp, refused, during, kept, beforeLeave, atLeave, landed, sent, server: left, hooks: hooks.pagehide, error: V.error(), notRestored, restored, - ids: [V.id("host", "CPU"), V.id("disk", "/"), V.id("util", "0000:01:00.0"), V.id("agent", "Stage (this session) [5d88e9]"), V.id("a:b", "c"), V.id("a", "b:c"), V.id("a_3a_b"), V.id("agent", long), V.id("agent", `${long}y`), V.id("agent", "Ärger 🦫")], + ids: [V.id("host", "CPU"), V.id("disk", "/"), V.id("util", "0000:01:00.0"), V.id("agent", "Stage (this session) [5d88e9]"), V.id("a:b", "c"), V.id("a", "b:c"), V.id("a_3a_b"), V.id("agent", long), V.id("agent", `${long}y`), V.id("agent", "Çelik 🦫")], })); })(); """.replace("@PIN@", json.dumps(PIN)).replace("@PIN_ID@", PIN["id"])