refactor: extract testable resolve-core + cover album routing; check.sh checks .cjs (closes task/resolver-orchestration-testable)

Source: task/resolver-orchestration-testable (plan/steward-linker-quality) — new album orchestration in resolver.js had zero node:test coverage.

- Extract the pure album/artist orchestration into service/resolve-core.js
  (resolveAll/resolveOne/pickDirect/cacheKey) taking injected search/classify
  fns; resolver.js becomes a thin server wiring the real Spotify search +
  ollama classify. No behavior change.
- Add service/resolver.test.js: self-titled artist+album tie-break, LLM-album
  -> Google fallback, kind-aware cache separation, plus gate/drop/error paths.
- scripts/check.sh: node --check now also matches *.cjs (extract.test.cjs).
- AGENTS.md Testing: note resolve-core coverage + the extract.test.cjs extractor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
paul
2026-06-23 00:29:59 +00:00
co-authored by Claude Opus 4.8
parent 2b4babf955
commit 8496e55baf
5 changed files with 265 additions and 79 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ set -euo pipefail
cd "$(dirname "$0")/.."
echo "== node --check (syntax) =="
for f in $(find service extension -name '*.js'); do
for f in $(find service extension \( -name '*.js' -o -name '*.cjs' \)); do
node --check "$f"
echo " ok $f"
done