Files
openclaw/src
zengLingbiao 774cd25aa6 fix(transcript-stream): propagate non-missing filesystem errors (#106412)
* fix(transcript-stream): log stat/open errors instead of silently returning empty iterator

streamSessionTranscriptLines and streamSessionTranscriptLinesReverse
used bare catch { return; } blocks that silently swallowed all fs errors
(permission denied, I/O error, etc.) and returned empty iterators. This
made it impossible to diagnose why transcript streaming failed.

Replace catch { return; } with catch (err) { transcriptLog.warn(...); return; }
so failures are visible in diagnostics.

* fix(transcript-stream): exclude ENOENT from warning logs in stat/open catch blocks

Both streamSessionTranscriptLines and streamSessionTranscriptLinesReverse
caught all fs errors and logged warnings, but ENOENT is an expected empty-
iterator case for these best-effort readers. Filter ENOENT before logging
so missing transcripts stay silent while permission/I/O errors surface.

Added deterministic regression tests with mocked fs.promises.stat/open:
- EACCES triggers a warning in both forward and reverse directions
- ENOENT stays silent in both directions

* fix(transcript): propagate session read failures

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-15 22:29:08 -07:00
..
2026-07-15 13:05:10 +01:00