RUN v3.2.7 /tmp/circe-pr4-evidence ❯ disk.test.ts (11 tests | 8 failed) 15ms × J1: appending after a tolerated torn tail preserves acknowledged records ("{\"kind\":\"out") 7ms → expected [ { kind: 'input', …(2) } ] to deeply equal [ { kind: 'input', …(2) }, …(1) ] × J1: appending after a tolerated torn tail preserves acknowledged records ("{\"kind\":\"out\n") 1ms → corrupt journal line 2 in /tmp/circe-pr4-probe-Qr3JYh/journal.jsonl: SyntaxError: Unterminated string in JSON at position 12 (line 1 column 13) × J2: a valid final record without newline remains separate from the next append 1ms → expected [] to deeply equal [ { kind: 'input', …(2) }, …(1) ] × J3: a durable reopen completes directory durability after initial directory fsync failed 2ms → expected 0 to be greater than 0 × J4: a complete non-entry final JSON record is corruption, not a torn append (null) 1ms → expected [Function] to throw an error × J4: a complete non-entry final JSON record is corruption, not a torn append (42) 0ms → expected [Function] to throw an error × J4: a complete non-entry final JSON record is corruption, not a torn append ({"unrelated":true}) 0ms → expected [Function] to throw an error × J5: a known entry kind with missing required data is rejected at load 0ms → expected [Function] to throw an error ✓ J6 control: short writes preserve multibyte UTF-8 records 0ms ✓ J7 control: a failed append poisons the handle and makes no further writes 0ms ✓ J8 control: normal append and first-create directory sync survive reopen 0ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 8 ⎯⎯⎯⎯⎯⎯⎯ FAIL disk.test.ts > J1: appending after a tolerated torn tail preserves acknowledged records ("{\"kind\":\"out") AssertionError: expected [ { kind: 'input', …(2) } ] to deeply equal [ { kind: 'input', …(2) }, …(1) ] - Expected + Received @@ -9,18 +9,6 @@ }, "id": "old", "kind": "ui", }, }, - { - "at": "2026-09-23T08:00:00.000Z", - "kind": "input", - "observation": { - "at": "2026-09-23T08:00:00.000Z", - "event": { - "action": "clear-selection", - }, - "id": "new", - "kind": "ui", - }, - }, ] ❯ disk.test.ts:44:29 42| journal.append(entry('new')); 43| journal.close(); 44| expect(open(p).entries()).toEqual([entry('old'), entry('new')]); | ^ 45| }); 46| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/8]⎯ FAIL disk.test.ts > J1: appending after a tolerated torn tail preserves acknowledged records ("{\"kind\":\"out\n") Error: corrupt journal line 2 in /tmp/circe-pr4-probe-Qr3JYh/journal.jsonl: SyntaxError: Unterminated string in JSON at position 12 (line 1 column 13) ❯ parseEntries ../circe-pr4-review/packages/journal-file/src/index.ts:79:13 77| // newline). A damaged interior line is a hole and must be refus… 78| if (index === lastNonEmpty) continue; 79| throw new Error(`corrupt journal line ${index + 1} in ${path}: $… | ^ 80| } 81| } ❯ Module.createFileJournal ../circe-pr4-review/packages/journal-file/src/index.ts:93:3 ❯ open disk.test.ts:33:44 ❯ disk.test.ts:44:10 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/8]⎯ FAIL disk.test.ts > J2: a valid final record without newline remains separate from the next append AssertionError: expected [] to deeply equal [ { kind: 'input', …(2) }, …(1) ] - Expected + Received - [ - { - "at": "2026-09-23T08:00:00.000Z", - "kind": "input", - "observation": { - "at": "2026-09-23T08:00:00.000Z", - "event": { - "action": "clear-selection", - }, - "id": "old", - "kind": "ui", - }, - }, - { - "at": "2026-09-23T08:00:00.000Z", - "kind": "input", - "observation": { - "at": "2026-09-23T08:00:00.000Z", - "event": { - "action": "clear-selection", - }, - "id": "new", - "kind": "ui", - }, - }, - ] + [] ❯ disk.test.ts:51:29 49| const journal = open(p); expect(journal.entries()).toEqual([entry('o… 50| journal.append(entry('new')); journal.close(); 51| expect(open(p).entries()).toEqual([entry('old'), entry('new')]); | ^ 52| }); 53| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/8]⎯ FAIL disk.test.ts > J3: a durable reopen completes directory durability after initial directory fsync failed AssertionError: expected 0 to be greater than 0 ❯ disk.test.ts:64:33 62| // Successful append must not inherit the first handle's failed crea… 63| // durability. The filename's existence is not proof of directory fs… 64| expect(faults.directorySyncs).toBeGreaterThan(0); | ^ 65| }); 66| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/8]⎯ FAIL disk.test.ts > J4: a complete non-entry final JSON record is corruption, not a torn append (null) FAIL disk.test.ts > J4: a complete non-entry final JSON record is corruption, not a torn append (42) FAIL disk.test.ts > J4: a complete non-entry final JSON record is corruption, not a torn append ({"unrelated":true}) AssertionError: expected [Function] to throw an error - Expected: null + Received: undefined ❯ disk.test.ts:69:25 67| it.each(['null', '42', '{"unrelated":true}'])('J4: a complete non-entr… 68| const p = path(); writeFileSync(p, JSON.stringify(entry('old')) + '\… 69| expect(() => open(p)).toThrow(/corrupt journal/); | ^ 70| }); 71| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/8]⎯ FAIL disk.test.ts > J5: a known entry kind with missing required data is rejected at load AssertionError: expected [Function] to throw an error - Expected: null + Received: undefined ❯ disk.test.ts:74:25 72| it('J5: a known entry kind with missing required data is rejected at l… 73| const p = path(); writeFileSync(p, JSON.stringify({ kind: 'effect-fr… 74| expect(() => open(p)).toThrow(/corrupt journal/); | ^ 75| }); 76| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/8]⎯ Test Files 1 failed (1) Tests 8 failed | 3 passed (11) Start at 14:09:19 Duration 320ms (transform 55ms, setup 0ms, collect 47ms, tests 15ms, environment 0ms, prepare 71ms)