| 1 | # Page-model edits through a cold native reopen |
| 2 | |
| 3 | `candidate` is `corpus/outline-edit/before` after eight compound page-model |
| 4 | publications, one per edited page, each combining several kinds of change in a single |
| 5 | transaction: paragraph reorder and Unicode replacement with a bold range; a subtree |
| 6 | move with a new nested child and an italic/colored/resized range; a subtree deletion |
| 7 | with an appended paragraph and a new two-paragraph outline; a mid-paragraph split; a |
| 8 | collapse with an outline move and fixed width; an outline reorder with text appended |
| 9 | in both; an outline deletion with underline/highlight/font changes; and a paragraph |
| 10 | join with strike/subscript. `candidate/manifest.json` records each case, the page's |
| 11 | position 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 |
| 14 | application cache, with the notebook retained after the native open. `followup` |
| 15 | opens `cold/notebook` in another fresh clone and replaces the Rust-written Unicode |
| 16 | paragraph 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 |
| 20 | native XML with the Rust model of each notebook (text order, resolved formatting, |
| 21 | associated tags), requires the cold reopen to leave every page space's active |
| 22 | revision unchanged (OneNote only adds its per-series navigation metadata copies to |
| 23 | the section root on open, as it does for the untouched `outline-edit` fixture whose |
| 24 | first-page copy was already stale), and checks each case's expected outline positions, paragraph order, |
| 25 | nesting and collapse state in the candidate, the cold notebook and the follow-up. |
| 26 | |
| 27 | To 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` |
| 31 | with `--author tools/native/page-model-followup.ps1` into `followup`, and a final |
| 32 | cold capture of `followup/notebook` into `followup-cold`. Each runner removes its clone. |