Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
12d6cd52 test(ai-client): add ChatPersistor unit coverage
Add a dedicated isolation suite for the extracted ChatPersistor (31
tests) covering edge cases that are awkward to trigger through the full
ChatClient:
- readInitial: sync read, async promise passthrough, throwing adapter
- hydrateAsync: array / null / undefined / non-promise / rejection, plus
the generation guard that drops a stale async hydration after a local
change
- notifyMessagesChanged: persists a snapshot (not the live array), skips
exactly one write after beginClear, swallows sync errors, runs async
writes FIFO with no overlap, and isolates rejections
- remove: removeItem, swallowed errors, and generation invalidation of a
queued write a removal supersedes
- shouldIgnoreChunk: every branch (cleared message id, cleared run id,
in-flight currentRunId, runless content/snapshot, parentMessageId with
toolCallId memoization)
- run lifecycle hooks: onRunSettled forget + runless-pointer advance,
onSessionRunError, takeRunlessRunId, resetIgnored (partial reset), and
the guard that a non-cleared run is never suppressed
Adds shared createUIMessage / createMockPersistence helpers to
test-utils. Full ai-client suite: 279 passing.