| author | |
| committer | |
| log | c7a3a67441644b41cb53718b670c1315d096e56a |
| tree | 52cb6336b334d00ba47a30872b97921a3a550e5c |
| parent | 8f943380df58facba8f67538e833f1e7f86a515a |
| signature | Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU |
Take the parent, all, features and leading-parent outputs of
delete_pages_permanently, let OneNote 2010 create a titled page with a bold
body in each section through COM, and reopen each natively saved section
through a fresh cache. Every surviving page keeps its exact active revision
through both native phases; the native page carries its title and body; the
cold reopen changes only the section root's navigation metadata copies or
nothing at all. tools/test_page_removal.py compares all eight captures with
the Rust model and finds the native title once per hierarchy. Eight owned
clones removed. Acceptance: evidence/m10/PAGE-MODEL.md.
Assisted-by: claude-fable-5.1205 files changed, 2424 insertions(+), 281 deletions(-)
.gitignore-1| ... | ... | @@ -2,7 +2,6 @@ |
| 2 | 2 | /corpus/private/ |
| 3 | 3 | /corpus/recovered/ |
| 4 | 4 | /evidence/ |
| 5 | /.DS_Store | |
| 6 | 5 | __pycache__/ |
| 7 | 6 | /fuzz/target/ |
| 8 | 7 | /fuzz/corpus/ |
corpus/page-lifecycle/removal/README.md+12| ... | ... | @@ -50,3 +50,15 @@ failure. Decode the input hex into a new writable corpus and set |
| 50 | 50 | the platform path separator, then use `cargo +nightly fuzz run document CORPUS -- |
| 51 | 51 | -seed=1993 -max_total_time=120 -timeout=30 -runs=20000`. The target also retains its |
| 52 | 52 | built-in synthetic sources. This is bounded reader testing of these inputs. |
| 53 | ||
| 54 | `rust-followup` takes four Rust `delete_pages_permanently` outputs (`parent`, `all`, | |
| 55 | `features`, `leading-parent`) and lets OneNote 2010 create a titled page with a bold | |
| 56 | body in each section through COM (`tools/native/page-removal-followup.ps1`), then | |
| 57 | reopens the natively saved section through a fresh cache. The Rust test | |
| 58 | `native_pages_created_after_rust_removal_reopen_cold` requires every surviving page | |
| 59 | to keep its exact active revision through both native phases, the new page to carry | |
| 60 | the native title and body, and the cold reopen to change no object space. | |
| 61 | `tools/test_page_removal.py` compares both captures' native XML with the Rust model | |
| 62 | and finds the native title exactly once in each hierarchy. Regenerate the candidates | |
| 63 | with `ONESTORE_PAGE_REMOVAL_OUTPUT` on the removal reference test, then run the | |
| 64 | runner with `--author` into `followup` and cold into `followup-cold`. |
corpus/page-lifecycle/removal/rust-followup/all/candidate/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/all/candidate/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/all/candidate/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/all/candidate/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/commands.jsonl created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-9D41F146 -ExpectedPages 1", "exit": 0, "stdout": "Read 1 sections and 1 pages.\r\n", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-9d41f146", "hostname": "ONE-M6-9D41F146"} |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/all/followup-cold/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/all/followup-cold/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-9D41F146", | |
| 5 | "cold": true, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{25934258-59D3-4BDE-AC72-E15FFD6686EF}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:38:32.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{42009BC8-CAC0-0ABF-2724-B6687B3DFF98}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:38:32.000Z" color="#91BAAE"><one:Page ID="{B7C37E10-3B18-4553-9CDD-EC76B971CDC2}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:35:10.000Z" lastModifiedTime="2026-09-11T07:38:32.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/read/page-000.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{B7C37E10-3B18-4553-9CDD-EC76B971CDC2}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:35:10.000Z" lastModifiedTime="2026-09-11T07:38:32.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:35:11.000Z" lastModifiedTime="2026-09-11T07:35:12.000Z" objectID="{947ACBF9-6A02-44DD-BA46-AD72D84B24B9}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:35:13.000Z" objectID="{947ACBF9-6A02-44DD-BA46-AD72D84B24B9}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:35:12.000Z" lastModifiedTime="2026-09-11T07:35:12.000Z" objectID="{947ACBF9-6A02-44DD-BA46-AD72D84B24B9}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/run.json created+18| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/all/followup/notebook", | |
| 3 | "expected_pages": 1, | |
| 4 | "author": null, | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 16 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 17 | } | |
| 18 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 71048, | |
| 5 | "sha256": "36a33c1d7f8a13d93f6bcb0ea9431d5524a1f43aa8a8e121dc2c735e076cc029", | |
| 6 | "mtime_ns": 1789112222791725210 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "0f15237414704e35cc85965841e1388fb91d2150e1eb2f41981256649e72cd40", | |
| 12 | "mtime_ns": 1789112222791871294 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup-cold/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/all/followup/commands.jsonl created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\author.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-4C5FF100", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-4C5FF100 -ExpectedPages 1 -UseCurrentCache", "exit": 0, "stdout": "Read 1 sections and 1 pages.\r\n", "stderr": "", "error": null} | |
| 4 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/all/followup/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-4c5ff100", "hostname": "ONE-M6-4C5FF100"} |
corpus/page-lifecycle/removal/rust-followup/all/followup/native-title.txt created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | Native after Rust removal 🦋 é | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/all/followup/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/all/followup/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/all/followup/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/all/followup/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-4C5FF100", | |
| 5 | "cold": false, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{D958EE90-492E-40A1-A1F6-A67D8A40674C}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:36:47.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{5877315E-7E62-004F-2E1B-2E4298A4685C}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:36:47.000Z" color="#91BAAE"><one:Page ID="{ADB4D486-8FBA-4FA3-95E2-745C5AE85A06}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:35:10.000Z" lastModifiedTime="2026-09-11T07:36:47.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/all/followup/read/page-000.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{ADB4D486-8FBA-4FA3-95E2-745C5AE85A06}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:35:10.000Z" lastModifiedTime="2026-09-11T07:36:47.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:35:11.000Z" lastModifiedTime="2026-09-11T07:35:12.000Z" objectID="{8E0D616F-DEA0-4E2D-B379-35583BD2B37D}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:35:13.000Z" objectID="{8E0D616F-DEA0-4E2D-B379-35583BD2B37D}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:35:12.000Z" lastModifiedTime="2026-09-11T07:35:12.000Z" objectID="{8E0D616F-DEA0-4E2D-B379-35583BD2B37D}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/all/followup/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup/run.json created+19| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/all/candidate/notebook", | |
| 3 | "expected_pages": 1, | |
| 4 | "author": "tools/native/page-removal-followup.ps1", | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "author.ps1": "6e6bd74f0460457118d436345350c38594c52bd9199fb4a1e31efec3b3e954fd", | |
| 16 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 17 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 18 | } | |
| 19 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup/scripts/author.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [Parameter(Mandatory=$true)][string]$CloneHost) | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | & "$PSScriptRoot\cold-current.ps1" -Root $Root -CloneHost $CloneHost | |
| 5 | $app = New-Object -ComObject OneNote.Application | |
| 6 | $notebook = '' | |
| 7 | try { | |
| 8 | $app.OpenHierarchy((Join-Path $Root 'notebook'), '', [ref]$notebook, 0) | |
| 9 | $section = '' | |
| 10 | $app.OpenHierarchy('Lifecycle.one', $notebook, [ref]$section, 0) | |
| 11 | $page = '' | |
| 12 | $app.CreateNewPage($section, [ref]$page, 2) | |
| 13 | $title = 'Native after Rust removal ' + [char]::ConvertFromUtf32(0x1F98B) + ' e' + [char]0x0301 | |
| 14 | $xml = '<one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="' + $page + '"><one:Title><one:OE><one:T><![CDATA[' + $title + ']]></one:T></one:OE></one:Title><one:Outline><one:OEChildren><one:OE><one:T><![CDATA[<b>Native body after Rust removal.</b>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page>' | |
| 15 | $app.UpdatePageContent($xml, [DateTime]::MinValue, 1, $false) | |
| 16 | $app.SyncHierarchy($notebook) | |
| 17 | [IO.File]::WriteAllText("$Root\native-title.txt", $title, [Text.Encoding]::UTF8) | |
| 18 | } finally { | |
| 19 | try { if ($notebook) { $app.CloseNotebook($notebook, $false) } } | |
| 20 | finally { | |
| 21 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 22 | $app = $null | |
| 23 | [GC]::Collect() | |
| 24 | [GC]::WaitForPendingFinalizers() | |
| 25 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 120 -ErrorAction SilentlyContinue | |
| 26 | } | |
| 27 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/all/followup/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/all/followup/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 64904, | |
| 5 | "sha256": "645169c4f76dedd0deb0c928a08339479763ae607c21b7f604c21d823eee53eb", | |
| 6 | "mtime_ns": 1789112028773633383 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "0f15237414704e35cc85965841e1388fb91d2150e1eb2f41981256649e72cd40", | |
| 12 | "mtime_ns": 1789112028775905222 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/all/followup/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/all/followup/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/features/candidate/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/features/candidate/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/features/candidate/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/features/candidate/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/commands.jsonl created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-53651AB4 -ExpectedPages 7", "exit": 0, "stdout": "Read 1 sections and 7 pages.\r\n", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-53651ab4", "hostname": "ONE-M6-53651AB4"} |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/features/followup-cold/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/features/followup-cold/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-53651AB4", | |
| 5 | "cold": true, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{E68C7BB3-99DA-4D81-89EC-BB00397F9825}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:46:22.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{20CCBFDB-D3EF-0037-2380-EA6582442D45}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:46:22.000Z" color="#91BAAE"><one:Page ID="{41C8B779-6FBC-0B2B-3601-E3A7D0637D8E}{1}{B0}" name="Image jpg" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:46:21.000Z" pageLevel="1"/><one:Page ID="{E8FA6473-5618-050F-18A6-0B492D19A23F}{1}{B0}" name="Image bmp" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"/><one:Page ID="{8E4D1A16-13C2-00C8-1E6A-365A7C7D2358}{1}{B0}" name="Image gif" dateTime="2026-09-06T02:25:44.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"/><one:Page ID="{8A861B6E-8499-0B73-3633-0470977E9DED}{1}{B0}" name="Image role background=false, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"/><one:Page ID="{5DB7EE41-DE89-0317-1102-7372CF8F799E}{1}{B0}" name="Image role background=true, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"/><one:Page ID="{CA486ACE-B813-0F6C-1432-A87D52A02CAA}{1}{B0}" name="Image role background=false, printout=true" dateTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"/><one:Page ID="{64E4D528-91E6-451D-B7A3-DC422A674404}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:41:47.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-000.xml created+21| ... | ... | @@ -0,0 +1,21 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{41C8B779-6FBC-0B2B-3601-E3A7D0637D8E}{1}{B0}" name="Image jpg" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:46:21.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-06T02:25:42.000Z" objectID="{9FF51156-9861-03CE-0872-7163182D267F}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image jpg]]></one:T></one:OE></one:Title><one:Image format="jpg" hyperlink="https://example.invalid/image/jpg" alt="Pattern jpg" originalPageNumber="0" lastModifiedTime="2026-09-06T02:25:50.000Z" objectID="{9FF51156-9861-03CE-0872-7163182D267F}{39}{B0}"><one:Position x="72.0" y="108.0" z="0"/><one:Size width="144.0" height="48.00000381469727" isSetByUser="true"/><one:Data>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a | |
| 3 | HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy | |
| 4 | MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABAAGADASIA | |
| 5 | AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA | |
| 6 | AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 | |
| 7 | ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm | |
| 8 | p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA | |
| 9 | AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx | |
| 10 | BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK | |
| 11 | U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 | |
| 12 | uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDwhYfa | |
| 13 | plh9qsrD7VMsPtUqRFOqVVh9qmWH2qysPtUyw+1UpHbTqlZYfaplh9qsrD7VMsPtVqR206pVWGpl | |
| 14 | h9qsrDUyw+1UpHbTqlZYalWH2q0sNSrD7VSkdtOqVlh9qmWH2qysPtUyw+1UpHdTqnHrD7VMsPtV | |
| 15 | lYfaplh9q81SPyqnVKqw+1TLD7VZWH2qZYfaqUjtp1SssPtUyw+1WVh9qmWH2qlI7adUqrDUyw+1 | |
| 16 | WVhqZYfarUjtp1SssNSrD7VaWGpVh9qpSO2nVKyw+1TLD7VZWH2qZYfaqUjup1Tj1h9qmWH2qysP | |
| 17 | tUyw+1eapH5VTqlVYfaplh9qsrD7VMsPtVKR206pWWH2qZYfarKw+1TLD7VSkdtOqVVhqZYfarKw | |
| 18 | 1MsPtVqR206pWWGpVh9qtLDUqw+1UpHbTqlZYfaplh9qsrD7VMsPtVKR206px6w+1TLD7VZWH2qZ | |
| 19 | YfavNUj8rp1SqsPtUyw+1WVh9qmWH2qlI7adUrLD7VMsPtVlYfaplh9qpSO2nVKqw1MsPtVlYamW | |
| 20 | H2q1I7adUrLDUqw+1WlhqVYfaqUjtp1SssPtUyw+1WVh9qmWH2qlI7adU//Z | |
| 21 | </one:Data></one:Image></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-001.xml created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{5DB7EE41-DE89-0317-1102-7372CF8F799E}{1}{B0}" name="Image role background=true, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{9B0A6BCD-8E72-0E43-2398-A18348276005}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image role background=true, printout=false]]></one:T></one:OE></one:Title><one:Image format="png" backgroundImage="true" alt="Role pattern" originalPageNumber="2" lastModifiedTime="2026-09-06T02:25:49.000Z" objectID="{9B0A6BCD-8E72-0E43-2398-A18348276005}{39}{B0}"><one:Position x="36.0" y="36.0" z="0"/><one:Size width="288.0" height="192.0" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAwUlEQVR4nO3ZwQ2DQBDF0Hkk/dec | |
| 3 | CuASwXCwtBVY/mYBM3OMznEC4TsfMx1nEALk2o8ACZB/GpJBAiSD3PcgbmICJIM0MVvX/RokQDJI | |
| 4 | E1ODvPOrS5EWIBmkialB1ntcpAVIBmli1rvTRVGAZJAmZj1AvawKkAzSxNQg6zEu0gIkgzQx69Hp | |
| 5 | oihAMkgT85LTn1UBkkGamBpkvcdFWoBkkCZmvTtdFAVIBmli1gPUy6oAySBNTA2yHuMiLUAyyPMT | |
| 6 | +wHXVRp4qDc0HQAAAABJRU5ErkJggg==</one:Data></one:Image><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{9B0A6BCD-8E72-0E43-2398-A18348276005}{41}{B0}"><one:Position x="72.0" y="108.0" z="1"/><one:Size width="146.7475433349609" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{9B0A6BCD-8E72-0E43-2398-A18348276005}{42}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[Foreground role control]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-002.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{64E4D528-91E6-451D-B7A3-DC422A674404}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:41:47.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:41:47.000Z" lastModifiedTime="2026-09-11T07:41:49.000Z" objectID="{58CC5859-22A6-4E2C-B50B-200264ECE496}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:41:50.000Z" objectID="{58CC5859-22A6-4E2C-B50B-200264ECE496}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:41:49.000Z" lastModifiedTime="2026-09-11T07:41:49.000Z" objectID="{58CC5859-22A6-4E2C-B50B-200264ECE496}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-003.xml created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{8A861B6E-8499-0B73-3633-0470977E9DED}{1}{B0}" name="Image role background=false, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{B85156A9-5F53-0AAD-10DE-67D934E04D5F}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image role background=false, printout=false]]></one:T></one:OE></one:Title><one:Image format="png" alt="Role pattern" originalPageNumber="2" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{B85156A9-5F53-0AAD-10DE-67D934E04D5F}{39}{B0}"><one:Position x="36.0" y="36.0" z="0"/><one:Size width="288.0" height="192.0" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAwUlEQVR4nO3ZwQ2DQBDF0Hkk/dec | |
| 3 | CuASwXCwtBVY/mYBM3OMznEC4TsfMx1nEALk2o8ACZB/GpJBAiSD3PcgbmICJIM0MVvX/RokQDJI | |
| 4 | E1ODvPOrS5EWIBmkialB1ntcpAVIBmli1rvTRVGAZJAmZj1AvawKkAzSxNQg6zEu0gIkgzQx69Hp | |
| 5 | oihAMkgT85LTn1UBkkGamBpkvcdFWoBkkCZmvTtdFAVIBmli1gPUy6oAySBNTA2yHuMiLUAyyPMT | |
| 6 | +wHXVRp4qDc0HQAAAABJRU5ErkJggg==</one:Data></one:Image><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{B85156A9-5F53-0AAD-10DE-67D934E04D5F}{41}{B0}"><one:Position x="72.0" y="108.0" z="1"/><one:Size width="146.7475433349609" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{B85156A9-5F53-0AAD-10DE-67D934E04D5F}{42}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[Foreground role control]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-004.xml created+46| ... | ... | @@ -0,0 +1,46 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{8E4D1A16-13C2-00C8-1E6A-365A7C7D2358}{1}{B0}" name="Image gif" dateTime="2026-09-06T02:25:44.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{F5181227-75E8-053B-09CC-A2678C4AAA3B}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image gif]]></one:T></one:OE></one:Title><one:Image format="png" hyperlink="https://example.invalid/image/gif" alt="Pattern gif" originalPageNumber="0" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{F5181227-75E8-053B-09CC-A2678C4AAA3B}{39}{B0}"><one:Position x="72.0" y="108.0" z="0"/><one:Size width="144.0" height="48.00000381469727" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAMAAADS6oI8AAADAFBMVEW4t5mrt5O4qpWrqo6euo2S | |
| 3 | uoeZs4ieqoiSqoK4nJCrnIq4kIyrkIaen4SSn36ZmH+ekH+SkHmGuoGGs395t3pounJos3CGqnx5 | |
| 4 | qnVtqm9iqmqGnHd5nHGGkHN5kG1on2lomGdokGS4hIirhIK4d4Srd32eh3ySh3aZgHeed3eSd3G4 | |
| 5 | a4Cra3m4YHyrYHaea3OSa22eYG+SYGmGh3CGgG55hGloh2FogF+Gd2t5d2Rtd15id1mGa2d5a2CG | |
| 6 | YGN5YF1ta1pia1VoYFRWumlWs2dJt2I4ulo4s1hWqmRJql09qlcyqlImulEaukshs0wKukMKs0Em | |
| 7 | qkwaqkYPqkAEqjtWnF9JnFlWkFtJkFU4n1E4mE84kEwmn0gan0IhmEMmkEMakD0KnzoKmDgKkDVW | |
| 8 | h1hWgFZJhFE4h0k4gEdWd1NJd0w9d0Yyd0FWa09Ja0hWYEtJYEU9a0Iyaz04YDwmh0AahzohgDsK | |
| 9 | hzIKgDAmdzsadzUPdy8EdyomazcaazEmYDMaYC0PaysEayYKYCW4VHirVHK4R3SrR22eV2ySV2aZ | |
| 10 | UGeeR2eSR2G4O3CrO2m4MGyrMGaeO2OSO12eMF+SMFmGV2CGUF55VFloV1FoUE+GR1t5R1RtR05i | |
| 11 | R0mGO1d5O1CGMFN5ME1tO0piO0VoMES4JGirJGK4GGSrGF6eJ1ySJ1aZIFeeGFeSGFG4DmGrDlq4 | |
| 12 | A12rA1eeDlSSDk6eA1CSA0qGJE95JEmGGEt5GEVoJ0FoID9oGDyGDkh5DkGGA0R5Az5tDjtiDjZo | |
| 13 | AzVWVEdJVEE4Vzk4UDdWR0NJRzw9RzYyRzFWOz9JOzhWMDtJMDU9OzIyOy04MCwmVzAaVyohUCsK | |
| 14 | VyIKUCAmRysaRyUPRx8ERxomOycaOyEmMCMaMB0POxsEOxYKMBVWJDdJJDFWGDNJGC04Jyk4ICc4 | |
| 15 | GCRWDjBJDilWAyxJAyY9DiMyDh44Ax0mJyAaJxohIBsmGBsaGBUKJxIKIBAKGA0mDhgaDhImAxQa | |
| 16 | Aw4PDgwEDgcKAwZYdbPqAAAAAWJLR0QAiAUdSAAAAAxjbVBQSkNtcDA3MTIAAAADSABzvAAABjJJ | |
| 17 | REFUWEedkImbTgUcha9ChZl2RUKR0TKTtGiRsZUSEpI0tKm0GoW0WSOjMmNpL82oFG1apJJltNDC | |
| 18 | KKRNURRZytZqRr9zzl2+79779Ty+9w943+ccZ7fPLvGv+N1js9jk8r7HfDFPzCRvktfIDOGEA64/ | |
| 19 | rYD8oUCFVyhPGuAHtqRYUJq0IHFAOFBh7C4Hu/4B//4NfgO/bwGbN4JNm34FC8D7pWD+XDBv3hww | |
| 20 | 8w3w5uvgtVfBjBmvAAf+CvrL6f+HfgXo30L/RurdAP2l9M+lfs4c+t+g/3X6X6U+JiB/egH54wJ/ | |
| 21 | xQ74bUNkAR9a8F5kQeKAaOAvUr5T7CB20Aay5WexTkBPSt8Rb4uXyUvkBfK8cCqkNxL9O3ZIbyQH | |
| 22 | 1klvxATkDwVC/p3btcAPrE8RmJ0U0IAX4wJ/+mDBdoLAeg8E1q5da/f8BGZ7IDBr1iy75y0DeqIB | |
| 23 | U6dOtXueM5wgsM1QYKvhB0wOaE8MmBzAbkyfPl2BadOmmd2A3Qv8QRBAAXoGfiHRwLskEkDB9OGA | |
| 24 | 5H5gm/Rbt8oeDcgeDtgAg/qUAQ7YliJQVoZ7lhjJgZIS/FNcHAkUFeGfwsJC50efH8T34guPMgE5 | |
| 25 | eNajRBSLSWQiKSImB5GA608rIH8osMZbsDppgB9YmmLBlKQFiQPCgTXGj6vBD6vA99+Bz8EXS0HZ | |
| 26 | YrBkyWfgGfDsFFDyNCgungwmTQATx4OicaCw8EHgwL+G/tX0r6JfAfqX0r+YejdA/xT6n6Z+8mT6 | |
| 27 | J9A/nv5x1McE5E8vIH/KQGRAzAI+9Ex0QeKAUOBb8g34mnxFPiWfgI/FIvIUeRI8IR4nD5D7yX1i | |
| 28 | NHECfzRAvxuQXwH63YD8MQH5owEN0II9DWiAuyAxsHJl8NCKFb5/4cLIAg547LHIAj00dmx8YCXh | |
| 29 | QysEBywkuOhDY9GiDwD9ABc9YjwsqCcYMMoYPfpe4HwrvbHckH+ZIb0Bu0G9Ib0BexAoKCiQf8yY | |
| 30 | MdCPGkW9BaD+kiCAAvQMfESigUeJH3gIWAAF04cDkvuB5dIvWyZ7NCB7EKBegQLqUwY4YHmKQH4+ | |
| 31 | 7ulnJAdycxP8iYGcHPyTnZ3tjPQZJoaK2zzyBeSgtUeuaCGakpNIDjE5iARcf1oB+UOBEd6C4UkD | |
| 32 | /ED/FAtaJi1IHBAOjDBGDgfDhoCh94BbwW39Qf4toF+/m0Er0LolyD0btGjRHDRtAk46EeScALKz | |
| 33 | jwcO/CPoH07/EPoVoL8//bdQ7wbob0n/2dQ3b05/E/pPpP8E6mMC8qcXkD9lIDIgZgEfahVdkDgg | |
| 34 | FLib3AXuJHeQm8iN4AZxPTmLnAnOEKeT48ix5BjRkDiBPxqg3w3IrwD9bkD+mID80YAGaMGeBjTA | |
| 35 | XZAYGDw4eGjQIN/ft29kAQc0axZZoIcaN44PDCZ8aJDggL4EF11rXCPoB7joVOMUQT3BgAZGw4ZH | |
| 36 | A+du6Y2BhvwDDOkN2IPANdIbsAeBrKws+Rs1agR9gwbUWwDq2wkCKEDPwHXED/Qhpj6N+IGTgQVQ | |
| 37 | MH04ILkfGCj9gAGyBwHp+/SRPQhQr0AW9SkDHDAwRaBHj/hA3boJ/sRAjRr4p3r16s7VPleIy8Vl | |
| 38 | Hj3EJS5HedQVR4oDyQGkBjE5iARcf1oB+VMF3AG9Qwt6plhQP2mBBuwfF7jKB4XeBI2eHgh0797d | |
| 39 | HroY1PdAoE6dOnbPEQb0RAOqVatm9+xnOEGgl6FAnuEHTA5oTwyYHMBuZGZmKpCRkWF2A3YvcCVB | |
| 40 | AAXoGbiURAP1SCSAgunDAcn9QC/p8/JkjwZkDwdsgEF9ONDN83flgkigffuki2p7/lq1Ei/6v0A3 | |
| 41 | 48quoFcXkHcRuABc2h6cL84jtUG9WuBwcRjJ3Bdk7AP2FnsRB/5u9Helvwv9CtDvBuRXgH43IP9h | |
| 42 | 9O9LvxuQPxqQP72A/DGBzp2DAZ06+f527SILOKBmzcgCDahaNT7QmfChToID2hFcdI7RVtAPcNEh | |
| 43 | xsGCeoIBlQx7h3ST3uhoyN/BkN6APQi0ld6APQhUqVJF/sqVK0NfqZL0jgP1hQQBFKBn4FziB9oQ | |
| 44 | Ux9K/MBBwAIomD4ckNwPdJS+QwfZg4D0bdrIHgSoV6AK9SkDHNAxzQD9sYH/AHAD8Cry1R2MAAAA | |
| 45 | AElFTkSuQmCC | |
| 46 | </one:Data></one:Image></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-005.xml created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{CA486ACE-B813-0F6C-1432-A87D52A02CAA}{1}{B0}" name="Image role background=false, printout=true" dateTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{AF28DBEC-8D1D-07D0-3784-F5E63FC995D0}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image role background=false, printout=true]]></one:T></one:OE></one:Title><one:Image format="png" isPrintOut="true" alt="Role pattern" originalPageNumber="2" lastModifiedTime="2026-09-06T02:25:47.000Z" objectID="{AF28DBEC-8D1D-07D0-3784-F5E63FC995D0}{39}{B0}"><one:Position x="36.0" y="36.0" z="0"/><one:Size width="288.0" height="192.0" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAwUlEQVR4nO3ZwQ2DQBDF0Hkk/dec | |
| 3 | CuASwXCwtBVY/mYBM3OMznEC4TsfMx1nEALk2o8ACZB/GpJBAiSD3PcgbmICJIM0MVvX/RokQDJI | |
| 4 | E1ODvPOrS5EWIBmkialB1ntcpAVIBmli1rvTRVGAZJAmZj1AvawKkAzSxNQg6zEu0gIkgzQx69Hp | |
| 5 | oihAMkgT85LTn1UBkkGamBpkvcdFWoBkkCZmvTtdFAVIBmli1gPUy6oAySBNTA2yHuMiLUAyyPMT | |
| 6 | +wHXVRp4qDc0HQAAAABJRU5ErkJggg==</one:Data></one:Image><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{AF28DBEC-8D1D-07D0-3784-F5E63FC995D0}{41}{B0}"><one:Position x="72.0" y="108.0" z="1"/><one:Size width="146.7475433349609" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{AF28DBEC-8D1D-07D0-3784-F5E63FC995D0}{42}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[Foreground role control]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/page-006.xml created+9| ... | ... | @@ -0,0 +1,9 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{E8FA6473-5618-050F-18A6-0B492D19A23F}{1}{B0}" name="Image bmp" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:46:22.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:43.000Z" lastModifiedTime="2026-09-06T02:25:43.000Z" objectID="{B9BE20DD-FF1C-0258-0307-185FC3812D6E}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image bmp]]></one:T></one:OE></one:Title><one:Image format="png" hyperlink="https://example.invalid/image/bmp" alt="Pattern bmp" originalPageNumber="0" lastModifiedTime="2026-09-06T02:25:49.000Z" objectID="{B9BE20DD-FF1C-0258-0307-185FC3812D6E}{39}{B0}"><one:Position x="72.0" y="108.0" z="0"/><one:Size width="144.0" height="48.00000381469727" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAO | |
| 3 | xAAADsQBlSsOGwAAARlJREFUeF7t2VFHQ2EcBvD3PWetVqvVam1ERESMiIiIiL7/J5p9gD1dvF51 | |
| 4 | 8eNcn4uf53n2P1ZLKUOpnkMCtYx0kkAt00F8gkAtsxFQBJpPAEWgxRGgCLScAopAq2NAEWhzAigC | |
| 5 | 3c0ARaD7U0AR6OEMUAR6nAOKQE/ngCLQ8wWgCLRdAIpAL5eAItDrFaAI9LYEFIHerwFFoI8bQBHo | |
| 6 | cwUoAn3dAopA32tAEehnAygKjPu/xjyHBAY0WQDQL+0BBKhtYSVIgiSo6w+xiqmYiqnYX34J2SAb | |
| 7 | ZINskA1qa4EESZAEdW1B15e7g9xBbf2VIAmSICPtDmprgQRJkAR1bUHXl7uD3EFt/ZUgCZIgI+0O | |
| 8 | amuBBEnQP07QDo1OW207QPoWAAAAAElFTkSuQmCC | |
| 9 | </one:Data></one:Image></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/run.json created+18| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/features/followup/notebook", | |
| 3 | "expected_pages": 7, | |
| 4 | "author": null, | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 16 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 17 | } | |
| 18 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 139520, | |
| 5 | "sha256": "4c51e1d89b121d74fc15945b3d4e83698956d274bfa092f21a12a817f3acd95a", | |
| 6 | "mtime_ns": 1789112618636859068 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "f9e4761726171bdc72e946e6742603dd225f2e154298987f36f628b6d8741e78", | |
| 12 | "mtime_ns": 1789112618637055068 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup-cold/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/features/followup/commands.jsonl created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\author.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-49B2CF78", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-49B2CF78 -ExpectedPages 7 -UseCurrentCache", "exit": 0, "stdout": "Read 1 sections and 7 pages.\r\n", "stderr": "", "error": null} | |
| 4 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/features/followup/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-49b2cf78", "hostname": "ONE-M6-49B2CF78"} |
corpus/page-lifecycle/removal/rust-followup/features/followup/native-title.txt created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | Native after Rust removal 🦋 é | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/features/followup/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/features/followup/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/features/followup/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/features/followup/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-49B2CF78", | |
| 5 | "cold": false, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{AD2774F1-8E38-4BDE-B87E-95652A412809}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:43:21.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{1F2E4CD6-2BA5-0702-2F9E-799170BAD2B4}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:43:21.000Z" color="#91BAAE"><one:Page ID="{7E2A4474-97F6-0C1E-3A1F-7053229D827F}{1}{B0}" name="Image jpg" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:43:20.000Z" pageLevel="1"/><one:Page ID="{D718977E-AE52-023A-14B8-98BDDFE75DCE}{1}{B0}" name="Image bmp" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:43:20.000Z" pageLevel="1"/><one:Page ID="{B1AFE91B-EB88-07FD-1274-A5AE8E83DCA9}{1}{B0}" name="Image gif" dateTime="2026-09-06T02:25:44.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1"/><one:Page ID="{B564E863-7CD3-0C46-3A2D-97846580621C}{1}{B0}" name="Image role background=false, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1"/><one:Page ID="{62551D4C-26C3-0422-1D1C-E0863D71866F}{1}{B0}" name="Image role background=true, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1"/><one:Page ID="{F5AA99C3-4059-0859-182C-3B89A05ED35B}{1}{B0}" name="Image role background=false, printout=true" dateTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1"/><one:Page ID="{5B062625-69AC-4228-BBBD-4FB6D899BBF5}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:41:47.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-000.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{5B062625-69AC-4228-BBBD-4FB6D899BBF5}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:41:47.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:41:47.000Z" lastModifiedTime="2026-09-11T07:41:49.000Z" objectID="{672EAB54-DAEC-4919-B915-B3F696121B67}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:41:50.000Z" objectID="{672EAB54-DAEC-4919-B915-B3F696121B67}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:41:49.000Z" lastModifiedTime="2026-09-11T07:41:49.000Z" objectID="{672EAB54-DAEC-4919-B915-B3F696121B67}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-001.xml created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{62551D4C-26C3-0422-1D1C-E0863D71866F}{1}{B0}" name="Image role background=true, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{A4E898C0-7638-0976-2F86-3277BAD99FF4}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image role background=true, printout=false]]></one:T></one:OE></one:Title><one:Image format="png" backgroundImage="true" alt="Role pattern" originalPageNumber="2" lastModifiedTime="2026-09-06T02:25:49.000Z" objectID="{A4E898C0-7638-0976-2F86-3277BAD99FF4}{39}{B0}"><one:Position x="36.0" y="36.0" z="0"/><one:Size width="288.0" height="192.0" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAwUlEQVR4nO3ZwQ2DQBDF0Hkk/dec | |
| 3 | CuASwXCwtBVY/mYBM3OMznEC4TsfMx1nEALk2o8ACZB/GpJBAiSD3PcgbmICJIM0MVvX/RokQDJI | |
| 4 | E1ODvPOrS5EWIBmkialB1ntcpAVIBmli1rvTRVGAZJAmZj1AvawKkAzSxNQg6zEu0gIkgzQx69Hp | |
| 5 | oihAMkgT85LTn1UBkkGamBpkvcdFWoBkkCZmvTtdFAVIBmli1gPUy6oAySBNTA2yHuMiLUAyyPMT | |
| 6 | +wHXVRp4qDc0HQAAAABJRU5ErkJggg==</one:Data></one:Image><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{A4E898C0-7638-0976-2F86-3277BAD99FF4}{41}{B0}"><one:Position x="72.0" y="108.0" z="1"/><one:Size width="146.7475433349609" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{A4E898C0-7638-0976-2F86-3277BAD99FF4}{42}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[Foreground role control]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-002.xml created+21| ... | ... | @@ -0,0 +1,21 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{7E2A4474-97F6-0C1E-3A1F-7053229D827F}{1}{B0}" name="Image jpg" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:43:20.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-06T02:25:42.000Z" objectID="{A017E25B-602B-04FB-046C-E297EAD3D98E}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image jpg]]></one:T></one:OE></one:Title><one:Image format="jpg" hyperlink="https://example.invalid/image/jpg" alt="Pattern jpg" originalPageNumber="0" lastModifiedTime="2026-09-06T02:25:50.000Z" objectID="{A017E25B-602B-04FB-046C-E297EAD3D98E}{39}{B0}"><one:Position x="72.0" y="108.0" z="0"/><one:Size width="144.0" height="48.00000381469727" isSetByUser="true"/><one:Data>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a | |
| 3 | HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy | |
| 4 | MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABAAGADASIA | |
| 5 | AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA | |
| 6 | AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 | |
| 7 | ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm | |
| 8 | p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA | |
| 9 | AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx | |
| 10 | BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK | |
| 11 | U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 | |
| 12 | uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDwhYfa | |
| 13 | plh9qsrD7VMsPtUqRFOqVVh9qmWH2qysPtUyw+1UpHbTqlZYfaplh9qsrD7VMsPtVqR206pVWGpl | |
| 14 | h9qsrDUyw+1UpHbTqlZYalWH2q0sNSrD7VSkdtOqVlh9qmWH2qysPtUyw+1UpHdTqnHrD7VMsPtV | |
| 15 | lYfaplh9q81SPyqnVKqw+1TLD7VZWH2qZYfaqUjtp1SssPtUyw+1WVh9qmWH2qlI7adUqrDUyw+1 | |
| 16 | WVhqZYfarUjtp1SssNSrD7VaWGpVh9qpSO2nVKyw+1TLD7VZWH2qZYfaqUjup1Tj1h9qmWH2qysP | |
| 17 | tUyw+1eapH5VTqlVYfaplh9qsrD7VMsPtVKR206pWWH2qZYfarKw+1TLD7VSkdtOqVVhqZYfarKw | |
| 18 | 1MsPtVqR206pWWGpVh9qtLDUqw+1UpHbTqlZYfaplh9qsrD7VMsPtVKR206px6w+1TLD7VZWH2qZ | |
| 19 | YfavNUj8rp1SqsPtUyw+1WVh9qmWH2qlI7adUrLD7VMsPtVlYfaplh9qpSO2nVKqw1MsPtVlYamW | |
| 20 | H2q1I7adUrLDUqw+1WlhqVYfaqUjtp1SssPtUyw+1WVh9qmWH2qlI7adU//Z | |
| 21 | </one:Data></one:Image></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-003.xml created+46| ... | ... | @@ -0,0 +1,46 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{B1AFE91B-EB88-07FD-1274-A5AE8E83DCA9}{1}{B0}" name="Image gif" dateTime="2026-09-06T02:25:44.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{CAFAE12A-8DA2-020E-05D2-31937EB455CA}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image gif]]></one:T></one:OE></one:Title><one:Image format="png" hyperlink="https://example.invalid/image/gif" alt="Pattern gif" originalPageNumber="0" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{CAFAE12A-8DA2-020E-05D2-31937EB455CA}{39}{B0}"><one:Position x="72.0" y="108.0" z="0"/><one:Size width="144.0" height="48.00000381469727" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAMAAADS6oI8AAADAFBMVEW4t5mrt5O4qpWrqo6euo2S | |
| 3 | uoeZs4ieqoiSqoK4nJCrnIq4kIyrkIaen4SSn36ZmH+ekH+SkHmGuoGGs395t3pounJos3CGqnx5 | |
| 4 | qnVtqm9iqmqGnHd5nHGGkHN5kG1on2lomGdokGS4hIirhIK4d4Srd32eh3ySh3aZgHeed3eSd3G4 | |
| 5 | a4Cra3m4YHyrYHaea3OSa22eYG+SYGmGh3CGgG55hGloh2FogF+Gd2t5d2Rtd15id1mGa2d5a2CG | |
| 6 | YGN5YF1ta1pia1VoYFRWumlWs2dJt2I4ulo4s1hWqmRJql09qlcyqlImulEaukshs0wKukMKs0Em | |
| 7 | qkwaqkYPqkAEqjtWnF9JnFlWkFtJkFU4n1E4mE84kEwmn0gan0IhmEMmkEMakD0KnzoKmDgKkDVW | |
| 8 | h1hWgFZJhFE4h0k4gEdWd1NJd0w9d0Yyd0FWa09Ja0hWYEtJYEU9a0Iyaz04YDwmh0AahzohgDsK | |
| 9 | hzIKgDAmdzsadzUPdy8EdyomazcaazEmYDMaYC0PaysEayYKYCW4VHirVHK4R3SrR22eV2ySV2aZ | |
| 10 | UGeeR2eSR2G4O3CrO2m4MGyrMGaeO2OSO12eMF+SMFmGV2CGUF55VFloV1FoUE+GR1t5R1RtR05i | |
| 11 | R0mGO1d5O1CGMFN5ME1tO0piO0VoMES4JGirJGK4GGSrGF6eJ1ySJ1aZIFeeGFeSGFG4DmGrDlq4 | |
| 12 | A12rA1eeDlSSDk6eA1CSA0qGJE95JEmGGEt5GEVoJ0FoID9oGDyGDkh5DkGGA0R5Az5tDjtiDjZo | |
| 13 | AzVWVEdJVEE4Vzk4UDdWR0NJRzw9RzYyRzFWOz9JOzhWMDtJMDU9OzIyOy04MCwmVzAaVyohUCsK | |
| 14 | VyIKUCAmRysaRyUPRx8ERxomOycaOyEmMCMaMB0POxsEOxYKMBVWJDdJJDFWGDNJGC04Jyk4ICc4 | |
| 15 | GCRWDjBJDilWAyxJAyY9DiMyDh44Ax0mJyAaJxohIBsmGBsaGBUKJxIKIBAKGA0mDhgaDhImAxQa | |
| 16 | Aw4PDgwEDgcKAwZYdbPqAAAAAWJLR0QAiAUdSAAAAAxjbVBQSkNtcDA3MTIAAAADSABzvAAABjJJ | |
| 17 | REFUWEedkImbTgUcha9ChZl2RUKR0TKTtGiRsZUSEpI0tKm0GoW0WSOjMmNpL82oFG1apJJltNDC | |
| 18 | KKRNURRZytZqRr9zzl2+79779Ty+9w943+ccZ7fPLvGv+N1js9jk8r7HfDFPzCRvktfIDOGEA64/ | |
| 19 | rYD8oUCFVyhPGuAHtqRYUJq0IHFAOFBh7C4Hu/4B//4NfgO/bwGbN4JNm34FC8D7pWD+XDBv3hww | |
| 20 | 8w3w5uvgtVfBjBmvAAf+CvrL6f+HfgXo30L/RurdAP2l9M+lfs4c+t+g/3X6X6U+JiB/egH54wJ/ | |
| 21 | xQ74bUNkAR9a8F5kQeKAaOAvUr5T7CB20Aay5WexTkBPSt8Rb4uXyUvkBfK8cCqkNxL9O3ZIbyQH | |
| 22 | 1klvxATkDwVC/p3btcAPrE8RmJ0U0IAX4wJ/+mDBdoLAeg8E1q5da/f8BGZ7IDBr1iy75y0DeqIB | |
| 23 | U6dOtXueM5wgsM1QYKvhB0wOaE8MmBzAbkyfPl2BadOmmd2A3Qv8QRBAAXoGfiHRwLskEkDB9OGA | |
| 24 | 5H5gm/Rbt8oeDcgeDtgAg/qUAQ7YliJQVoZ7lhjJgZIS/FNcHAkUFeGfwsJC50efH8T34guPMgE5 | |
| 25 | eNajRBSLSWQiKSImB5GA608rIH8osMZbsDppgB9YmmLBlKQFiQPCgTXGj6vBD6vA99+Bz8EXS0HZ | |
| 26 | YrBkyWfgGfDsFFDyNCgungwmTQATx4OicaCw8EHgwL+G/tX0r6JfAfqX0r+YejdA/xT6n6Z+8mT6 | |
| 27 | J9A/nv5x1McE5E8vIH/KQGRAzAI+9Ex0QeKAUOBb8g34mnxFPiWfgI/FIvIUeRI8IR4nD5D7yX1i | |
| 28 | NHECfzRAvxuQXwH63YD8MQH5owEN0II9DWiAuyAxsHJl8NCKFb5/4cLIAg547LHIAj00dmx8YCXh | |
| 29 | QysEBywkuOhDY9GiDwD9ABc9YjwsqCcYMMoYPfpe4HwrvbHckH+ZIb0Bu0G9Ib0BexAoKCiQf8yY | |
| 30 | MdCPGkW9BaD+kiCAAvQMfESigUeJH3gIWAAF04cDkvuB5dIvWyZ7NCB7EKBegQLqUwY4YHmKQH4+ | |
| 31 | 7ulnJAdycxP8iYGcHPyTnZ3tjPQZJoaK2zzyBeSgtUeuaCGakpNIDjE5iARcf1oB+UOBEd6C4UkD | |
| 32 | /ED/FAtaJi1IHBAOjDBGDgfDhoCh94BbwW39Qf4toF+/m0Er0LolyD0btGjRHDRtAk46EeScALKz | |
| 33 | jwcO/CPoH07/EPoVoL8//bdQ7wbob0n/2dQ3b05/E/pPpP8E6mMC8qcXkD9lIDIgZgEfahVdkDgg | |
| 34 | FLib3AXuJHeQm8iN4AZxPTmLnAnOEKeT48ix5BjRkDiBPxqg3w3IrwD9bkD+mID80YAGaMGeBjTA | |
| 35 | XZAYGDw4eGjQIN/ft29kAQc0axZZoIcaN44PDCZ8aJDggL4EF11rXCPoB7joVOMUQT3BgAZGw4ZH | |
| 36 | A+du6Y2BhvwDDOkN2IPANdIbsAeBrKws+Rs1agR9gwbUWwDq2wkCKEDPwHXED/Qhpj6N+IGTgQVQ | |
| 37 | MH04ILkfGCj9gAGyBwHp+/SRPQhQr0AW9SkDHDAwRaBHj/hA3boJ/sRAjRr4p3r16s7VPleIy8Vl | |
| 38 | Hj3EJS5HedQVR4oDyQGkBjE5iARcf1oB+VMF3AG9Qwt6plhQP2mBBuwfF7jKB4XeBI2eHgh0797d | |
| 39 | HroY1PdAoE6dOnbPEQb0RAOqVatm9+xnOEGgl6FAnuEHTA5oTwyYHMBuZGZmKpCRkWF2A3YvcCVB | |
| 40 | AAXoGbiURAP1SCSAgunDAcn9QC/p8/JkjwZkDwdsgEF9ONDN83flgkigffuki2p7/lq1Ei/6v0A3 | |
| 41 | 48quoFcXkHcRuABc2h6cL84jtUG9WuBwcRjJ3Bdk7AP2FnsRB/5u9Helvwv9CtDvBuRXgH43IP9h | |
| 42 | 9O9LvxuQPxqQP72A/DGBzp2DAZ06+f527SILOKBmzcgCDahaNT7QmfChToID2hFcdI7RVtAPcNEh | |
| 43 | xsGCeoIBlQx7h3ST3uhoyN/BkN6APQi0ld6APQhUqVJF/sqVK0NfqZL0jgP1hQQBFKBn4FziB9oQ | |
| 44 | Ux9K/MBBwAIomD4ckNwPdJS+QwfZg4D0bdrIHgSoV6AK9SkDHNAxzQD9sYH/AHAD8Cry1R2MAAAA | |
| 45 | AElFTkSuQmCC | |
| 46 | </one:Data></one:Image></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-004.xml created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{B564E863-7CD3-0C46-3A2D-97846580621C}{1}{B0}" name="Image role background=false, printout=false" dateTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{87B3A5A4-A719-0D98-1CC0-F42DC61EB2AE}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image role background=false, printout=false]]></one:T></one:OE></one:Title><one:Image format="png" alt="Role pattern" originalPageNumber="2" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{87B3A5A4-A719-0D98-1CC0-F42DC61EB2AE}{39}{B0}"><one:Position x="36.0" y="36.0" z="0"/><one:Size width="288.0" height="192.0" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAwUlEQVR4nO3ZwQ2DQBDF0Hkk/dec | |
| 3 | CuASwXCwtBVY/mYBM3OMznEC4TsfMx1nEALk2o8ACZB/GpJBAiSD3PcgbmICJIM0MVvX/RokQDJI | |
| 4 | E1ODvPOrS5EWIBmkialB1ntcpAVIBmli1rvTRVGAZJAmZj1AvawKkAzSxNQg6zEu0gIkgzQx69Hp | |
| 5 | oihAMkgT85LTn1UBkkGamBpkvcdFWoBkkCZmvTtdFAVIBmli1gPUy6oAySBNTA2yHuMiLUAyyPMT | |
| 6 | +wHXVRp4qDc0HQAAAABJRU5ErkJggg==</one:Data></one:Image><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{87B3A5A4-A719-0D98-1CC0-F42DC61EB2AE}{41}{B0}"><one:Position x="72.0" y="108.0" z="1"/><one:Size width="146.7475433349609" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-06T02:25:45.000Z" lastModifiedTime="2026-09-06T02:25:45.000Z" objectID="{87B3A5A4-A719-0D98-1CC0-F42DC61EB2AE}{42}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[Foreground role control]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-005.xml created+9| ... | ... | @@ -0,0 +1,9 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{D718977E-AE52-023A-14B8-98BDDFE75DCE}{1}{B0}" name="Image bmp" dateTime="2026-09-06T02:25:42.000Z" lastModifiedTime="2026-09-11T07:43:20.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:43.000Z" lastModifiedTime="2026-09-06T02:25:43.000Z" objectID="{865CD3D0-0756-056D-0F19-8BAB317FD29F}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image bmp]]></one:T></one:OE></one:Title><one:Image format="png" hyperlink="https://example.invalid/image/bmp" alt="Pattern bmp" originalPageNumber="0" lastModifiedTime="2026-09-06T02:25:49.000Z" objectID="{865CD3D0-0756-056D-0F19-8BAB317FD29F}{39}{B0}"><one:Position x="72.0" y="108.0" z="0"/><one:Size width="144.0" height="48.00000381469727" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAO | |
| 3 | xAAADsQBlSsOGwAAARlJREFUeF7t2VFHQ2EcBvD3PWetVqvVam1ERESMiIiIiL7/J5p9gD1dvF51 | |
| 4 | 8eNcn4uf53n2P1ZLKUOpnkMCtYx0kkAt00F8gkAtsxFQBJpPAEWgxRGgCLScAopAq2NAEWhzAigC | |
| 5 | 3c0ARaD7U0AR6OEMUAR6nAOKQE/ngCLQ8wWgCLRdAIpAL5eAItDrFaAI9LYEFIHerwFFoI8bQBHo | |
| 6 | cwUoAn3dAopA32tAEehnAygKjPu/xjyHBAY0WQDQL+0BBKhtYSVIgiSo6w+xiqmYiqnYX34J2SAb | |
| 7 | ZINskA1qa4EESZAEdW1B15e7g9xBbf2VIAmSICPtDmprgQRJkAR1bUHXl7uD3EFt/ZUgCZIgI+0O | |
| 8 | amuBBEnQP07QDo1OW207QPoWAAAAAElFTkSuQmCC | |
| 9 | </one:Data></one:Image></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/page-006.xml created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{F5AA99C3-4059-0859-182C-3B89A05ED35B}{1}{B0}" name="Image role background=false, printout=true" dateTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-11T07:43:21.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{90CA28E1-7557-00E5-3B9A-6612CD376A21}{33}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Image role background=false, printout=true]]></one:T></one:OE></one:Title><one:Image format="png" isPrintOut="true" alt="Role pattern" originalPageNumber="2" lastModifiedTime="2026-09-06T02:25:47.000Z" objectID="{90CA28E1-7557-00E5-3B9A-6612CD376A21}{39}{B0}"><one:Position x="36.0" y="36.0" z="0"/><one:Size width="288.0" height="192.0" isSetByUser="true"/><one:Data>iVBORw0KGgoAAAANSUhEUgAAAGAAAABACAIAAABqVuVZAAAAwUlEQVR4nO3ZwQ2DQBDF0Hkk/dec | |
| 3 | CuASwXCwtBVY/mYBM3OMznEC4TsfMx1nEALk2o8ACZB/GpJBAiSD3PcgbmICJIM0MVvX/RokQDJI | |
| 4 | E1ODvPOrS5EWIBmkialB1ntcpAVIBmli1rvTRVGAZJAmZj1AvawKkAzSxNQg6zEu0gIkgzQx69Hp | |
| 5 | oihAMkgT85LTn1UBkkGamBpkvcdFWoBkkCZmvTtdFAVIBmli1gPUy6oAySBNTA2yHuMiLUAyyPMT | |
| 6 | +wHXVRp4qDc0HQAAAABJRU5ErkJggg==</one:Data></one:Image><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{90CA28E1-7557-00E5-3B9A-6612CD376A21}{41}{B0}"><one:Position x="72.0" y="108.0" z="1"/><one:Size width="146.7475433349609" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-06T02:25:46.000Z" lastModifiedTime="2026-09-06T02:25:46.000Z" objectID="{90CA28E1-7557-00E5-3B9A-6612CD376A21}{42}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[Foreground role control]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/features/followup/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup/run.json created+19| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/features/candidate/notebook", | |
| 3 | "expected_pages": 7, | |
| 4 | "author": "tools/native/page-removal-followup.ps1", | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "author.ps1": "6e6bd74f0460457118d436345350c38594c52bd9199fb4a1e31efec3b3e954fd", | |
| 16 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 17 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 18 | } | |
| 19 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup/scripts/author.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [Parameter(Mandatory=$true)][string]$CloneHost) | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | & "$PSScriptRoot\cold-current.ps1" -Root $Root -CloneHost $CloneHost | |
| 5 | $app = New-Object -ComObject OneNote.Application | |
| 6 | $notebook = '' | |
| 7 | try { | |
| 8 | $app.OpenHierarchy((Join-Path $Root 'notebook'), '', [ref]$notebook, 0) | |
| 9 | $section = '' | |
| 10 | $app.OpenHierarchy('Lifecycle.one', $notebook, [ref]$section, 0) | |
| 11 | $page = '' | |
| 12 | $app.CreateNewPage($section, [ref]$page, 2) | |
| 13 | $title = 'Native after Rust removal ' + [char]::ConvertFromUtf32(0x1F98B) + ' e' + [char]0x0301 | |
| 14 | $xml = '<one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="' + $page + '"><one:Title><one:OE><one:T><![CDATA[' + $title + ']]></one:T></one:OE></one:Title><one:Outline><one:OEChildren><one:OE><one:T><![CDATA[<b>Native body after Rust removal.</b>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page>' | |
| 15 | $app.UpdatePageContent($xml, [DateTime]::MinValue, 1, $false) | |
| 16 | $app.SyncHierarchy($notebook) | |
| 17 | [IO.File]::WriteAllText("$Root\native-title.txt", $title, [Text.Encoding]::UTF8) | |
| 18 | } finally { | |
| 19 | try { if ($notebook) { $app.CloseNotebook($notebook, $false) } } | |
| 20 | finally { | |
| 21 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 22 | $app = $null | |
| 23 | [GC]::Collect() | |
| 24 | [GC]::WaitForPendingFinalizers() | |
| 25 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 120 -ErrorAction SilentlyContinue | |
| 26 | } | |
| 27 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/features/followup/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/features/followup/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 132280, | |
| 5 | "sha256": "266aaf86a29b942255349dc84ec8a8d9691c965aeafd16122326a97b3acb10ee", | |
| 6 | "mtime_ns": 1789112426557088257 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "f9e4761726171bdc72e946e6742603dd225f2e154298987f36f628b6d8741e78", | |
| 12 | "mtime_ns": 1789112426559091346 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/features/followup/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/features/followup/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/leading-parent/candidate/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/leading-parent/candidate/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/leading-parent/candidate/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/leading-parent/candidate/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/commands.jsonl created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-063C5792 -ExpectedPages 9", "exit": 0, "stdout": "Read 1 sections and 9 pages.\r\n", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-063c5792", "hostname": "ONE-M6-063C5792"} |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-063C5792", | |
| 5 | "cold": true, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{F55352BF-6049-4300-B6FD-9CF571401EA6}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:52:54.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{B0F2D5DF-D905-016D-2963-93E5A58CB946}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:52:54.000Z" color="#91BAAE"><one:Page ID="{2E3694C3-15BF-46D5-A768-6D2CBC288F62}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{50C88C2A-9685-096A-3C7E-033D7CC69BD6}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{1AA5F5D9-062E-00F8-283D-031C915650F8}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{3AAA34EA-0FF6-07DA-38A0-C5E86AE4789D}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{FDF566EE-C633-45D8-9BCF-C1166B5F622E}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{96109C4E-F0CF-4FE9-A46F-C34DFC66F634}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{ED59F8AD-A5C6-488B-8FD5-AB4CF8AFDB05}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/><one:Page ID="{2E667D93-0933-428C-85A3-8D54D2B04745}{1}{B0}" name="Same title" dateTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:25.000Z" pageLevel="1"/><one:Page ID="{617FD9B9-50E1-472F-9F75-BFD548622941}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:49:34.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-000.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{1AA5F5D9-062E-00F8-283D-031C915650F8}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{35413002-A97B-0CE1-0357-7BA2BD308E7A}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-001.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{2E3694C3-15BF-46D5-A768-6D2CBC288F62}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{BEE3BF70-1485-457A-9B6D-DDA495A0EC23}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[grandchild]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{BEE3BF70-1485-457A-9B6D-DDA495A0EC23}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="175.9715728759766" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{BEE3BF70-1485-457A-9B6D-DDA495A0EC23}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body grandchild &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-002.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{2E667D93-0933-428C-85A3-8D54D2B04745}{1}{B0}" name="Same title" dateTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:25.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:08.000Z" objectID="{2C7DE4E9-5D95-4819-B79C-475BFC4B59F8}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Same title]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T06:03:08.000Z" objectID="{2C7DE4E9-5D95-4819-B79C-475BFC4B59F8}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="158.2952728271484" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:08.000Z" objectID="{2C7DE4E9-5D95-4819-B79C-475BFC4B59F8}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body parent &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-003.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{3AAA34EA-0FF6-07DA-38A0-C5E86AE4789D}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-004.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{50C88C2A-9685-096A-3C7E-033D7CC69BD6}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{9EBDFD31-AA30-010D-17F9-580DE6B51729}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-005.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{617FD9B9-50E1-472F-9F75-BFD548622941}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:49:34.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:49:35.000Z" lastModifiedTime="2026-09-11T07:49:36.000Z" objectID="{98995A21-2BD5-4490-96D2-5D84A2091F4C}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:49:37.000Z" objectID="{98995A21-2BD5-4490-96D2-5D84A2091F4C}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:49:36.000Z" lastModifiedTime="2026-09-11T07:49:36.000Z" objectID="{98995A21-2BD5-4490-96D2-5D84A2091F4C}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-006.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{96109C4E-F0CF-4FE9-A46F-C34DFC66F634}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{D39E8DC3-FD82-4A5B-B1BE-7F4DB07AE684}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{0721BC33-DF5F-45D9-963A-A1A9DAE11C78}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="160.1752014160156" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{0721BC33-DF5F-45D9-963A-A1A9DAE11C78}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body trailing &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-007.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{ED59F8AD-A5C6-488B-8FD5-AB4CF8AFDB05}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{5A2782E5-0D6C-476A-8D17-7072DBF17816}{14}{B0}"><one:Position x="36.0" y="14.40000057220459" z="0"/><one:Size width="174.3547973632812" height="13.42771625518799"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{5A2782E5-0D6C-476A-8D17-7072DBF17816}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body automatic &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/page-008.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{FDF566EE-C633-45D8-9BCF-C1166B5F622E}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:52:54.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{D00D875A-2088-42A8-8DB1-2154BD09E751}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Renamed &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{9B7AACF0-48B5-4E32-88F1-BE341E69566F}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="170.2942504882812" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{9B7AACF0-48B5-4E32-88F1-BE341E69566F}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body duplicate &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/run.json created+18| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/leading-parent/followup/notebook", | |
| 3 | "expected_pages": 9, | |
| 4 | "author": null, | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 16 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 17 | } | |
| 18 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 83640, | |
| 5 | "sha256": "07d44900cbb3e03c7ccb27fb256afee1601fb2473cfa927b1c3e20aa662c3dd4", | |
| 6 | "mtime_ns": 1789113084012096660 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "99b99375297e299d0dabe97e4c156a1a2249fd0521edebae64ac3221a5955f2c", | |
| 12 | "mtime_ns": 1789113084012236119 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup-cold/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/commands.jsonl created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\author.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-9A847CAB", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-9A847CAB -ExpectedPages 9 -UseCurrentCache", "exit": 0, "stdout": "Read 1 sections and 9 pages.\r\n", "stderr": "", "error": null} | |
| 4 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-9a847cab", "hostname": "ONE-M6-9A847CAB"} |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/native-title.txt created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | Native after Rust removal 🦋 é | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-9A847CAB", | |
| 5 | "cold": false, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{DA6442DA-8D22-4971-8E11-7F0A30A391BE}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:51:09.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{7FFCA482-4DB0-0E7A-2A3A-FFD9B28F0040}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:51:09.000Z" color="#91BAAE"><one:Page ID="{E138E59E-810A-49C2-A431-0110AB2B3664}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{9FC6FD77-0230-067D-3F27-6F016BC522D0}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{D5AB8484-929B-0FEF-2B64-6F208655E9FE}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{F5A445B7-9B43-08CD-3BF9-A9D47DE7C19B}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{32FB17B3-5286-4ACF-9896-AD2A7C5CDB28}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{591EED13-647A-40FE-A736-AF71EB654F32}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{225789F0-3173-479C-8C8C-C770EFAC6203}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/><one:Page ID="{E1680CCE-9D86-4D9B-86FA-E168C5B3FE43}{1}{B0}" name="Same title" dateTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:25.000Z" pageLevel="1"/><one:Page ID="{AE71A8E4-C454-4838-9C2C-D3E95F619047}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:49:34.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-000.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{225789F0-3173-479C-8C8C-C770EFAC6203}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{9529F3B8-99D9-487D-8E4E-1C4ECCF2C110}{14}{B0}"><one:Position x="36.0" y="14.40000057220459" z="0"/><one:Size width="174.3547973632812" height="13.42771625518799"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{9529F3B8-99D9-487D-8E4E-1C4ECCF2C110}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body automatic &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-001.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{32FB17B3-5286-4ACF-9896-AD2A7C5CDB28}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{1F03F607-B43D-4DBF-8EE8-4D68AA0A5E57}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Renamed &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{5474DDAD-DC00-4125-8BA8-D208096AEF69}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="170.2942504882812" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{5474DDAD-DC00-4125-8BA8-D208096AEF69}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body duplicate &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-002.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{591EED13-647A-40FE-A736-AF71EB654F32}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{1C90FC9E-6937-454C-B2E7-1371A7795F82}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{C82FCD6E-4BEA-4ACE-9563-CD95CDE2A57E}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="160.1752014160156" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{C82FCD6E-4BEA-4ACE-9563-CD95CDE2A57E}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body trailing &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-003.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{9FC6FD77-0230-067D-3F27-6F016BC522D0}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{51B38C6C-3E85-0E1A-14A0-3431F1B6AE2F}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-004.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{AE71A8E4-C454-4838-9C2C-D3E95F619047}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:49:34.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:49:35.000Z" lastModifiedTime="2026-09-11T07:49:36.000Z" objectID="{57972B7C-BF60-4B87-958B-31B8B50AA64A}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:49:37.000Z" objectID="{57972B7C-BF60-4B87-958B-31B8B50AA64A}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:49:36.000Z" lastModifiedTime="2026-09-11T07:49:36.000Z" objectID="{57972B7C-BF60-4B87-958B-31B8B50AA64A}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-005.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{D5AB8484-929B-0FEF-2B64-6F208655E9FE}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{FA4F415F-3DCE-03F6-000E-179EAA33377C}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-006.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{E138E59E-810A-49C2-A431-0110AB2B3664}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{71EDCE2D-8030-4A6D-9834-B19882A35525}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[grandchild]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{71EDCE2D-8030-4A6D-9834-B19882A35525}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="175.9715728759766" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{71EDCE2D-8030-4A6D-9834-B19882A35525}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body grandchild &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-007.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{E1680CCE-9D86-4D9B-86FA-E168C5B3FE43}{1}{B0}" name="Same title" dateTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:25.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:08.000Z" objectID="{E37395B4-C920-470E-B4C5-2B67EB48E0FE}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Same title]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T06:03:08.000Z" objectID="{E37395B4-C920-470E-B4C5-2B67EB48E0FE}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="158.2952728271484" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:27.000Z" lastModifiedTime="2026-09-09T06:03:08.000Z" objectID="{E37395B4-C920-470E-B4C5-2B67EB48E0FE}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body parent &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/page-008.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{F5A445B7-9B43-08CD-3BF9-A9D47DE7C19B}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:51:09.000Z" pageLevel="1"><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings></one:Page> |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/run.json created+19| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/leading-parent/candidate/notebook", | |
| 3 | "expected_pages": 9, | |
| 4 | "author": "tools/native/page-removal-followup.ps1", | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "author.ps1": "6e6bd74f0460457118d436345350c38594c52bd9199fb4a1e31efec3b3e954fd", | |
| 16 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 17 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 18 | } | |
| 19 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/scripts/author.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [Parameter(Mandatory=$true)][string]$CloneHost) | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | & "$PSScriptRoot\cold-current.ps1" -Root $Root -CloneHost $CloneHost | |
| 5 | $app = New-Object -ComObject OneNote.Application | |
| 6 | $notebook = '' | |
| 7 | try { | |
| 8 | $app.OpenHierarchy((Join-Path $Root 'notebook'), '', [ref]$notebook, 0) | |
| 9 | $section = '' | |
| 10 | $app.OpenHierarchy('Lifecycle.one', $notebook, [ref]$section, 0) | |
| 11 | $page = '' | |
| 12 | $app.CreateNewPage($section, [ref]$page, 2) | |
| 13 | $title = 'Native after Rust removal ' + [char]::ConvertFromUtf32(0x1F98B) + ' e' + [char]0x0301 | |
| 14 | $xml = '<one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="' + $page + '"><one:Title><one:OE><one:T><![CDATA[' + $title + ']]></one:T></one:OE></one:Title><one:Outline><one:OEChildren><one:OE><one:T><![CDATA[<b>Native body after Rust removal.</b>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page>' | |
| 15 | $app.UpdatePageContent($xml, [DateTime]::MinValue, 1, $false) | |
| 16 | $app.SyncHierarchy($notebook) | |
| 17 | [IO.File]::WriteAllText("$Root\native-title.txt", $title, [Text.Encoding]::UTF8) | |
| 18 | } finally { | |
| 19 | try { if ($notebook) { $app.CloseNotebook($notebook, $false) } } | |
| 20 | finally { | |
| 21 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 22 | $app = $null | |
| 23 | [GC]::Collect() | |
| 24 | [GC]::WaitForPendingFinalizers() | |
| 25 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 120 -ErrorAction SilentlyContinue | |
| 26 | } | |
| 27 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 76440, | |
| 5 | "sha256": "4aabf26fa4960cf6d99d76c1f76906ef1023f04bf01b65ea07464ac87449ca3e", | |
| 6 | "mtime_ns": 1789112626756437119 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "99b99375297e299d0dabe97e4c156a1a2249fd0521edebae64ac3221a5955f2c", | |
| 12 | "mtime_ns": 1789112626758941541 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/leading-parent/followup/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/parent/candidate/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/parent/candidate/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/parent/candidate/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/parent/candidate/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/commands.jsonl created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-E51EA1B2 -ExpectedPages 9", "exit": 0, "stdout": "Read 1 sections and 9 pages.\r\n", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-e51ea1b2", "hostname": "ONE-M6-E51EA1B2"} |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-E51EA1B2", | |
| 5 | "cold": true, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{FD2D481A-A4F7-4E5D-9FBB-BD075D28FE0B}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:31:55.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{02093461-D398-0A63-0129-3FADA615A564}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:31:55.000Z" color="#91BAAE"><one:Page ID="{E2336D94-9C18-0264-1434-AF757F5F87F4}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/><one:Page ID="{A85E1467-0CB3-0BF6-0077-AF5492CF4CDA}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/><one:Page ID="{8851D554-056B-0CD4-10EA-69A0697D64BF}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/><one:Page ID="{C111B7BE-85E8-4384-9304-19C89503CF96}{1}{B0}" name="child" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="2"/><one:Page ID="{9CCD757D-1F22-4DDB-8F22-C164BFB19340}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="3"/><one:Page ID="{4F0E8750-CCAE-4ED6-B385-6D5E68C67E0C}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/><one:Page ID="{24EB7DF0-FA52-44E7-8C25-6F05FFFFEA16}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/><one:Page ID="{5FA21913-AF5B-4385-A79F-0704FB36C727}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/><one:Page ID="{B8FBEB8C-EAEF-476B-91E6-BEFBC3DAF4F4}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:28:37.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-000.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{24EB7DF0-FA52-44E7-8C25-6F05FFFFEA16}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{61656C7D-F71F-4155-99F4-D305B3E3FAA6}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{B5DA5D8D-D5C2-4ED7-BE70-0DE1D978005A}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="160.1752014160156" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{B5DA5D8D-D5C2-4ED7-BE70-0DE1D978005A}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body trailing &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-001.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{4F0E8750-CCAE-4ED6-B385-6D5E68C67E0C}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{62F666E4-2A15-49A6-A5FB-8D1CBE90FB73}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Renamed &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{29814D4E-4228-453C-A0BB-127C1DF04A4D}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="170.2942504882812" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{29814D4E-4228-453C-A0BB-127C1DF04A4D}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body duplicate &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-002.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{5FA21913-AF5B-4385-A79F-0704FB36C727}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{E8DC635B-07F1-4C64-A55D-DC3AD8686434}{14}{B0}"><one:Position x="36.0" y="14.40000057220459" z="0"/><one:Size width="174.3547973632812" height="13.42771625518799"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{E8DC635B-07F1-4C64-A55D-DC3AD8686434}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body automatic &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-003.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{8851D554-056B-0CD4-10EA-69A0697D64BF}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-004.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{9CCD757D-1F22-4DDB-8F22-C164BFB19340}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="3" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{0C185ECE-1E18-4E74-B327-71EC9639F001}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[grandchild]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{0C185ECE-1E18-4E74-B327-71EC9639F001}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="175.9715728759766" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{0C185ECE-1E18-4E74-B327-71EC9639F001}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body grandchild &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-005.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{A85E1467-0CB3-0BF6-0077-AF5492CF4CDA}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{87BAD1BC-A3E6-07EF-2B1D-D7EABEA99258}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-006.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{B8FBEB8C-EAEF-476B-91E6-BEFBC3DAF4F4}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:28:37.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:28:37.000Z" lastModifiedTime="2026-09-11T07:28:39.000Z" objectID="{FCD7D8E8-F7CD-408A-86C0-BFB0C84F25B4}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:28:40.000Z" objectID="{FCD7D8E8-F7CD-408A-86C0-BFB0C84F25B4}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:28:39.000Z" lastModifiedTime="2026-09-11T07:28:39.000Z" objectID="{FCD7D8E8-F7CD-408A-86C0-BFB0C84F25B4}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-007.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{C111B7BE-85E8-4384-9304-19C89503CF96}{1}{B0}" name="child" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="2" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-09T03:09:29.000Z" objectID="{4B45C2CD-67C5-472C-BB43-069A2EB81632}{28}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[child]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{4B45C2CD-67C5-472C-BB43-069A2EB81632}{35}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="149.6102294921875" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-09T03:09:29.000Z" objectID="{4B45C2CD-67C5-472C-BB43-069A2EB81632}{36}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body child &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/page-008.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{E2336D94-9C18-0264-1434-AF757F5F87F4}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:31:55.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{2C461C8F-A0AD-0A03-3FB3-F445E52C0B0B}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/run.json created+18| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/parent/followup/notebook", | |
| 3 | "expected_pages": 9, | |
| 4 | "author": null, | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 16 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 17 | } | |
| 18 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 62856, | |
| 5 | "sha256": "e1c9e25eb5bb28c90ecd2f9bd627497489382e485c47efbc38e719880e7c0f3d", | |
| 6 | "mtime_ns": 1789111825549418917 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "a0530a11d189eaf6c64273f6997ca3a2e953ab911798993420b872794d1d3cbc", | |
| 12 | "mtime_ns": 1789111825549583834 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup-cold/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/parent/followup/commands.jsonl created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | {"command": "powershell -NoProfile -Command \"Expand-Archive -LiteralPath C:\\one-tests\\transfer.zip -DestinationPath C:\\one-tests\\runs\\capture\\notebook\"", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 2 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\author.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-E0700600", "exit": 0, "stdout": "", "stderr": "", "error": null} | |
| 3 | {"command": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\\one-tests\\read-current.ps1 -Root C:\\one-tests\\runs\\capture -CloneHost ONE-M6-E0700600 -ExpectedPages 9 -UseCurrentCache", "exit": 0, "stdout": "Read 1 sections and 9 pages.\r\n", "stderr": "", "error": null} | |
| 4 | {"command": "powershell -NoProfile -Command \"Compress-Archive -Force -Path C:\\one-tests\\runs\\capture\\* -DestinationPath C:\\one-tests\\captured.zip\"", "exit": 0, "stdout": "", "stderr": "", "error": null} |
corpus/page-lifecycle/removal/rust-followup/parent/followup/format-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup/geometry-differences.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup/machine.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"name": "m6-e0700600", "hostname": "ONE-M6-E0700600"} |
corpus/page-lifecycle/removal/rust-followup/parent/followup/native-title.txt created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | Native after Rust removal 🦋 é | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup/notebook/Lifecycle.one created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/parent/followup/notebook/Lifecycle.one differ |
corpus/page-lifecycle/removal/rust-followup/parent/followup/notebook/Open Notebook.onetoc2 created| Binary files /dev/null and b/corpus/page-lifecycle/removal/rust-followup/parent/followup/notebook/Open Notebook.onetoc2 differ |
corpus/page-lifecycle/removal/rust-followup/parent/followup/pdf-format-checks.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/environment.json created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | { | |
| 2 | "powershell": "5.1.14409.1005", | |
| 3 | "schema": "xs2010", | |
| 4 | "hostname": "ONE-M6-E0700600", | |
| 5 | "cold": false, | |
| 6 | "onenote": "14.0.4763.1000" | |
| 7 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/hierarchy.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Notebook xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" name="notebook" nickname="notebook" ID="{3DF07BC7-3DBB-47FE-842E-F3AB9B14BD5F}{1}{B0}" path="C:\one-tests\runs\capture\notebook" lastModifiedTime="2026-09-11T07:30:08.000Z" color="#B49EDE"><one:Section name="Lifecycle" ID="{CAC17C94-D03E-0DE4-0A28-8AEA0913946F}{1}{B0}" path="C:\one-tests\runs\capture\notebook\Lifecycle.one" lastModifiedTime="2026-09-11T07:30:08.000Z" color="#91BAAE"><one:Page ID="{2AFB2561-9FBE-05E3-1F35-1A32D059B6FF}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/><one:Page ID="{60965C92-0F15-0C71-0B76-1A133DC97DD1}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/><one:Page ID="{40999DA1-06CD-0B53-1BEB-DCE7C67B55B4}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/><one:Page ID="{09D9FF4B-864E-4403-9805-AC8F3A05FE9D}{1}{B0}" name="child" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="2"/><one:Page ID="{54053D88-1C84-4A5C-8423-742310B7A24B}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="3"/><one:Page ID="{87C6CFA5-CF08-4951-B884-D819C7C04F07}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/><one:Page ID="{EC233505-F9F4-4360-8724-DA4250F9DB1D}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/><one:Page ID="{976A51E6-ACFD-4402-AC9E-B2435430F62C}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/><one:Page ID="{7033A379-E949-40EC-9AE7-0BBC6CDCC5FF}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:28:37.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"/></one:Section></one:Notebook> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-000.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{09D9FF4B-864E-4403-9805-AC8F3A05FE9D}{1}{B0}" name="child" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="2" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-09T03:09:29.000Z" objectID="{838D8A38-6463-40AB-B042-B3DD81BE2739}{28}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[child]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{838D8A38-6463-40AB-B042-B3DD81BE2739}{35}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="149.6102294921875" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-09T03:09:29.000Z" objectID="{838D8A38-6463-40AB-B042-B3DD81BE2739}{36}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body child &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-001.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{2AFB2561-9FBE-05E3-1F35-1A32D059B6FF}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{E48E547A-A30B-0D84-34B2-41024A2A3A00}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-002.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{40999DA1-06CD-0B53-1BEB-DCE7C67B55B4}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-003.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{54053D88-1C84-4A5C-8423-742310B7A24B}{1}{B0}" name="grandchild" dateTime="2026-09-09T03:09:29.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="3" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{C4D0163B-1DBE-49F3-B826-C4AB393FC10A}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[grandchild]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{C4D0163B-1DBE-49F3-B826-C4AB393FC10A}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="175.9715728759766" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{C4D0163B-1DBE-49F3-B826-C4AB393FC10A}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body grandchild &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-004.xml created+2| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{60965C92-0F15-0C71-0B76-1A133DC97DD1}{1}{B0}" name="Untitled page" dateTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1"><one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="17.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:19.000Z" lastModifiedTime="2026-09-09T03:09:19.000Z" objectID="{4F729949-A040-0068-201C-62AD11AFA353}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[]]></one:T></one:OE></one:Title></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-005.xml created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{7033A379-E949-40EC-9AE7-0BBC6CDCC5FF}{1}{B0}" name="Native after Rust removal 🦋 é" dateTime="2026-09-11T07:28:37.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-11T07:28:37.000Z" lastModifiedTime="2026-09-11T07:28:39.000Z" objectID="{341F901D-F46B-470D-8DC1-0AF7674914BF}{32}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Native after Rust removal &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-11T07:28:40.000Z" objectID="{341F901D-F46B-470D-8DC1-0AF7674914BF}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="185.6125946044922" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-11T07:28:39.000Z" lastModifiedTime="2026-09-11T07:28:39.000Z" objectID="{341F901D-F46B-470D-8DC1-0AF7674914BF}{40}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:11.0pt"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold'>Native body after Rust removal.</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-006.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{87C6CFA5-CF08-4951-B884-D819C7C04F07}{1}{B0}" name="Renamed 🦋 é" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{AA3E2E11-29B3-4E21-AEFA-385B1196CA78}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[Renamed &#129419; é]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{E14905BB-418E-42BB-ABBA-A73BB2F67B46}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="170.2942504882812" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{E14905BB-418E-42BB-ABBA-A73BB2F67B46}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body duplicate &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-007.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{976A51E6-ACFD-4402-AC9E-B2435430F62C}{1}{B0}" name="Body automatic 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{20142BAE-0457-4BE3-AE5C-697D776E553F}{14}{B0}"><one:Position x="36.0" y="14.40000057220459" z="0"/><one:Size width="174.3547973632812" height="13.42771625518799"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{20142BAE-0457-4BE3-AE5C-697D776E553F}{15}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body automatic &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/page-008.xml created+4| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | <?xml version="1.0"?> | |
| 2 | <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="{EC233505-F9F4-4360-8724-DA4250F9DB1D}{1}{B0}" name="Body trailing 🦀 é preserved" dateTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-11T07:30:08.000Z" pageLevel="1" lang="en-US"><one:QuickStyleDef index="0" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Title lang="en-US"><one:OE author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" creationTime="2026-09-09T03:09:34.000Z" lastModifiedTime="2026-09-09T03:09:34.000Z" objectID="{A9AD2488-F4B9-46D2-92F5-66421CE5CBAD}{16}{B0}" alignment="left" quickStyleIndex="0" style="font-family:Calibri;font-size:17.0pt"><one:T><![CDATA[]]></one:T></one:OE></one:Title><one:Outline author="virtual" authorInitials="V" lastModifiedBy="virtual" lastModifiedByInitials="V" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{7D121578-D664-4950-B571-B8A6767E3151}{39}{B0}"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:Size width="160.1752014160156" height="13.42771339416504"/><one:OEChildren><one:OE creationTime="2026-09-09T03:09:30.000Z" lastModifiedTime="2026-09-09T03:09:30.000Z" objectID="{7D121578-D664-4950-B571-B8A6767E3151}{40}{B0}" alignment="left" quickStyleIndex="0"><one:T><![CDATA[<span | |
| 3 | style='font-weight:bold' lang=en-US>Body trailing &#129408; é</span><span | |
| 4 | lang=en-US> </span><span style='font-style:italic' lang=x-none>preserved</span>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page> |
corpus/page-lifecycle/removal/rust-followup/parent/followup/read/payloads.json created+3| ... | ... | @@ -0,0 +1,3 @@ |
| 1 | [ | |
| 2 | ||
| 3 | ] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup/run.json created+19| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | { | |
| 2 | "notebook": "/private/tmp/page-removal/run/parent/candidate/notebook", | |
| 3 | "expected_pages": 9, | |
| 4 | "author": "tools/native/page-removal-followup.ps1", | |
| 5 | "author_timeout_seconds": 600, | |
| 6 | "inspect": false, | |
| 7 | "collect_notebook": true, | |
| 8 | "base": { | |
| 9 | "file": "win7-office-base.qcow2", | |
| 10 | "format": "qcow2", | |
| 11 | "sha256": "a1a4f8fab782ee14885ff801ca2f6347c208fdcfc3513637096f314315c89346", | |
| 12 | "virtual_size": 68719476736 | |
| 13 | }, | |
| 14 | "scripts": { | |
| 15 | "author.ps1": "6e6bd74f0460457118d436345350c38594c52bd9199fb4a1e31efec3b3e954fd", | |
| 16 | "cold.ps1": "c177fc72ae6c2634d186f5671a880de20b09f9716532c37c69cb13aa15c7e331", | |
| 17 | "read.ps1": "04013bfcccee40a17e2a225f9b9e96f40a3a8daad9e350609654f8eda3ccbb41" | |
| 18 | } | |
| 19 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup/scripts/author.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [Parameter(Mandatory=$true)][string]$CloneHost) | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | & "$PSScriptRoot\cold-current.ps1" -Root $Root -CloneHost $CloneHost | |
| 5 | $app = New-Object -ComObject OneNote.Application | |
| 6 | $notebook = '' | |
| 7 | try { | |
| 8 | $app.OpenHierarchy((Join-Path $Root 'notebook'), '', [ref]$notebook, 0) | |
| 9 | $section = '' | |
| 10 | $app.OpenHierarchy('Lifecycle.one', $notebook, [ref]$section, 0) | |
| 11 | $page = '' | |
| 12 | $app.CreateNewPage($section, [ref]$page, 2) | |
| 13 | $title = 'Native after Rust removal ' + [char]::ConvertFromUtf32(0x1F98B) + ' e' + [char]0x0301 | |
| 14 | $xml = '<one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="' + $page + '"><one:Title><one:OE><one:T><![CDATA[' + $title + ']]></one:T></one:OE></one:Title><one:Outline><one:OEChildren><one:OE><one:T><![CDATA[<b>Native body after Rust removal.</b>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page>' | |
| 15 | $app.UpdatePageContent($xml, [DateTime]::MinValue, 1, $false) | |
| 16 | $app.SyncHierarchy($notebook) | |
| 17 | [IO.File]::WriteAllText("$Root\native-title.txt", $title, [Text.Encoding]::UTF8) | |
| 18 | } finally { | |
| 19 | try { if ($notebook) { $app.CloseNotebook($notebook, $false) } } | |
| 20 | finally { | |
| 21 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 22 | $app = $null | |
| 23 | [GC]::Collect() | |
| 24 | [GC]::WaitForPendingFinalizers() | |
| 25 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 120 -ErrorAction SilentlyContinue | |
| 26 | } | |
| 27 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup/scripts/cold.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [string]$CloneHost = '') | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 5 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 6 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 7 | } | |
| 8 | if (Get-Process ONENOTE -ErrorAction SilentlyContinue) { throw 'Close OneNote before resetting its test cache.' } | |
| 9 | $key = 'HKCU:\Software\Microsoft\Office\14.0\OneNote' | |
| 10 | if ($CloneHost) { | |
| 11 | if ($CloneHost -notmatch '^ONE-[A-Z0-9-]+$' -or [Environment]::MachineName -ne $CloneHost) { | |
| 12 | throw 'The disposable clone hostname does not match this machine.' | |
| 13 | } | |
| 14 | New-Item "$key\Options\Paths" -Force | Out-Null | |
| 15 | New-ItemProperty "$key\Options\Paths" -Name UnfiledNotesSection -PropertyType ExpandString -Value 'C:\one-tests\Loose.one' -Force | Out-Null | |
| 16 | } elseif ((Get-ItemProperty "$key\Options\Paths").UnfiledNotesSection -ne 'C:\one-tests\Loose.one' -or | |
| 17 | -not (Test-Path 'C:\one-tests\profile-original-cache')) { | |
| 18 | throw 'Park the personal OneNote profile before resetting the test cache.' | |
| 19 | } | |
| 20 | $cache = Join-Path $env:LOCALAPPDATA 'Microsoft\OneNote\14.0' | |
| 21 | $parked = Join-Path 'C:\one-tests\caches' ([IO.Path]::GetFileName($root)) | |
| 22 | if (Test-Path $parked) { throw 'Choose a new run; its parked cache already exists.' } | |
| 23 | New-Item -ItemType Directory -Path 'C:\one-tests\caches' -Force | Out-Null | |
| 24 | if (Test-Path $cache) { Move-Item -LiteralPath $cache -Destination $parked } | |
| 25 | if (Test-Path "$key\OpenNotebooks") { Remove-Item "$key\OpenNotebooks" -Recurse } | |
| 26 | New-Item "$key\OpenNotebooks" | Out-Null | |
| 27 | New-ItemProperty "$key\OpenNotebooks" -Name '1' -PropertyType String -Value "$root\notebook" | Out-Null |
corpus/page-lifecycle/removal/rust-followup/parent/followup/scripts/read.ps1 created+142| ... | ... | @@ -0,0 +1,142 @@ |
| 1 | param( | |
| 2 | [Parameter(Mandatory=$true)][string]$Root, | |
| 3 | [int]$ExpectedPages = -1, | |
| 4 | [switch]$UseCurrentCache, | |
| 5 | [switch]$Pdf, | |
| 6 | [switch]$KeepOpen, | |
| 7 | [string]$CloneHost = '' | |
| 8 | ) | |
| 9 | Set-StrictMode -Version Latest | |
| 10 | $ErrorActionPreference = 'Stop' | |
| 11 | $root = [IO.Path]::GetFullPath($Root).TrimEnd('\') | |
| 12 | if ([IO.Path]::GetDirectoryName($root) -ne 'C:\one-tests\runs') { | |
| 13 | throw 'Choose a run directly below C:\one-tests\runs.' | |
| 14 | } | |
| 15 | $notebook = Join-Path $root 'notebook' | |
| 16 | $output = Join-Path $root 'read' | |
| 17 | if (Test-Path $output) { throw 'Choose a new read destination.' } | |
| 18 | if ($UseCurrentCache) { | |
| 19 | if ((Get-ItemProperty 'HKCU:\Software\Microsoft\Office\14.0\OneNote\Options\Paths').UnfiledNotesSection -ne 'C:\one-tests\Loose.one') { | |
| 20 | throw 'Park the personal OneNote profile before reading test notebooks.' | |
| 21 | } | |
| 22 | } else { | |
| 23 | & "$PSScriptRoot\cold-current.ps1" -Root $root -CloneHost $CloneHost | |
| 24 | } | |
| 25 | New-Item -ItemType Directory -Path $output | Out-Null | |
| 26 | $app = New-Object -ComObject OneNote.Application | |
| 27 | $notebookId = '' | |
| 28 | $failure = $null | |
| 29 | try { | |
| 30 | $app.OpenHierarchy($notebook, '', [ref]$notebookId, 0) | |
| 31 | $process = Get-Process ONENOTE | |
| 32 | @{ hostname = [Environment]::MachineName; onenote = $process.MainModule.FileVersionInfo.FileVersion; | |
| 33 | powershell = $PSVersionTable.PSVersion.ToString(); schema = 'xs2010'; cold = (-not $UseCurrentCache.IsPresent) } | | |
| 34 | ConvertTo-Json | Set-Content (Join-Path $output 'environment.json') -Encoding UTF8 | |
| 35 | $sections = @() | |
| 36 | foreach ($file in @(Get-ChildItem $notebook -Recurse | Where-Object { $_.Extension -eq '.one' })) { | |
| 37 | $id = '' | |
| 38 | $app.OpenHierarchy($file.FullName, '', [ref]$id, 0) | |
| 39 | $sections += $id | |
| 40 | } | |
| 41 | $deadline = [DateTime]::UtcNow.AddSeconds(300) | |
| 42 | $previous = '' | |
| 43 | $lastChange = '' | |
| 44 | $stableSince = [DateTime]::UtcNow | |
| 45 | $settled = $false | |
| 46 | do { | |
| 47 | $pages = @{} | |
| 48 | foreach ($section in $sections) { | |
| 49 | $hierarchy = '' | |
| 50 | $app.GetHierarchy($section, 4, [ref]$hierarchy, 1) | |
| 51 | [xml]$xml = $hierarchy | |
| 52 | foreach ($node in $xml.SelectNodes('//*[@path]')) { | |
| 53 | if (-not $node.GetAttribute('path').StartsWith("$notebook\", [StringComparison]::OrdinalIgnoreCase)) { | |
| 54 | throw 'OneNote opened a section outside the copied notebook.' | |
| 55 | } | |
| 56 | } | |
| 57 | foreach ($node in $xml.SelectNodes('//*[local-name()="Page"]')) { | |
| 58 | $id = $node.GetAttribute('ID') | |
| 59 | $content = '' | |
| 60 | $app.GetPageContent($id, [ref]$content, 1, 1) | |
| 61 | $pages[$id] = $content | |
| 62 | } | |
| 63 | } | |
| 64 | $signature = [String]::Join('|', @($pages.Keys | Sort-Object | ForEach-Object { $_ + $pages[$_] })) | |
| 65 | if ($signature -ne $previous) { | |
| 66 | $lastChange = $previous | |
| 67 | $previous = $signature | |
| 68 | $stableSince = [DateTime]::UtcNow | |
| 69 | } | |
| 70 | if ((($ExpectedPages -ge 0 -and $pages.Count -eq $ExpectedPages) -or | |
| 71 | ($ExpectedPages -lt 0 -and $pages.Count -gt 0)) -and | |
| 72 | ([DateTime]::UtcNow - $stableSince).TotalSeconds -ge 2) { $settled = $true; break } | |
| 73 | Start-Sleep -Milliseconds 250 | |
| 74 | } while ([DateTime]::UtcNow -lt $deadline) | |
| 75 | if (-not $settled -or ($ExpectedPages -ge 0 -and $pages.Count -ne $ExpectedPages) -or ($ExpectedPages -lt 0 -and $pages.Count -eq 0)) { | |
| 76 | [IO.File]::WriteAllText((Join-Path $output 'previous-signature.txt'), $lastChange, [Text.Encoding]::UTF8) | |
| 77 | $index = 0 | |
| 78 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 79 | [IO.File]::WriteAllText((Join-Path $output ('unsettled-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 80 | $index++ | |
| 81 | } | |
| 82 | $hierarchy = '' | |
| 83 | $app.GetHierarchy($notebookId, 4, [ref]$hierarchy, 1) | |
| 84 | [IO.File]::WriteAllText((Join-Path $output 'unsettled-hierarchy.xml'), $hierarchy, [Text.Encoding]::UTF8) | |
| 85 | throw "Expected $ExpectedPages stable pages; OneNote returned $($pages.Count), settled=$settled." | |
| 86 | } | |
| 87 | $index = 0 | |
| 88 | $payloads = @() | |
| 89 | foreach ($id in @($pages.Keys | Sort-Object)) { | |
| 90 | [IO.File]::WriteAllText((Join-Path $output ('page-{0:d3}.xml' -f $index)), $pages[$id], [Text.Encoding]::UTF8) | |
| 91 | if ($Pdf) { | |
| 92 | $pdfPath = Join-Path $output ('page-{0:d3}.pdf' -f $index) | |
| 93 | $app.NavigateTo($id, '', $false) | |
| 94 | $app.Publish($id, $pdfPath, 3, '') | |
| 95 | if (-not (Test-Path $pdfPath) -or (Get-Item $pdfPath).Length -eq 0) { throw 'OneNote did not publish the page PDF.' } | |
| 96 | } | |
| 97 | [xml]$page = $pages[$id] | |
| 98 | foreach ($file in $page.SelectNodes('//*[local-name()="InsertedFile" or local-name()="MediaFile"]')) { | |
| 99 | $bytes = [IO.File]::ReadAllBytes($file.GetAttribute('pathCache')) | |
| 100 | $hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($bytes)).Replace('-', '').ToLowerInvariant() | |
| 101 | [IO.File]::WriteAllBytes((Join-Path $output ($hash + '.attachment')), $bytes) | |
| 102 | $payloads += @{ page = $id; object = $file.ParentNode.GetAttribute('objectID'); | |
| 103 | kind = $file.LocalName; name = $file.GetAttribute('preferredName'); | |
| 104 | sha256 = $hash; bytes = $bytes.Length } | |
| 105 | } | |
| 106 | $index++ | |
| 107 | } | |
| 108 | [IO.File]::WriteAllText((Join-Path $output 'payloads.json'), (ConvertTo-Json -InputObject $payloads -Depth 4), [Text.Encoding]::UTF8) | |
| 109 | $all = '' | |
| 110 | $app.GetHierarchy($notebookId, 4, [ref]$all, 1) | |
| 111 | [xml]$finalTree = $all | |
| 112 | $finalIds = @($finalTree.SelectNodes('//*[local-name()="Page"]') | ForEach-Object { $_.GetAttribute('ID') } | Sort-Object -Unique) | |
| 113 | if ($finalIds.Count -ne $pages.Count -or @($finalIds | Where-Object { -not $pages.ContainsKey($_) }).Count -ne 0) { | |
| 114 | throw 'The notebook hierarchy changed while collecting page evidence; repeat the cold read.' | |
| 115 | } | |
| 116 | [IO.File]::WriteAllText((Join-Path $output 'hierarchy.xml'), $all, [Text.Encoding]::UTF8) | |
| 117 | Write-Output "Read $($sections.Count) sections and $($pages.Count) pages." | |
| 118 | } catch { | |
| 119 | $failure = $_ | |
| 120 | [IO.File]::WriteAllText((Join-Path $output 'failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 121 | throw | |
| 122 | } finally { | |
| 123 | try { | |
| 124 | try { | |
| 125 | if ($notebookId -and $CloneHost) { $app.SyncHierarchy($notebookId) } | |
| 126 | if ($notebookId -and -not $KeepOpen -and (-not $UseCurrentCache -or $CloneHost)) { | |
| 127 | $app.CloseNotebook($notebookId, $false) | |
| 128 | } | |
| 129 | } catch { | |
| 130 | if ($null -eq $failure) { throw } | |
| 131 | [IO.File]::WriteAllText((Join-Path $output 'cleanup-failure.txt'), ($_ | Out-String), [Text.Encoding]::UTF8) | |
| 132 | } | |
| 133 | } finally { | |
| 134 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 135 | } | |
| 136 | $app = $null | |
| 137 | [GC]::Collect() | |
| 138 | [GC]::WaitForPendingFinalizers() | |
| 139 | if (-not $UseCurrentCache -and -not $CloneHost) { | |
| 140 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 10 | |
| 141 | } | |
| 142 | } |
corpus/page-lifecycle/removal/rust-followup/parent/followup/source.json created+14| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | [ | |
| 2 | { | |
| 3 | "path": "Lifecycle.one", | |
| 4 | "bytes": 56688, | |
| 5 | "sha256": "f7b163e466afb5c13530beefd2bb7b3303f08ed42f5a6f817a805abf7005d65b", | |
| 6 | "mtime_ns": 1789111621160316671 | |
| 7 | }, | |
| 8 | { | |
| 9 | "path": "Open Notebook.onetoc2", | |
| 10 | "bytes": 4800, | |
| 11 | "sha256": "a0530a11d189eaf6c64273f6997ca3a2e953ab911798993420b872794d1d3cbc", | |
| 12 | "mtime_ns": 1789111621162916678 | |
| 13 | } | |
| 14 | ] |
corpus/page-lifecycle/removal/rust-followup/parent/followup/table-autofit.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | [] | |
| \ No newline at end of file |
corpus/page-lifecycle/removal/rust-followup/parent/followup/teardown.json created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | {"absent": true} |
corpus/page-lifecycle/removal/rust-followup/provenance.json created+77| ... | ... | @@ -0,0 +1,77 @@ |
| 1 | { | |
| 2 | "generator": "ONESTORE_PAGE_REMOVAL_OUTPUT on removal_matches_all_native_cases_and_retains_every_old_revision", | |
| 3 | "author_script": "tools/native/page-removal-followup.ps1", | |
| 4 | "cases": { | |
| 5 | "parent": { | |
| 6 | "candidate_sha256": "f7b163e466afb5c13530beefd2bb7b3303f08ed42f5a6f817a805abf7005d65b", | |
| 7 | "captures": { | |
| 8 | "followup": { | |
| 9 | "clone": "m6-e0700600", | |
| 10 | "teardown_absent": true, | |
| 11 | "notebook_sha256": "e1c9e25eb5bb28c90ecd2f9bd627497489382e485c47efbc38e719880e7c0f3d", | |
| 12 | "pages": 9 | |
| 13 | }, | |
| 14 | "followup-cold": { | |
| 15 | "clone": "m6-e51ea1b2", | |
| 16 | "teardown_absent": true, | |
| 17 | "notebook_sha256": "253fde4f872bb302632de20eb977180114ab1776d6032cc4e9e46905ff3e6366", | |
| 18 | "pages": 9 | |
| 19 | } | |
| 20 | } | |
| 21 | }, | |
| 22 | "all": { | |
| 23 | "candidate_sha256": "645169c4f76dedd0deb0c928a08339479763ae607c21b7f604c21d823eee53eb", | |
| 24 | "captures": { | |
| 25 | "followup": { | |
| 26 | "clone": "m6-4c5ff100", | |
| 27 | "teardown_absent": true, | |
| 28 | "notebook_sha256": "36a33c1d7f8a13d93f6bcb0ea9431d5524a1f43aa8a8e121dc2c735e076cc029", | |
| 29 | "pages": 1 | |
| 30 | }, | |
| 31 | "followup-cold": { | |
| 32 | "clone": "m6-9d41f146", | |
| 33 | "teardown_absent": true, | |
| 34 | "notebook_sha256": "36a33c1d7f8a13d93f6bcb0ea9431d5524a1f43aa8a8e121dc2c735e076cc029", | |
| 35 | "pages": 1 | |
| 36 | } | |
| 37 | } | |
| 38 | }, | |
| 39 | "features": { | |
| 40 | "candidate_sha256": "266aaf86a29b942255349dc84ec8a8d9691c965aeafd16122326a97b3acb10ee", | |
| 41 | "captures": { | |
| 42 | "followup": { | |
| 43 | "clone": "m6-49b2cf78", | |
| 44 | "teardown_absent": true, | |
| 45 | "notebook_sha256": "4c51e1d89b121d74fc15945b3d4e83698956d274bfa092f21a12a817f3acd95a", | |
| 46 | "pages": 7 | |
| 47 | }, | |
| 48 | "followup-cold": { | |
| 49 | "clone": "m6-53651ab4", | |
| 50 | "teardown_absent": true, | |
| 51 | "notebook_sha256": "5d7d209a9320bcd932879da30bd0b6d54e87b7ee85766037bf69954d3f2d66b0", | |
| 52 | "pages": 7 | |
| 53 | } | |
| 54 | } | |
| 55 | }, | |
| 56 | "leading-parent": { | |
| 57 | "candidate_sha256": "4aabf26fa4960cf6d99d76c1f76906ef1023f04bf01b65ea07464ac87449ca3e", | |
| 58 | "captures": { | |
| 59 | "followup": { | |
| 60 | "clone": "m6-9a847cab", | |
| 61 | "teardown_absent": true, | |
| 62 | "notebook_sha256": "07d44900cbb3e03c7ccb27fb256afee1601fb2473cfa927b1c3e20aa662c3dd4", | |
| 63 | "pages": 9 | |
| 64 | }, | |
| 65 | "followup-cold": { | |
| 66 | "clone": "m6-063c5792", | |
| 67 | "teardown_absent": true, | |
| 68 | "notebook_sha256": "07d44900cbb3e03c7ccb27fb256afee1601fb2473cfa927b1c3e20aa662c3dd4", | |
| 69 | "pages": 9 | |
| 70 | } | |
| 71 | } | |
| 72 | } | |
| 73 | }, | |
| 74 | "rejected_attempts": [ | |
| 75 | "features followup-cold and leading-parent followup first ran while the lab configuration was moving to .env and failed before booting a clone; both were rerun" | |
| 76 | ] | |
| 77 | } |
crates/onestore/tests/page_deletion.rs+77-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | use onestore::{ |
| 2 | 2 | ExGuid, FileDataReference, ObjectData, PreparedEdit, PropertySets, RevisionIndex, Store, |
| 3 | document::Document, | |
| 3 | document::{Document, Kind}, | |
| 4 | 4 | }; |
| 5 | 5 | use std::collections::BTreeSet; |
| 6 | 6 | |
| ... | ... | @@ -177,6 +177,82 @@ fn removal_rejects_duplicate_missing_and_non_page_spaces_without_publication() { |
| 177 | 177 | |
| 178 | 178 | use page_schedule::{current, disk}; |
| 179 | 179 | |
| 180 | /// OneNote created a page in each section after Rust permanently removed pages from it; | |
| 181 | /// the surviving pages keep their revisions through the native save and a cold reopen. | |
| 182 | #[test] | |
| 183 | fn native_pages_created_after_rust_removal_reopen_cold() { | |
| 184 | let root = std::path::Path::new(concat!( | |
| 185 | env!("CARGO_MANIFEST_DIR"), | |
| 186 | "/../../corpus/page-lifecycle/removal/rust-followup" | |
| 187 | )); | |
| 188 | for case in ["parent", "all", "features", "leading-parent"] { | |
| 189 | let read = |phase: &str| { | |
| 190 | std::fs::read(root.join(case).join(phase).join("notebook/Lifecycle.one")).unwrap() | |
| 191 | }; | |
| 192 | let (candidate, followup, cold) = | |
| 193 | (read("candidate"), read("followup"), read("followup-cold")); | |
| 194 | let title = | |
| 195 | std::fs::read_to_string(root.join(case).join("followup/native-title.txt")).unwrap(); | |
| 196 | let title = title.trim_start_matches('\u{feff}').trim_end(); | |
| 197 | let stores = [&candidate, &followup, &cold].map(|bytes| Store::parse(bytes).unwrap()); | |
| 198 | let indexes = stores.each_ref().map(|store| { | |
| 199 | assert!(store.checksum_mismatches.is_empty()); | |
| 200 | let index = RevisionIndex::parse(store).unwrap(); | |
| 201 | index.validate_current().unwrap(); | |
| 202 | index | |
| 203 | }); | |
| 204 | let documents = indexes | |
| 205 | .each_ref() | |
| 206 | .map(|index| Document::parse(index).unwrap()); | |
| 207 | let before = documents[0].pages().unwrap(); | |
| 208 | for (document, index) in documents[1..].iter().zip(&indexes[1..]) { | |
| 209 | let pages = document.pages().unwrap(); | |
| 210 | assert_eq!(pages.len(), before.len() + 1, "{case}"); | |
| 211 | assert_eq!( | |
| 212 | &pages[..before.len()], | |
| 213 | before.as_slice(), | |
| 214 | "{case}: surviving page order" | |
| 215 | ); | |
| 216 | for (sid, _) in &before { | |
| 217 | assert_eq!( | |
| 218 | index.active(*sid).unwrap(), | |
| 219 | indexes[0].active(*sid).unwrap(), | |
| 220 | "{case}: {sid}" | |
| 221 | ); | |
| 222 | } | |
| 223 | let (native, page) = pages[before.len()]; | |
| 224 | let revision = document.active(native).unwrap(); | |
| 225 | let metadata = revision | |
| 226 | .roots | |
| 227 | .get(&2) | |
| 228 | .and_then(|id| revision.nodes.get(id)) | |
| 229 | .unwrap(); | |
| 230 | assert!( | |
| 231 | matches!(&metadata.kind, Kind::Metadata { title: Some(name), .. } if name == title), | |
| 232 | "{case}" | |
| 233 | ); | |
| 234 | let body = revision | |
| 235 | .parents(&[page]) | |
| 236 | .unwrap() | |
| 237 | .into_keys() | |
| 238 | .any(|id| matches!(&revision.nodes[&id].kind, Kind::RichText { text, .. } if text == "Native body after Rust removal.")); | |
| 239 | assert!(body, "{case}: native body"); | |
| 240 | } | |
| 241 | // The section root may gain OneNote's per-series navigation metadata copies on open. | |
| 242 | for sid in indexes[1] | |
| 243 | .spaces | |
| 244 | .keys() | |
| 245 | .filter(|sid| **sid != indexes[1].root) | |
| 246 | { | |
| 247 | assert_eq!( | |
| 248 | indexes[1].active(*sid).unwrap(), | |
| 249 | indexes[2].active(*sid).unwrap(), | |
| 250 | "{case}: cold reopen changed {sid}" | |
| 251 | ); | |
| 252 | } | |
| 253 | } | |
| 254 | } | |
| 255 | ||
| 180 | 256 | #[test] |
| 181 | 257 | fn tombstones_and_first_page_promotion_survive_each_storage_interruption() { |
| 182 | 258 | let leading = include_bytes!( |
tools/codex_usage_report.example.json deleted-18| ... | ... | @@ -1,18 +0,0 @@ |
| 1 | { | |
| 2 | "threadIds": ["01a078fb-d5d2-7ad0-97f0-d14db4e4c94e"], | |
| 3 | "sources": [ | |
| 4 | "/Users/clo/.codex/sessions/2026/09/06/rollout-2026-09-06T16-09-25-01a078fb-d5d2-7ad0-97f0-d14db4e4c94e.jsonl" | |
| 5 | ], | |
| 6 | "boundaries": [ | |
| 7 | { | |
| 8 | "name": "Planning discussion", | |
| 9 | "kind": "discussion", | |
| 10 | "end": "2026-09-07T01:28:56Z" | |
| 11 | }, | |
| 12 | { | |
| 13 | "name": "Canvas goal", | |
| 14 | "kind": "goal", | |
| 15 | "start": "2026-09-07T01:28:56Z" | |
| 16 | } | |
| 17 | ] | |
| 18 | } |
tools/codex_usage_report.mjs deleted-129| ... | ... | @@ -1,129 +0,0 @@ |
| 1 | #!/usr/bin/env node | |
| 2 | ||
| 3 | import { mkdir, readFile, readdir, writeFile } from "node:fs/promises"; | |
| 4 | import { homedir } from "node:os"; | |
| 5 | import { dirname, join, resolve } from "node:path"; | |
| 6 | ||
| 7 | const rates = { input: 10, cached: 1, output: 50 }; | |
| 8 | ||
| 9 | function usageCost(usage) { | |
| 10 | return ((usage.input_tokens - usage.cached_input_tokens) * rates.input | |
| 11 | + usage.cached_input_tokens * rates.cached | |
| 12 | + usage.output_tokens * rates.output) / 1_000_000; | |
| 13 | } | |
| 14 | ||
| 15 | function duration(ms) { | |
| 16 | const seconds = Math.round(ms / 1000); | |
| 17 | const hours = Math.floor(seconds / 3600); | |
| 18 | const minutes = Math.floor((seconds % 3600) / 60); | |
| 19 | const remainder = seconds % 60; | |
| 20 | return hours ? `${hours}h ${minutes}m` : minutes ? `${minutes}m ${remainder}s` : `${remainder}s`; | |
| 21 | } | |
| 22 | ||
| 23 | function unionDuration(intervals) { | |
| 24 | const merged = []; | |
| 25 | for (const interval of intervals.sort((a, b) => a[0] - b[0])) { | |
| 26 | const previous = merged.at(-1); | |
| 27 | if (previous && interval[0] <= previous[1]) previous[1] = Math.max(previous[1], interval[1]); | |
| 28 | else merged.push([...interval]); | |
| 29 | } | |
| 30 | return merged.reduce((total, [start, end]) => total + end - start, 0); | |
| 31 | } | |
| 32 | ||
| 33 | async function filesBelow(root) { | |
| 34 | const entries = await readdir(root, { withFileTypes: true }); | |
| 35 | const nested = await Promise.all(entries.map((entry) => { | |
| 36 | const path = join(root, entry.name); | |
| 37 | return entry.isDirectory() ? filesBelow(path) : entry.name.endsWith(".jsonl") ? [path] : []; | |
| 38 | })); | |
| 39 | return nested.flat(); | |
| 40 | } | |
| 41 | ||
| 42 | async function loadEvents(paths) { | |
| 43 | const events = []; | |
| 44 | for (const path of paths) { | |
| 45 | for (const line of (await readFile(path, "utf8")).trim().split("\n")) { | |
| 46 | if (!line) continue; | |
| 47 | try { events.push(JSON.parse(line)); } catch { /* Ignore a partially-written final line. */ } | |
| 48 | } | |
| 49 | } | |
| 50 | return events; | |
| 51 | } | |
| 52 | ||
| 53 | function snapshotBefore(records, time) { | |
| 54 | return records.filter((record) => Date.parse(record.timestamp) <= time).at(-1)?.payload.thread_token_usage; | |
| 55 | } | |
| 56 | ||
| 57 | function taskRows(events, start, end) { | |
| 58 | const tasks = new Map(); | |
| 59 | for (const event of events) { | |
| 60 | if (event.type !== "event_msg" || !["task_started", "task_complete"].includes(event.payload.type)) continue; | |
| 61 | const prior = tasks.get(event.payload.turn_id) ?? {}; | |
| 62 | tasks.set(event.payload.turn_id, { ...prior, ...event.payload }); | |
| 63 | } | |
| 64 | return [...tasks.values()].filter((task) => task.started_at >= start && task.started_at < end && task.duration_ms); | |
| 65 | } | |
| 66 | ||
| 67 | function toolIntervals(events, start, end) { | |
| 68 | return events.flatMap((event) => { | |
| 69 | const item = event.type === "event_msg" && event.payload.type === "item_completed" ? event.payload.item : undefined; | |
| 70 | if (!item || !["CommandExecution", "McpToolCall"].includes(item.type)) return []; | |
| 71 | const milliseconds = (item.duration?.secs ?? 0) * 1000 + (item.duration?.nanos ?? 0) / 1_000_000; | |
| 72 | const finished = Date.parse(event.timestamp); | |
| 73 | return milliseconds && finished >= start && finished < end ? [[finished - milliseconds, finished]] : []; | |
| 74 | }); | |
| 75 | } | |
| 76 | ||
| 77 | function segment(events, records, boundary, previous, finalTime) { | |
| 78 | const start = boundary.start ? Date.parse(boundary.start) : -Infinity; | |
| 79 | const end = boundary.end ? Date.parse(boundary.end) : finalTime; | |
| 80 | const tasks = taskRows(events, start, end); | |
| 81 | const tools = toolIntervals(events, start, end); | |
| 82 | const finish = snapshotBefore(records, end); | |
| 83 | const begin = previous ?? snapshotBefore(records, start); | |
| 84 | return { | |
| 85 | name: boundary.name, | |
| 86 | kind: boundary.kind ?? "segment", | |
| 87 | cost: finish ? usageCost(finish) - (begin ? usageCost(begin) : 0) : null, | |
| 88 | durationMs: tasks.reduce((total, task) => total + task.duration_ms, 0), | |
| 89 | apiTtftMs: tasks.reduce((total, task) => total + (task.time_to_first_token_ms ?? 0), 0), | |
| 90 | toolWallMs: unionDuration(tools), | |
| 91 | toolCoreMs: tools.reduce((total, [startTime, endTime]) => total + endTime - startTime, 0), | |
| 92 | }; | |
| 93 | } | |
| 94 | ||
| 95 | function chart(segments) { | |
| 96 | const maximum = Math.max(...segments.map((segment) => segment.cost ?? 0), 1); | |
| 97 | return segments.map((segment) => `<div class="row"><span>${escapeHtml(segment.name)}</span><div class="bar"><i style="width:${(segment.cost ?? 0) / maximum * 100}%"></i></div><b>${segment.cost === null ? "—" : `$${segment.cost.toFixed(2)}`}</b></div>`).join("\n"); | |
| 98 | } | |
| 99 | ||
| 100 | function escapeHtml(value) { | |
| 101 | return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"); | |
| 102 | } | |
| 103 | ||
| 104 | function html(report) { | |
| 105 | const rows = report.segments.map((segment) => `<tr><td>${escapeHtml(segment.name)}</td><td>${segment.kind}</td><td>${segment.cost === null ? "—" : `$${segment.cost.toFixed(2)}`}</td><td>${duration(segment.durationMs)}</td><td>${duration(segment.toolWallMs)}</td><td>${duration(segment.toolCoreMs)}</td><td>≥${duration(segment.apiTtftMs)}</td></tr>`).join("\n"); | |
| 106 | return `<!doctype html><meta charset="utf-8"><title>Codex usage report</title><style>body{font:14px system-ui;margin:40px;max-width:900px;color:#202124}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px;border-bottom:1px solid #ddd}.row{display:grid;grid-template-columns:220px 1fr 90px;gap:12px;align-items:center;margin:8px 0}.bar{background:#edf0f2;height:14px;border-radius:8px;overflow:hidden}.bar i{display:block;height:100%;background:#3874cb}</style><h1>Codex usage report</h1><p>API-equivalent rate: Astra standard ($10/M uncached input, $1/M cached input, $50/M output). Tool core time counts parallel calls separately; API TTFT is a lower bound.</p><h2>Cost</h2>${chart(report.segments)}<h2>Segments</h2><table><thead><tr><th>Segment</th><th>Type</th><th>Cost</th><th>Duration</th><th>Tool wall</th><th>Tool core</th><th>Recorded API</th></tr></thead><tbody>${rows}</tbody></table>`; | |
| 107 | } | |
| 108 | ||
| 109 | function usage() { | |
| 110 | console.error("Usage: node tools/codex_usage_report.mjs report.json [output.html]"); | |
| 111 | process.exit(1); | |
| 112 | } | |
| 113 | ||
| 114 | const [configPath, outputPath] = process.argv.slice(2); | |
| 115 | if (!configPath) usage(); | |
| 116 | const config = JSON.parse(await readFile(resolve(configPath), "utf8")); | |
| 117 | const codexHome = config.codexHome ?? join(homedir(), ".codex"); | |
| 118 | const paths = config.sources ?? (await Promise.all(["sessions", "archived_sessions"].map((name) => filesBelow(join(codexHome, name))))).flat(); | |
| 119 | const events = await loadEvents(paths); | |
| 120 | const selected = events.filter((event) => event.type !== "token_usage_record" || config.threadIds.includes(event.payload.thread_id)); | |
| 121 | const records = selected.filter((event) => event.type === "token_usage_record").sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)); | |
| 122 | if (!records.length) throw new Error("No token records matched config.threadIds."); | |
| 123 | const finalTime = Date.parse(records.at(-1).timestamp); | |
| 124 | const segments = config.boundaries.map((boundary, index) => segment(selected, records, boundary, index ? snapshotBefore(records, Date.parse(config.boundaries[index - 1].end ?? new Date(finalTime).toISOString())) : undefined, finalTime)); | |
| 125 | const report = { threadIds: config.threadIds, total: usageCost(records.at(-1).payload.thread_token_usage), segments }; | |
| 126 | if (outputPath) { | |
| 127 | await mkdir(dirname(resolve(outputPath)), { recursive: true }); | |
| 128 | await writeFile(resolve(outputPath), html(report)); | |
| 129 | } else console.log(JSON.stringify(report, null, 2)); |
tools/native/page-removal-followup.ps1 created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | param([Parameter(Mandatory=$true)][string]$Root, [Parameter(Mandatory=$true)][string]$CloneHost) | |
| 2 | Set-StrictMode -Version Latest | |
| 3 | $ErrorActionPreference = 'Stop' | |
| 4 | & "$PSScriptRoot\cold-current.ps1" -Root $Root -CloneHost $CloneHost | |
| 5 | $app = New-Object -ComObject OneNote.Application | |
| 6 | $notebook = '' | |
| 7 | try { | |
| 8 | $app.OpenHierarchy((Join-Path $Root 'notebook'), '', [ref]$notebook, 0) | |
| 9 | $section = '' | |
| 10 | $app.OpenHierarchy('Lifecycle.one', $notebook, [ref]$section, 0) | |
| 11 | $page = '' | |
| 12 | $app.CreateNewPage($section, [ref]$page, 2) | |
| 13 | $title = 'Native after Rust removal ' + [char]::ConvertFromUtf32(0x1F98B) + ' e' + [char]0x0301 | |
| 14 | $xml = '<one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2010/onenote" ID="' + $page + '"><one:Title><one:OE><one:T><![CDATA[' + $title + ']]></one:T></one:OE></one:Title><one:Outline><one:OEChildren><one:OE><one:T><![CDATA[<b>Native body after Rust removal.</b>]]></one:T></one:OE></one:OEChildren></one:Outline></one:Page>' | |
| 15 | $app.UpdatePageContent($xml, [DateTime]::MinValue, 1, $false) | |
| 16 | $app.SyncHierarchy($notebook) | |
| 17 | [IO.File]::WriteAllText("$Root\native-title.txt", $title, [Text.Encoding]::UTF8) | |
| 18 | } finally { | |
| 19 | try { if ($notebook) { $app.CloseNotebook($notebook, $false) } } | |
| 20 | finally { | |
| 21 | [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($app) | |
| 22 | $app = $null | |
| 23 | [GC]::Collect() | |
| 24 | [GC]::WaitForPendingFinalizers() | |
| 25 | Get-Process ONENOTE -ErrorAction SilentlyContinue | Wait-Process -Timeout 120 -ErrorAction SilentlyContinue | |
| 26 | } | |
| 27 | } |
tools/test_page_removal.py+19| ... | ... | @@ -59,3 +59,22 @@ class PageRemovalTest(unittest.TestCase): |
| 59 | 59 | |
| 60 | 60 | if __name__ == '__main__': |
| 61 | 61 | unittest.main() |
| 62 | ||
| 63 | ||
| 64 | class RustRemovalFollowupTest(unittest.TestCase): | |
| 65 | """OneNote creates a page in a section after Rust removed pages from it, then reopens cold.""" | |
| 66 | ||
| 67 | CASES = ('parent', 'all', 'features', 'leading-parent') | |
| 68 | ||
| 69 | def test_native_page_after_rust_removal_matches_its_captures(self): | |
| 70 | for case in self.CASES: | |
| 71 | with self.subTest(case=case): | |
| 72 | root = FIXTURE / 'rust-followup' / case | |
| 73 | title = (root / 'followup/native-title.txt').read_text(encoding='utf-8-sig') | |
| 74 | self.assertTrue(title.startswith('Native after Rust removal')) | |
| 75 | for phase in ('followup', 'followup-cold'): | |
| 76 | compare(root / phase / 'notebook', root / phase / 'read') | |
| 77 | hierarchy = ET.parse(root / phase / 'read/hierarchy.xml').getroot() | |
| 78 | names = [page.get('name') for page in hierarchy.findall('.//one:Page', ns)] | |
| 79 | self.assertEqual(names.count(title), 1, names) | |
| 80 | self.assertTrue(json.loads((root / phase / 'teardown.json').read_text())['absent']) |
tools/zenith-locks deleted-132| ... | ... | @@ -1,132 +0,0 @@ |
| 1 | #!/usr/bin/env python3 | |
| 2 | """Watch SMB byte-range locks on zenith (TrueNAS) as OneNote takes and drops them.""" | |
| 3 | import json | |
| 4 | import os | |
| 5 | import subprocess | |
| 6 | import sys | |
| 7 | import time | |
| 8 | ||
| 9 | HOST = "10.0.0.1" | |
| 10 | SSH = ["ssh", "-o", "BatchMode=yes", "-o", "ControlMaster=auto", | |
| 11 | "-o", "ControlPath=/tmp/zenith-locks-%r@%h:%p", "-o", "ControlPersist=30s", HOST] | |
| 12 | SEP = "--%%--" | |
| 13 | ||
| 14 | ||
| 15 | def agent_socket(): | |
| 16 | """SSH_AUTH_SOCK is usually absent here; find a live agent that holds an identity.""" | |
| 17 | pids = subprocess.run(["pgrep", "ssh-agent"], capture_output=True, text=True).stdout.split() | |
| 18 | for pid in pids: | |
| 19 | out = subprocess.run(["lsof", "-a", "-U", "-p", pid], capture_output=True, text=True).stdout | |
| 20 | for word in out.split(): | |
| 21 | if "/agent." not in word: | |
| 22 | continue | |
| 23 | env = dict(os.environ, SSH_AUTH_SOCK=word) | |
| 24 | if subprocess.run(["ssh-add", "-l"], env=env, capture_output=True).returncode == 0: | |
| 25 | return word | |
| 26 | return None | |
| 27 | ||
| 28 | ||
| 29 | def connect(): | |
| 30 | if subprocess.run(SSH + ["true"], capture_output=True).returncode == 0: | |
| 31 | return | |
| 32 | sock = agent_socket() | |
| 33 | if sock is None: | |
| 34 | sys.exit("no ssh-agent with a loaded identity; cannot reach %s" % HOST) | |
| 35 | os.environ["SSH_AUTH_SOCK"] = sock | |
| 36 | if subprocess.run(SSH + ["true"], capture_output=True).returncode != 0: | |
| 37 | sys.exit("ssh %s failed even with agent %s" % (HOST, sock)) | |
| 38 | ||
| 39 | ||
| 40 | def status(*views): | |
| 41 | cmd = (" ; echo %s ; " % SEP).join("midclt call smb.status " + v for v in views) | |
| 42 | out = subprocess.run(SSH + [cmd], capture_output=True, text=True) | |
| 43 | if out.returncode != 0: | |
| 44 | sys.exit(out.stderr.strip() or "ssh failed") | |
| 45 | return [json.loads(chunk) for chunk in out.stdout.split(SEP + "\n")] | |
| 46 | ||
| 47 | ||
| 48 | def locks(byterange): | |
| 49 | """(share_path, file, pid, type, start, size) per held range.""" | |
| 50 | for entry in byterange: | |
| 51 | for lk in entry["locks"]: | |
| 52 | yield (entry["share_path"], entry["file_name"], lk["server_id"]["pid"], | |
| 53 | lk["type"], lk["start"], lk["size"]) | |
| 54 | ||
| 55 | ||
| 56 | def table(rows, headers): | |
| 57 | rows = [[str(c) for c in r] for r in rows] | |
| 58 | width = [max(len(h), *(len(r[i]) for r in rows)) for i, h in enumerate(headers)] | |
| 59 | for r in [headers] + rows: | |
| 60 | print(" ".join(c.ljust(w) for c, w in zip(r, width)).rstrip()) | |
| 61 | ||
| 62 | ||
| 63 | def show_locks(): | |
| 64 | byterange, openfiles, shares = status("BYTERANGE", "LOCKS", "SHARES") | |
| 65 | held = sorted(locks(byterange)) | |
| 66 | if not held: | |
| 67 | print("no byte-range locks held") | |
| 68 | return | |
| 69 | machine = {s["server_id"]["pid"]: s["machine"] for s in shares} | |
| 70 | user = {} | |
| 71 | for f in openfiles: | |
| 72 | for o in f["opens"].values(): | |
| 73 | user[(f["service_path"], f["filename"], o["server_id"]["pid"])] = o["username"] | |
| 74 | rows = [] | |
| 75 | for share, name, pid, typ, start, size in held: | |
| 76 | who = user.get((share, name, pid), "?") | |
| 77 | rows.append(["%s/%s" % (os.path.basename(share), os.path.basename(name)), pid, who, | |
| 78 | machine.get(pid, "?"), start, size, | |
| 79 | {"W": "write", "R": "read"}.get(typ, typ)]) | |
| 80 | table(rows, ["FILE", "PID", "USER", "CLIENT", "OFFSET", "LENGTH", "TYPE"]) | |
| 81 | ||
| 82 | ||
| 83 | def show_opens(): | |
| 84 | openfiles, shares = status("LOCKS", "SHARES") | |
| 85 | machine = {s["server_id"]["pid"]: s["machine"] for s in shares} | |
| 86 | rows = [] | |
| 87 | for f in openfiles: | |
| 88 | share = os.path.basename(f["service_path"]) | |
| 89 | for o in f["opens"].values(): | |
| 90 | pid = o["server_id"]["pid"] | |
| 91 | rows.append(["%s/%s" % (share, f["filename"]), pid, o["username"], | |
| 92 | machine.get(pid, "?"), o["access_mask"]["text"] or "-", | |
| 93 | o["sharemode"]["text"] or "-", o["opened_at"][11:23]]) | |
| 94 | if not rows: | |
| 95 | print("no open files") | |
| 96 | return | |
| 97 | table(sorted(rows), ["FILE", "PID", "USER", "CLIENT", "ACCESS", "SHAREMODE", "OPENED"]) | |
| 98 | ||
| 99 | ||
| 100 | def watch(interval): | |
| 101 | prev = set() | |
| 102 | while True: | |
| 103 | now = set(locks(status("BYTERANGE")[0])) | |
| 104 | t = time.time() | |
| 105 | stamp = time.strftime("%H:%M:%S", time.localtime(t)) + ".%03d" % (t % 1 * 1000) | |
| 106 | for sign, changed in (("-", prev - now), ("+", now - prev)): | |
| 107 | for share, name, pid, typ, start, size in sorted(changed): | |
| 108 | print("%s %s %s/%s pid=%s %s %d+%d" % | |
| 109 | (stamp, sign, os.path.basename(share), os.path.basename(name), pid, | |
| 110 | {"W": "write", "R": "read"}.get(typ, typ), start, size), flush=True) | |
| 111 | prev = now | |
| 112 | time.sleep(interval) | |
| 113 | ||
| 114 | ||
| 115 | def main(): | |
| 116 | args = sys.argv[1:] | |
| 117 | connect() | |
| 118 | if args and args[0] == "--watch": | |
| 119 | watch(float(args[1]) if len(args) > 1 else 0.5) | |
| 120 | elif args == ["--opens"]: | |
| 121 | show_opens() | |
| 122 | elif not args: | |
| 123 | show_locks() | |
| 124 | else: | |
| 125 | sys.exit("usage: zenith-locks [--watch [SECONDS] | --opens]") | |
| 126 | ||
| 127 | ||
| 128 | if __name__ == "__main__": | |
| 129 | try: | |
| 130 | main() | |
| 131 | except KeyboardInterrupt: | |
| 132 | pass |