From 1aea3e9a1b44d2d1575b9ff6d512da248035404a Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 30 Nov 2026 06:56:35 -0500 Subject: [PATCH] chore: take workbench pointers and real library data out of the public tree A sweep of the export (git archive) against the release leak standard: - Internal ids in comments: a split "(rule 157)", two "RULE 131" headers and a "Preference 172" the id search missed because it was case-sensitive. - Comments that quoted or credited the operator (shuffle caps, mix rotation, player bar layout, ID3v1 table). - Real artists still in the suspect-source fixtures (and the Beck example in its comment): replaced with invented ones in the same file shapes. - "26,171 tracks", a count from a real library, in the plural examples: now 12,345. - Comments pointing at CI files the export leaves out (release.yml, the ci-go image, the Gitea keystore secret, an M8 milestone, .dockerignore history); client/README describes the release image, not the lanes. - renovate.json is export-ignore: it targets the workbench's dev branch. Co-Authored-By: Claude Opus 5.5 --- .dockerignore | 4 ---- .gitattributes | 1 + .gitignore | 7 ++----- Dockerfile | 7 +++---- Makefile | 4 ++-- .../com/fabledsword/minstrel/shared/Plural.kt | 2 +- .../fabledsword/minstrel/shared/PluralTest.kt | 2 +- client/README.md | 20 +++++-------------- internal/api/client_assets.go | 4 ++-- internal/buildinfo/buildinfo.go | 4 ++-- internal/library/duplicate_resolve.go | 4 ++-- internal/library/genre_test.go | 6 +++--- internal/library/source_markers.go | 2 +- internal/library/source_markers_test.go | 14 ++++++------- internal/playlists/system_mixes.go | 2 +- internal/recommendation/shuffle_caps_test.go | 9 ++++----- .../recommendation/songs_like_limits_test.go | 2 +- web/src/lib/components/PlayerBar.svelte | 2 +- web/src/lib/utils/plural.test.ts | 2 +- web/src/lib/utils/plural.ts | 2 +- web/src/routes/library/liked/liked.test.ts | 2 +- 21 files changed, 42 insertions(+), 60 deletions(-) diff --git a/.dockerignore b/.dockerignore index be1135a4..a3be6f83 100644 --- a/.dockerignore +++ b/.dockerignore @@ -33,8 +33,4 @@ docs/ !.env.example # CI workflow files don't need to ship in the image. -# -# This said `.forgejo/` and `.github/` — neither of which this repo has. Gitea -# Actions reads `.gitea/`, so the one directory that actually exists was the -# one not excluded, and every workflow edit invalidated the context. .gitea/ diff --git a/.gitattributes b/.gitattributes index 8a31bd18..893bf1d9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,5 +4,6 @@ .gitea/ export-ignore ci/ export-ignore ci-requirements.md export-ignore +renovate.json export-ignore internal/server/release_gate_test.go export-ignore internal/server/release_version_test.go export-ignore diff --git a/.gitignore b/.gitignore index 0781eb75..1bf1e1ca 100644 --- a/.gitignore +++ b/.gitignore @@ -54,7 +54,7 @@ GEMINI.md .windsurfrules .aider.conf.yml -# Native Android (Kotlin/Compose) — M8 rewrite +# Native Android (Kotlin/Compose) android/.gradle/ android/.kotlin/ android/.idea/ @@ -63,10 +63,7 @@ android/app/build/ android/local.properties android/*.iml android/app/*.iml -# Release signing material — keystore + extracted credentials live local -# only; the canonical copy is the Gitea repo secret (ANDROID_KEYSTORE_B64 -# + the alias/password secrets). Losing the local file is fine; losing -# the secret means rebuilding the keystore + reinstalling all clients. +# Release signing material: a keystore never belongs in the repo. android/*.keystore android/*.keystore.* android/*.jks diff --git a/Dockerfile b/Dockerfile index 8dba78aa..92e7e7bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ COPY . . # Overwrite the committed placeholder with the freshly-built SPA assets. COPY --from=web /web/build ./web/build ENV CGO_ENABLED=0 -# Version stamping. release.yml passes the DERIVED version name +# Version stamping. The release build passes the DERIVED version name # (YYYY.MM.DD.HHMM) and the lane's channel; a local `docker build` falls back # to "dev"/"local". Both are surfaced at /healthz. # @@ -57,9 +57,8 @@ RUN mkdir -p /app/data /app/client && chown -R minstrel:minstrel /app WORKDIR /app # In-app update channel. client/ in the build context holds -# minstrel.apk + minstrel.apk.version, which release.yml fills on every -# build (dev and tag pushes bundle their own APK, main bundles the latest -# release's); a local build has only .gitkeep + README. Endpoints return +# minstrel.apk + minstrel.apk.version, which the release build fills; a +# local build has only .gitkeep + README. Endpoints return # 404 when the APK files aren't present, so such an image degrades # gracefully. COPY --chown=minstrel:minstrel client/ /app/client/ diff --git a/Makefile b/Makefile index be1fefb8..9a35be0b 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ SQLC_VERSION := 1.31.1 generate: docker run --rm -v "$(CURDIR):/src" -w /src sqlc/sqlc:$(SQLC_VERSION) generate -# Same codegen, run as a Go tool instead of a container. This is the CI path: -# the ci-go image already has Go, so it avoids docker-in-docker. Pinned to the +# Same codegen, run as a Go tool instead of a container, for a machine that +# has Go but no Docker. Pinned to the # SAME version as `generate` above so both routes emit identical output. generate-go: go run github.com/sqlc-dev/sqlc/cmd/sqlc@v$(SQLC_VERSION) generate diff --git a/android/app/src/main/java/com/fabledsword/minstrel/shared/Plural.kt b/android/app/src/main/java/com/fabledsword/minstrel/shared/Plural.kt index f6090290..d762ceef 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/shared/Plural.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/shared/Plural.kt @@ -3,7 +3,7 @@ package com.fabledsword.minstrel.shared import java.text.NumberFormat /** - * A count with its noun: "1 track", "26,171 tracks". The number is formatted + * A count with its noun: "1 track", "12,345 tracks". The number is formatted * for the listener's locale, as the web app's counts are. The app's one way to * say a count; PluralTest names any hand-written copy. */ diff --git a/android/app/src/test/java/com/fabledsword/minstrel/shared/PluralTest.kt b/android/app/src/test/java/com/fabledsword/minstrel/shared/PluralTest.kt index 4ebc1d72..c502fade 100644 --- a/android/app/src/test/java/com/fabledsword/minstrel/shared/PluralTest.kt +++ b/android/app/src/test/java/com/fabledsword/minstrel/shared/PluralTest.kt @@ -14,7 +14,7 @@ class PluralTest { try { assertEquals("1 track", plural(1, "track", "tracks")) assertEquals("0 tracks", plural(0, "track", "tracks")) - assertEquals("26,171 tracks", plural(26_171, "track", "tracks")) + assertEquals("12,345 tracks", plural(12_345, "track", "tracks")) } finally { Locale.setDefault(saved) } diff --git a/client/README.md b/client/README.md index 165b4db6..af4bd4a4 100644 --- a/client/README.md +++ b/client/README.md @@ -4,22 +4,12 @@ Holds the Android APK (`minstrel.apk`) and its version sidecar (`minstrel.apk.version`) that the server serves via `/api/client/version` and `/api/client/apk` for the in-app update flow. -## Production +## Release images -CI fills this directory in `release.yml` before every image build: - -- **Dev push (`:dev`) and tag release (`v*`):** the `android-release` job - builds and signs the APK and uploads it as a workflow artifact; - `image-release` downloads it here as `minstrel.apk` and writes the - sidecar from that build's version outputs. A tag release also attaches - both files to the Gitea release. -- **Main push (`:latest` + `:`):** no APK is built, but the image - still moves `:latest`, so `image-release` downloads the most recent - release's APK and the sidecar recorded beside it. `:latest` keeps its - update channel between releases. - -Either way, `docker buildx build` bakes both files into the image via -`COPY client/ /app/client/`. +The release build signs the APK, writes its sidecar, and places both here +before the image is built. `docker buildx build` bakes them into the image +via `COPY client/ /app/client/`, so a server always offers the app built +alongside it. ## The sidecar diff --git a/internal/api/client_assets.go b/internal/api/client_assets.go index 9482b272..05b40b18 100644 --- a/internal/api/client_assets.go +++ b/internal/api/client_assets.go @@ -121,8 +121,8 @@ func clientAPKAllowDownload(userID string, now time.Time) time.Duration { return 0 } -// clientVersionSidecar is the JSON written beside the bundled APK by -// release.yml. It carries three values that are deliberately separate: +// clientVersionSidecar is the JSON the release build writes beside the +// bundled APK. It carries three values that are deliberately separate: // // - Name is a LABEL for people, "YYYY.MM.DD.HHMM" from the commit's // timestamp. Two channels carrying the same code report the same name. diff --git a/internal/buildinfo/buildinfo.go b/internal/buildinfo/buildinfo.go index 8a40caaf..a4e4b207 100644 --- a/internal/buildinfo/buildinfo.go +++ b/internal/buildinfo/buildinfo.go @@ -11,8 +11,8 @@ import "time" // // -ldflags="-X 'github.com/Fabled-Sword/minstrel/internal/buildinfo.Version=2026.09.10.1449'" // -// release.yml passes it through the MINSTREL_VERSION build-arg → Dockerfile -// ldflag. +// The release build passes it through the MINSTREL_VERSION build-arg → +// Dockerfile ldflag. // // Image tags carry no version, so this is the only thing that says which // build is running. diff --git a/internal/library/duplicate_resolve.go b/internal/library/duplicate_resolve.go index 21b0a3f5..5d7b4f48 100644 --- a/internal/library/duplicate_resolve.go +++ b/internal/library/duplicate_resolve.go @@ -573,8 +573,8 @@ func (w *DuplicateResolveWorker) Run(ctx context.Context) { } } -// tickOnce contains one pass so nothing it does can stop the next tick (rule -// 157). It reports whether the pass was put off for a running scan. +// tickOnce contains one pass so nothing it does can stop the next tick. It +// reports whether the pass was put off for a running scan. func (w *DuplicateResolveWorker) tickOnce(ctx context.Context) (waitForScan bool) { defer func() { if r := recover(); r != nil { diff --git a/internal/library/genre_test.go b/internal/library/genre_test.go index 66576036..9358b9b4 100644 --- a/internal/library/genre_test.go +++ b/internal/library/genre_test.go @@ -476,9 +476,9 @@ func TestTrueUpCasing(t *testing.T) { } } -// The casing repair must never touch a name resolved from the ID3v1 table. The -// operator chose to keep that table canonical, so entry 40's 1990s spelling -// "AlternRock" stays as-is even though it reads like damage. +// The casing repair must never touch a name resolved from the ID3v1 table. +// That table is kept canonical, so entry 40's 1990s spelling "AlternRock" +// stays as-is even though it reads like damage. func TestNormaliseGenreValue_CanonicalTableNamesNotRecased(t *testing.T) { if got := normaliseGenreValue("40"); !equalStrings(got, []string{"AlternRock"}) { t.Errorf("bare 40 = %q, want [AlternRock]", got) diff --git a/internal/library/source_markers.go b/internal/library/source_markers.go index dec5ecf1..bec7de39 100644 --- a/internal/library/source_markers.go +++ b/internal/library/source_markers.go @@ -24,7 +24,7 @@ type sourceMarker struct { // suspectSourceMarkers was calibrated against a real library. Two candidates // were left out on purpose: // - "live in"/"live at": nearly all from real live albums. -// - a bare "reaction": it caught Beck's "Chain Reaction". The marker below +// - a bare "reaction": it caught songs called "Chain Reaction". The marker below // wants the phrases a reaction video actually uses. var suspectSourceMarkers = []sourceMarker{ {"music video", `official[^a-zA-Z]*(music[^a-zA-Z]*)?video|music[^a-zA-Z]*video`}, diff --git a/internal/library/source_markers_test.go b/internal/library/source_markers_test.go index b4456c29..d374555d 100644 --- a/internal/library/source_markers_test.go +++ b/internal/library/source_markers_test.go @@ -5,8 +5,8 @@ import ( "testing" ) -// Real basenames, each with the -// labels it should carry. The negatives are the near misses that shaped the +// Basenames in the shapes real files take, each with the labels it should +// carry. Every artist and title is invented. The negatives are the near misses that shaped the // list: a song called "Chain Reaction", a live album, an ordinary track. func TestSourceMarkersFor(t *testing.T) { cases := []struct { @@ -20,15 +20,15 @@ func TestSourceMarkersFor(t *testing.T) { {"Plastic Apes - Ghost Nights - 16 - Plastic Apes - Sancho's Holiday Bonanza (Visualiser).mp3", []string{"visualiser"}}, {"Artist - Album - 01 - Artist - Song (Lyric Video).mp3", []string{"lyric video"}}, {"Plastic Apes - Mammalz - 02 - FIRST TIME HEARING Plastic Apes - Elevation REACTION.mp3", []string{"reaction"}}, - {"Watsky - INTENTION - 05 - MANIAC Reacts to Watsky - AWW SHiT.mp3", []string{"reaction"}}, - {"米津玄師 - diorama - 09 - 【MV】米津玄師 - 恋と病熱.mp3", []string{"MV"}}, - {"Andora - Ego - 01 - Andora - Ego (feat. Will Stetson) MV.mp3", []string{"MV"}}, - {"Jimmy Eat World - Something(s) Loud - 05 - Jimmy Eat World - Call to Love (Audio).mp3", []string{"[Audio]"}}, + {"Lantern Fox - INTENTIONS - 05 - MANIAC Reacts to Lantern Fox - Paper Cuts.mp3", []string{"reaction"}}, + {"月見草 - 箱庭 - 09 - 【MV】月見草 - 夜の灯.mp3", []string{"MV"}}, + {"Velmara - Ego - 01 - Velmara - Ego (feat. Ivo Brand) MV.mp3", []string{"MV"}}, + {"Porch Light Parade - Something(s) Loud - 05 - Porch Light Parade - Call to Love (Audio).mp3", []string{"[Audio]"}}, {"Record Heat - World War IV - 03 - Record Heat - Front Seat Feelin' [Audio].mp3", []string{"[Audio]"}}, {"Apex Sibling - Come To Mother - 03 - Apex Sibling - Pegasus Bouncing Ball (HQ).mp3", []string{"[HD]"}}, {"Artist - Album - 01 - Artist - Song (Official Lyric Video) [4K].mp3", []string{"lyric video", "[HD]"}}, - {"Beck - Guero - 15 - Beck - Chain Reaction.mp3", nil}, + {"Odd Hollow - Gringo Days - 15 - Odd Hollow - Chain Reaction.mp3", nil}, {"Kettle Saints - Unplugged in Old York - 01 - About a Ghost (live in New York).flac", nil}, {"Fields of Ontario - Music Has the Right to Wander - 05 - Prismatic.flac", nil}, {"Artist - Album - 01 - Mvula.flac", nil}, diff --git a/internal/playlists/system_mixes.go b/internal/playlists/system_mixes.go index 109d460c..f67f391c 100644 --- a/internal/playlists/system_mixes.go +++ b/internal/playlists/system_mixes.go @@ -181,7 +181,7 @@ var discoveryMixSpecs = []discoveryMixSpec{ }, { name: "New for you", variant: "new_for_you", - diversify: true, dailyRotate: true, // operator wants daily rotation on all deterministic mixes + diversify: true, dailyRotate: true, // every deterministic mix rotates daily minLen: discoveryMixMinLenAlbum, fetch: func(ctx context.Context, q *dbq.Queries, uid pgtype.UUID, _ string) ([]discoverTrack, error) { rows, err := q.ListNewForYouTracks(ctx, uid) diff --git a/internal/recommendation/shuffle_caps_test.go b/internal/recommendation/shuffle_caps_test.go index 04870572..4d8cd1a7 100644 --- a/internal/recommendation/shuffle_caps_test.go +++ b/internal/recommendation/shuffle_caps_test.go @@ -93,8 +93,8 @@ func TestShuffle_CapStopsOneArtistTakingTheWholeRadio(t *testing.T) { } } -// A CAP IS A BOUND, NOT AN EXCLUSION. The operator asked for the opposite of -// removal: "again it should be able to add songs from the same artist." +// A CAP IS A BOUND, NOT AN EXCLUSION: a radio can still play more songs by +// the artist it is capping, just not all of them. func TestShuffle_CappedArtistIsStillRepresented(t *testing.T) { var cs []Candidate for i := 0; i < 20; i++ { @@ -114,9 +114,8 @@ func TestShuffle_CappedArtistIsStillRepresented(t *testing.T) { } } -// RULE 131, applied past the system mixes it was written for: degrade, never -// vanish. A hard cap over a pool with few artists would hand back a six-track -// "radio" for a fifty-track request. The caps must change WHICH tracks are +// Degrade, never vanish, as the system mixes do. A hard cap over a pool with +// few artists would hand back a six-track "radio" for a fifty-track request. The caps must change WHICH tracks are // picked, never HOW MANY. func TestShuffle_CapsNeverShortenTheResult(t *testing.T) { for _, tc := range []struct { diff --git a/internal/recommendation/songs_like_limits_test.go b/internal/recommendation/songs_like_limits_test.go index 865cae3a..ba933e23 100644 --- a/internal/recommendation/songs_like_limits_test.go +++ b/internal/recommendation/songs_like_limits_test.go @@ -24,7 +24,7 @@ func TestSongsLikeLimits_FavourTheArmsThatMeasureTheSeed(t *testing.T) { } } -// RULE 131: a system playlist degrades, it never vanishes. +// A system playlist degrades, it never vanishes. // // Zeroing the seed-independent arms was the first instinct and is exactly the // vanish-or-nothing shape that rule forbids: a seed whose artist has thin diff --git a/web/src/lib/components/PlayerBar.svelte b/web/src/lib/components/PlayerBar.svelte index c4b277c3..b9ef40cc 100644 --- a/web/src/lib/components/PlayerBar.svelte +++ b/web/src/lib/components/PlayerBar.svelte @@ -55,7 +55,7 @@ {#if current}