1# Native page lifecycle controls
2
3Six sequential OneNote 2010 controls, each independently reopened in a fresh
4Windows clone. `notebook` is the closed source; `read` is its native section XML;
5`cold/notebook` and `cold/read` retain the independently reopened notebook and XML.
6Identical artifacts link to one copy. `provenance.json` records the source,
7controller hash and clone teardown. The seed section is the existing synthetic
8deletion fixture; personal notebooks are not inputs.
9
10| Phase | Native operation |
11| --- | --- |
12| 01-blank | Create default, blank-with-title and blank-without-title pages. |
13| 02-authored | Add six pages, including duplicate explicit titles and a body-derived title. |
14| 03-renamed | Rename one duplicate with Unicode; clear another title. |
15| 04-nested | Place child/grandchild pages at levels 2 and 3. |
16| 05-reordered | Move an ordinary page before the parent/subpage group using complete explicit order. |
17| 06-deleted-parent | Soft-delete the parent while retaining its subpages. |
18
19The native deletion moves the parent into `OneNote_RecycleBin` and appends its
20surviving level-2/3 pages to the preceding page series. These COM controls do not
21define keyboard selection or implicit subtree movement. Renaming reallocates
22title content; body identities, formatting and content remain unchanged.
23
24Run `PYTHONPATH=tools python3 -m unittest tools.test_page_lifecycle -v` after
25building the workspace examples with all features. The tests compare every phase
26to its native XML and cold output, then independently check page styles, titles,
27order, levels, series grouping and exact preserved body graphs.
28
29To reproduce, copy `corpus/native-delete/deletion-05/before/synthetic.one` into a
30new notebook directory and run `tools/native_runner.py INPUT OUTPUT --author
31tools/native/page-lifecycle.ps1 --collect-notebook`. Cold-capture each generated
32phase's notebook with the same runner, without `--author`. The controller waits
33for stable native content before closing and refreshes COM IDs after reopening;
34COM IDs are not the stored object-space identities.