Python · 643 bytes Raw Blame History
1 """v6 → v7 migrator: additive `auto_harvest` + `harvest_source` on Section.
2
3 v7 introduces two optional body-section fields to record provenance for
4 sections that were written back into the `.dlm` by `dlm harvest` — the
5 post-training pull-mode that ingests failing probes from a sway report.
6 Neither field is part of `section_id`; they're tag-style metadata that
7 rides alongside the existing `adapter` and `tags` fields.
8
9 A v6 document without these fields parses as v7 unchanged — this is a
10 pure identity migrator.
11 """
12
13 from __future__ import annotations
14
15
16 def migrate(raw: dict[str, object]) -> dict[str, object]:
17 return dict(raw)