You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[quality] package entry src/index.ts is untested — export surface unpinned, broken re-exports would pass CI #47
The package entry src/index.ts (main: dist/index.js, the import path for every library consumer) is loaded by zero tests — it does not even appear in the node --test --experimental-test-coverage report. All existing suites import checker.js, learner.js, watcher.js, and cli.js directly, so a typo'd re-export path, a dropped name, or an accidental new export in index.ts compiles cleanly and passes CI while breaking only downstream import { check } from '@hivecommons/rationguard' consumers.
Related minor observation (no action proposed): src/learner.ts:174-176 (addToCustomExcuses's mkdirSync branch) is unreachable dead defensive code — the promotion path only runs after saveStore has already created the same .rationguard directory on earlier sightings, so its 2 uncovered lines in coverage reports are permanent.
Recommendation
Add an export-surface test that imports through ./index.js exactly as a consumer would: pin the exact export list (so additions/removals are deliberate), smoke-check check()/generatePromptBlock() through the entry, assert every DEFAULT_EXCUSES category has a CATEGORY_LABELS label, and construct a Watcher via createWatcher().
Priority
Impact: medium (published npm package; the entry file is the one consumers actually load)
Activity