Stand up code stewards + testing for the linker, adapted to its JS/Node stack: - service/lib.js: extract the resolver's pure logic (norm + exact-name match + link builders) so it is unit-testable without the server side effect; resolver.js imports it. - service/lib.test.js: node:test coverage of the precision lever (7 tests). - scripts/check.sh: zero-dep gate (node --check + JSON validation + node --test). - AGENTS.md: repo doctrine — plain-repo push flow (NOT towl's PR pipeline), the three stewards (quality/design/security), the test gate, standing decisions (MV2 stays; no ML). Source: issue/linker-code-stewards-and-test-infra (inbox human-feedback 2026-06-16 — "should have a set of code stewards ... ensure a testing infra gets setup and maintained"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
680 B
Bash
Executable File
21 lines
680 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 )
|
|
|
|
echo "ALL CHECKS PASSED"
|