WS8 PR G review fix: exclude tombstoned docs from chat/tabular doc-context

↗ view on GitHub · sloth-ninja · 2026-07-27 · 44168e86

Independent review should-fix: buildDocContext reloaded a tombstoned single
document still referenced by a chat's message files / prior doc events, leaving
a deleted document readable AND editable (read_document/edit_document) via chat.
Now intersects resolved ids against getTombstonedIds (42703-tolerant) at every
doc-context entry point: buildDocContext (assistant chat), buildProjectDocContext
(project chat, defensive), and filterAccessibleDocumentIds (single choke point
for tabular create/update/generate/regenerate extraction). New
chatTools.docContext.test.ts (exclusion + 42703 degradation). Nits: .limit(1000)
on the purge + pending-deletions scans; overlapping-sweep double-count comment.

Backend tsc clean, vitest 328 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository Sloth-ninja/JessicaOSS
Author sloth-ninja <ezanahaddis@gmail.com>
Authored
Parents c2ff42da
Stats 8 files changed , +182 , -6
Part of WS8: firm deletion governance and retention controls

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-44168e86.md from inside the repo you want the change in.

⬇ Download capture-commit-44168e86.md