[EDIFIKANA] Add DS-X-009b unit-side FK-cascade sweep test - #578
Merged
Conversation
5 tasks
CRamsan
force-pushed
the
cr/ds-x-004-create-occupant-unit-guard
branch
from
July 27, 2026 07:12
ac84e64 to
07a0fa5
Compare
CRamsan
changed the base branch from
cr/ds-x-004-create-occupant-unit-guard
to
main
July 27, 2026 07:18
added 4 commits
July 27, 2026 00:19
DS-X-009 already existed and covers the property-side RESTRICT-vs- CASCADE sweep completely (discovered during implementation -- it predates this plan and was missed during planning since only the catalog file was grepped for this ID, not the test file). Adds the missing unit-side piece: units(unit_id) has no RESTRICT references at all, only CASCADE (rent_config/payment_records/unit_occupants/ documents) and SET NULL (tasks/invites), so purgeUnit should never be blocked by an FK violation, unlike purgeProperty.
…og (NONE) DS-X-009 (property-side RESTRICT-vs-CASCADE sweep) already existed and passes live -- discovered during implementation, not written as part of this work. Adds DS-X-009b to the catalog for the newly-added unit-side sweep test, and reframes Finding #6 from speculative to confirmed with the observed outcome.
CRamsan
force-pushed
the
cr/ds-x-009-fk-cascade-sweep
branch
from
July 27, 2026 07:20
5dd6c2e to
4f14e96
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
properties/unitsFKON DELETEbehavior with live, observed evidence.DS-X-009(the property-sideRESTRICT-vs-CASCADEsweep) already existed inCrossDatastoreIntegrationTest.ktand already passes — it predates this session's work and was missed during planning (only the catalog file was searched for this ID, not the test file). The plan's originally-proposed property-side tests were correctly dropped as redundant.DS-X-009b, confirmingunits(unit_id)has noRESTRICTreferences at all (unlikeproperties) — onlyCASCADE(e.g.rent_config) andSET NULL(e.g.tasks) — sopurgeUnitcan never be blocked by an FK violation, unlikepurgeProperty.DS-X-009/DS-X-009brows from speculative to confirmed.Demo
N/A — no UI changes.
References
~/.claude/plans/ds-x-009-fk-cascade-sweep.md~/.claude/plans/ds-x-009-fk-cascade-sweep-verification.mdTest plan
./gradlew :edifikana:back-end:release --quiet— PASS./gradlew :edifikana:back-end:integTest --tests "*CrossDatastoreIntegrationTest*"— 12/12 PASS, including the pre-existingDS-X-009and newDS-X-009b(both also confirmed in isolation)