From 875de01de7d1e54310abd1e16c3d9fca0ddeab8b Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Fri, 24 Jul 2026 09:58:58 -0300 Subject: [PATCH] chore(quality): drop stale muse-spark-web allowlist entry + sync sidebar order snapshots (#8383) Two independent "code is right, bookkeeping lagged" base-reds: 1. #8233 made open-sse/executors/muse-spark-web.ts import sanitizeErrorMessage from utils/error.ts (a real Rule #12 fix), but left its KNOWN_MISSING_ERROR_HELPER allowlist entry in scripts/check/check-error-helper.mjs in place. The gate's own stale-allowlist enforcement (assertNoStale) correctly flagged the now -obsolete entry: `npm run check:error-helper` failed with "1 entrada(s) obsoleta(s)", and tests/unit/check-error-helper.test.ts's "the shipped allowlist freezes exactly the known current violators" test expected an empty Set. Removed the entry (kept the assertNoStale machinery and the general scope-header comments untouched). 2. #8064 added the "compression-exclusions" sidebar item right after "compression-studio" in COMPRESSION_CONTEXT_GROUP (deliberate, complete feature) but didn't update two order-snapshot tests written before that item existed: - tests/unit/sidebar-visibility.test.ts expected the "omni-proxy" section's flattened id list to end the compression block at "compression-studio". - tests/unit/ui/sidebar-engine-items.test.ts asserted "Studio must be last" in COMPRESSION_CONTEXT_GROUP. Updated both to the real, intentional order: Settings -> Combos -> engines -> Studio -> Exclusions (Studio now second-to-last, Exclusions last). Validation (red -> green): - check:error-helper gate: red ("1 entrada(s) obsoleta(s)") -> green ("OK (898 files scanned, 0 known-missing frozen)") - tests/unit/check-error-helper.test.ts: 31/32 -> 32/32 - tests/unit/sidebar-visibility.test.ts: 6/7 -> 7/7 - tests/unit/ui/sidebar-engine-items.test.ts: 13/14 -> 14/14 Refs #8233 Refs #8064 --- scripts/check/check-error-helper.mjs | 3 ++- tests/unit/sidebar-visibility.test.ts | 1 + tests/unit/ui/sidebar-engine-items.test.ts | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/check/check-error-helper.mjs b/scripts/check/check-error-helper.mjs index c226426ab1..6495eb6812 100644 --- a/scripts/check/check-error-helper.mjs +++ b/scripts/check/check-error-helper.mjs @@ -42,7 +42,8 @@ const IS_API_ROUTE = /^src\/app\/api\/.+\/route\.tsx?$/; export const KNOWN_MISSING_ERROR_HELPER = new Set([ // --- original open-sse/executors + handlers scope (pre-6A.8) --- // --- 6A.8 expanded scope: src/app/api/**/route.ts pre-existing violations --- - // TODO(6A.8): pre-existing, triage — route through buildErrorBody()/sanitizeErrorMessage() + // (empty — #8233 made open-sse/executors/muse-spark-web.ts import sanitizeErrorMessage, + // resolving the last frozen violator; see docs/security/ERROR_SANITIZATION.md) ]); // Import specifiers that count as "uses the error helper" (path ends in utils/error). diff --git a/tests/unit/sidebar-visibility.test.ts b/tests/unit/sidebar-visibility.test.ts index 721e00e29b..a1771999ba 100644 --- a/tests/unit/sidebar-visibility.test.ts +++ b/tests/unit/sidebar-visibility.test.ts @@ -58,6 +58,7 @@ test("primary sidebar items place limits after cache", () => { "context-ultra", "context-omniglyph", "compression-studio", + "compression-exclusions", "cli-code", "cli-agents", "acp-agents", diff --git a/tests/unit/ui/sidebar-engine-items.test.ts b/tests/unit/ui/sidebar-engine-items.test.ts index 474e50d863..157ee4d059 100644 --- a/tests/unit/ui/sidebar-engine-items.test.ts +++ b/tests/unit/ui/sidebar-engine-items.test.ts @@ -78,11 +78,20 @@ describe("COMPRESSION_CONTEXT_GROUP contains all 4 engine items", () => { } }); - it("group order is Settings → Combos → engines → Studio", () => { + it("group order is Settings → Combos → engines → Studio → Exclusions", () => { const ids = itemIds as string[]; assert.equal(ids[0], "context-settings", "Settings must be first"); assert.equal(ids[1], "context-combos", "Combos must be second"); - assert.equal(ids[ids.length - 1], "compression-studio", "Studio must be last"); + assert.equal( + ids[ids.length - 1], + "compression-exclusions", + "Exclusions must be last" + ); + assert.equal( + ids[ids.length - 2], + "compression-studio", + "Studio must immediately precede Exclusions" + ); // Combos precedes every per-engine page. const combosIdx = ids.indexOf("context-combos"); for (const id of ["context-caveman", "context-rtk", ...ENGINE_IDS]) {