[EDIFIKANA] Add purgeDocument hard-delete method (DS-DOC-007) - #580
Merged
Conversation
CRamsan
force-pushed
the
cr/ds-prop-010-atomic-create-property
branch
from
July 27, 2026 07:22
d8697ea to
e9f4681
Compare
CRamsan
changed the base branch from
cr/ds-prop-010-atomic-create-property
to
main
July 27, 2026 07:25
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
force-pushed
the
cr/ds-doc-007-purge-document-guard
branch
from
July 27, 2026 07:26
d6b4133 to
2006838
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
DocumentDatastorehad no way to hard-delete a document at all — unlike every other resourcein this catalog (Task, Unit, Occupant, CommonArea, PaymentRecord, RentConfig, Property,
Employee all have a
purgeXmethod). AddedpurgeDocument, following the sameselect-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 acrosstest runs. Now calls
deleteDocumentthenpurgeDocument, matching every other resource type.datastore-test-catalog.md) in full — all six purge-related gapsidentified 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 buildDS-DOC-007 purgeDocument should refuse to purge an active (non-deleted) document— the consistent-group guard behavior
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 sharedteardown change (used by every integration test class) introduces no regression