[VS-NfD] Implement the orphan-file sweep and resolve Attachment.deletedAt
#194
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#194
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan reference:
20-massnahmenplan.md-> Phase 2ADR: n/a
Effort: M (2 AT)
Depends on: —
Context
Files whose page no longer embeds them are never reclaimed, so content can
survive its page indefinitely on disk. An unused nullable column that looks
like a soft-delete marker is itself a finding — a reader cannot tell
whether deletion is soft or hard.
Current state
apps/api/prisma/schema.prisma:530–538documents both facts explicitly:the
pageIdlink is "not touched when an image is later removed from itspage's content — an orphan-file sweep to reclaim those is a separate
future maintenance job (operations.md), not this one", and
"
deletedAtstays unused for now — purge hard-deletes attachments".Acceptance criteria
live page document and removes row plus file, correcting quota usage.
page does not exist yet) — proven by a test.
Attachment.deletedAtis either used by the sweep with documentedsemantics or removed by migration; the schema comment matches the
outcome.
period; a freshly uploaded, not-yet-embedded file is not.
docs/architecture/operations.mddocuments the job; #229 covers it.Out of scope
Deduplication by content hash (see #199) and pond purge (#193).
Delivered by PR #249 (
0bc36aa+ fence fix02c1f18), merged to main fast-forward. CI run 494 green (493 red was the job-count fence catching the deliberate sixth job). Deviation from the AC documented in the PR: claimed-but-unembedded attachments are NOT auto-swept (panel assets are user-managed; content-reference sweeping would destroy data). Closing.