Skip to content

[EDIFIKANA] Add purgeDocument hard-delete method (DS-DOC-007) - #580

Merged
CRamsan merged 5 commits into
mainfrom
cr/ds-doc-007-purge-document-guard
Jul 27, 2026
Merged

[EDIFIKANA] Add purgeDocument hard-delete method (DS-DOC-007)#580
CRamsan merged 5 commits into
mainfrom
cr/ds-doc-007-purge-document-guard

Conversation

@CRamsan

@CRamsan CRamsan commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • DocumentDatastore had no way to hard-delete a document at all — unlike every other resource
    in this catalog (Task, Unit, Occupant, CommonArea, PaymentRecord, RentConfig, Property,
    Employee all have a purgeX method). Added purgeDocument, following the same
    select-then-guard-then-delete pattern used by every other purge method.
  • SupabaseIntegrationTest's shared teardown previously only soft-deleted document fixtures
    (documentResources.forEach { deleteDocument(it) }), leaving them to accumulate forever across
    test runs. Now calls deleteDocument then purgeDocument, matching every other resource type.
  • This closes out Finding Create Wiki for Spec Doc #5 (datastore-test-catalog.md) in full — all six purge-related gaps
    identified this session (DS-CA-011, DS-OCC-008, DS-PAY-007, DS-RENT-006, DS-TASK-009,
    DS-DOC-007) are now fixed.

Demo

N/A — no UI changes.

References

Test plan

  • ./gradlew :edifikana:back-end:release --quiet — clean build
  • New test DS-DOC-007 purgeDocument should refuse to purge an active (non-deleted) document
    — the consistent-group guard behavior
  • New test DS-DOC-007b purgeDocument should permanently remove a soft-deleted document
    confirms genuine hard-deletion via a raw untyped select (not just another soft-delete no-op)
  • ./gradlew :edifikana:back-end:integTest --tests "*SupabaseDocumentDatastoreIntegrationTest*" — all pass
  • ./gradlew :edifikana:back-end:integTest (full suite) — 264/264 pass, confirming the shared
    teardown change (used by every integration test class) introduces no regression

@CRamsan
CRamsan force-pushed the cr/ds-prop-010-atomic-create-property branch from d8697ea to e9f4681 Compare July 27, 2026 07:22
@CRamsan
CRamsan changed the base branch from cr/ds-prop-010-atomic-create-property to main July 27, 2026 07:25
Cramsan added 5 commits July 27, 2026 00:26
DocumentDatastore had no way to hard-delete a document at all, unlike every
other resource, so integration test fixtures accumulated as soft-deleted
rows forever. Adds purgeDocument (select-then-guard-then-delete, same shape
as every other purgeX method) and updates the shared integration test
teardown to actually purge document fixtures instead of just soft-deleting
them.
@CRamsan
CRamsan force-pushed the cr/ds-doc-007-purge-document-guard branch from d6b4133 to 2006838 Compare July 27, 2026 07:26
@CRamsan
CRamsan merged commit ef7b7c7 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