mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 06:18:00 +01:00
entity_wallets is polymorphic, so only the CRUD handler's DELETE cleaned it and every other path leaked. The 2026-11-06 data-invariant gate found three links (a project, two AI assistants) whose entities were deleted with no audit row, i.e. outside the app. An AFTER DELETE trigger on each entity table removes the links in the database, and the migration clears the existing orphans so the gate is green on apply. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>