From 6b36e80dadf6bbd1996ea3fb987484dacfb3aaf2 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 18 Nov 2026 23:00:24 +0000 Subject: [PATCH] test(hub): keep the inbox-gone harness clear of page-inbox names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d695bb2 added a top-level const answers to page-inbox.js; the harness of test_hub_inbox_gone runs the page modules and its own code in one Node VM and declared let answers too, so setUpClass died on a SyntaxError and the gate on 88c232f went red. The harness now calls its fetch table replies. 🎯 Fix: 97 % 💥 Break: 0 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 97 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- tests/test_hub_inbox_gone.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_hub_inbox_gone.py b/tests/test_hub_inbox_gone.py index 55853b5..0697aa5 100644 --- a/tests/test_hub_inbox_gone.py +++ b/tests/test_hub_inbox_gone.py @@ -55,7 +55,7 @@ let renders = []; let atLoad = null; let loads = 0; let reloaded = null; -let answers = {}; +let replies = {}; toast = (title, lines, good) => { toasts.push([title, lines, good]); return {remove() {}}; }; render = (force) => { renders.push(force); }; drawStream = () => {}; @@ -68,7 +68,7 @@ load = async () => { }; fetch = async (path) => { posts.push(path); - const answer = answers[path] || [500, "unexpected " + path]; + const answer = replies[path] || [500, "unexpected " + path]; if (answer === "offline") { throw new TypeError("Failed to fetch"); } @@ -87,7 +87,7 @@ async function scenario(name, shown, given, act, after) { atLoad = null; loads = 0; reloaded = after || null; - answers = given; + replies = given; await act(); results[name] = {inbox: state.inbox.map((item) => item.id), atLoad, loads, renders: renders.length, toasts: [...toasts], posts: [...posts], busy: ui.busy}; } @@ -106,7 +106,7 @@ const grantBoth = () => submit(state.inbox.map((item) => entryOf(item, "approve" await scenario("bulk_409", ["gone", "kept"], {"/api/sign": reply(409, '{"status": "held"}')}, grantBoth, ["kept"]); state.inbox = [items.gone, items.kept, items.later].map((item) => ({...item})); renders = []; - answers = {"/api/state?": reply(200, JSON.stringify({inbox: [items.kept], radio: [], settings: {}, now: now + 10}))}; + replies = {"/api/state?": reply(200, JSON.stringify({inbox: [items.kept], radio: [], settings: {}, now: now + 10}))}; await fresh(); results.refresh = {inbox: state.inbox.map((item) => item.id), renders, offline: ui.offline}; console.log(JSON.stringify(results));