From 5dbba278689ce276f4e3eec5e53022ccd5cd5aff Mon Sep 17 00:00:00 2001 From: ch <1938389+netravnen@users.noreply.github.com> Date: Thu, 20 Aug 2026 21:56:40 +0200 Subject: [PATCH] fix(user.js): apply lifecycle markers to executor-surfaced stragglers Resolve the executor-surfaced-decisions ticket (2026-08-20): the wave-1 conformance tests found zero-reference symbols and one @ai duplication group that no human audit had caught. Per the ratified decisions, the four orphan helpers are staged rather than deleted, the two dead documented logging helpers are marked deprecated ahead of their allowlisted removal, and the triplicated modal-close @ai tag is rewritten so each site names its own modal and the loop its cancel protects. Changes: - CP CONFLICT_RESOLVE_GATE_COUNT: line-comment "@staged wip" marker (gate-count for data-driven conflict-resolver gate reporting; verifyConflictGates hardcodes the count in prose today). - CP addToolbarDropdownAction: "@staged wip" (no multi-item toolbar dropdown built yet; wire when the first one lands). - CP getCopyNetworkFrontendPath: "@staged wip" (per-entity copy-URL helper; wire when the copy-link action expands beyond networks). - DP stripTrailingLinkEmojiTokens: "@staged wip" (anchor-label emoji cleanup; wire into hydrateExistingPeeringDbAnchor when label rewriting returns). - lib/admincom-common.js dbgGroup/dbgGroupEnd: "@deprecated" with removal condition (documented logging API with no callers; remove with the next CONVENTIONS.md doc cycle). - CP: the three identical "@ai Preserve the cancelSignal write and the resolveClosed() call." tags on modal close() handlers rewritten modal-specifically (IXLAN renumber / IX-F member audit / conflict resolver), each naming the apply/merge/delete loop its cancelSignal write aborts. Each rewritten tag is unique and passes the litmus. - Version bumps (lib change inlines into all three scripts): CP 2.0.228 -> 2.0.229, DP 1.7.12 -> 1.7.13, FP 1.1.42 -> 1.1.43, in both .src.js and .meta.js; .user.js regenerated. Security: - N/A Testing: - python user.js/scripts/build_userscripts.py && --check: green. - node --check on all three generated .user.js: green. - cd user.js && node --test: 585 pass, 1 skipped, 0 fail. Backwards Compatibility: - Comment-only and version-header changes; no behavior change. Assisted-by: Claude:claude-opus-5 --- user.js/lib/admincom-common.js | 10 +++++++-- .../peeringdb-cp-consolidated-tools.meta.js | 2 +- .../peeringdb-cp-consolidated-tools.src.js | 11 ++++++---- .../peeringdb-cp-consolidated-tools.user.js | 21 +++++++++++++------ user.js/peeringdb-deskpro-tools.meta.js | 2 +- user.js/peeringdb-deskpro-tools.src.js | 3 ++- user.js/peeringdb-deskpro-tools.user.js | 13 +++++++++--- .../peeringdb-fp-consolidated-tools.meta.js | 2 +- .../peeringdb-fp-consolidated-tools.src.js | 2 +- .../peeringdb-fp-consolidated-tools.user.js | 12 ++++++++--- 10 files changed, 55 insertions(+), 23 deletions(-) diff --git a/user.js/lib/admincom-common.js b/user.js/lib/admincom-common.js index 4a86938..28f75be 100644 --- a/user.js/lib/admincom-common.js +++ b/user.js/lib/admincom-common.js @@ -112,12 +112,18 @@ function dbgWarn(tag, msg, ...rest) { if (!isDebugEnabled()) return; console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest); } -/** Open a console group tagged like dbg(), but only when debug mode is active. */ +/** + * Open a console group tagged like dbg(), but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroup(tag, label) { if (!isDebugEnabled()) return; console.group(`[${MODULE_PREFIX}:${tag}]`, label); } -/** Close the current console group, but only when debug mode is active. */ +/** + * Close the current console group, but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroupEnd() { if (!isDebugEnabled()) return; console.groupEnd(); diff --git a/user.js/peeringdb-cp-consolidated-tools.meta.js b/user.js/peeringdb-cp-consolidated-tools.meta.js index 031253b..5c94a8b 100644 --- a/user.js/peeringdb-cp-consolidated-tools.meta.js +++ b/user.js/peeringdb-cp-consolidated-tools.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB CP - Consolidated Tools // @namespace https://www.peeringdb.com/cp/ -// @version 2.0.228 +// @version 2.0.229 // @description Consolidated CP userscript with strict route-isolated modules for facility/network/user/entity workflows // @author // @match https://www.peeringdb.com/cp/* diff --git a/user.js/peeringdb-cp-consolidated-tools.src.js b/user.js/peeringdb-cp-consolidated-tools.src.js index d3e6a39..7589861 100644 --- a/user.js/peeringdb-cp-consolidated-tools.src.js +++ b/user.js/peeringdb-cp-consolidated-tools.src.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB CP - Consolidated Tools // @namespace https://www.peeringdb.com/cp/ -// @version 2.0.228 +// @version 2.0.229 // @description Consolidated CP userscript with strict route-isolated modules for facility/network/user/entity workflows // @author // @match https://www.peeringdb.com/cp/* @@ -130,6 +130,7 @@ "ipaddr4", "ipaddr6", "speed", "operational", "is_rs_peer", "bfd_support", "notes", ]; const AUTO_MERGE_FIELDS = PRESERVED_NETIXLAN_FIELDS.slice(); + // @staged wip — gate-count constant for data-driven conflict-resolver gate reporting; verifyConflictGates and its modal copy hardcode "8 safety gates" in prose today, so wire this in when that reporting goes data-driven. const CONFLICT_RESOLVE_GATE_COUNT = 8; // Recent IP changes report: window length in minutes for the audit view. const RECENT_IP_CHANGES_WINDOW_MIN = 60; @@ -2516,7 +2517,7 @@ /** * Removes the modal from the DOM and cancels any apply loop in flight. - * @ai Preserve the cancelSignal write and the resolveClosed() call. + * @ai Set cancelSignal.cancelled before resolveClosed() so a backdrop dismissal of the renumber modal aborts applyRenumberRows' PUT loop mid-flight and only then releases the opener's action lock via closed. */ function close() { // Dismissing the UI must stop the work, not just hide it. This was @@ -3338,7 +3339,7 @@ /** * Removes the modal and cancels any merge loop in flight. - * @ai Preserve the cancelSignal write and the resolveClosed() call. + * @ai Keep the cancelSignal.cancelled write and the resolveClosed() call: dismissing the IX-F member-audit modal must stop applyIxfMerges' PUT/DELETE merge loop, not merely hide its progress display. */ function close() { // Dismissing the UI must stop the work, not just hide it. This was @@ -4279,7 +4280,7 @@ /** * Removes the modal and cancels any delete loop in flight. - * @ai Preserve the cancelSignal write and the resolveClosed() call. + * @ai Closing the conflict resolver must halt applyConflictDeletes before its next DELETE — keep the cancelSignal.cancelled write ahead of backdrop.remove() and resolveClosed(). */ function close() { // Dismissing the UI must stop the work, not just hide it -- this modal @@ -5507,6 +5508,7 @@ * Purpose: Add multi-item expandable menus (e.g., Maps) to the main toolbar UL. * Necessity: Toolbar insertion semantics differ from the secondary row; wrapping * createDropdownActionListItem ensures correct placement and data-pdb-cp-action tagging. + * @staged wip — no multi-item toolbar dropdown (e.g. a Maps menu) is built yet; wire this in when the first dropdown toolbar action lands on the primary toolbar. * @param {{ id: string, label: string, items: Array<{label: string, href: string}>, * insertLeft?: boolean }} opts * @returns {HTMLAnchorElement|null} The dropdown toggle anchor element, or null on failure. @@ -7842,6 +7844,7 @@ * Determines the frontend URL path for a CP entity (network, carrier, ix). * Purpose: Generate correct copy-to-clipboard URL for the current entity type. * Necessity: Different entity types map to different URL paths. + * @staged wip — per-entity frontend copy-URL helper (carrier/ix/net paths ready); wire it in when the copy-link toolbar action expands beyond network pages. * @param {{ entity: string, entityId: string }} ctx - Route context from getRouteContext(). * @returns {string} Root-relative frontend path (e.g., "/net/42"). */ diff --git a/user.js/peeringdb-cp-consolidated-tools.user.js b/user.js/peeringdb-cp-consolidated-tools.user.js index 7deed23..f31dbb6 100644 --- a/user.js/peeringdb-cp-consolidated-tools.user.js +++ b/user.js/peeringdb-cp-consolidated-tools.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB CP - Consolidated Tools // @namespace https://www.peeringdb.com/cp/ -// @version 2.0.228 +// @version 2.0.229 // @description Consolidated CP userscript with strict route-isolated modules for facility/network/user/entity workflows // @author // @match https://www.peeringdb.com/cp/* @@ -130,6 +130,7 @@ "ipaddr4", "ipaddr6", "speed", "operational", "is_rs_peer", "bfd_support", "notes", ]; const AUTO_MERGE_FIELDS = PRESERVED_NETIXLAN_FIELDS.slice(); + // @staged wip — gate-count constant for data-driven conflict-resolver gate reporting; verifyConflictGates and its modal copy hardcode "8 safety gates" in prose today, so wire this in when that reporting goes data-driven. const CONFLICT_RESOLVE_GATE_COUNT = 8; // Recent IP changes report: window length in minutes for the audit view. const RECENT_IP_CHANGES_WINDOW_MIN = 60; @@ -641,12 +642,18 @@ if (!isDebugEnabled()) return; console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest); } - /** Open a console group tagged like dbg(), but only when debug mode is active. */ + /** + * Open a console group tagged like dbg(), but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroup(tag, label) { if (!isDebugEnabled()) return; console.group(`[${MODULE_PREFIX}:${tag}]`, label); } - /** Close the current console group, but only when debug mode is active. */ + /** + * Close the current console group, but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroupEnd() { if (!isDebugEnabled()) return; console.groupEnd(); @@ -3977,7 +3984,7 @@ /** * Removes the modal from the DOM and cancels any apply loop in flight. - * @ai Preserve the cancelSignal write and the resolveClosed() call. + * @ai Set cancelSignal.cancelled before resolveClosed() so a backdrop dismissal of the renumber modal aborts applyRenumberRows' PUT loop mid-flight and only then releases the opener's action lock via closed. */ function close() { // Dismissing the UI must stop the work, not just hide it. This was @@ -4799,7 +4806,7 @@ /** * Removes the modal and cancels any merge loop in flight. - * @ai Preserve the cancelSignal write and the resolveClosed() call. + * @ai Keep the cancelSignal.cancelled write and the resolveClosed() call: dismissing the IX-F member-audit modal must stop applyIxfMerges' PUT/DELETE merge loop, not merely hide its progress display. */ function close() { // Dismissing the UI must stop the work, not just hide it. This was @@ -5740,7 +5747,7 @@ /** * Removes the modal and cancels any delete loop in flight. - * @ai Preserve the cancelSignal write and the resolveClosed() call. + * @ai Closing the conflict resolver must halt applyConflictDeletes before its next DELETE — keep the cancelSignal.cancelled write ahead of backdrop.remove() and resolveClosed(). */ function close() { // Dismissing the UI must stop the work, not just hide it -- this modal @@ -6968,6 +6975,7 @@ * Purpose: Add multi-item expandable menus (e.g., Maps) to the main toolbar UL. * Necessity: Toolbar insertion semantics differ from the secondary row; wrapping * createDropdownActionListItem ensures correct placement and data-pdb-cp-action tagging. + * @staged wip — no multi-item toolbar dropdown (e.g. a Maps menu) is built yet; wire this in when the first dropdown toolbar action lands on the primary toolbar. * @param {{ id: string, label: string, items: Array<{label: string, href: string}>, * insertLeft?: boolean }} opts * @returns {HTMLAnchorElement|null} The dropdown toggle anchor element, or null on failure. @@ -9303,6 +9311,7 @@ * Determines the frontend URL path for a CP entity (network, carrier, ix). * Purpose: Generate correct copy-to-clipboard URL for the current entity type. * Necessity: Different entity types map to different URL paths. + * @staged wip — per-entity frontend copy-URL helper (carrier/ix/net paths ready); wire it in when the copy-link toolbar action expands beyond network pages. * @param {{ entity: string, entityId: string }} ctx - Route context from getRouteContext(). * @returns {string} Root-relative frontend path (e.g., "/net/42"). */ diff --git a/user.js/peeringdb-deskpro-tools.meta.js b/user.js/peeringdb-deskpro-tools.meta.js index 074fc89..f7255b7 100644 --- a/user.js/peeringdb-deskpro-tools.meta.js +++ b/user.js/peeringdb-deskpro-tools.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB DP - Consolidated Tools // @namespace https://www.peeringdb.com/ -// @version 1.7.12 +// @version 1.7.13 // @description Consolidated DeskPro tools: linkifies/enriches PeeringDB links (ASN/IP/IX/NET/FAC/Carrier), adds an owning-org shortcut link beside each, copies mailto addresses, normalizes PeeringDB CP double-slash links, generates pihole whitelist commands for IX/NET/FAC/Carrier approval tickets // @author // @match https://peeringdb.deskpro.com/app* diff --git a/user.js/peeringdb-deskpro-tools.src.js b/user.js/peeringdb-deskpro-tools.src.js index 0394e9b..75f3507 100644 --- a/user.js/peeringdb-deskpro-tools.src.js +++ b/user.js/peeringdb-deskpro-tools.src.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB DP - Consolidated Tools // @namespace https://www.peeringdb.com/ -// @version 1.7.12 +// @version 1.7.13 // @description Consolidated DeskPro tools: linkifies/enriches PeeringDB links (ASN/IP/IX/NET/FAC/Carrier), adds an owning-org shortcut link beside each, copies mailto addresses, normalizes PeeringDB CP double-slash links, generates pihole whitelist commands for IX/NET/FAC/Carrier approval tickets // @author // @match https://peeringdb.deskpro.com/app* @@ -1581,6 +1581,7 @@ /** * Strips trailing link-emoji tokens from visible anchor text. * Purpose: Prevent re-decoration cycles from treating prior emoji icons as label content. + * @staged wip — anchor-label emoji cleanup for re-decoration; wire into hydrateExistingPeeringDbAnchor when anchor-label rewriting returns there. * @param {string} value - Raw anchor text. * @returns {string} Text without trailing link-emoji tokens. */ diff --git a/user.js/peeringdb-deskpro-tools.user.js b/user.js/peeringdb-deskpro-tools.user.js index 19c1a79..288d7ee 100644 --- a/user.js/peeringdb-deskpro-tools.user.js +++ b/user.js/peeringdb-deskpro-tools.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB DP - Consolidated Tools // @namespace https://www.peeringdb.com/ -// @version 1.7.12 +// @version 1.7.13 // @description Consolidated DeskPro tools: linkifies/enriches PeeringDB links (ASN/IP/IX/NET/FAC/Carrier), adds an owning-org shortcut link beside each, copies mailto addresses, normalizes PeeringDB CP double-slash links, generates pihole whitelist commands for IX/NET/FAC/Carrier approval tickets // @author // @match https://peeringdb.deskpro.com/app* @@ -494,12 +494,18 @@ if (!isDebugEnabled()) return; console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest); } - /** Open a console group tagged like dbg(), but only when debug mode is active. */ + /** + * Open a console group tagged like dbg(), but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroup(tag, label) { if (!isDebugEnabled()) return; console.group(`[${MODULE_PREFIX}:${tag}]`, label); } - /** Close the current console group, but only when debug mode is active. */ + /** + * Close the current console group, but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroupEnd() { if (!isDebugEnabled()) return; console.groupEnd(); @@ -2310,6 +2316,7 @@ /** * Strips trailing link-emoji tokens from visible anchor text. * Purpose: Prevent re-decoration cycles from treating prior emoji icons as label content. + * @staged wip — anchor-label emoji cleanup for re-decoration; wire into hydrateExistingPeeringDbAnchor when anchor-label rewriting returns there. * @param {string} value - Raw anchor text. * @returns {string} Text without trailing link-emoji tokens. */ diff --git a/user.js/peeringdb-fp-consolidated-tools.meta.js b/user.js/peeringdb-fp-consolidated-tools.meta.js index f1f2643..3d8dc76 100644 --- a/user.js/peeringdb-fp-consolidated-tools.meta.js +++ b/user.js/peeringdb-fp-consolidated-tools.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB FP - Consolidated Tools // @namespace https://www.peeringdb.com/ -// @version 1.1.42 +// @version 1.1.43 // @description Consolidated FP userscript for PeeringDB frontend (Net/Org/Fac/IX/Carrier) // @author // @match https://www.peeringdb.com/* diff --git a/user.js/peeringdb-fp-consolidated-tools.src.js b/user.js/peeringdb-fp-consolidated-tools.src.js index b7ef77a..e696af1 100644 --- a/user.js/peeringdb-fp-consolidated-tools.src.js +++ b/user.js/peeringdb-fp-consolidated-tools.src.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB FP - Consolidated Tools // @namespace https://www.peeringdb.com/ -// @version 1.1.42 +// @version 1.1.43 // @description Consolidated FP userscript for PeeringDB frontend (Net/Org/Fac/IX/Carrier) // @author // @match https://www.peeringdb.com/* diff --git a/user.js/peeringdb-fp-consolidated-tools.user.js b/user.js/peeringdb-fp-consolidated-tools.user.js index c9cdea9..f1a4537 100644 --- a/user.js/peeringdb-fp-consolidated-tools.user.js +++ b/user.js/peeringdb-fp-consolidated-tools.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PeeringDB FP - Consolidated Tools // @namespace https://www.peeringdb.com/ -// @version 1.1.42 +// @version 1.1.43 // @description Consolidated FP userscript for PeeringDB frontend (Net/Org/Fac/IX/Carrier) // @author // @match https://www.peeringdb.com/* @@ -438,12 +438,18 @@ if (!isDebugEnabled()) return; console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest); } - /** Open a console group tagged like dbg(), but only when debug mode is active. */ + /** + * Open a console group tagged like dbg(), but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroup(tag, label) { if (!isDebugEnabled()) return; console.group(`[${MODULE_PREFIX}:${tag}]`, label); } - /** Close the current console group, but only when debug mode is active. */ + /** + * Close the current console group, but only when debug mode is active. + * @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle + */ function dbgGroupEnd() { if (!isDebugEnabled()) return; console.groupEnd();