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>
22 lines
735 B
Bash
Executable File
22 lines
735 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Local check gate for the linker (owned by the quality steward — plan/steward-linker-quality).
|
|
# Zero-dep: only `node` is required. Run before every push.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "== node --check (syntax) =="
|
|
for f in $(find service extension \( -name '*.js' -o -name '*.cjs' \)); do
|
|
node --check "$f"
|
|
echo " ok $f"
|
|
done
|
|
|
|
echo "== JSON validity =="
|
|
node -e "JSON.parse(require('fs').readFileSync('extension/manifest.json','utf8')); JSON.parse(require('fs').readFileSync('service/package.json','utf8'))"
|
|
echo " ok extension/manifest.json + service/package.json"
|
|
|
|
echo "== node --test (unit) =="
|
|
( cd service && node --test )
|
|
( cd extension && node --test )
|
|
|
|
echo "ALL CHECKS PASSED"
|