1# Page-model edits through a cold native reopen
2
3`candidate` is `corpus/outline-edit/before` after eight compound page-model
4publications, one per edited page, each combining several kinds of change in a single
5transaction: paragraph reorder and Unicode replacement with a bold range; a subtree
6move with a new nested child and an italic/colored/resized range; a subtree deletion
7with an appended paragraph and a new two-paragraph outline; a mid-paragraph split; a
8collapse with an outline move and fixed width; an outline reorder with text appended
9in both; an outline deletion with underline/highlight/font changes; and a paragraph
10join with strike/subscript. `candidate/manifest.json` records each case, the page's
11position in the section and the model the writer read back.
12
13`cold` is an independent OneNote 2010 capture of the candidate through a fresh
14application cache, with the notebook retained after the native open. `followup`
15opens `cold/notebook` in another fresh clone and replaces the Rust-written Unicode
16paragraph on "Move leaf down" natively (`tools/native/page-model-followup.ps1`);
17`followup-cold` reopens that result cold.
18
19`PYTHONPATH=tools python3 -m unittest test_page_model -v` compares every page's
20native XML with the Rust model of each notebook (text order, resolved formatting,
21associated tags), requires the cold reopen to leave every page space's active
22revision unchanged (OneNote only adds its per-series navigation metadata copies to
23the section root on open, as it does for the untouched `outline-edit` fixture whose
24first-page copy was already stale), and checks each case's expected outline positions, paragraph order,
25nesting and collapse state in the candidate, the cold notebook and the follow-up.
26
27To regenerate: `ONESTORE_PAGE_MODEL_OUTPUT=/absolute/new cargo test -p onestore
28--test page_writer export_native_page_model_candidates -- --ignored`, then
29`tools/native_runner.py /absolute/new/candidate/notebook /absolute/new/cold
30--expected-pages 15 --collect-notebook`, then the same runner on `cold/notebook`
31with `--author tools/native/page-model-followup.ps1` into `followup`, and a final
32cold capture of `followup/notebook` into `followup-cold`. Each runner removes its clone.