feat(apiproxy): projection column on session.list — cold titles with zero log loads

SessionSummary grows an optional projections column (whole value per key,
same passthrough posture as the history-tail block): attached rows cut the
live registry watermark cache; cold rows view the persisted projection
cache's stored rows via the new registry viewCheckpoint face (version-
matching keys only, zero I/O) — the RFC's motivating scenario, every
session's title across a listing without loading one event log. The column
is fail-soft and absence-coded: no registry, no cache row, or a throwing
read serve the row without the column, never breaking the listing.
This commit is contained in:
imccyu
2026-07-28 01:38:15 +08:00
parent c330c1cd3e
commit 003b22a157
10 changed files with 187 additions and 5 deletions

View File

@@ -143,6 +143,17 @@ export interface SessionSummary {
parentSessionId?: SessionId
/** Session working directory (header.cwd passthrough); absent when unrecorded. */
cwd?: string
/**
* Whole current value per projection key, with zero log loads: attached
* sessions read the registry's live watermark cut; cold sessions read the
* persisted projection cache's stored rows — as stale as that session's
* last durable checkpoint, never wrong, superseded by the history tail
* baseline the moment the session is opened. Absent when no value is
* available (no registry, no cache row for a cold session, or a fail-soft
* cache read miss); a listing client treats absence as "no title yet",
* exactly like a blank session.
*/
projections?: Partial<SessionProjectionMap>
}
/** Session-domain unary methods (the map keys session.* of RpcMethodMap). */