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
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-24 09:58:58 -03:00
committed by GitHub
parent afe3a931f9
commit 875de01de7
3 changed files with 14 additions and 3 deletions

View File

@@ -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).

View File

@@ -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",

View File

@@ -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]) {