Document the tenant-data repair protocol and its non-goals
Support wants to move an incorrectly linked case by editing organization IDs directly, risking a cascade of broken ownership.
- Focused work estimate
- 1h 30m + prerequisites
- Priority in the scenario
- Medium
- Engineering practice
- Repair planning · Data integrity
Estimated field mix
- Database engineering60%
- Security40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional case-management application filters most requests correctly, but imports and background commands can connect a case to another organization's project or assignee.
Setup prerequisites
- Create two synthetic organizations with overlapping display names.
- Use repository-level authorization and migration-backed constraints.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
- ATENANT-101 · Map tenant ownership for case-management entities
- ATENANT-102 · Add composite uniqueness for tenant-owned relationship targets
- ATENANT-103 · Reject null organization scope in protected repository methods
- ATENANT-104 · Enforce same-organization case-to-project references with a foreign key
- ATENANT-105 · Keep case-comment inserts scoped during concurrent parent changes
- ATENANT-106 · Make bulk case imports validate every tenant relationship before commit
- ATENANT-107 · Carry tenant identity through background case-processing commands
- ATENANT-108 · Find legacy cross-tenant references without exposing case contents
- ATENANT-109 · Verify tenant constraints through a least-privilege database writer
Acceptance criteria
- Require a reviewed explicit mapping and affected-relationship inventory.
- Preserve audit references and report unresolved children.
- Separate repairing a bad link from transferring entity ownership.
Implementation constraints
- Use one fabricated mismatch as the worked example.
Verification to include
- Repair a reviewed synthetic project link with all constraints enabled.
- Attempt an incomplete ownership transfer and stop before mutation.
Deliverables
- Tenant repair runbook
Rollout and recovery
Review repairs in a disposable database first; retain invalid rows quarantined when ownership is uncertain.
Value of the work
For the engineer: Practice tenant-aware keys, foreign keys and direct-write denial tests.
For the team: Review defense in depth for data isolation across ordinary and privileged writers.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.