De-bloat pass: docs, comments, dead code, shared backend crate - #213
Merged
Conversation
Docs (~800 lines): trim LLM verbosity across the repo docs. tracker CLAUDE.md 415→201 (changelog sections dropped, API list rebuilt from the real router table); MODULES-PLAYBOOK workflows rewritten artist-primary (they contradicted the documented model); parties README loses its back-pointer gotchas index and investigation logs; AMIGA-ROMS.md becomes the canonical home for the fast-RAM/JIT facts (previously stated three times); CREDITS.md deleted (strict subset of THIRD_PARTY_NOTICES.md); root README stale e2e → integration fixed; .env.examples compressed. Dead code (~700 lines): delete migrate.rs + the tracker-migrate bin (the artist-primary relayout ran to completion; UNKNOWN_ARTIST moves to scan.rs), an unreachable RootKind branch, unused functions (facetFormats/facetTrackers/keyOf/cycleTheme/clearChannelMutes), ~25 needlessly exported symbols, and the unused js-dos + @tanstack/svelte-virtual deps. New crates/scene-backend: the byte-identical error/auth/CSP/SPA-fallback/ scan-guard/junk-list code both app backends carried now lives once. CSP is parameterized (emulator_blobs) and keeps the unsafe-eval guard test. Dedup: Rust helpers (playlist row mapper, manifest_204/album_204, cached(), classify table, capitalize_first); frontend helpers (fmtTime, hex2, persist, persistedMode, gl, canvas2d, stage) replace 3–15× copies; the 16-branch viz chain becomes a component map with the ids defined once; the Escape cascade becomes an ordered table; modal CSS moves to @scene/design (≤640px fullscreen preserved); party api.ts gains tracker's richer error extraction. Comments (~1,600 lines): delete iteration-journey notes, section banners, router-table narration and test war stories; compress design essays to their constraints. Constraint comments (CSP rationale, hvsc.rs, iOS audio, Tunnel seam math, cassette physics) untouched. Net −3,374 lines. just lint (zero warnings), just build, cargo test --workspace, tracker integration (--ignored), player unit/browser/visual suites and both frontend typechecks all pass.
`POST /api/rescan/{root}` answers 202 and walks in the background for a
`scan` root, so the bare POST in collection_filter_scopes_rows_and_facets
left the second root racing the three queries that follow. Locally the
three-file fixture always won; on CI it did not, and the unfiltered
stream came back with 3 ids while each collection filter reported 3 —
`all.len() == mods.len() + extra.len()` failing 3 vs 6.
Use the harness's `rescan_root`, which asserts the 202 and then waits on
`/status`, and pin the unfiltered count so a silent regression to the
one-root reading cannot pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repo-wide de-bloat: trim LLM-verbose docs and comments, delete dead code, and deduplicate — no functional changes intended. Net −2,627 lines (+2,111/−4,738 across 124 files).
Docs (~800 lines)
apps/tracker/CLAUDE.md415→201: changelog sections dropped; the API list rebuilt from the actual router (it was missing/api/manifest, reload and the curation endpoints).apps/tracker/MODULES-PLAYBOOK.md: Workflows A/B rewritten artist-primary — they still taught the removedgroup/artistfiling and contradicted the model section.apps/party/parties/README.md775→658: gotchas back-pointer index reduced to its 5 novel entries; investigation logs compressed to their rules.apps/party/AMIGA-ROMS.mdis now the canonical home for the fast-RAM/JIT facts (previously stated in three places).apps/party/CREDITS.mddeleted (strict subset ofTHIRD_PARTY_NOTICES.md).e2e→integration;.env.examples compressed (one documented a variable that no longer exists).Dead code (~700 lines)
migrate.rs+tracker-migratebin deleted — the artist-primary relayout ran to completion;UNKNOWN_ARTISTmoved toscan.rs.RootKindguard, unused functions (facetFormats/facetTrackers/keyOf/cycleTheme/clearChannelMutes), ~25 internal-only symbols un-exported.js-dosand@tanstack/svelte-virtualdeps removed (−23 packages).New
crates/scene-backendThe byte-identical error/auth/CSP/SPA-fallback/scan-guard/junk-list code both app backends carried now lives once.
build_cspis parameterized (emulator_blobs) and theunsafe-evalguard test moved with it, covering both flag values.Dedup
manifest_204/album_204,cached()response helper, classify table, sharedcapitalize_first.fmtTime/hex2/persist/persistedMode/gl/canvas2d/stagehelpers replace 3–15× copies; the 16-branch viz chain is a component map (ids defined once,BoingBallstays the fallback); the Escape cascade is an ordered table (order preserved); modal CSS moved to@scene/design(≤640 px fullscreen preserved); partyapi.tsgains tracker's richer error extraction.Track/PlaylistTrack— theOptionsplit is load-bearing (present: falseitems).Comments (~1,600 lines)
Iteration-journey notes, section banners, router-table narration and test war stories deleted; design essays compressed to their constraints. Constraint comments (CSP rationale,
hvsc.rs, iOS audio, Tunnel seam math, cassette physics) untouched.Verification
just lint(prettier + eslint + clippy/fmt): zero warningsjust build: all frontends + release workspacecargo test --workspace+ tracker integration (-- --ignored, spawned binary, real HTTP): pass@scene/playerunit + browser (171) and visual snapshot (68) suites: pass — no baselines regeneratedKnown non-regression: the visual suite logs a pre-existing unhandled rejection in
board-departures("host not set" — the test mounts withoutsetPlayerHost); same code path before this change.