| 1 | # Offline page order and indentation |
| 2 | |
| 3 | Eighteen cases combine two offline intents with the nine retained native movement |
| 4 | states in `../movement`. Each starts from `../04-nested`, queues an indentation |
| 5 | change or explicit three-page movement, then a dependent body-text edit. Nine |
| 6 | cases reconcile directly; nine require reviewed placement retaining the original |
| 7 | page and allocated series identities. Both edits survive cache reopen. |
| 8 | |
| 9 | Each case contains its generated candidate and intent manifest, plus a fresh |
| 10 | OneNote 2010 capture. Native page order, text and character formatting agree; |
| 11 | active graphs compare exactly and all bytes after the 1024-byte header remain |
| 12 | unchanged. The warm native promoted-parent input contains stale cached indentation; |
| 13 | the Rust topology edit refreshes it before publication. Its strict comparison |
| 14 | needs no stale-cache exception. |
| 15 | |
| 16 | `twelve-clients` starts twelve independent offline branches from one 37-page |
| 17 | section. Each branch reorders two pages, nests another, and inserts its own body |
| 18 | outline. All 24 publications reconcile without review. The native reopen retains |
| 19 | all page identities, order, indentation and twelve distinct Unicode bodies. |
| 20 | OneNote fills the seed page's absent optional metadata copy; the verifier checks |
| 21 | its complete contents and references. `provenance.json` records all nineteen |
| 22 | captures, source hashes, scripts, base image and clone removal. |
| 23 | |
| 24 | Reproduce candidates with new absolute output directories: |
| 25 | |
| 26 | ```sh |
| 27 | ONESTORE_OFFLINE_PAGE_EDIT_OUTPUT=/tmp/one-page-edits cargo test -p notebook --all-features --test sync_pages native_page_changes_reconcile_with_atomic_offline_batches_and_review -- --exact |
| 28 | python tools/offline_page_edits.py /tmp/one-page-edits /tmp/one-page-edits-cold --workers 4 |
| 29 | ONESTORE_OFFLINE_PAGE_CLIENT_OUTPUT=/tmp/one-page-clients cargo test -p notebook --all-features --test sync_pages twelve_disjoint_page_batches_merge_with_dependent_bodies_without_review -- --exact |
| 30 | python tools/native_runner.py /tmp/one-page-clients /tmp/one-page-clients-cold --expected-pages 37 --collect-notebook |
| 31 | ``` |
| 32 | |
| 33 | After building the `onestore-notebook` document example, run |
| 34 | `python -m unittest discover -s tools -p test_page_movement.py -v` to compare the |
| 35 | retained captures. The `offline_page` sanitizer target exercises twelve replicas, |
| 36 | atomic page batches, conflict review, creation, body insertion, cache reopen and |
| 37 | interrupted publication using the shared Rust schedule model. `schedules` retains |
| 38 | the twelve initial inputs for ASan seed 1987 (163 executions, including 150 |
| 39 | mutations). Link them into a new writable corpus directory, then run |
| 40 | `cargo +nightly fuzz run offline_page CORPUS -- -seed=1987 -max_total_time=240 |
| 41 | -timeout=30` from the repository root. |
| 42 | |
| 43 | These captures establish native compatibility of reconciled results. The twelve |
| 44 | branches publish serially; the schedule model varies their interleavings. Neither |
| 45 | is a simultaneous native/Rust SMB campaign or physical power-loss test. |