DamonKoy/dsh-projection-guard
Guards the persisted session-projection cache: per-row JSON degradation so one misbehaving projection unit (e.g. a third-party plugin storing a Map) can never stall session titles or the whole cache again, plus a startup self-heal that backfills missing titles.
dsh-projection-guard protects the persisted session-projection cache against misbehaving projection units so session titles — and every other projection — survive restarts no matter what third-party plugins do. DSH persists per-session projection checkpoints into session_projcache.json; the write path serializes the whole per-session checkpoint in one JSON pass, so if a single projection unit stores a non-JSON value (Map, Set, class instance, cyclic or non-finite value), the entire write fails fail-soft (log-only) and the cache silently stops updating — after a restart every cold session loses its title and other projections. The guard makes each projection unit's row degrade independently: one bad row no longer kills the whole checkpoint, repairOnStart backfills missing cached titles from persisted logs at startup, and logDropped warns per dropped non-JSON row (key + session id). Config: repairOnStart (true), logDropped (true).
Install
dsh plugin --profile web add github:DamonKoy/dsh-projection-guardGitHub install per README (EN primary with zh edition); npm 404 verified 2026-09-03. Install: dsh plugin --profile web add github:DamonKoy/dsh-projection-guard, restart dsh web. Alternative: add the repo as a profile dependency ("dsh-projection-guard": "github:DamonKoy/dsh-projection-guard") with the bundle in dsh.profile.bundles, then pnpm install in the profile dir and restart.
Compatibility
DSH web profile; guards the persisted session-projection cache (session_projcache.json).
Details
- Repo: DamonKoy/dsh-projection-guard
- Category: Sessions & Messages
- Stars: 0
- Version: git github:DamonKoy/dsh-projection-guard
- Last push: 2026-08-15
- First seen: 2026-08-15
Recent updates
Per-row degradation of the session projection cache; one misbehaving unit can no longer fail the whole write; startup title backfill; per-row drop warnings.
FAQ
- What bug does this fix?
- A single projection unit storing a non-JSON value (Map, Set, cyclic, non-finite) used to fail the entire per-session cache write fail-soft, silently freezing updates so cold sessions lost titles after restart.
- How does it protect the cache?
- Rows degrade independently — one bad unit's row is dropped or repaired while every other projection keeps writing; repairOnStart backfills titles from persisted logs.
- Is anything logged?
- With logDropped enabled the guard warns per dropped non-JSON row, including the session id and key.
Alternatives
ddggnnbb-dsh-session-restore · clouwer/dsh-memsearch · damonkoy-dsh-session-title-fix