fix(hub): the grant label helper no longer redeclares labelOf, and the grant-mode probe escapes its inner templates

14bb4f3 added function labelOf(item) to page-grant.js beside page-dom.js's labelOf(key), the agent name every other page file calls. The assembled page script then stopped parsing ('Identifier labelOf has already been declared'), so the hub page could not load, and test_page_scope, test_hub_page, test_page_reveal and the decision-row, inbox-gone and operator-task harnesses failed on it. The item helper is now grantLabel(item); its 5 callers in page-inbox.js follow, page-dom.js keeps labelOf.

The same commit put two template literals (b${proofs.length} and ${label}: ) inside test_hub_grant_mode.py's probe, itself a template literal, so they closed it early; both are escaped now.

Checks: the assembled page parses with no name declared twice (test_page_scope's own parse_error and clashes helpers, called inline), and node --check passes the probe. No test ran: the full suite runs again on master after the four fix bundles (operator order).

Security: MEDUSA over the 7 files of the four fix bundles on master: 100, all covered, 0 open findings.

🎯 Fix: 90 %
💥 Break: 2 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 88
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-22 23:28:53 +00:00
1 parent a4f7017691
commit 9b8e2a7d71
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -72,7 +72,7 @@ let renders = 0;
let streams = 0;
let signing = false;
proofFor = async (entries) => { proofs.push(entries.map((entry) => entry.kind + ":" + entry.id)); sent.push(entries.map((entry) => entry.label)); return signing ? {proof: "p"} : null; };
sendJson = async () => ({ok: true, data: {id: `b${proofs.length}`, due: 0}});
sendJson = async () => ({ok: true, data: {id: \`b\${proofs.length}\`, due: 0}});
undoToast = () => {};
acceptRule = async (item) => { accepts.push(item.id); return true; };
openSheet = (title, body) => { sheets.push(body); };
@@ -83,7 +83,7 @@ toast = () => ({remove() {}});
const results = {};
const take = () => ({selected: [...ui.selected].sort(), proofs: proofs.splice(0), labels: sent.splice(0), accepts: accepts.splice(0), renders, streams});
const dialogOf = (item) => { const made = choiceOf(item, () => {}); return Array.isArray(made) ? made[1] : made; };
const option = (item, label) => buttons(dialogOf(item)).find((button) => (button.getAttribute("title") || "").startsWith(`${label}: `));
const option = (item, label) => buttons(dialogOf(item)).find((button) => (button.getAttribute("title") || "").startsWith(\`\${label}: \`));
const pressedOptions = (item) => buttons(dialogOf(item)).filter((button) => button.getAttribute("aria-pressed") === "true").map((button) => button.getAttribute("title").split(": ")[0]);
const press = (item) => {
const first = actionsFor(item)[0];