bounds search_clicks, prunes lyrics_index, clears a stale queue source
Both branches were written against the same base and both add to the
same two registries, so the conflicts are between the two fixes rather
than with main. All four were resolved by keeping both sides:
backend/app.go — both branches register a janitor job. Both are
registered.
backend/maintenance/sweeps.go — both append a job at the end of the
file. Both are kept, each with its own closing tail.
backend/maintenance/maintenance_test.go — both append a test. Both
are kept, as separate functions.
backend/library/library.go — #249's orphan-path lyrics delete was
written against the loop variable before #250 renamed it, so the audioFile.ID it added no longer exists in that function. Adapted to f.ID; nothing else in #249's change needed it.
Verification run locally on this head, before pushing:
go build ./backend/... — clean
gofmt -l backend/ frontend/ — clean
go test ./backend/maintenance/ -run TestStale -v — both new sweeps
pass (TestStaleArtistMetadataJob, TestStaleSearchClicksJob)
go test ./backend/library/ ./backend/queue/ ./backend/playlist/ — pass
(the library package needs make testdata first, which is why a bare
run in a fresh worktree fails on the fixture scan)
Supersedes PRs #252 and #253, which are closed rather than merged — their
branches are the two merges above, so their commits and authorship
survive in this history.
Batch: two janitorial fixes reconciled into one merge, so the
combination is verified once instead of leaving `main` to find it.
| commit | issue | what it does |
|---|---|---|
| `a205224a` (merge of `fix/248-artist-metadata-sweep`) | #248 | sweeps `artist_metadata` rows nothing references |
| `8dbdb7ad` (merge of `fix/249-unbounded-growth`) | #249 | bounds `search_clicks`, prunes `lyrics_index`, clears a stale queue source |
Both branches were written against the same base and both add to the
same two registries, so the conflicts are between the two fixes rather
than with `main`. All four were resolved by keeping both sides:
- `backend/app.go` — both branches register a janitor job. Both are
registered.
- `backend/maintenance/sweeps.go` — both append a job at the end of the
file. Both are kept, each with its own closing tail.
- `backend/maintenance/maintenance_test.go` — both append a test. Both
are kept, as separate functions.
- `backend/library/library.go` — #249's orphan-path lyrics delete was
written against the loop variable before #250 renamed it, so the
`audioFile.ID` it added no longer exists in that function. Adapted to
`f.ID`; nothing else in #249's change needed it.
Verification run locally on this head, before pushing:
- `go build ./backend/...` — clean
- `gofmt -l backend/ frontend/` — clean
- `go test ./backend/maintenance/ -run TestStale -v` — both new sweeps
pass (`TestStaleArtistMetadataJob`, `TestStaleSearchClicksJob`)
- `go test ./backend/library/ ./backend/queue/ ./backend/playlist/` — pass
(the library package needs `make testdata` first, which is why a bare
run in a fresh worktree fails on the fixture scan)
Supersedes PRs #252 and #253, which are closed rather than merged — their
branches are the two merges above, so their commits and authorship
survive in this history.
Closes #248
Closes #249
artist_metadata was classified Cache/Swept but had no sweep and no
DELETE anywhere, so long-lived entity data (no TTL by design) grew for
the life of the install. Sweep rows whose MBID is neither a library
artist nor holding cached artwork, and register the job with the
janitor.
Closes#248
Three unbounded or stale surfaces, each small on its own:
- lyrics_index rows were never pruned on track removal, so the FTS index
grew forever. Delete the entry where the library search FTS entry is
already deleted, on the orphan and RemoveFromLibrary paths.
- search_clicks had no ceiling; age out ranking rows after a retention
window via a daily janitor job.
- queue.source_* kept a "Playing from X" label after its playlist was
deleted. Drop the source when the queue's own playlist goes, wired
through a playlist-service hook like Library.SetRemovalHooks.
Closes#249
frontend/bindings is generated by wails3 and is not covered by the
codegen pre-commit hook, so the new bound method went out without it and
make bindings-check failed on the PR.
Both branches add to the same two registries, so the conflicts are
between the two fixes rather than with main:
- backend/app.go: both register a janitor job. Both are registered.
- backend/maintenance/sweeps.go: both append a job at the end of the
file. Both are kept, each with its own closing tail.
- backend/maintenance/maintenance_test.go: both append a test. Both are
kept as separate functions.
- backend/library/library.go: #249's orphan-path lyrics delete was
written against the loop variable before #250 renamed it, so its
`audioFile.ID` no longer exists in that function. Adapted to `f.ID`.
Closes#248Closes#249
yonlu
merged commit a5c3990d12 into main2026-09-21 02:01:55 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Batch: two janitorial fixes reconciled into one merge, so the
combination is verified once instead of leaving
mainto find it.a205224a(merge offix/248-artist-metadata-sweep)artist_metadatarows nothing references8dbdb7ad(merge offix/249-unbounded-growth)search_clicks, pruneslyrics_index, clears a stale queue sourceBoth branches were written against the same base and both add to the
same two registries, so the conflicts are between the two fixes rather
than with
main. All four were resolved by keeping both sides:backend/app.go— both branches register a janitor job. Both areregistered.
backend/maintenance/sweeps.go— both append a job at the end of thefile. Both are kept, each with its own closing tail.
backend/maintenance/maintenance_test.go— both append a test. Bothare kept, as separate functions.
backend/library/library.go— #249's orphan-path lyrics delete waswritten against the loop variable before #250 renamed it, so the
audioFile.IDit added no longer exists in that function. Adapted tof.ID; nothing else in #249's change needed it.Verification run locally on this head, before pushing:
go build ./backend/...— cleangofmt -l backend/ frontend/— cleango test ./backend/maintenance/ -run TestStale -v— both new sweepspass (
TestStaleArtistMetadataJob,TestStaleSearchClicksJob)go test ./backend/library/ ./backend/queue/ ./backend/playlist/— pass(the library package needs
make testdatafirst, which is why a barerun in a fresh worktree fails on the fixture scan)
Supersedes PRs #252 and #253, which are closed rather than merged — their
branches are the two merges above, so their commits and authorship
survive in this history.
Closes #248
Closes #249