feat: dsh-session-projection-cache — durable projection checkpoints and the cold-read ladder

New package on the domain data form: one session_projcache record per
session (key → {stateVersion, observedSeq, state}), landing beside
workspace.json under the shipped json backend. Write policy: two mandatory
points (turn/end + session disposal) with count/interval throttling between
them (both Config fields required — flush cadence is a deployment choice);
every background write is fail-soft (log + stay stale, self-heal on the
next write or cold read). coldSnapshot(id) runs the read ladder — cached
rows + persistence readFrom from the registry's anchored restore floor +
registry restore + fail-soft write-back — detecting crash-repair-shrunk
logs via the one-below anchor and degrading to a single full re-read.
Mounted in apps/cli/cordis.yml (writeEveryEvents 200 / writeIntervalMs
5000).
This commit is contained in:
imccyu
2026-07-28 01:26:19 +08:00
parent fc4b573ff0
commit c330c1cd3e
12 changed files with 779 additions and 0 deletions

View File

@@ -116,6 +116,16 @@
- id: workspace
name: '@deepseek-ai/dsh-workspace'
# Persisted projection cache: durable per-session checkpoints of every
# registered projection unit (json backend → ./.storages/session_projcache.json,
# beside workspace.json), throttled between the two mandatory points
# (turn/end + detach), serving cold listings without full-log loads.
- id: session-projection-cache
name: '@deepseek-ai/dsh-session-projection-cache'
config:
writeEveryEvents: 200
writeIntervalMs: 5000
# Managed child-process groups for the bash executor (spawn/kill/output plumbing).
- id: subprocess
name: '@deepseek-ai/dsh-subprocess-local'

View File

@@ -57,6 +57,7 @@
"@deepseek-ai/dsh-session": "workspace:^",
"@deepseek-ai/dsh-session-persistence-jsonl": "workspace:^",
"@deepseek-ai/dsh-session-projection": "workspace:^",
"@deepseek-ai/dsh-session-projection-cache": "workspace:^",
"@deepseek-ai/dsh-session-title": "workspace:^",
"@deepseek-ai/dsh-session-title-first-message-llm": "workspace:^",
"@deepseek-ai/dsh-skill": "workspace:^",