Record live recovery checks and preserve native rollback selection

This commit is contained in:
nick 2026-11-05 20:45:58 +00:00
parent 0c144b9e72
commit b7f1fbcaee
2 changed files with 7 additions and 1 deletions

View File

@ -64,3 +64,9 @@ Word 1.0.0.8 reopened the saved synthetic manuscript, started its agent automati
A paste test exposed an additional observation gap: the document held seven words while the last completed snapshot still held two until another observation. Version 1.0.0.9 schedules a coalesced, lightweight position/length/saved-state probe at most once per second on the existing Word STA scheduler. It reuses the existing bounded reader only when observation changes. It does not call Word's full-document statistics API or add another prose reader. Same-length edits while already dirty remain subject to the documented explicit-refresh limitation.
The final signed Office build passed with zero warnings/errors. A before/after check confirmed Build without Clean retained the existing Manifest and LoadBehavior registration. Read-only reflection checks against the actual compiled startup resolver resolved the registered adjacent agent for matching DLL bytes and refused an unrelated DLL.
Live final-build count check: in Word 1.0.0.9, the saved synthetic document was reopened and an additional word pasted into its body. Word and Companion Diagnostics both showed eight words. The ribbon resolved Chapter One, the agent started automatically, both queues were zero, and the COM error counter was zero. The displayed maximum sampled COM call was 1.89 ms and the last UI batch was 0.25 ms for that small-document observation; these are not large-manuscript latency distributions.
Final interactive evidence: after author-approved browser sign-in on 1.0.0.9, the remembered book restored on the ribbon. Review structure completed with eight approximate words, one chapter candidate and no scene candidates for the synthetic test. The saved Context view returned saved-book state and explicitly reported no saved context at the unmarked location. Open PlotDirector was invoked; its Word/agent path was available, but the browser destination was not qualified. Windows Computer Use stopped when it could not determine the browser URL with enough confidence to enforce its policy. No further desktop input was issued. Browser page correctness, native website presence, manual server scene mapping and the broad large-manuscript/performance matrix remain open.
Installed package: 1.0.0.9 from source 0c144b9e7283812e31b34bcbd033534133c2d081, retained in Downloads/PlotDirectorWordCompanion/1.0.0.9-0c144b9e. The final follow-up commit records evidence and ensures later native-version rollbacks do not accidentally reinstall the original ClickOnce subscription when a prior native registry registration already exists. The original 1.0.0.6 ClickOnce manifest URI, signed files and archived rollback records are retained.

View File

@ -55,7 +55,7 @@ if($Rollback){
if($saved.PSObject.Properties.Name -contains 'registryKey'){if($saved.registryKey -notmatch '^[a-zA-Z0-9._ -]+$'){throw 'Invalid saved registration key.'};$registry=Join-Path 'HKCU:\Software\Microsoft\Office\Word\Addins' $saved.registryKey}
if($PSCmdlet.ShouldProcess($registry,'Restore previous per-user Word registration')){
Stop-DeveloperAgent
if(Test-Path -LiteralPath $clickOnceBackup){
if(!$saved.existed -and (Test-Path -LiteralPath $clickOnceBackup)){
$previous=Get-Content -Raw -LiteralPath $clickOnceBackup|ConvertFrom-Json
$installed=Get-CompanionClickOnce
if($installed -and $installed.manifest -ne $previous.manifest){Invoke-CompanionVsto '/Uninstall' $installed.manifest}