Context
scripts/check-branding-drift.mjs guards against the pre-rebrand "gittensory" string silently creeping back into runtime code after the LoopOver rebrand. Its own header comment states the intended scope: "executable code in src/** and each workspace package's bin/, lib/, src/, scripts/ dirs" (check-branding-drift.mjs:7). This repo's package.json declares two workspace globs: "apps/*" and "packages/*" (package.json:7-10).
But BRANDING_DRIFT_PATHSPECS (check-branding-drift.mjs:30-41) only contains packages/*/bin/**, packages/*/lib/**/*.js, packages/*/lib/**/*.ts, packages/*/src/**/*.ts, and packages/*/scripts/**/*.mjs — every pathspec is scoped to packages/*; none covers apps/* at all, contradicting the header comment's stated "each workspace package" scope. scripts/branding-drift-baseline.json (the generated snapshot this check diffs against) has zero apps/loopover-ui entries, confirming the gap is real, not just theoretical.
This is a live, non-theoretical gap: git grep -il "gittensory" -- 'apps/loopover-ui/src/**' (excluding tests) currently finds 4 files with real "gittensory" references — apps/loopover-ui/src/components/site/api/try-it.tsx:21 (LEGACY_STORAGE_KEY = "gittensory.session_token"), apps/loopover-ui/src/routes/app.index.tsx:443 (a legacy localStorage-key fallback "gittensory.onboarding"), apps/loopover-ui/src/routes/app.runs.tsx:582 ("gittensory.runs.views"), and apps/loopover-ui/src/routes/app.workbench.tsx:36 ("gittensory.workbench.tab"). These four are all legitimate, intentional legacy-localStorage-key references (preserving already-shipped browser storage keys from before the rebrand) — exactly the kind of "permanent historical reference" the check's own baseline-diff mechanism is built to grandfather (mirroring how scripts/branding-drift-baseline.json already grandfathers legitimate hits elsewhere). The bug is not that these four exist; it's that apps/* is invisible to the check entirely, so a new, unintentional "gittensory" reintroduced anywhere under apps/loopover-ui/src (or any other apps/* workspace) — a hardcoded metric name, resource URI, or default string, the exact class of bug check-branding-drift.mjs's own header comment cites #6786 for — would never be caught.
Requirements
- Add
apps/*/src/**/*.ts, apps/*/src/**/*.tsx, and apps/*/scripts/**/*.mjs to BRANDING_DRIFT_PATHSPECS in scripts/check-branding-drift.mjs, mirroring the existing packages/* pathspecs' shape (.ts and .tsx both covered for apps/* since UI workspaces are TSX-heavy, unlike packages/*/src which is .ts-only today).
- Keep the existing
:(exclude)**/*.test.ts / :(exclude)**/*.test.tsx exclusions applying to the new apps/* pathspecs too (they are unscoped ** excludes already, so no separate edit is needed there — verify this in the implementation, don't assume).
- Regenerate
scripts/branding-drift-baseline.json via npm run branding-drift:update in the same PR, so the four pre-existing legitimate apps/loopover-ui/src hits (try-it.tsx, app.index.tsx, app.runs.tsx, app.workbench.tsx) are grandfathered at their current count rather than failing CI on this PR itself.
- Do not add
apps/*/bin/** or apps/*/lib/** — no apps/* workspace currently has those directories; only add pathspecs for directories that actually exist, matching this script's existing don't-guess convention.
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in scripts/check-branding-drift.mjs, plus the regression test above. The regenerated branding-drift-baseline.json is a generated data file, not measured by Codecov.
Expected Outcome
npm run branding-drift:check (part of test:ci) actually scans every apps/* workspace's src/scripts directories, not just packages/*, so a future unintentional "gittensory" reintroduction in apps/loopover-ui, apps/loopover-extension, apps/loopover-miner-extension, or apps/loopover-miner-ui is caught instead of silently shipping.
Links & Resources
scripts/check-branding-drift.mjs:7 (header comment's stated "each workspace package" scope), :30-41 (BRANDING_DRIFT_PATHSPECS, the array to extend).
package.json:7-10 — the workspaces field confirming apps/* is a real workspace glob.
apps/loopover-ui/src/components/site/api/try-it.tsx:21, apps/loopover-ui/src/routes/app.index.tsx:443, app.runs.tsx:582, app.workbench.tsx:36 — the four current, legitimate hits that need baselining once the gap is closed.
scripts/branding-drift-baseline.json — the generated artifact to regenerate via npm run branding-drift:update.
Context
scripts/check-branding-drift.mjsguards against the pre-rebrand "gittensory" string silently creeping back into runtime code after the LoopOver rebrand. Its own header comment states the intended scope: "executable code insrc/**and each workspace package'sbin/,lib/,src/,scripts/dirs" (check-branding-drift.mjs:7). This repo'spackage.jsondeclares two workspace globs:"apps/*"and"packages/*"(package.json:7-10).But
BRANDING_DRIFT_PATHSPECS(check-branding-drift.mjs:30-41) only containspackages/*/bin/**,packages/*/lib/**/*.js,packages/*/lib/**/*.ts,packages/*/src/**/*.ts, andpackages/*/scripts/**/*.mjs— every pathspec is scoped topackages/*; none coversapps/*at all, contradicting the header comment's stated "each workspace package" scope.scripts/branding-drift-baseline.json(the generated snapshot this check diffs against) has zeroapps/loopover-uientries, confirming the gap is real, not just theoretical.This is a live, non-theoretical gap:
git grep -il "gittensory" -- 'apps/loopover-ui/src/**'(excluding tests) currently finds 4 files with real "gittensory" references —apps/loopover-ui/src/components/site/api/try-it.tsx:21(LEGACY_STORAGE_KEY = "gittensory.session_token"),apps/loopover-ui/src/routes/app.index.tsx:443(a legacy localStorage-key fallback"gittensory.onboarding"),apps/loopover-ui/src/routes/app.runs.tsx:582("gittensory.runs.views"), andapps/loopover-ui/src/routes/app.workbench.tsx:36("gittensory.workbench.tab"). These four are all legitimate, intentional legacy-localStorage-key references (preserving already-shipped browser storage keys from before the rebrand) — exactly the kind of "permanent historical reference" the check's own baseline-diff mechanism is built to grandfather (mirroring howscripts/branding-drift-baseline.jsonalready grandfathers legitimate hits elsewhere). The bug is not that these four exist; it's thatapps/*is invisible to the check entirely, so a new, unintentional "gittensory" reintroduced anywhere underapps/loopover-ui/src(or any otherapps/*workspace) — a hardcoded metric name, resource URI, or default string, the exact class of bugcheck-branding-drift.mjs's own header comment cites #6786 for — would never be caught.Requirements
apps/*/src/**/*.ts,apps/*/src/**/*.tsx, andapps/*/scripts/**/*.mjstoBRANDING_DRIFT_PATHSPECSinscripts/check-branding-drift.mjs, mirroring the existingpackages/*pathspecs' shape (.tsand.tsxboth covered forapps/*since UI workspaces are TSX-heavy, unlikepackages/*/srcwhich is.ts-only today).:(exclude)**/*.test.ts/:(exclude)**/*.test.tsxexclusions applying to the newapps/*pathspecs too (they are unscoped**excludes already, so no separate edit is needed there — verify this in the implementation, don't assume).scripts/branding-drift-baseline.jsonvianpm run branding-drift:updatein the same PR, so the four pre-existing legitimateapps/loopover-ui/srchits (try-it.tsx,app.index.tsx,app.runs.tsx,app.workbench.tsx) are grandfathered at their current count rather than failing CI on this PR itself.apps/*/bin/**orapps/*/lib/**— noapps/*workspace currently has those directories; only add pathspecs for directories that actually exist, matching this script's existing don't-guess convention.Deliverables
BRANDING_DRIFT_PATHSPECScoversapps/*the same way it already coverspackages/*scripts/branding-drift-baseline.jsonregenerated and committed, including the four pre-existingapps/loopover-ui/srclegacy-key hitsapps/*/srcpath is detected as new drift (mirroring this file's existing test coverage forpackages/*pathspecs)Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in
scripts/check-branding-drift.mjs, plus the regression test above. The regeneratedbranding-drift-baseline.jsonis a generated data file, not measured by Codecov.Expected Outcome
npm run branding-drift:check(part oftest:ci) actually scans everyapps/*workspace'ssrc/scriptsdirectories, not justpackages/*, so a future unintentional "gittensory" reintroduction inapps/loopover-ui,apps/loopover-extension,apps/loopover-miner-extension, orapps/loopover-miner-uiis caught instead of silently shipping.Links & Resources
scripts/check-branding-drift.mjs:7(header comment's stated "each workspace package" scope),:30-41(BRANDING_DRIFT_PATHSPECS, the array to extend).package.json:7-10— theworkspacesfield confirmingapps/*is a real workspace glob.apps/loopover-ui/src/components/site/api/try-it.tsx:21,apps/loopover-ui/src/routes/app.index.tsx:443,app.runs.tsx:582,app.workbench.tsx:36— the four current, legitimate hits that need baselining once the gap is closed.scripts/branding-drift-baseline.json— the generated artifact to regenerate vianpm run branding-drift:update.