Sweep restore-born orphan resource rows on prod-2
The 2026-11-15 prod-2 restore left resource rows that no data row backs: every RBAC row-resource keyed by a name (tags:name:perf:...) instead of the live row id, plus 4 dead-token resources. The perf duplicate was roleless and blocked all item updates (join-items-exist resolves each tag through be-id, which errors on More than one match with no readable hit). This item records the fix, executed in the 2026-11-22 session: healed the perf tag's by-id resource with the standard roles, then deleted the orphan perf resource, the 20 tags: siblings, and finally all 1,734 remaining orphans (items 278, notes 454, usage 928, plans 53, states 7, authors 10, tokens 4) in one id-keyed sweep with FK cascade (6,286 role links). Verified: zero orphans remain, every row-resourced type keeps by-id resources with roles, API smoke green. Rollback TSVs: ~/workbench/prod2-sweep-20261122/.
- Slot
- 7174
- Status
- 60 Done
- Tags
- mvp, prod, perf, corrupt
- Contributors
- Donnie, Rosie