CODE-063: kv lane never collects a dead worktree's blocks and mark

Now
OPEN
Sev
LOW
Rep
///bee
Ask
gritzko
Rev
///bee#8cb69a0
See
BEE-024
See
BEE-043
See
BEE-009

Input

Context

index/kv.js:352:9B-356 with :62: killBlock runs only for the SWEEPING worktree's code, so a worktree that is deleted — the bee fork per-ticket flow, done.js retirement — leaves its blocks and its MARK row in the shared lane forever. Confirmed: main sweep 2 blocks; git worktree add + sweep 4 blocks / 2 marks; rm -rf + git worktree prune + sweep still 4 / 2, 0 tombed. :247 readAll scans the whole lane every sweep, so a query's cost grows with every fork the repo ever had. Found in the 2026-09-18 review.

Goals

Tombstone blocks whose wt code names no worktree in git worktree list / $SRC_ROOT, or GC them on a cold run; consider seeking the marks plus this worktree's path_hl set instead of a whole-lane scan.

WIP

Design decisions

TODOs

Outcome