| 1 |
"""v8 → v9 migrator: additive `training.cache` block. |
| 2 |
|
| 3 |
v9 introduces per-document tokenized-cache tuning |
| 4 |
(`TrainingConfig.cache`) — three knobs (`enabled`, `max_bytes`, |
| 5 |
`prune_older_than_days`) that let a `.dlm` override the pre-v9 |
| 6 |
hard-coded defaults. All fields carry defaults that preserve v8 |
| 7 |
behavior exactly. |
| 8 |
|
| 9 |
A v8 document without `training.cache` parses as v9 unchanged; this |
| 10 |
is a pure identity migrator, same shape as the v7→v8 gate migrator. |
| 11 |
""" |
| 12 |
|
| 13 |
from __future__ import annotations |
| 14 |
|
| 15 |
|
| 16 |
def migrate(raw: dict[str, object]) -> dict[str, object]: |
| 17 |
return dict(raw) |