| 1 | # Page creation |
| 2 | |
| 3 | `candidate` adds four pages to `../03-renamed/notebook/Lifecycle.one`: an appended |
| 4 | page without a title node, a prepended page with an empty title field, and two |
| 5 | appended pages titled `New 🦋 é`. All thirteen ordered page identities survive |
| 6 | each fresh OneNote 2010 reopen. Identical artifacts are relative symlinks. |
| 7 | |
| 8 | `cold` captures the first reopen. `native` adds a distinct body paragraph to each |
| 9 | duplicate-title page through `tools/native/created-pages.ps1`; `native/cold` |
| 10 | reopens that result in another cache. `followup` prefixes those bodies with |
| 11 | `Rust + ` and the titles with `Reviewed `; `followup/cold` reopens that result. |
| 12 | The retained `provenance.json` records the native capture inputs and clone removal. |
| 13 | |
| 14 | After building workspace examples, run `python -m unittest discover -s tools |
| 15 | -p test_page_creation.py -v`. It compares native XML content and character formats, |
| 16 | ordered identities, and complete active object graphs across each cold reopen. |
| 17 | Only `followup/cold` differs: OneNote refreshes the section's cached copies of the |
| 18 | two renamed titles, which the Rust title edit leaves stale. |
| 19 | |
| 20 | Export fresh Rust candidates by setting each variable to a new output directory: |
| 21 | |
| 22 | | Core integration test (`cargo test -p onestore --test page TEST -- --exact`) | Variable | |
| 23 | | --- | --- | |
| 24 | | `native_section_accepts_empty_and_titled_pages_with_preserved_history` | `ONESTORE_PAGE_CREATION_OUTPUT` | |
| 25 | | `native_changes_on_created_pages_accept_rust_followups` | `ONESTORE_PAGE_FOLLOWUP_OUTPUT` | |
| 26 | | `repeated_page_creation_crosses_root_fragments_counters_and_section_checkpoints` | `ONESTORE_PAGE_STRESS_OUTPUT` | |
| 27 | |
| 28 | The last test produces 521 pages, crosses a section revision checkpoint and |
| 29 | transaction-counter rollover, and checks that every unpublished candidate still |
| 30 | exposes the complete preceding page order. Its large native capture is local |
| 31 | evidence. Reproduce with `tools/native_runner.py INPUT OUTPUT --expected-pages 521 |
| 32 | --collect-notebook`, then `PYTHONPATH=tools python tools/verify_page_creation.py |
| 33 | INPUT OUTPUT`. That comparison permits only exact native materialization of a |
| 34 | previously absent section metadata copy; all other graph fields compare exactly. |
| 35 | |
| 36 | This core operation deliberately creates one optional title outline without |
| 37 | generated date/time text or template content. MS-ONE 2.2.50 permits a title with |
| 38 | one or two outlines. The fixture establishes this explicit empty-page contract. |