Files
t3code/apps
Cursor Agent e1599eebd9 fix: trace2 watcher basename matching and concurrent flush/watcher race
Bug 1: fs.watch provides basename-only paths on most platforms, so the
comparison against the full absolute traceFilePath never matched. Now
compares using path.basename() so the watcher correctly triggers
readTraceDelta for real-time hook progress streaming.

Bug 2: readTraceDelta is shared between the forked watcher fiber and
the flush call. Both could enter concurrently at the async readFileString
boundary, causing duplicate line processing. Wraps readTraceDelta with a
Semaphore(1) mutex to serialize access to processedChars and lineBuffer.
2026-03-24 08:26:40 +00:00
..