Found while narrowing the musl question: the only remaining better-sqlite3 string in the shipped bundle is a user-facing message.
The defect
src/commands/index-cmd.ts:134:
Exit codes: 0 built or refreshed, 2 could not run -- conflicting flags, or better-sqlite3 is not installed (SPEC §10).
Measured at a3d2211:
| Check |
Result |
better-sqlite3 in src/ outside comments |
only this message |
declared in package.json dependencies |
none at all — {} |
| in the lockfile |
absent |
| what the index actually imports |
node:sqlite (src/core/index-db.ts:57) |
ADR-0012 replaced better-sqlite3 with node:sqlite precisely so there is no native dependency. The comments in index-db.ts that mention it are legitimate — they explain why that choice was made. This one is not a comment: it tells a user who hit exit 2 to go look for a package that is not part of the product and never will be.
Why it matters more than a typo
The message is the one place a user is sent when the command fails. Sending them after a package that does not exist costs them the time it takes to discover that, and it contradicts the ADR that removed the dependency — the same class of stale claim as an inventory naming code that has been deleted.
Fix direction
State the conditions that actually produce exit 2: conflicting flags, or the SQLite binding being unavailable, which is what index-db.ts degrades on. Scope: the one addHelpText string in src/commands/index-cmd.ts, plus an assertion so the message cannot name a package the manifest does not carry.
Found while narrowing the musl question: the only remaining
better-sqlite3string in the shipped bundle is a user-facing message.The defect
src/commands/index-cmd.ts:134:Measured at
a3d2211:better-sqlite3insrc/outside commentspackage.jsondependencies{}node:sqlite(src/core/index-db.ts:57)ADR-0012 replaced
better-sqlite3withnode:sqliteprecisely so there is no native dependency. The comments inindex-db.tsthat mention it are legitimate — they explain why that choice was made. This one is not a comment: it tells a user who hit exit 2 to go look for a package that is not part of the product and never will be.Why it matters more than a typo
The message is the one place a user is sent when the command fails. Sending them after a package that does not exist costs them the time it takes to discover that, and it contradicts the ADR that removed the dependency — the same class of stale claim as an inventory naming code that has been deleted.
Fix direction
State the conditions that actually produce exit 2: conflicting flags, or the SQLite binding being unavailable, which is what
index-db.tsdegrades on. Scope: the oneaddHelpTextstring insrc/commands/index-cmd.ts, plus an assertion so the message cannot name a package the manifest does not carry.