#305: a full pond archive before deletion and before purge #316
No reviewers
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#316
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue-305-pond-archive"
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?
Implements #305.
The safety prompt was never the gap — typing the pond name is stricter than a confirm dialog and stays untouched. The gap is that the person who deletes the pond loses access the moment they do: it leaves their view, only a Site Admin can bring it back, and the export is no longer reachable for them. So the archive is offered inside the deletion flow, before the button.
What the archive contains
manifest.json: pond settings (effective, defaults filled in — a preservation format must not require its reader to know Dorfteich's defaults), labels, page hierarchy and sort keys, comments, attachment metadata incl. the #199 hash. It extends the #210 manifest rather than adding a second descriptor, and carries an explicitformatVersion.README.txt— the manifest is for machines; whoever unpacks a folder of Markdown a year from now must not believe they hold a one-click restore.Format documented in
docs/architecture/pond-archive-format.md, including what is deliberately NOT in it (history, permissions, trash).Decisions worth reviewing
complete: true; only an archive that actually leaves pages out is incomplete. The Site-Admin route skips the read filter — an archive taken before an irreversible purge must not depend on which ponds the operator is a member of. My first version conflated the two, and the test caught it.exportevent per classified page before any classified byte enters the stream; attachments never travel without their page.pond.archived, catalogue v1.7.Verified by hand, not only asserted
A real pond's archive downloaded and unpacked:
The manifest carried the effective settings (8 keys incl. fonts/theme/startPageId), per-page classification, the attachment with its sha256, and the files list. The classified page's Markdown kept its
classification: vs_nfdfrontmatter and the VS-NfD marking.Plus: 6 api tests (an unembedded attachment travels; the hierarchy/labels/comments land in the manifest; the preview reports omissions; the audit entry carries the counts; a Site Admin gets a complete archive without pond membership; an ordinary pond admin gets 403 on the admin route), api suite 104 files green, a11y pack 11/11 in both schemes — it now also scans the pond settings screen.
Not done, and why
The Site Admin's purge dialog (#193) exists only as an api endpoint — there is no pond-trash UI in the web app to attach an offer to. The api half (
GET /admin/trash/ponds/:id/archive[/preview]) is here and tested, so it becomes a link the day that screen is built. Building it is #193's scope, not this one's.The "N pages omitted" path is covered by the api's preview logic and unit-level assertions, not by an e2e with a label-restricted reader.
Closes #305
1b992c8626to5c03da2ccc5c03da2cccto3310ae3926