8.7 KiB
Ready-to-paste Windows Codex automated qualification prompt
Qualify the actual source from prompt01 on codex/word-companion-native-phase1-20261104, Atlas application baseline be88c1d068a4c384c5db348238ac78704b6f73e9, native version 1.0.0.12. Record any later validated Windows fix commit. Read prompt01 and the existing WindowsValidation/Setup/Qualification-2026-11-05.md first.
Fundamental unattended rule
No Computer Use, mouse automation, desktop control or interactive UI-driving tools. Do not launch Word, steal focus, close documents, terminate applications, reboot, open approval prompts or run an installer during normal unattended tests. The user must remain able to work. No Visual Studio Installer/Repair/Update, workload changes, PATH or trust-store edits. Build/signing approval is also an interactive boundary.
A. Identify the real environment before claiming installation
Record with PowerShell, keeping personal details in local evidence rather than public logs:
whoami /user
[System.Security.Principal.WindowsIdentity]::GetCurrent().Name
[Diagnostics.Process]::GetCurrentProcess().SessionId
$env:USERPROFILE
[Environment]::GetFolderPath('LocalApplicationData')
Get-Process WINWORD -ErrorAction SilentlyContinue | Select-Object Id,SessionId,Path
Determine whether the executing process is packaged/private (the existing Setup uses native GetCurrentPackageFullName). Compare effective identity, SID, session, profile paths and process ancestry with the actual signed-in author's session using supported OS queries. Do not assume $env:LOCALAPPDATA, HKCU or tool-launched processes represent normal Windows.
Use Windows Installer's supported MsiEnumProductsEx/product-info APIs with the actual user SID and installation context. The qualified baseline is per-user unmanaged context 2, product {98F46939-764D-407F-BD1F-1D88315D010A}. Enumerate upgrade-family products after packaging changes as well. Do not use Win32_Product (it can trigger repairs). Private HKCU data alone proves nothing. If the normal user installation/profile is inaccessible, mark installation inspection blocked and continue B/C.
Expected normal baseline paths (resolve for the actual user, never silently substitute Codex's private AppData): %LOCALAPPDATA%\Programs\PlotDirector Companion with Agent, %LOCALAPPDATA%\PlotDirector\Companion for state, and %LOCALAPPDATA%\PlotDirector\InstallerBackup for exact-product backups. Record current registry/uninstall/manifest state read-only before any scheduled upgrade.
B. Repeatable builds and portable regressions
Use the existing Update script from prompt01 to prepare a signed complete developer package, without installation. It locates existing build tools. Never use Office Clean or F5 registration.
Additional non-interactive commands from repository root:
dotnet build PlotLine.slnx -c Release --disable-build-servers -m:1 /p:UseSharedCompilation=false
dotnet run --no-build -c Release --project PlotDirector.NativeCompanion/Tests/PlotDirector.Companion.Tests.csproj
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- --native-companion
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- --native-companion-http
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- --native-workflow
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- --native-tray
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- --native-import
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- --intent-assessment
Run serially and stop a failed dependent phase. The tests are synthetic, not live Word/AI qualification. Check handshake/recovery, per-document isolation, bounded/coalesced queues, cancellation, stale responses, authentication expiry, book association and analysis states. Presentation tests cover fresh/expired/stale connection labels, Windows-theme precedence/fallback and analysis-versus-import wording. If testing real Windows theme preference read-only, inspect HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme in the correct user context; do not change the user's theme automatically.
C. Package verification without execution
Dot-source WindowsValidation/DeveloperPackage.ps1 and run the existing Test-DeveloperPackage '<actual package path>'. Verify package.json source SHA, 1.0.0.12, inventory hashes, referenced files, architecture and framework dependencies. Verify both VSTO manifest signatures with the SDK mage resolved by the existing scripts. Inspect Get-AuthenticodeSignature on the MSI/bootstrapper; report local developer trust separately from public signing. Check manifest identities, publisher Nick Beckley, file versions and agent runtimeconfig/deps JSON. No VSTO trust installation as a verification shortcut.
Build the unified installer only after prompt01's deliberate version12 packaging update. Inspect MSI read-only using WindowsInstaller COM/native APIs: Property, File, Component, Registry, Shortcut, Upgrade, install/uninstall sequence, embedded Media/CAB and summary information. Require:
- Both tray and VSTO payloads, with hashes matching the verified package.
- Version12 application/bootstrapper/file versions and coherent three-part MSI version/upgrade boundaries; existing UpgradeCode retained and ProductCode strategy documented.
- Per-user installation, no machine-wide ALLUSERS change; correct limited-privilege summary, install root and stable component identities.
- Word add-in identity
PlotDirector.WordAddIn, installed signed manifest with|vstolocal, LoadBehavior3 and the existing DLL resolver mechanism. - Start menu and Startup shortcuts target the installed tray, not build output; Add/Remove Programs metadata and unified uninstall cover both components.
- User-state directories, document metadata, manuscripts, auth data and logs excluded from destructive MSI removal.
- Bootstrapper still escapes the packaged/private environment safely; backup handling targets only this exact product. No other Office add-ins, caches, applications or trust settings touched.
Write hashes/versions/inventory results to a local qualification report. Do not run the installed tray merely to inspect dependencies: that may activate its visible window or interrupt an existing singleton. Portable tests exercise activation contracts on isolated test pipes; actual installed activation belongs to manual acceptance.
D. Installation boundary — schedule explicitly
Current unified Setup has no guaranteed fully silent end-to-end mode. --install skips one confirmation but still permits completion/error/trust dialogs. MSI silent execution alone omits bootstrapper/VSTO normal-user orchestration and is not equivalent qualification. Do not invent /quiet switches or run raw MSI to bypass the established flow.
If interactive trust/UAC is required, stop installation only before opening anything. Report the exact approval, signing/trust reason and required window. Preserve all build/test results and wait for an explicitly scheduled installation window. Never repeatedly ask for clicks during working hours or leave a modal prompt waiting unattended. Do not bypass Windows protections.
At the authorised window: require Word already closed by the user; do not close it for them. Run the unified EXE through normal user Windows/File Explorer as documented. Capture bootstrapper/MSI/VSTO outcomes and backups, then inspect the actual user installation via native Installer APIs and installed file hashes. Result0 or HKCU LoadBehavior3 is not proof Word loaded the add-in.
Upgrade and uninstall/rollback are separately scheduled destructive test phases: preserve the prior verified EXE/package, user-state backup and registration exports. Do not uninstall a working author's installation merely to finish a test. If upgrade fails, retain logs/exports and diagnose the exact failure; do not clear ClickOnce/VSTA caches globally, remove unrelated registry keys, or install private sandbox copies. Recover through the previous verified unified installer in the same normal-user context only with explicit scheduling.
E. Report results honestly
Separate: Passed automated / Failed automated / Blocked by environment / Requires interactive Windows qualification / Requires human acceptance.
Include exact Git source, versions/hashes, effective versus actual user context, tool versions, paths, relevant Event Log/installer failures, retained backups and recovery instructions. Avoid secrets/manuscript text in logs. Registry/package validation proves expected registration, not Word load or visual responsiveness. Do not launch Word to complete unattended checks. Hand remaining items to checklist03.