Files
orca/src
NeilandOrca 8e9dc4ecf2 [P2] fix(persistence): tolerate null worktreeMeta entries in linked-item normalization (#11614)
* fix(persistence): tolerate null worktreeMeta entries in linked-item normalization

Co-authored-by: Orca <help@stably.ai>

* fix(persistence): drop null worktreeMeta entries instead of retaining them

gcStaleWorktreeMeta never reaps a timestamp-less key, so a skipped null meta
would persist forever and reach unguarded consumers (reassignSshTargetId,
push-target cleanup, disconnected-SSH listing, usage metadata).

Co-authored-by: Orca <help@stably.ai>

* fix(persistence): drop every corrupt worktreeMeta shape with its lineage rows

Widen the guard past null so scalars/arrays can't survive load into a
Record<string, WorktreeMeta> that consumers trust, self-heal a whole-map
"worktreeMeta": null instead of leaning on gcStaleWorktreeMeta running next,
and clear the two lineage companions the way gcStaleWorktreeMeta and
removeWorktreeMeta already do.

Co-authored-by: Orca <help@stably.ai>

* fix(persistence): persist whole-map metadata repairs

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-30 17:55:54 -07:00
..