fix(session-persistence): async readRaw default and full branch coverage

The inherited readRaw default now rejects like the async backend overrides
instead of throwing synchronously, and its arms plus the JSONL override's
retry loop, zero-frame, and corrupt-header branches get dedicated tests.
This commit is contained in:
_Kerman
2026-08-10 19:49:57 +08:00
parent ced7caabf8
commit bf70da473b
4 files changed
+46 -2

No files matched your search

@@ -106,9 +106,9 @@ export abstract class SessionPersistence extends Service {
* @returns the raw artifact plus its parsed header, or `undefined` when the
* session is absent or the backend owns no per-session artifact.
*/
readRaw(_id: SessionId, signal?: AbortSignal): Promise<SessionRawArtifact | undefined> {
async readRaw(_id: SessionId, signal?: AbortSignal): Promise<SessionRawArtifact | undefined> {
signal?.throwIfAborted()
return Promise.resolve(undefined)
return undefined
}
/**