Skip to content

[EDIFIKANA] Add DS-X-009b unit-side FK-cascade sweep test - #578

Merged
CRamsan merged 4 commits into
mainfrom
cr/ds-x-009-fk-cascade-sweep
Jul 27, 2026
Merged

[EDIFIKANA] Add DS-X-009b unit-side FK-cascade sweep test#578
CRamsan merged 4 commits into
mainfrom
cr/ds-x-009-fk-cascade-sweep

Conversation

@CRamsan

@CRamsan CRamsan commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Closes Finding Upgrade gradle dependencies #6: replaces migration-reading speculation about properties/units FK ON DELETE behavior with live, observed evidence.
  • Discovered during implementation, not written by this PR: DS-X-009 (the property-side RESTRICT-vs-CASCADE sweep) already existed in CrossDatastoreIntegrationTest.kt and 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.
  • Adds the genuinely missing piece: DS-X-009b, confirming units(unit_id) has no RESTRICT references at all (unlike properties) — only CASCADE (e.g. rent_config) and SET NULL (e.g. tasks) — so purgeUnit can never be blocked by an FK violation, unlike purgeProperty.
  • Test-only — no production code changes; both purge methods already have their soft-delete guards from earlier in this batch.
  • Reframes the catalog's Finding Upgrade gradle dependencies #6 and DS-X-009/DS-X-009b rows from speculative to confirmed.

Demo

N/A — no UI changes.

References

  • Plan: ~/.claude/plans/ds-x-009-fk-cascade-sweep.md
  • Verification: ~/.claude/plans/ds-x-009-fk-cascade-sweep-verification.md

Test plan

  • ./gradlew :edifikana:back-end:release --quiet — PASS
  • ./gradlew :edifikana:back-end:integTest --tests "*CrossDatastoreIntegrationTest*" — 12/12 PASS, including the pre-existing DS-X-009 and new DS-X-009b (both also confirmed in isolation)
  • Full backend integration suite — 262/262 PASS, confirming no regression from this test's multi-datastore setup (unit, rent config, task)

@CRamsan
CRamsan force-pushed the cr/ds-x-004-create-occupant-unit-guard branch from ac84e64 to 07a0fa5 Compare July 27, 2026 07:12
@CRamsan
CRamsan changed the base branch from cr/ds-x-004-create-occupant-unit-guard to main July 27, 2026 07:18
Cramsan 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
CRamsan force-pushed the cr/ds-x-009-fk-cascade-sweep branch from 5dd6c2e to 4f14e96 Compare July 27, 2026 07:20
@CRamsan
CRamsan merged commit 4b6a254 into main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant