Skip to content

v0.2.3 — a line the watcher never reports is read anyway

Choose a tag to compare

@Kostakurta8 Kostakurta8 released this 22 Sep 07:15
· 85 commits to main since this release

Fixed

A line the watcher never reports is read anyway.

The main transcript was the one file the hub read on a single, best-effort signal. chokidar arms itself asynchronously, so a line appended between the catch-up read and the poller taking its baseline is folded into that baseline: the change event never fires, and the one sweep on ready has already run.

Nothing re-read the file after that — the rescan swept the subagent directories every 500ms and skipped the parent, and the live sweep returns early for a session it is already streaming. So the line was not late, it was lost, until the session happened to write again. For a session whose last line landed in that window, for ever.

The rescan now reads the main transcript on the same tick it rescans the subagents, which is the floor every other file in the session already had. A read that finds nothing costs one statSync — readNew returns immediately when the offset is already at the end of the file.

This is also what had been failing CI intermittently since August, on whichever matrix leg happened to be busiest: macos/node 24 in August, ubuntu/node 24 on the 0.2.2 release run. The failing run shows the whole shape of it — twenty-six roster sweeps, zero bytes read, no reset and no error.

Install: npx github:Kostakurta8/roundtable

Full changelog: https://github.com/Kostakurta8/roundtable/blob/main/CHANGELOG.md