[VS-NfD] Mark the Markdown ZIP export with frontmatter and a visible imprint #210

Closed
opened 2026-07-30 01:43:43 +02:00 by fable-5 · 1 comment
Collaborator

Plan reference: 20-massnahmenplan.md -> P1-2 (output channels)
ADR: ADR 0022
Effort: S (1 AT)
Depends on: #204

Context

The ZIP export is the bulk egress path: many pages at once, as plain files
that get copied onward. It needs both a machine-readable marker and a
human-visible one.

Current state

  • apps/api/src/import-export/export.service.ts builds the pond ZIP
    (Content-Disposition at :68); page selection at :95–108 filters by
    read permission.
  • apps/api/src/import-export/export-markdown.ts emits the Markdown; it
    writes no YAML frontmatter — frontmatter handling exists only on the
    Obsidian import side (obsidian-vault.ts:203,528).
  • Verified: labels do not appear in any export (see §0.2), so no existing
    metadata block can carry the marking.

Acceptance criteria

  • Each exported Markdown file carries the classification in YAML
    frontmatter and as a visible line at the top and bottom of the
    file.
  • The ZIP contains a manifest listing every file with its
    classification, and the highest classification contained is stated
    once at archive level.
  • Unclassified pages get no marking; existing round-trip and fidelity
    tests still pass (frontmatter must not confuse our own importer —
    asserted by a round-trip test).
  • Documented in #228.

Out of scope

The Obsidian vault export variant's own frontmatter modes, beyond keeping
them working.

**Plan reference:** `20-massnahmenplan.md` -> P1-2 (output channels) **ADR:** ADR 0022 **Effort:** S (1 AT) **Depends on:** #204 ## Context The ZIP export is the bulk egress path: many pages at once, as plain files that get copied onward. It needs both a machine-readable marker and a human-visible one. ## Current state - `apps/api/src/import-export/export.service.ts` builds the pond ZIP (`Content-Disposition` at `:68`); page selection at `:95–108` filters by read permission. - `apps/api/src/import-export/export-markdown.ts` emits the Markdown; it writes **no** YAML frontmatter — frontmatter handling exists only on the Obsidian *import* side (`obsidian-vault.ts:203,528`). - Verified: labels do not appear in any export (see §0.2), so no existing metadata block can carry the marking. ## Acceptance criteria - [ ] Each exported Markdown file carries the classification in YAML frontmatter **and** as a visible line at the top and bottom of the file. - [ ] The ZIP contains a manifest listing every file with its classification, and the highest classification contained is stated once at archive level. - [ ] Unclassified pages get no marking; existing round-trip and fidelity tests still pass (frontmatter must not confuse our own importer — asserted by a round-trip test). - [ ] Documented in #228. ## Out of scope The Obsidian vault export variant's own frontmatter modes, beyond keeping them working.
fable-5 added this to the M26 — VS-NfD: classification metadata milestone 2026-07-30 01:43:43 +02:00
fable-5 added the
area:export
vs-nfd:blocker
vs-nfd
effort:S
labels 2026-07-30 01:43:43 +02:00
Author
Collaborator

Done in PR #269 (commit 6849704, CI run 552 green, fast-forward merged on Stefan's standing merge instruction).

Evidence:

  • Every classified .md in the pond ZIP carries YAML frontmatter (classification: vs_nfd) AND the visible marking line at top and bottom; unclassified files are byte-identical to before.
  • manifest.json per archive (and per pond folder of the account data export): every file with its level, the highest level stated once at archive level; media inherits the highest classification among the readable pages referencing it (fail-closed).
  • Round trip: the importer recognizes exactly our frontmatter block, strips it and the imprint lines, and creates the page AT LEAST at the imported level (content cannot escape its marking through a ZIP) - pinned by classified-markdown.test.ts and an e2e export-import round-trip. Foreign frontmatter passes through unchanged; Obsidian vault frontmatter modes untouched.
Done in PR #269 (commit 6849704, CI run 552 green, fast-forward merged on Stefan's standing merge instruction). Evidence: - Every classified .md in the pond ZIP carries YAML frontmatter (classification: vs_nfd) AND the visible marking line at top and bottom; unclassified files are byte-identical to before. - manifest.json per archive (and per pond folder of the account data export): every file with its level, the highest level stated once at archive level; media inherits the highest classification among the readable pages referencing it (fail-closed). - Round trip: the importer recognizes exactly our frontmatter block, strips it and the imprint lines, and creates the page AT LEAST at the imported level (content cannot escape its marking through a ZIP) - pinned by classified-markdown.test.ts and an e2e export-import round-trip. Foreign frontmatter passes through unchanged; Obsidian vault frontmatter modes untouched.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#210
No description provided.