Symptom
When stat of a session's feed-debug file fails for a reason other than ENOENT, the batch is dropped but the renderer advances its persisted cursor, so those entries are never resent and never written — while the comment claims the opposite.
Mechanism
src/main/storage/feedDebugLog.ts (~201-208): the "unknown on-disk size … fail CLOSED … return WITHOUT advancing the cursor so the renderer resends these entries" branch returns normally. The IPC handler (src/main/ipc/debug.ts, debug:append-feed-log) resolves, useFeedDebugPersist's .then sets persistedFeedDebugIdRef to the batch's max id, and the entries are marked durable.
Expected
That branch must reject (throw) so the renderer keeps the entries pending and retries after the pacing interval; the comment then becomes true. Add a test with a stat failure that is not ENOENT asserting the IPC rejects and a later batch re-includes the entries.
Evidence
Found during the review of #750 (pre-existing).
Refs #748, #750, #388.
Symptom
When
statof a session's feed-debug file fails for a reason other than ENOENT, the batch is dropped but the renderer advances its persisted cursor, so those entries are never resent and never written — while the comment claims the opposite.Mechanism
src/main/storage/feedDebugLog.ts(~201-208): the "unknown on-disk size … fail CLOSED … return WITHOUT advancing the cursor so the renderer resends these entries" branchreturns normally. The IPC handler (src/main/ipc/debug.ts,debug:append-feed-log) resolves,useFeedDebugPersist's.thensetspersistedFeedDebugIdRefto the batch's max id, and the entries are marked durable.Expected
That branch must reject (throw) so the renderer keeps the entries pending and retries after the pacing interval; the comment then becomes true. Add a test with a stat failure that is not ENOENT asserting the IPC rejects and a later batch re-includes the entries.
Evidence
Found during the review of #750 (pre-existing).
Refs #748, #750, #388.