Catch artist names written in lowercase right after a cue phrase ("check out devourment",
"by cattle decapitation", "fan of ...") — the Title-Case/ALL-CAPS pass missed those.
- extension/extract.js (new): pure extraction (matchesIn + new cueMatchesIn + allMatchesIn),
UMD so it loads as a content script AND require()s in node for tests. The cue pass uses the
regex `d` flag to map matches back to positions for in-place wrapping; a small cue-stoplist
drops "the/this/new/..." right after the cue.
- extension/content.js: extraction now comes from globalThis.RSLExtract.allMatchesIn
(Title-Case + cue union), keeping the existing position-based wrapping.
- extension/manifest.json: load extract.js before content.js.
- extension/extract.test.cjs (new) + scripts/check.sh: 6 node:test cases for the extraction
logic; check.sh now runs the extension tests too (16 total, green).
- README: updated the detection limitation note.
Deferred (design item 2): merging names split across inline formatting (cross-node) — more
involved; left as a follow-up.
Verified: scripts/check.sh green (16 tests). In-browser behavior is logic-verified only (no
headless Firefox); additive to the pending background-fix re-test — the [rsl] logs distinguish
"candidates found" from "resolve failed".
Source: task/smarter-candidate-extraction (objective/linker-improvements).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
712 B
Bash
Executable File
22 lines
712 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'); 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"
|