A track credited to more than one artist has exactly one navigable artist in this app and the rest are punctuation. `primaryArtist()` string-parses the credit, strips a " feat. " clause and discards the guest; it deliberately does not split on "&", "with" or "," because those live inside real artist names. Measured on a real 26,069-file library plus an 80+80 MusicBrainz sample: 13% of recordings are multi-artist upstream, while only 0.86% of files carry any structured multi-artist tag — mp3 carries zero files with multiple MUSICBRAINZ_ARTISTID across 19,840. Of 1,286 files saying "feat.", 90% have nothing structured behind it, and a sample of 80 such files was multi-artist in MB 80 times out of 80. CLAUDE.md justified plan 013's removal of the credit tables with "3 credits of 2,823 listed more than one artist". That measured our own *writer* — cachedLinkArtist was called once per credit, so a collaboration could never have been recorded. Dropping the join table was still right on cost; the evidence for "multi-artist is rare" was not. A credit is ordered parts and the credit string is derived from them, so join phrases are assembly instructions, not disassembly ones. Nothing here reconstructs a credit by searching a name inside a credit string: the stored text may come from tags while the parts come from the catalog, and those disagree for ~1 in 3 multi-artist credits. Where it comes from, after two dead ends: the canonical dump CI already streams has no join phrases and no as-credited names, and the JSON dumps cover 153,691 recordings of ~35M with *zero* overlap against a real library. So mbdump.tar.bz2 — 7.1 GB, ~13.7 min in pure-Go bzip2, whose members are alphabetical, which is what lets one pass resolve an entity's credit without buffering 35M recordings. - artist_credit_part / artist_credit_ref, multi-artist credits only: a single-artist credit is already explore_index's own artist_name. - Column layouts verified against the real 20260815 export; ErrDumpShape makes a wrong guess a failed build, not a wrong catalog. - The pass runs on every mode, not just a build. The job picks its mode from the index's own state, and a complete import means "refresh", which never enters the importer — so credits could otherwise only arrive via a rebuild that re-downloads ~205 GB. It reports whether it populated anything, which is what flips `changed` and republishes. - The importer asks whether an artifact carries the tables, on the writer where `core` is attached, so the artifact already published still imports. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AfVYUVExXsx1nSWrXN8mAh
81 lines
2.4 KiB
YAML
81 lines
2.4 KiB
YAML
# lefthook.yml — local git hooks for yellowjacket
|
|
# Install with: lefthook install
|
|
# Docs: https://github.com/evilmartians/lefthook
|
|
|
|
# Conventional Commits. CI runs the same script over every commit in a
|
|
# push, so skipping this locally only defers the failure.
|
|
commit-msg:
|
|
commands:
|
|
commit-check:
|
|
run: ./scripts/commit-check.sh {1}
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
go-vet:
|
|
glob: "*.go"
|
|
run: go vet ./...
|
|
|
|
golangci-lint:
|
|
glob: "*.go"
|
|
run: go tool golangci-lint run --timeout 5m ./...
|
|
|
|
codegen-check:
|
|
glob: "*.{go,sql,templ}"
|
|
run: |
|
|
go generate ./...
|
|
if [ -n "$(git diff --name-only)" ]; then
|
|
echo "Generated code is out of date. Run 'make generate' and stage the changes."
|
|
# --no-pager, or this blocks forever on `less` waiting for a
|
|
# keypress that a hook run without a tty will never get: the
|
|
# commit hangs at exactly the moment it is trying to tell you
|
|
# why it failed.
|
|
git --no-pager diff --stat
|
|
exit 1
|
|
fi
|
|
|
|
# frontend/bindings is generated by `wails3`, not `go generate`, so
|
|
# the check above does not cover it. ~3.5s warm, ~20s on a cold
|
|
# build cache: v3's generator is a static analyser over the whole
|
|
# package graph, where v2's built the app with a `bindings` tag and
|
|
# ran it.
|
|
bindings-check:
|
|
glob: "*.go"
|
|
run: ./scripts/bindings-check.sh
|
|
|
|
# .pi/ documents make targets; a stale one sends an agent off a
|
|
# cliff with total confidence. Instant.
|
|
skill-check:
|
|
glob: "{Makefile,.pi/**/*.md}"
|
|
run: ./scripts/skill-check.sh
|
|
|
|
frontend-typecheck:
|
|
glob: "frontend/**/*.{ts,tsx}"
|
|
root: "frontend/"
|
|
run: ./node_modules/.bin/tsc --noEmit
|
|
|
|
# A backtick in a comment inside a css`` literal ends the literal.
|
|
# tsc does catch it, as "Class static side incorrectly extends base
|
|
# class static side" pointing at a line of prose; this says what
|
|
# actually happened. Instant.
|
|
css-literals:
|
|
glob: "frontend/**/*.ts"
|
|
root: "frontend/"
|
|
run: node scripts/check-css-literals.mjs
|
|
|
|
pre-push:
|
|
parallel: true
|
|
commands:
|
|
go-test:
|
|
glob: "*.go"
|
|
run: go test -race -count=1 -timeout 120s ./...
|
|
|
|
go-mod-verify:
|
|
run: go mod verify
|
|
|
|
# The component and store tier: a real browser, no app. ~2s.
|
|
ui-test:
|
|
glob: "frontend/**/*.ts"
|
|
root: "frontend/"
|
|
run: ./node_modules/.bin/vitest run
|