Prepare Phase 3B.4 Windows Word qualification handover

This commit is contained in:
Nick Beckley 2026-11-21 00:08:41 +00:00
parent 5b7eb279c5
commit ea1aabb363
9 changed files with 2369 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# Atlas preparation validation
Completed 21 November 2026. Readiness was checked read-only on 20 November 23:51 UTC and rechecked 21 November 00:04 UTC.
- Shared branch fetched/fast-forward checked at baseline `5b7eb27`; application source remains `80f7cb5`.
- Deployed version and DLL/JS hashes match the intended baseline; anonymous TLS GETs and expected authentication responses recorded in `readiness.json`. No authenticated handshake or live schema audit claimed.
- 65 static repository paths and the three document links/source references verified; 12 existing script interfaces compared with actual declared parameters. No Windows command was executed.
- 91 matrix IDs checked for eight nonempty fields: purpose, prerequisites, actions, expected result, evidence, pass/fail, cleanup plus ID. All future physical results are NOT_RUN in the optional template.
- Current source metadata agrees on add-in/agent 1.0.0.41 and MSI 1.0.41; no package existence or installed version inferred.
- No safe dedicated runtime observation-stall/delay/native-failure control found. Relevant physical cases require verified safe local control or BLOCKED status; managed fixtures are separate. Historical synthetic native-review source fixture and locally available baseline/rollback artefacts remain Windows prerequisites.
- No application/native/schema/configuration/author-data edit, account provisioning, service restart, deployment, Windows build or software installation occurred.
- Existing unrelated untracked investigation document preserved. Only new handover/matrix/prompt and preparation evidence are included in the handoff commit.
This record qualifies documentation preparation, not physical Word behaviour. Windows signing/tools/installation context and proposed performance thresholds still require local verification/approval.

View File

@ -0,0 +1,107 @@
{
"cases": 91,
"groups": {
"A": 10,
"B": 10,
"C": 10,
"D": 15,
"E": 18,
"F": 14,
"G": 14
},
"allRowsHaveRequiredEightFields": true,
"stableIds": [
"A01",
"A02",
"A03",
"A04",
"A05",
"A06",
"A07",
"A08",
"A09",
"A10",
"B01",
"B02",
"B03",
"B04",
"B05",
"B06",
"B07",
"B08",
"B09",
"B10",
"C01",
"C02",
"C03",
"C04",
"C05",
"C06",
"C07",
"C08",
"C09",
"C10",
"D01",
"D02",
"D03",
"D04",
"D05",
"D06",
"D07",
"D08",
"D09",
"D10",
"D11",
"D12",
"D13",
"D14",
"D15",
"E01",
"E02",
"E03",
"E04",
"E05",
"E06",
"E07",
"E08",
"E09",
"E10",
"E11",
"E12",
"E13",
"E14",
"E15",
"E16",
"E17",
"E18",
"F01",
"F02",
"F03",
"F04",
"F05",
"F06",
"F07",
"F08",
"F09",
"F10",
"F11",
"F12",
"F13",
"F14",
"G01",
"G02",
"G03",
"G04",
"G05",
"G06",
"G07",
"G08",
"G09",
"G10",
"G11",
"G12",
"G13",
"G14"
],
"physicalTestsExecuted": false
}

View File

@ -0,0 +1,85 @@
{
"checkedUtc": "2026-11-21T00:04:39.853873+00:00",
"host": "Atlas Linux",
"sourceBaseline": "5b7eb279c51c1c6f3c13be5c7f9538f0f0414942",
"branch": "codex/word-companion-native-phase1-20261104",
"readiness": "Expected deployed baseline and public/auth-protected routes match; no known server blocker. Windows authenticated account/book/runtime eligibility not tested.",
"server": "https://dev.plotdirector.com/",
"service": [
"ActiveState=active",
"SubState=running",
"ActiveEnterTimestamp=Fri 2026-11-20 22:45:45 UTC",
"MainPID=3608087"
],
"deployedInformationalVersion": "1.0.0+80f7cb516b52bcf1a0d42493700f0bde85ac776c",
"sha256": [
"5d7f9b4db127f89a7fb866a932b2c14af5d5b7b96cae4b1bd25fc43e10d3c16d /srv/apps/plotdirector-dev/current/PlotLine.dll",
"58123f11f50145323db3c086768c0dd77e3442d16fe8b1d9d8720c7f9b130d54 /srv/apps/plotdirector-dev/current/wwwroot/js/writer-word.js"
],
"tlsValidated": true,
"responses": [
{
"method": "GET",
"path": "/",
"status": 200,
"redirectPath": null
},
{
"method": "GET",
"path": "/Account/Login",
"status": 200,
"redirectPath": null
},
{
"method": "GET",
"path": "/api/native-companion/connection",
"status": 401,
"redirectPath": null
},
{
"method": "GET",
"path": "/api/native-companion/books",
"status": 401,
"redirectPath": null
},
{
"method": "GET",
"path": "/api/native-companion/books/0/chapter-sync",
"status": 401,
"redirectPath": null
},
{
"method": "GET",
"path": "/native-companion/status?writerBookId=0",
"status": 302,
"redirectPath": "/Account/Login"
},
{
"method": "GET",
"path": "/native-companion/connection-state",
"status": 302,
"redirectPath": "/Account/Login"
},
{
"method": "GET",
"path": "/Writer/Write",
"status": 302,
"redirectPath": "/Account/Login"
}
],
"nativeSourceVersion": "1.0.0.41",
"nativePackageBuiltOnAtlas": false,
"physicalTestsExecuted": false,
"databaseQueried": false,
"serviceRestarted": false,
"serverDeployed": false,
"testAccountCreated": false,
"migrationConfigDeltaRequiredFor41": false,
"limits": [
"No authenticated native handshake/book check",
"No Windows environment/signing/package availability established",
"No safe dedicated runtime stall/delay/failure hook found",
"No local rollback/static-baseline artefact availability established",
"Historical synthetic AI-review fixture must be supplied or case blocked"
]
}

View File

@ -0,0 +1,295 @@
{
"validation": "all listed paths exist; hashes cover reviewed source, scripts and final documents",
"paths": [
{
"path": "AGENTS.md",
"sha256": "20f1e483b9cb7fbd4b87528c4bedbc6289f99fd4f223f44251c9d2ede5a4c353"
},
{
"path": "Docs/Navigation/FocusSynchronisationCorrection.md",
"sha256": "f70ab9c5cb863936ad05882fc034fb29ec69a89f843e26ab80228d4c1cb9c258"
},
{
"path": "Docs/WordCompanion/2026-11-12-vsto-range-synchronisation.md",
"sha256": "6ebeb68e7c0dfc45e2e313f998e79c30c3882a1724911a2280ff9904314c7b91"
},
{
"path": "Docs/WordCompanion/Persistent-Authorisation.md",
"sha256": "9c84c9949d9b8588027dfee3bfe35a127767e63a6ed79aa8934e3ee915357553"
},
{
"path": "Docs/WordCompanion/WindowsHandover/2026-11-11-fast-reopening.md",
"sha256": "e6ac09f289091f90d5800828d19becf93f22b991d77b9000a1b915a6dc5552d0"
},
{
"path": "Docs/WordCompanion/WindowsHandover/2026-11-11-v1.0.0.32-word-side-verification.md",
"sha256": "0ef938d902f847cd5bcacd3ab1f8c0ca0e3df26c1d52ad994ea046d0697ad587"
},
{
"path": "Docs/WordCompanion/WindowsHandover/2026-11-12-v1.0.0.33-post-edit-synchronisation.md",
"sha256": "cccaa89c66789f72ef3e849276797fa24acce463bb5cd3c0580d7a8270dbabff"
},
{
"path": "Docs/WordCompanion/WindowsHandover/README.md",
"sha256": "122a60b40096065a9b0e2ee229e4d713a9ad58004578b4872e06476941191b6d"
},
{
"path": "Docs/Writer/Writer-Phase3B-Word-Companion-Integration-Audit.md",
"sha256": "e9dc3386baa9c52c466fbcc5fec516b3f173bcc22f8d7f35ce90991e87346442"
},
{
"path": "Docs/Writer/Writer-Phase3B1-Integration-Correctness-Completion.md",
"sha256": "f2553249283a67e9288027b07f58b6f342c8b76bff9b2ee8e108dde740ee33ee"
},
{
"path": "Docs/Writer/Writer-Phase3B2-3B3-Completion.md",
"sha256": "5aac171a24f3d16c209c8b8036896ff8a8f2b745d5b9b482a142085c59fa41c9"
},
{
"path": "Docs/Writer/Writer-Phase3B4-Acceptance-Matrix.md",
"sha256": "5707fa2f1f4ea285377bfe5576b2b00c9e916f271156acd7ae6bc91b9c18cae8"
},
{
"path": "Docs/Writer/Writer-Phase3B4-Windows-Codex-Prompt.md",
"sha256": "2f6db75fdb9b48353195d9cf6db95ee0cffeae5867bacf3f1dfe975b65252ca8"
},
{
"path": "Docs/Writer/Writer-Phase3B4-Windows-Handover.md",
"sha256": "91b4eb75de05f7ef007514191e32bb2cf786199422436fa4fb13e77658cfa022"
},
{
"path": "PlotDirector.NativeCompanion/Agent/PlotDirector.Companion.Agent.csproj",
"sha256": "052507825dbc2dce59c3149399f55827f088b74d43709554ca54884b6acfb50c"
},
{
"path": "PlotDirector.NativeCompanion/Agent/Program.cs",
"sha256": "864df950517af1a83e7f4146e72b1e3fd97cd26373b04449764ecda713c6c140"
},
{
"path": "PlotDirector.NativeCompanion/Agent/TrayApplication.cs",
"sha256": "afc057c5b03cf0531b12e4362074224af8b645df4b7c612b787d460a11071d36"
},
{
"path": "PlotDirector.NativeCompanion/Agent/TrayCoordinator.cs",
"sha256": "5ef8394a3a7a9629f91f780434c3157f748b40d4781db6a0bc62114b4f9bbd42"
},
{
"path": "PlotDirector.NativeCompanion/Client/AgentLink.cs",
"sha256": "1480a8b7dc5f015e0b8d87976b826b9b0d19bec4cdc0d47f1b034754b41d780d"
},
{
"path": "PlotDirector.NativeCompanion/Client/DocumentBinding.cs",
"sha256": "685e07955b87e8606eec4645cbe5be0546e281add148e81320f965d89ecc23f8"
},
{
"path": "PlotDirector.NativeCompanion/Client/WordAccessScheduler.cs",
"sha256": "77d76861a9b936f609b961e987b85b810950a6923f2b9cc857c6897dd3552af3"
},
{
"path": "PlotDirector.NativeCompanion/DeveloperVersion.props",
"sha256": "2f151e8428a2856e569132d547f26c07e06576e36ffabe23dd273a037c0593b6"
},
{
"path": "PlotDirector.NativeCompanion/NativeCompanion.Windows.sln",
"sha256": "48be9b2ec1f180ff124c2b1407200568b82a2222190d4f0e8692b18087c7b39d"
},
{
"path": "PlotDirector.NativeCompanion/Protocol/Messages.cs",
"sha256": "c43124286ca8bfe9a8f2dff238349691a1099a2f4ca829fdc251947970771078"
},
{
"path": "PlotDirector.NativeCompanion/Tests/PlotDirector.Companion.Tests.csproj",
"sha256": "b85ac3342a7c69ba02d7a5c422a35c73b5c584baedfbfcd87f5a1d0f70d646d4"
},
{
"path": "PlotDirector.NativeCompanion/Tests/WordObservationTests.cs",
"sha256": "12185f8ea3ad4564a7ba0595b8ff693cdc746dfe51536a52dcde5be73c32b902"
},
{
"path": "PlotDirector.NativeCompanion/Vsto/PlotDirector.WordAddIn.csproj",
"sha256": "e9b7a8012a40c32cb69d50ff657c98d0a0be2b1904634efc243a5637835673cd"
},
{
"path": "PlotDirector.NativeCompanion/Vsto/Properties/AssemblyInfo.cs",
"sha256": "a0829d12548aaab4095904749c84a5303d65704a692c9b8101bde06abc32cb4f"
},
{
"path": "PlotDirector.NativeCompanion/Vsto/Ribbon.xml",
"sha256": "7123032f65af31c46128c0f153d291b9a51d4ee02e655acb82e9510a3e7762d9"
},
{
"path": "PlotDirector.NativeCompanion/Vsto/WordAdapter.cs",
"sha256": "99fd7fadb1440daec1abf8c5847aa0bc6877e503de058127448681fc9ffebcfe"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Build-Developer.ps1",
"sha256": "f0e75b93d95f0451fc93612391d57b427260407ec6cb5370be24b4ee97c6cb12"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/DeveloperPackage.ps1",
"sha256": "486c1ec42a15e34f62708dee865506ce30df809b63299e65bce251d4c5557182"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Generate-Fixtures.ps1",
"sha256": "8027f8ed119a27aae8a99076b87e2ced089a656dd4c3736283ff7072157fe8cc"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Install-WordCompanion.ps1",
"sha256": "9a129afa6345008360a3fe6ba9df40964a1189244940bf6172d9a2f7900ff447"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Measure-ChapterSync.ps1",
"sha256": "f804e769bf72a92bd0d84289a2cd97e7669a8a2062dfe1bf89a9a945e29ab6b3"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Measure-Processes.ps1",
"sha256": "2db0295431b184cc102e32631b6ae3c8c1af406c319c76c552e4e2f6696ae5bc"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/README.md",
"sha256": "f66d26c949c0e306747e37893521e0a335c87f9de8f27a381ac8f06c6118b4d9"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Build-Setup.ps1",
"sha256": "c8cb8303e65b6f3e2c7249fe6b725e881ba4bd1b401bb915600e71db931edfb3"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/FileCopyPreflight.cs",
"sha256": "f0003145b51a70b75bbdc69dbe805b1300cffdc5550458bfe89562886e86fd50"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Fixtures/Advertised-Version10-Upgrade.txt",
"sha256": "96f67f1f237556d67ed802e941c2337704c58b474c53db26e6f2b411a1ed4c9a"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Inspect-UserInstallation.ps1",
"sha256": "a109ec42bd904d721a3220fa2271a56330de3ef1064736e495928f0800b286ae"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/InstallerInventory.cs",
"sha256": "2f6a1956a447bfc86b5ffdc6193ee92120fc7b55b346ac669bbfbd8b6e36596a"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Qualification-2026-11-05.md",
"sha256": "ede06346337dc2c604bf288bf90e44f403cf58bfbd531f004fcf36cedba379f5"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/README.md",
"sha256": "571dba79cf5a734ab21534dd0bd511f5da2daee319ad3509079470d5dadda298"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Release.json",
"sha256": "fcc3a03e5298472a523b9ec90d72ca769885fcb5ad2b685722a62143b015572f"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Setup.cs",
"sha256": "6cdde85b02d179cc3571b0ff0e6249e663f74c7c81624aff28f27d8c033e335d"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Setup.manifest",
"sha256": "edcda6ed5ebfbdf79a50ec1b9012d478d3b39545d339dea22d87e3b2af5a7f89"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Test-DeveloperPayload.ps1",
"sha256": "1b99a54fcb335d926b3df04eb476460aac972359eda391f60b576b48166af87a"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Test-SetupPackage.ps1",
"sha256": "72802fe8218d245550cd0c8276db6656e253fe370d9cd367de5e3846065cd81c"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Test-UpgradeRegression.ps1",
"sha256": "d077987f58a9124f73b1c39f34b7e21c05fe6766cb2a9f80fe00c5f7f8e72098"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/UpgradePolicy.cs",
"sha256": "156a2c77d75a351e0639fba33a5e80ec177fc15e92cfa8a70719e3427a6e6a91"
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Update-WordCompanion.ps1",
"sha256": "8edeb72e6d73e5388ca9116e34275d6af11eb5b1ffdc3330760e33b7058150b3"
},
{
"path": "PlotLine.Tests/PlotLine.Tests.csproj",
"sha256": "75ec24bb762c3dad3591f736eb61f6aead19569f090ed608d42f13766dc49800"
},
{
"path": "PlotLine.slnx",
"sha256": "a103d60f2244a64d951e76f577ae1c08b1985ed7dfd4404007c3937cfe45e5fe"
},
{
"path": "PlotLine/Controllers/NativeChapterSyncController.cs",
"sha256": "dbcae73afd648d2589f5cd2aeb7326a26f1132b9820859bf69a07fb575d17772"
},
{
"path": "PlotLine/Controllers/NativeCompanionAuthController.cs",
"sha256": "411e737d0e0197bdb462602b1c7d9ad86268ac7d1758319538a10764c7a2df93"
},
{
"path": "PlotLine/Controllers/NativeCompanionController.cs",
"sha256": "0ad81715657b5ea116424a74496840d68479073b78575b04377e045730c178e4"
},
{
"path": "PlotLine/Controllers/NativeCompanionWorkflowController.cs",
"sha256": "e502f3088fc8a6a1eb66fb2f76013c4ca5cf6b14523d2fdfa119e185807ef1e9"
},
{
"path": "PlotLine/Controllers/NativeInstallationController.cs",
"sha256": "7584787c7f3ffff69262d6370538cb1ea30d0345f689b511694bc26f247cfd3f"
},
{
"path": "PlotLine/Controllers/NativeManuscriptCaptureController.cs",
"sha256": "83c6f3ebc6d467b1c4d4637bbb50c47be4605c828fc9c53e9c7696c86de1e26e"
},
{
"path": "PlotLine/Controllers/NativePresenceController.cs",
"sha256": "d829d7cf0a77debf4affe6ce618aab2218c945804cbc71a0563aaf810293b7ac"
},
{
"path": "PlotLine/Controllers/NativeWorkspaceController.cs",
"sha256": "a7ed94feaf568e5251f98dd59b2970360c5739535cb9db1874d9c91812e19016"
},
{
"path": "PlotLine/Controllers/WriterWordController.cs",
"sha256": "35b9c463d9a951e9ec8e57513844053f01e36e6ff35bfef8cc330ab0f63d2631"
},
{
"path": "PlotLine/Services/NativeCompanion/NativePresenceStore.cs",
"sha256": "e51133d4a65d6312fb05304a84eab02b1db29f9d3f934898b611162d468ee44b"
},
{
"path": "PlotLine/wwwroot/js/writer-word.js",
"sha256": "58123f11f50145323db3c086768c0dd77e3442d16fe8b1d9d8720c7f9b130d54"
}
],
"localMarkdownLinksValidated": [
{
"file": "Writer-Phase3B4-Acceptance-Matrix.md",
"target": "Writer-Phase3B4-Windows-Handover.md"
},
{
"file": "Writer-Phase3B4-Acceptance-Matrix.md",
"target": "Writer-Phase3B4-Windows-Codex-Prompt.md"
},
{
"file": "Writer-Phase3B4-Windows-Handover.md",
"target": "Writer-Phase3B4-Acceptance-Matrix.md"
},
{
"file": "Writer-Phase3B4-Windows-Handover.md",
"target": "Writer-Phase3B4-Windows-Codex-Prompt.md"
},
{
"file": "Writer-Phase3B4-Windows-Handover.md",
"target": "Evidence/Phase3B4/20261120T235104Z-atlas-preparation/readiness.json"
},
{
"file": "Writer-Phase3B4-Windows-Handover.md",
"target": "Evidence/Phase3B4/20261120T235104Z-atlas-preparation/script-contracts.json"
},
{
"file": "Writer-Phase3B4-Windows-Handover.md",
"target": "Writer-Phase3B4-Acceptance-Matrix.md"
}
]
}

View File

@ -0,0 +1,153 @@
{
"method": "static inspection of actual declared parameters/body; no Windows script execution",
"scripts": [
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Update-WordCompanion.ps1",
"documentedParameters": [
"CertificateThumbprint",
"NoSync"
],
"declaredParameters": [
"CertificateThumbprint",
"NoSync"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/DeveloperPackage.ps1",
"documentedParameters": [],
"declaredParameters": [],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Build-Developer.ps1",
"documentedParameters": [
"CertificateThumbprint"
],
"declaredParameters": [
"CertificateThumbprint"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Install-WordCompanion.ps1",
"documentedParameters": [
"PackagePath",
"Rollback",
"StopAgent"
],
"declaredParameters": [
"PackagePath",
"Rollback",
"StopAgent"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Generate-Fixtures.ps1",
"documentedParameters": [
"OutputDirectory"
],
"declaredParameters": [
"OutputDirectory"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Measure-Processes.ps1",
"documentedParameters": [
"OutputFile",
"Seconds"
],
"declaredParameters": [
"OutputFile",
"Seconds"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Measure-ChapterSync.ps1",
"documentedParameters": [
"ProtocolAssembly",
"OutputFile",
"MaximumParagraphs",
"IncludeLegacyParagraphXml"
],
"declaredParameters": [
"ProtocolAssembly",
"OutputFile",
"MaximumParagraphs",
"IncludeLegacyParagraphXml"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Build-Setup.ps1",
"documentedParameters": [
"PackagePath",
"OutputDirectory",
"ExpectedSourceCommit",
"CertificateThumbprint"
],
"declaredParameters": [
"PackagePath",
"OutputDirectory",
"ExpectedSourceCommit",
"CertificateThumbprint"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Test-DeveloperPayload.ps1",
"documentedParameters": [
"PackagePath",
"ReportPath"
],
"declaredParameters": [
"PackagePath",
"ReportPath"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Test-SetupPackage.ps1",
"documentedParameters": [
"PackagePath",
"SetupDirectory",
"BaselineMsi",
"ReportPath"
],
"declaredParameters": [
"PackagePath",
"SetupDirectory",
"BaselineMsi",
"ReportPath"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Test-UpgradeRegression.ps1",
"documentedParameters": [
"FailedSetupDirectory",
"CorrectedSetupDirectory",
"ReportPath"
],
"declaredParameters": [
"FailedSetupDirectory",
"CorrectedSetupDirectory",
"ReportPath"
],
"executedOnAtlas": false
},
{
"path": "PlotDirector.NativeCompanion/WindowsValidation/Setup/Inspect-UserInstallation.ps1",
"documentedParameters": [
"OutputPath"
],
"declaredParameters": [
"OutputPath"
],
"executedOnAtlas": false
}
]
}

View File

@ -0,0 +1,147 @@
# Phase 3B.4 physical acceptance matrix
Execute with [Windows handover](Writer-Phase3B4-Windows-Handover.md) and its [ready-to-paste prompt](Writer-Phase3B4-Windows-Codex-Prompt.md). Stable IDs must not be renumbered between attempts. Record every ID, including BLOCKED/NOT_RUN; for performance record both sizes and each trial. This document specifies tests; it contains **no physical results**.
Common preconditions **P0**: source/package/signatures verified per handover; human-approved normal-user interactive window; matched installed .41 agent/add-in; correct Development account and exclusively owned disposable fixture project/books; pristine saved local copies and accepted-baseline metadata retained; no real author documents open or targeted. A01–A02 establish P0 progressively. Install/Word/PWA/fixture writes are never authorised solely by an unattended build. Use correct explicit book/document choices in **both** Companion and Writer.
Evidence **E0** for every case: UTC start/end, source/package/installed/server versions, fixture alias, expected/actual, PASS/FAIL/BLOCKED/NOT_RUN and cleanup result in `results.jsonl`. Add the row-specific evidence below. **N** = private native logs and before/after Word Diagnostics/Companion Troubleshooting (sanitised extracts only); **B** = browser/PWA screenshot plus redacted status/command ID/outcome/timestamps; **S** = before/after saved/accepted/verified revision, paragraph IDs/order, chapter/scene association and accepted text sentinel/hash, obtained through supported read-only Reader/diagnostics, not direct SQL/secret state. **M** = handover performance CSV, traces/counters with actual measurement scope. Screenshot a real Word landing when a range is expected. Whole HAR/credentials/private state never enter Git.
Cleanup **C0**: preserve evidence first; finish/discard only the run's authorised synthetic drafts, end only its sessions, restore its pristine working copy/accepted fixture through normal UI where needed; do not delete shared/author data or erase a failure. Close/reopen only disposable documents normally. If baseline cannot be safely restored, create a new owned fixture book with permission or mark dependent cases BLOCKED.
Each row's pass condition is conjunctive: **FAIL** on any contrary observable result, particularly wrong document/range, stale completion, accepted unsaved content or overwritten draft. A missing prerequisite/control is **BLOCKED**, not a pass or an invitation to forge commands. `managed-only` supplemental results never fill a required physical result. Stop the run on unsafe behaviour; record dependency-blocked remainder.
## A. Installation and startup (run first)
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| A01 | Clean source, signed package and recovery gate | Existing tools/cert; human installation not yet authorised | Execute handover section 3 in clean shared checkout; record full SHA; validate manifests, payload and MSI/CAB; locate/verify baseline MSI and rollback package; inspect current installation read-only. | Matched .41 payload, 1.0.41 MSI, expected signer/source/hash; no installation side effect. | Build/test transcripts, mage/signatures, package reports and sanitised before inventory. | PASS only all required static gates and recovery artefact verification succeed. Missing baseline/rollback artefact BLOCKS installation; conditional historical failed-fixture test may be separately BLOCKED. | Retain baseline/output separately; no installed-state change. |
| A02 | Approved upgrade/clean normal startup | A01 pass; concrete human approval; Word saved/closed normally | Human launches unified EXE from Explorer; complete normal trust UI; wait for actual setup completion; inspect installed MSI/files/registration and running tray; open Small in Word. | Correct per-user .41 bytes, Complete=3, expected installed manifest and loaded ribbon; no author-state loss. | Installer logs, before/after inventory, file hashes/versions, ribbon/diagnostics and PID path. | PASS only loaded add-in AND actual installed/running agent match signed package; setup exit zero alone fails proof. | Retain installer backups privately; leave only synthetic Small open. |
| A03 | Word before agent | P0; no active sync; normal agent exit/relaunch approved | Exit Companion normally (not X); keep/open Small in Word; observe startup and ribbon; use Open Companion if paused launch requires explicit activation; record both paths. | Word remains usable; one correct agent/IPC attaches; no forced document save. Explicit paused-state activation is distinguishable from auto-start. | N, launch status/PIDs/times, observed pause state. | PASS if normal supported startup connects without duplicate/wrong agent; unexpected need to reset approval fails. | Restore normal agent and record any paused preference through supported UI only. |
| A04 | Agent before Word | P0; no disposable Word windows; tray running | Open installed Companion first, then Small in Word; select its book explicitly if unassociated. | Add-in attaches to existing same-user agent; exact document/session appears. | N, load order/times and session alias. | PASS if one installed agent and correct session/binding; wrong binary/session fails. | Close only Small normally. |
| A05 | Browser before Word | P0; Word fixture closed | Open Development Writer in normal browser, observe disconnected state; open Small and wait for fresh saved position. | Previously accepted text stays readable; status recovers without navigating cursor or retargeting objective. | B/N, accepted-text before/after. | PASS iff disconnected-to-connected recovery is accurate and no implicit navigation/target change. | C0. |
| A06 | Word before browser | P0; Small open and fresh | Place cursor at sentinel; then open Writer/Review; note Global Focus and cursor separately. | Browser attaches to correct live manuscript; cursor and Focus remain independent. | B/N, Word range screenshot and Focus/objective snapshot. | PASS iff opening browser causes neither automatic Word movement nor objective change. | C0. |
| A07 | Actual add-in loading | P0; fresh Word launch | Inspect Word COM Add-ins/Disabled Items, installed manifest, Diagnostics version and PlotDirector ribbon; use Open Companion. | Intended .41 VSTO loads with current IPC, not a debug/old/duplicate deployment. | Word UI, registration target/hash, load error if any. | PASS only actual load/IPC confirmed; registration/LoadBehavior alone insufficient. | Do not re-enable/edit trust automatically; retain failure. |
| A08 | Correct account/server and renewal | P0; authorised Development account; existing approval preserved | Inspect Companion server/account/book; if approval required use Sign in with your browser and normal Development approval; wait/recheck through a renewal interval (>10min across later tests). | Intended Development author/book only; persistent renewal/restart uses same approval unless revoked. | Sanitised account alias, B/N connection/renewal times; no tokens/codes. | PASS if correct authenticated ownership and renewal; wrong binding or token reset fails. | Leave approved binding intact; no website logout merely for cleanup. |
| A09 | Browser refresh | P0; saved objective and live selected document | Record target/draft, reload browser; observe status and accepted Reader; issue one explicit navigation after freshness recovers. | Persisted state survives; no automatic Word movement; exact explicit request works. | B/N, objective and range before/after. | PASS iff persistence and explicit-only navigation hold. Unsaved page drafts obey normal documented reload warning, not fabricated persistence. | C0; do not reload a real unsaved form. |
| A10 | Actual installed PWA startup | P0; existing installed Development PWA, version recorded | Human starts installed PWA via its normal shortcut; open same fixture book; verify standalone display, auth, connection, accepted Reader and explicit navigation. | Real installed PWA uses current server/JS and correct account/session. | Actual installed-app/window/version evidence, B/N. | PASS only actual installation/startup; browser with standalone flag is NOT a substitute. | Close only test PWA window normally. |
## B. Document identity and explicit selection (R2)
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| B01 | Convenient single document | P0; new browser tab with no prior explicit choice; only Small live | Open Writer for Small's book; observe initial choice; request Chapter in Word once. | Sole eligible live document auto-selects; request targets Small exactly. | B/N, instance/session/range aliases. | PASS if unambiguous initial choice and actual acknowledged landing; no second document involved. | Close test tab; C0. |
| B02 | Two independent documents | P0; Small and Medium mapped to separate disposable books | Open both; inspect Companion sessions and Writer status for each book; explicitly choose intended document where chooser appears. | Book-scoped candidates and independent identities; no title-based association. | B/N, per-book/session map. | PASS iff no cross-book candidate or unexpected navigation. | Keep fixtures open for next cases. |
| B03 | Explicit same-book A choice | P0; associated Small=A and same-property copy=B simultaneously open | In one Writer tab show eligible A/B; explicitly choose A, note its instance/session; request navigation. | Choice is A even if B is active; exact A executes. | B/N, choice and actual active/range proof. | PASS iff selected exact A executes and no action reaches B. | Leave explicit A selection in same tab. |
| B04 | Close selected A (R2 core) | B03; B remains open | Close A normally; do not touch chooser; wait for close/status propagation; attempt existing navigation controls. | A remains selected as disconnected/unavailable; chooser retained, navigation disabled; B never substituted. | B/N, before/after choice/session and command/execution counters. | PASS iff no automatic B selection or navigation; any silent substitution FAILS R2. | Reopen A only in B06; retain tab selection. |
| B05 | Close unselected B | A/B live; explicitly A selected | Close B normally; refresh status without changing choice; navigate to A's known scene. | A stays selected, valid navigation still executes A. | B/N and landing. | PASS iff selection remains exact A; unwanted clearing/retargeting fails. | Restore B from synthetic copy if needed. |
| B06 | Reopen selected document | B04 or equivalent old explicit A session | Reopen same A file; inspect new session; wait without choosing; then deliberately select reopened A and navigate. | Old explicit session stays unavailable until deliberate choice; new session never inherits old execution proof. | Old/new session aliases, B/N and landing. | PASS iff no automatic new-session substitution; fresh explicit selection restores eligibility. | C0. |
| B07 | Active Word window independence | A/B live, explicitly A selected | Alternate active Word windows at least ten times and move cursors; return to same Writer tab without choosing. | Writer selection remains A; Global Focus/objective do not follow Word cursor. | B/N, session/Focus history snapshots. | PASS iff passive window/cursor changes never choose B or rewrite saved targets. | Activate A normally for fresh observation. |
| B08 | Same title, copied properties | Two same-filename fixture copies in separate test directories; both intentionally retain same PlotDirector properties | Inspect GUID/session aliases; choose each separately and navigate to distinct sentinel positions; close one. | Shared title/properties do not collapse live sessions; uncertain mapping is refused rather than guessed. | B/N, alias/GUID equality and distinct ranges. | PASS iff no wrong-copy execution; refusal is acceptable where duplicate provenance cannot be verified, but record limits. | Close/delete only authorised copies after evidence. |
| B09 | Agent restart with open docs | P0; A/B saved; no in-flight mutations; explicit A chosen | Record selection and sessions; quit agent normally, reopen installed Companion; observe reconnect while Word remains open; do not choose another document. | Old identity never silently becomes B; restart/reconcile does not mint saved proof before observation; correct same-session recovery or explicit unavailable state. | B/N, restart PIDs, choice key, saved-proof timeline. | PASS iff no identity substitution or false verification; require explicit choice if session changed. | Restore normal agent; C0. |
| B10 | Browser/PWA refresh and cached return | Explicit A; A disappears with B remaining; normal sessionStorage enabled | In the same tab/window reload, leave/return via history, minimise/restore installed PWA; inspect chooser each time; deliberately choose B only at end. | Explicit unavailable A remains; no navigation until deliberate eligible choice. | B/N, storage-policy metadata (no private content), before/after key. | PASS in same tab iff no substitution through each return; separate tabs and blocked storage must be reported separately, not assumed equivalent. | Restore tab/PWA choice deliberately; C0. |
## C. Word observation freshness (R1)
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| C01 | Fresh physical cursor observation | P0; saved verified Small | Move cursor between two sentinels; compare Word range/diagnostics and browser verified position without changing Focus. | New STA observations update current physical position only. | B/N with observation counters/UTC and range screenshots. | PASS iff fresh observed positions correspond to Word and do not update Focus/objective. | Return cursor to baseline sentinel. |
| C02 | Fresh saved/unsaved state | P0; accepted Small baseline | Make a synthetic edit without save; wait for observation; inspect browser/status; save normally and wait for verification. | Unsaved state revokes precision/acceptance eligibility; save produces fresh proof, not a forced save. | B/N/S timelines and Word Saved indication. | PASS iff unsaved content is not accepted/current-position proof; saved recovery is evidence-based. | C0. |
| C03 | Normal transport heartbeat | P0; actively observed saved Small | Keep Word responsive for >60s; record actual selection counter and repeated presence sequence/status updates. | Transport renews independently; fresh UI observations keep position eligible; no connection flicker from ordinary timing. | N/B, sequence and observation counter timestamps. | PASS iff both liveness and genuine observations are separately demonstrated. Heartbeat alone is insufficient proof. | C0. |
| C04 | Safe stopped-observation preflight | No destructive mechanism; production source unchanged | Inspect available documented local test hook/control without activating it. Current source has none; if none is verified safe and explicitly authorised, record C05/C06/C08 BLOCKED with reason. Run managed `--word-observation` only as supplemental evidence. | No risky freeze/crash/suspend/network-wide intervention or runtime code edit. | Hook identity/authority or blocked reason; managed transcript labelled managed-only. | PASS for safety/preflight only; it does not establish a physical stall. Missing mechanism BLOCKS core physical stall tests. | No process/state change. |
| C05 | Actual observation stall with agent alive | C04 verified safe mechanism and specific human approval; synthetic Word only | Activate only the verified mechanism as documented locally; capture last observation UTC/counter; keep agent running for >45s; prove heartbeat sequence advances while observation counter is stationary. | Healthy agent does not refresh cached cursor/saved proof. | N/B synchronised timeline and mechanism logs. | PASS physically only if actual observation cessation and continuing transport are proven; otherwise BLOCKED/FAIL, never infer from a hidden window. | Release mechanism per its authorised recovery; no kill/suspend improvisation. |
| C06 | Expiry and navigation while stale | C05; Word UI observations absent >=45s | After at least 46s plus observed presence delivery, inspect transport and position; attempt Chapter/Scene/Paragraph in Word where available. | Document can remain connected; saved/cursor/chapter/scene proof absent; precise commands disabled/refused or expire unconfirmed; no execution/success acknowledgement. | B/N, observation age, sequence, command ID/outcome and execution counter. | PASS iff no stale proof authorises actual navigation or false completion. Record publish latency, not a promise of exactly 45.000s browser update. | Release only approved mechanism; retain accepted fixture. |
| C07 | Safe inactive-document observation gap | A/B live, A explicitly selected, saved accepted A | Activate B for >46s; observe A's actual counter/age. If A keeps observing, record branch. If it stops, inspect A proof and attempt navigation without selecting B. | If A observations expire, A transport remains listed and precision is withheld; if fresh observations continue, no artificial expiry expected. | B/N, per-document observations and active-window record. | PASS for observed inactive-document branch iff age policy holds; NOT physical blocked-COM proof. No stale A navigation or B substitution. | Reactivate A; await genuine fresh observation. |
| C08 | Physical stall recovery | C05/C06 executed safely | Release verified stall mechanism; move cursor normally, save if synthetic edit requires; wait for new observation and explicitly navigate. | Fresh eligible proof resumes without reimport or account reset; actual matching acknowledgement works. | B/N/S, recovery time and landing. | PASS only physical safe-stall recovery proven; otherwise BLOCKED. | Restore normal test mechanism configuration, C0. |
| C09 | Inactive-document recovery | C07 exercised stale branch | Activate A, move cursor once, verify new observation; request known scene. | A regains precision through a real observation, not transport alone; no manual reimport. | B/N, stale/fresh counter and landing. | PASS iff fresh proof restores correct exact-session action. If C07 never expired, record NOT_RUN for stale recovery. | C0. |
| C10 | Restart/lease expiry distinction | P0; authorised normal quit/restart; fixtures saved | Quit agent normally; observe immediate removal or >45s lease expiry if removal cannot arrive; reopen and reconcile; compare proof before first new observation. | Transport expiry/disconnect differs from live stale-UI state; reconciliation alone supplies no fresh UI proof. | B/N, heartbeat gap/expiry and restart sequence. | PASS iff old proof cannot survive disconnected/restarted identity; graceful DELETE may remove immediately and must be recorded. | Leave correct agent running; no auth reset. |
## D. Writer → Word navigation and acknowledgements
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| D01 | Global Focus independence | P0; objective scene fixed; Word at different chapter | Change Global Focus chapter and scene through Focus UI without Word navigation, then move Word cursor without browser action. | Focus/Word/objective remain separate authorities. | B/N, all three targets before/after and execution counters. | PASS iff neither passive direction moves the other authority or rewrites objective. | Restore Focus explicitly, not by assuming cursor adopts it. |
| D02 | Explicit focused chapter | P0; fresh saved verified map; Focus chapter chosen | Click **Chapter in Word** once; capture request/outcome; inspect actual activated document/range. | Correct document/chapter start; requested then matching actual completion. | B/N/S and Word range screenshot. | PASS iff actual verified chapter landing and correlated acknowledgement both present. 202 alone fails proof. | C0. |
| D03 | Explicit mapped scene | P0; Focus mapped scene different from cursor | Click **Scene in Word**; inspect document/range and retain saved objective target. | Actual verified scene start only; objective unchanged. | B/N/S and landing. | PASS iff correct mapped scene and exact acknowledgement; no title/text guessing. | C0. |
| D04 | Review paragraph | P0; accepted Reader mapped passage selected explicitly | Click a specific accepted paragraph/passage, then **Paragraph in Word**; inspect selected Word range and provenance. | Exact accepted/verified paragraph in intended live document, not previous selection. | B/N/S, paragraph ID/alias and range screenshot. | PASS iff actual paragraph correspondence and matching ack; stale/unmapped target must refuse. | Clear only test selection explicitly. |
| D05 | Correct document activation | A/B eligible; choose A in Writer but B active in Word | Request A's known chapter/scene from browser. | A activates and lands correctly, B unchanged. | B/N, two Word window/range before/after records. | PASS iff exact selected live A executes once; any B execution FAILS. | Restore window order normally. |
| D06 | Safe navigation refusal | P0; fresh verified disposable Small | Make one unsaved synthetic edit; wait for observed unsaved state; attempt explicit navigation if offered and capture disabled/refusal feedback. | Saved-state prerequisite blocks precision; no queued/completed claim or forced save. | B/N, saved-state observation and execution counter. | PASS for refusal iff unsaved proof cannot authorise a move. Actual adapter failure is separate D15, not established here. | Discard only synthetic edit normally; C0. |
| D07 | Navigation timeout | Verified safe per-operation delay control, specific authorisation; otherwise BLOCKED | Use only approved control to withhold execution/result past 25s; issue one exact request and observe timeout; release safely. | No completion without native proof; late action/result cannot claim timely success. | B/N, ID, requested/expiry timestamps, actual execution record. | PASS physically only if controlled delayed execution/result tested; missing control BLOCKED. Managed `--word-observation` supplements, never substitutes. | Restore approved control; C0. |
| D08 | Expired command at execution | Same safe exact-command control as D07 | Hold a queued command beyond its recorded expiry before adapter delivery, then release; inspect Word execution count. | Expired command is not executed or acknowledged completed. | B/N, ID/expiry/delivery and unchanged Word range. | PASS iff expired command never executes; BLOCKED without safe delivery control. | Restore control; no private queue injection. |
| D09 | Duplicate requests | P0; responsive fresh document | Rapidly click same explicit navigation twice; record whether UI coalesces; repeat after completion; inspect UUIDs/Word execution count. | Pending repeat guarded/coalesced; completed later deliberate request works; duplicate identity cannot replay execution. | B/N, click/command/execution counts. | PASS for real UI repeat guard iff no unintended repeated pending movement. Same-UUID replay covered managed-only unless approved disposable harness exists. | C0. |
| D10 | Wrong document/session refusal | A selected but close A leaving property copy B; also reopen A new session | Attempt available navigation without selecting replacement; if unavailable, record disabled state; then select correct new session explicitly. | Old/wrong session cannot execute against B or reopened A; explicit fresh choice required. | B/N, old/new identity aliases and execution count. | PASS iff stale session never retargeted; direct API token/identity forgery forbidden. | C0. |
| D11 | Revision changes before execution | Approved deterministic safe command-delay control; otherwise BLOCKED | Queue exact request, edit/save synthetic document before delivering it, then release old command. | Old revision invalidated; current document not moved by obsolete command; no completed claim. | B/N/S, revision and command timestamps. | PASS iff deterministic ordering is established and old command refused. An uncontrolled race is INCONCLUSIVE/BLOCKED, not PASS. | Release control, restore fixture baseline. |
| D12 | Delayed/expired acknowledgement | Approved delay of actual adapter result only; otherwise BLOCKED | Execute requested move, hold result past recorded expiry, then release without resubmission. | Actual earlier execution recorded, but late result cannot manufacture a new/current completion receipt. | B/N, physical execution vs receipt timeline. | PASS only actual ordered result delay and correct expiry state proven; managed late-ack test labelled separately. | Restore control; C0. |
| D13 | Word unavailable and return | P0; accepted Review readable, unsaved Writer note in current page | Close only disposable Word normally; inspect controls, then reopen and return via Word **PlotDirector/Writing Context** and existing browser tab. | Clear unavailability; accepted text/draft retained on safe same-page return; explicit origin adoption only, no objective retarget. | B/N/S, note/Focus/objective/range before/after. | PASS iff no data/target overwrite; if link opens another tab, record tab scope separately rather than claim draft transfer. | Save/discard only synthetic draft explicitly. |
| D14 | Cross-book/uncertain mapping | P0; Medium active, Small book selected; include unmapped scene | Attempt Small's target while no matching live Small exists; attempt unmapped scene paragraph; inspect explanations. | Wrong-book/unverified target refused, never inferred from active window or similar text. | B/N/S, eligibility/refusal. | PASS iff no command executes against Medium/guessed scene. | Restore intended book/document explicitly. |
| D15 | Actual native execution failure | Verified safe per-operation native-failure mechanism and separate approval; none established by Atlas | Inspect mechanism and ordering first; trigger exactly one failed adapter execution against disposable Small and inspect browser outcome. Without safe mechanism record BLOCKED; do not use read-only mode as an assumed failure (Word may legally select read-only text). | Actual native failure reported as failure, never completed; document remains intact. | B/N, actual adapter error, matching command ID and unchanged/correct range. | PASS physically only if an actual safe native failure is observed and correctly surfaced; ordinary prerequisite refusal is insufficient. | Release approved mechanism; C0. |
## E. Saved manuscript → accepted canonical content → Reader/Review
Each mutation starts from its own pristine synthetic working baseline and known accepted revision; one case's structural changes must not silently become another case's baseline. Record Word content/saved state, accepted revision/content and live verification **separately**. Use E01/S artefacts for GUIDs; where supported UI does not expose durable IDs, retain existing authorised diagnostic evidence or mark the ID assertion BLOCKED. Do not inspect/modify live SQL or private tokens just to obtain a green identity result.
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| E01 | Initial accepted capture | P0; neutral Small, empty owned book, authorised import | Use normal import wizard/Companion association; preview chapters/scenes then confirm only intended synthetic import; wait for accepted Reader and verified position. | Saved capture becomes accepted canonical text with correct book/chapters; missing scene mapping remains uncertain. | B/N/S, import decisions and baseline paragraph IDs/checkpoints. | PASS iff actual saved fixture, accepted text and live positions correspond; preview alone is not acceptance. | Retain immutable local/accepted baseline; no reset of other books. |
| E02 | Saved paragraph edit | E01 baseline, mapped middle paragraph | Replace a short sentinel with different-length synthetic text; save normally; wait for selective sync and Reader update. | Changed chapter accepted once; unaffected paragraphs retain justified IDs/associations, later positions refreshed. | N/S, timing/reuse/reconciliation counts. | PASS iff actual accepted text matches save and old precise positions are not reused without proof. | C0 baseline or new test-owned book. |
| E03 | Same-length saved edit | Fresh baseline; two equal-length sentinel strings | Replace one string with its exact same-length partner, save; observe auto/periodic detection and explicit Synchronise if required by mode. | Content difference detected despite same length; accepted revision/content updates correctly. | N/S, equal character counts and detection latency. | PASS iff new content accepted and stale hash/position not falsely current; length-only detection fails. | C0. |
| E04 | Unsaved edit | Fresh baseline; current accepted Reader | Edit without saving; wait through >60s periodic opportunity with Word responsive; inspect Reader/status/precise navigation. | Unsaved text may be observed as changed metadata but is not accepted prose/current verified position; no forced save. | B/N/S and Word saved-state screenshot. | PASS iff last accepted text remains labelled accepted and precision is withheld appropriately. | Discard synthetic unsaved edit normally or save only as next explicit test. |
| E05 | Undo/Redo while dirty | Fresh baseline, two small unsaved edits including same-length change | Undo one edit, Redo, inspect observations; finally save known final text. | Dirty-state observations do not claim acceptance; final saved content reconciles coherently. | N/S, operation order and final text hash/sentinels. | PASS iff actual final saved/accepted state agrees and no stale intermediate state wins. | C0. |
| E06 | Insert paragraph | Fresh baseline, known neighbouring IDs | Insert one unique synthetic paragraph mid-scene; save and synchronise. | New identity for insertion; unaffected identities preserved where justified; subsequent positions reverified. | N/S before/after order and IDs. | PASS iff no neighbour identity theft or invented scene assignment. | C0. |
| E07 | Delete paragraph | Fresh baseline with non-annotated removable paragraph | Delete one paragraph; save; inspect Reader, references and navigation. | Removed paragraph absent; historical annotations/provenance not reassigned silently; neighbouring identity stable where justified. | N/S and any historical-reference status. | PASS iff no deleted-position navigation or reassigned provenance. | C0. |
| E08 | Move paragraph | Fresh baseline, distinct sentinel paragraph | Cut/paste paragraph within chapter, then another disposable trial across chapter boundary; save. | Identity is preserved only with justified native evidence; order/positions updated; uncertain association flagged. | N/S for both trials, original/new chapter aliases. | PASS iff no text-based identity guessing or old-position execution. | Restore both trial baselines separately. |
| E09 | Split paragraph | Fresh baseline, known paragraph ID | Insert paragraph break mid-paragraph; save and verify new accepted partition. | Split represented coherently; no duplicate durable identity assigned to both parts. | N/S, exact split position and IDs. | PASS iff accepted partition and live positions agree and provenance is not guessed. | C0. |
| E10 | Merge paragraphs | Fresh baseline, two known paragraphs | Remove separating paragraph break; save and inspect accepted partition/annotations. | Merge coherent; surviving/new identity justified, old separate target not silently reassigned. | N/S, original and new IDs/bounds. | PASS iff canonical/live geometry valid and historical references safe. | C0. |
| E11 | Chapter rename | Fresh baseline, Heading 1 chapter | Change heading text only; save; inspect chapter context and accepted Reader. | Stable chapter identity retained where proof supports it; title updated without cross-chapter retarget. | N/S, heading/chapter ID and title. | PASS iff actual identity/context coherent, not matched solely on old title. | C0. |
| E12 | Chapter reorder | Disposable multi-chapter baseline | Move full chapter including heading between two other chapters; save and verify all affected ranges. | Current order/boundaries revalidated; no old numeric range treated current. | N/S, chapter and paragraph sequence maps. | PASS iff all explicit landings follow actual new order or safely refuse pending review. | C0. |
| E13 | Chapter boundary change | Fresh medium baseline; adjacent chapters | Insert/remove a Heading 1 boundary and move one paragraph across it in separate trials; save. | Changed topology requires valid new evidence/review; no guessed chapter/scene mapping. | N/S, topology decisions and navigation checks. | PASS iff boundary changes do not inherit obsolete precise targets. | C0 for each trial. |
| E14 | Interrupted sync | Authorised normal agent quit; disposable saved edit pending | Start Synchronise, quit agent normally during observable active work; reopen, inspect accepted Reader and recovery. If too fast, use medium/large without artificial hang. | Committed accepted data remains; partial/stale work cannot corrupt/replay into another session; recovery coherent. | N/S, interrupted request/revision timeline. | PASS iff real interruption captured and accepted state/recovery safe; no captured active interval means BLOCKED/NOT_RUN, not PASS. | Restore normal agent, C0. |
| E15 | Agent restart after completed work | Saved accepted baseline, no pending operation | Record IDs/checkpoints, quit/reopen installed agent with Word open, reverify unchanged text. | Same accepted content/identities retained, fresh live proof rebuilt/reused legitimately. | N/S, checkpoint reuse vs reconcile counts and restart identity. | PASS iff accepted data stable and no fabricated fresh UI proof. | C0. |
| E16 | Reader update preserves selection | Accepted Review passage selected; another synthetic saved edit elsewhere | Leave passage selection/Focus Reading active; save unrelated Word paragraph edit; wait for accepted notification and Reader refresh. | Metadata-only notification does not replace selected prose unnecessarily; content-changing refresh protects/invalidates selection coherently. | B/N/S, selected passage IDs and before/after DOM/UI. | PASS iff no silent changed-target annotation or contradictory precise Word control. | Explicitly reselect if invalidated; C0. |
| E17 | Scene association certainty | Mapped scene and deliberate zero-paragraph/unmapped scene | Navigate Focus to each; edit nearby text, save and resynchronise; inspect scene associations and precise controls. | Supported mapping remains correct; unmapped scene stays unassigned unless author explicitly maps it. | B/N/S, associated paragraph ID sets. | PASS iff no invented association based on proximity/title/text. | C0. |
| E18 | Disconnect retains accepted content | Accepted baseline, Word/agent normal close approved | Close disposable Word and quit agent; reload Review/Reader; inspect accepted revision, notes and history. | Accepted prose/annotations remain readable; disconnected live position not represented as fresh. | B/S and offline status. | PASS iff durable accepted content retained with accurate liveness. | Restart normally for F; C0. |
## F. Complete Writer, Review and installed PWA workflows
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| F01 | Home/Write workspace journey | P0; owned project/book, accepted Small | Select project/book on Home; enter Write, navigate all Writer areas and back; repeat in normal browser and installed PWA. | Correct project/book and fixed saved target; same-window navigation where designed; no Word cursor movement. | B, route/book/objective snapshots and N execution count. | PASS iff scope retained and no hidden retarget or automatic cursor move. | C0. |
| F02 | Saved objective activity/intention | P0; known mapped scene | Create Revising objective with chapter/scene/intention through current wizard; change Global Focus to another scene/chapter, navigate Word explicitly elsewhere; reload Write. | Saved chapter/scene/activity/intention remain fixed until deliberate objective change. | B/N, saved objective summary and independent Focus/Word targets. | PASS iff all saved fields unchanged; any passive retarget fails. | Remove only synthetic objective if authorised; C0. |
| F03 | Sessions and unsaved return note | F02; explicit session recording authorised | Start Editing for objective chapter; type unsaved return note; move Word cursor/return to same Writer tab/PWA, disconnect/reconnect; end session explicitly and reload. | Return events preserve draft; ended record retains intended chapter/note; sync progress is separate. | B/N/S, session start/end/history and note hash/alias. | PASS iff draft not overwritten and final explicit save persists correct note/target; do not assume arbitrary reload preserves an unsaved page. | End only synthetic session; C0. |
| F04 | Explore and Guided Investigation independence | Owned fixture; Word normally closed | Start concern, answer inline questions to result, save/resume after refresh; return to Write and inspect objective/session. | No Word requirement; current inline journey persists; no automatic session/objective change. | B and saved investigation/result alias, session count. | PASS iff current inline flow works independently; removed standalone entry is not required. | Archive/delete only authorised synthetic investigation through UI. |
| F05 | Plan intended work | Owned fixture; baseline session/accepted revision recorded | Add planned activity with scene target, notes/date; use list/board/schedule; change status; return to Write. | Planned work/schedule retained; no recorded manuscript edit/session or objective retarget without explicit Start/change. | B/S, planned item and session/accepted revision comparison. | PASS iff planned/completed manuscript authorities stay distinct. | Remove only synthetic plan item through UI. |
| F06 | Reflect and Dashboard | F03 completed session; accepted baseline | Open Reflect calendar/history and Dashboard; inspect recorded session/note and accepted progress while Word has an unsaved synthetic edit. | Recorded/accepted history shown, no claim to know unsynchronised Word prose. | B/S, compared session/accepted vs unsaved states. | PASS iff projections reflect durable records and distinguish unsaved edits. | Discard only synthetic dirty Word edit; C0. |
| F07 | Three-column Review notes | Accepted Small with mapped scene | Open Review; inspect Chapter Notes/Reader/Scene Notes; edit/save synthetic chapter and scene notes independently. | Correct chapter/scene targets and accepted middle column; note edits are not manuscript changes. | B/S, note target and accepted revision. | PASS iff saved notes attach intended records without prose/target changes. | Restore/remove only test notes. |
| F08 | Annotations, edit and resolution | Accepted mapped passage; annotation writes authorised | Explicitly create Chapter, Scene and Passage observations; edit classification/text; resolve one; revisit passage. | Exact saved provenance/scopes, correct target and resolution; no changed Word prose. | B/S, observation aliases/scope/paragraph IDs and resolution. | PASS iff each scope/provenance is correct and revisiting does not retarget another note. | Delete/archive only synthetic annotations through supported UI; otherwise retain owned book for final cleanup. |
| F09 | F1 chapter-only fallback | Review mapped passage/scene selected, clean editors | Set Global Focus to same chapter with no scene; inspect displayed Reader/panel/Word controls; start new annotation without saving. | Obsolete passage, scene and precise Word targets clear; chapter remains correct. | B, selected target before/after, N command count. | PASS iff no old passage/scene field/control remains authoritative; no unintended write/command. | Cancel only empty synthetic form. |
| F10 | F1 unmapped fallback and explicit reselection | Deliberately unmapped scene in accepted chapter | Select mapped passage, switch Global Focus to unmapped scene; inspect fallback; then explicitly select a current mapped passage. | Unmapped fallback clears old precision; explicit reselection restores only newly chosen supported target. | B/S, selected paragraph/scene IDs and refusal/availability. | PASS iff no guessed unmapped position or old precise target; explicit new selection is distinguishable. | C0. |
| F11 | Dirty-editor deferral | Review synthetic annotation editor or Chapter/Scene note dirty | Change same/cross-chapter Focus while editor dirty, including during slow context load if naturally observable; inspect explanation; save/cancel deliberately, then use Go/resynchronise. | Editing target/draft retained; follow deferred until author action; late response cannot overwrite new target. | B, draft/target hashes and focus/context response order if available. | PASS iff draft survives and no silent form retarget; unobserved response-race branch recorded separately. | Save/discard only synthetic editor; C0. |
| F12 | Focus Reading and accepted updates | Review mapped passage, installed PWA | Enter Focus Reading; navigate next/previous chapter; update accepted synthetic text elsewhere; return/refresh. | Reader mode/valid chapter retained; selection safe; no contradictory passage/Word target after revision change. | B/S, mode/selection/context before/after. | PASS iff visible chapter and all actionable targets agree; no annotation target inferred silently. | Exit focus mode deliberately; C0. |
| F13 | F2 historical AI-review guard | Owned synthetic native review created through supported workflow, with separately approved AI cost; capture original saved session/content | Read review and make supported decisions; verify valid original-source navigation if eligible; close/reopen/change content (even if numeric revision repeats), revisit historical review and attempt locate. | Reading/decisions remain usable; stale/missing source-session/content proof refuses navigation (409/unavailable), never targets reused offset. | B/N/S, review/source session aliases, old/new content/proof and response status. | PASS iff original valid branch lands correctly and historical branch safely refuses. No synthetic stale review available means BLOCKED; do not forge DB records or use author reviews. | Retain/remove only owned synthetic review/book through UI after evidence. |
| F14 | Installed PWA return/refresh across all boundaries | F01–F13 applicable prerequisites; same PWA window/session | Repeat F1 fallback, explicit reselection, dirty-note safe return, objective/session and unavailable-document cases while switching Word→installed PWA; refresh only safe persisted state. | Actual installed PWA current JS retains precise-target correctness and saved state; same-tab R2 pin preserved. | B/N/S with actual PWA/version and task-switch/refresh order. | PASS iff actual installed run proves contracts; simulated browser flag cannot pass this row. | Close only test PWA normally; C0. |
## G. Physical large-manuscript performance
Use **both** neutral 190k and 250k fixtures, verified Word-open without repair and associated to separate owned books. For every G row record fixture/trial/cold-or-warm and at least **three comparable trials** unless safety stops the run. First establish the human-approved add-in-disabled baseline and then the matched enabled condition, preserving all other settings. Disabling/re-enabling add-ins is a user-approved local test action, never an automated way to bypass loading/signing failure. Record agent process separately. P0 plus measurement scope/threshold decision from handover section 6 is required. Percentiles/counters absent from available instrumentation are UNAVAILABLE; never fabricate them from synthetic hashes or aggregate maxima.
All measured correctness must pass regardless of threshold agreement. Proposed timing thresholds require explicit approval; absent agreement, record values and **performance acceptance NOT AGREED**. Historical 5–10s aspiration, 16s measurement and scheduler slice budgets have distinct sources and are not promises for these fixtures.
| ID | Purpose | Preconditions | Exact actions | Expected result | Evidence beyond E0 | Pass/fail criterion | Cleanup |
| --- | --- | --- | --- | --- | --- | --- | --- |
| G01 | Baseline and instrumentation | Both sizes, human approval for disabled/enabled comparison and measurement tools | Record hardware/settings; obtain same-operation disabled baseline then re-enable intended .41 add-in; start process CSV and approved UI/COM measurements; confirm thresholds decision. | Comparable physical baseline with known scope; no hidden author workloads or synthetic CPU surrogate. | M, versions/settings, approved thresholds and enabled/disabled evidence. | PASS for measurement readiness only iff comparable real Word data captured; missing baseline BLOCKS comparative claims. | Restore enabled .41 and normal settings; no reboot. |
| G02 | Opening and add-in startup | G01, closed saved fixture | Human opens each fixture from normal Word; time open-to-interactive, add-in-loaded, first useful verified context and full manuscript verification separately. Repeat cold/warm. | Useful Word UI throughout; correct complete verification with real boundaries. | M/N/S, video/event timestamps, chapter counts and reuse/reconcile/request/byte deltas. | PASS correctness iff actual chapters verified and UI safe; timings pass only approved gates. No sum of overlapping counters as total. | Close each fixture normally between controlled trials; preserve cache condition record. |
| G03 | One-chapter saved edit | Completed baseline each size; cursor outside edited chapter in one trial | Edit one middle chapter, save; record save/debounce/read/first-context/accepted/complete times and per-chapter work. | Selective reconciliation of changed chapter; unchanged checkpoints reused only with fresh evidence. | M/N/S, changed chapter, matches/mismatches, reuse/reconcile and HTTP/byte deltas. | PASS correctness iff accepted edit and justified reuse; compare approved save-to-accept threshold, not full-scan CPU proxy. | Restore authorised trial baseline; C0. |
| G04 | Same-length physical edit | Completed baseline each size | Equal-length replacement, save; measure automatic detection; repeat while already dirty then save; record periodic/manual branch. | No missed content change; unchanged geometry not assumed from length. | M/N/S, equal lengths/fingerprints and detection/accept latency. | PASS iff correct physical detection/acceptance; timing gate only if approved. | C0. |
| G05 | Multiple edits/coalescing | Both sizes, completed baseline | Make several edits rapidly in one chapter then three chapters, save after each planned sequence; observe revision/debounce/supersession. | Bounded work coalesces, final saved revision wins; no stale earlier acceptance. | M/N/S, edit/save order, work counts and queue peak. | PASS iff final state correct and queues bounded/recover; compare approved timings. | C0 for each sequence. |
| G06 | Unchanged periodic verification | Both sizes, complete unchanged saved state | Leave responsive Word open for at least two observed periodic opportunities (~60s scheduling, not hard deadline); record actual passes and HTTP deltas. | Fresh range checks; valid same-revision checkpoint reuse avoids unnecessary prose reconciliation/requests where implemented. | M/N, periodic timestamps, live/XML/reuse/reconciliation/request/byte counts. | PASS iff no false unchanged proof, unbounded rescanning or unintended reconciliation; missing counters reported, not zeroed. | Leave normal scheduler/settings unchanged. |
| G07 | Document switching during sync | Both large docs open, explicit selection known | Start verification of one, switch windows repeatedly while typing/scrolling lightly in the other, then return. | Active author remains responsive; exact sessions isolated; R1 inactive expiry is conservative and R2 pin stays explicit. | M/N/B, switch timeline, per-session queues/verification and range proof. | PASS iff no wrong-session work/navigation and no material responsiveness failure; measure both sizes. | C0; restore intended active fixture. |
| G08 | Cancellation | Approved existing normal cancellation/closure path, large active work | During actual work close only the saved disposable document normally (or use a supported visible Cancel if present); record retirement/cancellation and remaining document state. | Pending exact-session work retired, no late stale commit; other document unaffected. | M/N/S, actual cancel/close timestamps and late responses. | PASS iff observed cancellation preserves accepted data and other sessions; no forced process kill or invented Cancel control. | Reopen fixture normally for recovery case. |
| G09 | Recovery / unchanged reopen | G08 or authorised normal agent restart | Reopen saved fixture/relaunch normal agent as appropriate; time first useful fresh context and complete verification; compare accepted IDs/checkpoints. | Reconnect/reuse restores coherent current proof without reimport/resetting binding. | M/N/S, recovery interval defined from resume eligibility, reuse vs reconciliation. | PASS correctness iff state retained/refreshed; recovery timing only against approved gate. | C0. |
| G10 | Typing responsiveness | Baseline/measurement tools approved; each size synchronising | Type synthetic marked text continuously for two minutes during real extraction; measure keystroke-to-display with approved external sampling; save/discard intentionally. | No lost/duplicated typing or sustained lag; honest UI latency rather than timer proxy. | M, actual input/output observations and UI trace/samples. | FAIL on lost input/unresponsive behaviour; p95 gate only if approved and samples valid. | Remove only test typing or restore trial baseline. |
| G11 | Scrolling and ribbon response | Each size synchronising; baseline measured | Scroll through multiple chapters; invoke Word PlotDirector ribbon/Open Companion/Synchronise once at recorded times; observe visible response. | Responsive scrolling/ribbon; duplicate work controlled; correct status distinct from completion. | M/N, scroll/ribbon input-to-visible timing and queue/work counts. | FAIL on material stall/wrong status; apply only agreed latency gates. | Restore reading/cursor position explicitly, C0. |
| G12 | UI/COM latency and process pressure | Existing approved diagnostics/trace tools | Capture operation counts/total/max and >30/>100ms counts per trial; compute percentiles only from full samples; sample Word/agent CPU, private/working memory and queue depth under actual G02–G11 work. | Bounded queues/resources and accountable slow COM operations; no scheduler-preemption claim. | M/N, process CSV/PID/CPU delta, operation sample scope and peak queues. | FAIL on unbounded growth, unsafe COM/thread behaviour or persistent responsiveness loss; flag >100ms calls for investigation. Missing samples BLOCK percentile claim. | Stop approved traces normally; sanitise private paths. |
| G13 | Network and reconciliation accounting | Existing native counters available; approved narrow agent-specific byte capture if available | For one unchanged pass, one-chapter edit and boundary change, record before/after request counts/bytes, validations/reuses/reconciliations; correlate to accepted revision. | Changed content reconciles as necessary; unchanged chapters have justified checkpoint reuse, not hidden full prose transfers. | M/N/S, redacted agent endpoint/count/byte summary; browser traffic separately labelled; overlapping vs exclusive timings identified. | PASS only measured accounting agrees with actual work; unavailable transferred bytes is BLOCKED for that metric, never inferred as zero. | End scoped capture; keep raw tokens/prose outside Git. |
| G14 | Combined recovery/end-state | Both sizes tested, no author docs touched | Repeat saved edit→switch→normal cancellation→reopen sequence once per size; verify final accepted Reader/Review, correct Word landing and bound account; complete cleanup checklist. | Final state coherent with no lingering test control/session/process or stale precise target. | M/N/B/S and cleanup.json. | PASS iff end-state/cleanup explicit; any unresolved corruption/identity mismatch blocks overall completion regardless of timing. | Human confirms drafts saved/discarded, synthetic records/copies handled, normal add-in/settings/binding restored. |
## Final classification
Report `PASS` only for evidence actually obtained; use `BLOCKED` with the missing prerequisite and next responsible action. Separate confirmed defect, unverified risk, physical qualification requirement and optional improvement. R1 unsafe-stall coverage, delayed-command ordering or unavailable historical AI review may remain physical requirements; do not change code, invent a fault hook or silently waive them. If any required physical row is blocked, the run is partial. No Production deployment/distribution is authorised by a successful matrix.

View File

@ -0,0 +1,67 @@
# Ready-to-paste Windows Codex execution prompt
Copy the text below into Codex on the Windows development machine, in the existing PlotDirector checkout. It does not authorise installation or desktop interaction before the explicit interactive gate.
---
You are executing **PlotDirector Writer Phase 3B.4 physical Windows/Microsoft Word Companion qualification**. Atlas has completed preparation, not physical acceptance. Use the existing shared branch `codex/word-companion-native-phase1-20261104`. Production is forbidden. Do not deploy server code, apply SQL/configuration changes, create a new architecture/focus/synchronisation system, change native version, add test hooks, or use real author manuscripts.
Read repository `AGENTS.md`, then these three documents (repository-relative):
1. `Docs/Writer/Writer-Phase3B4-Windows-Handover.md`
2. `Docs/Writer/Writer-Phase3B4-Acceptance-Matrix.md`
3. `Docs/Writer/Writer-Phase3B2-3B3-Completion.md` for evidence context only.
The handover contains the actual supported build/package commands, local prerequisites, neutral fixture recipe, recovery and evidence schema. Follow it; no fresh architecture audit is required. Current source and verified local environment outrank historical version headings. Stop and report a concrete inconsistency rather than improvising a new build/installation path.
**Baseline:** application ancestor `80f7cb516b52bcf1a0d42493700f0bde85ac776c`, documentation ancestor `5b7eb27`, matched native add-in/agent **1.0.0.41**, MSI **1.0.41**. Development only: `https://dev.plotdirector.com/`. Atlas observed deployed version `1.0.0+80f7cb516b52bcf1a0d42493700f0bde85ac776c`, DLL hash `5d7f9b4db127f89a7fb866a932b2c14af5d5b7b96cae4b1bd25fc43e10d3c16d`, Word-widget JS hash `58123f11f50145323db3c086768c0dd77e3442d16fe8b1d9d8720c7f9b130d54`. Recheck freshness of this attestation through authorised read-only means; the website need not expose its assembly version publicly. If the server differs or authenticated book capabilities are incompatible, record the discrepancy and stop connected testing; ask for an Atlas readiness investigation, not permission to deploy from Windows.
Proceed in these phases:
**1. Unattended preflight/build/package only.**
- Inspect current branch/status, fetch tracking remote and fast-forward as specified. Preserve unrelated changes. If wrong branch, dirty/untracked worktree, divergence or later application/native changes, stop with exact details; do not reset, force-push, switch branches or discard work to make the build helper run.
- Verify source ancestry, .41 metadata, existing Windows/Word/VS/runtime/PowerShell tools, normal-user context and approved existing signer. Inspect existing installation read-only with `WindowsValidation/Setup/Inspect-UserInstallation.ps1`; raw identity/profile report stays private.
- Use existing x64 PowerShell 7 and the handover's exact `Update-WordCompanion.ps1 -CertificateThumbprint $thumbprint -NoSync` workflow after safe sync. It restores/builds/tests/signs a developer payload; it never installs. No VS launch/Clean/F5, dependency installation/repair, certificate creation/export/trust changes or execution-policy bypass. Never print private keys, tokens or protected state.
- Keep all raw staging/evidence outside Git while clean-worktree gates execute. Record full actual build SHA, not only the implementation ancestor. If the script reuses a validated existing package, record this and run the explicit required checks; never claim a build/test ran merely because a directory existed.
- Run additional foundation/`--word-observation`/`--chapter-sync` and full executable application regression commands from the handover, serially. Portable/managed fixtures cannot establish physical COM behaviour.
- Build the existing unified installer via `WindowsValidation/Setup/Build-Setup.ps1`; run `Test-DeveloperPayload.ps1` and `Test-SetupPackage.ps1` with a locally verified preserved older-family MSI. Run `Test-UpgradeRegression.ps1` only when its actual failed-setup artefact exists. Do not invent inputs or assume .41 installer availability from source version.
- Verify hashes, signer, mage manifests, MSI/CAB/version/upgrade evidence. Developer trust-only signature warnings require explicit review per handover; invalid signing/digests stop. Locate a suitable human-approved, signed known-good rollback package and record its actual path/hash/availability. Historical .10/.33 reports are not proof those files exist now.
**2. Stop for human interactive authorisation.**
Complete the concrete preflight first. Present the candidate source, package path/hash/version/signer, static test results, current installation, preserved rollback package, missing prerequisites, proposed disposable fixture/account/book scope and performance thresholds. Ask the human to approve a scheduled interactive installation/physical-test window, normal Word saving/closure, fixture creation/import/notes/sessions and any separately required AI cost. Explain that this handover requires the gate because setup changes installed add-in/agent registration and the tests control Word and mutate synthetic Development records. Do not launch Setup/Word, drive desktop/PWA, provision accounts or mutate manuscript data before this authorisation. Do not repeatedly ask for actions already covered by the approved scope.
If an existing prerequisite must be installed, trust store changed, account switched/revoked, tracing/debugger/network fault injection enabled, software uninstalled/rolled back, or an unresponsive process forcibly terminated, stop for specific additional human action/approval. Never terminate or suspend Word, reset pairing state or remove author data to force a test to pass. If Codex has no authorised desktop-control mechanism, ask the human to perform the exact documented action and wait for evidence; do not simulate it and claim acceptance.
**3. Approved normal-user installation and fixture setup.**
- Have the human save/close all Word windows normally and run the unified EXE from normal File Explorer. Do not use `--install` as a silent bypass. Wait for actual completion; inspect native MSI current-user context, Complete=3, file hashes/versions, installed manifest, actual loaded VSTO .41 and running installed agent .41. A setup parent exit zero or LoadBehavior=3 alone is insufficient.
- Use only authorised disposable Development account/project/books and new local synthetic files. Follow the existing generator plus handover neutralisation recipe before opening its raw outputs: generator IDs/tags are not real authorised server associations. Check OOXML opens without repair; verify real Word counts/structure. Build small, medium, 190k and 250k baselines and deliberate same-property copies. Hash and retain pristine originals privately.
- Establish actual Development account/server/book association, real saved capture/acceptance and mapped/unmapped scene fixtures through supported UI. No direct SQL, Production data, private author reviews or existing manuscript edits. F2 requires a genuine authorised synthetic historical native review/source fixture; if unavailable mark that row BLOCKED instead of inventing a database record or unsupported creation workflow.
**4. Execute the matrix in strict A → B → C → D → E → F → G order.**
Record every stable ID with prerequisites, exact actual actions, evidence, UTC start/end, physical/managed-only mode, result and cleanup. Save before/after diagnostics and actual Word range/identity evidence when navigation is expected. Repeat required browser/PWA cases in a genuinely installed PWA; standalone flags and mocked transports do not establish physical acceptance.
Critical contracts:
- **R2:** explicitly selected A remains disconnected if A disappears; never silently becomes B, including same-title/property copies, restart and same-tab refresh/return. Initial sole-document convenience is allowed only without prior explicit choice.
- **R1:** transport liveness is independent from UI observation freshness. Matched .41 selection frames stamp before COM reads; at >=45s age, cached saved/cursor/chapter/scene proof cannot authorise precise navigation. No safe dedicated stall hook was found in the production runtime. Follow C04: without a verified safe authorised mechanism, mark true blocked-UI/stall cases BLOCKED. Inactive-document expiry and managed-clock success are different evidence; never suspend/crash Word or add a runtime hook to manufacture a result.
- **Navigation:** exact live document/session/manuscript/revision/range; HTTP 202 means requested. Completed requires actual matching native execution acknowledgement. Delayed/expired command/result rows require a safe authorised control; a lucky race or fabricated packet cannot pass them. Command expiry is 25s; record actual timeline.
- **Synchronisation:** unsaved Word text, accepted canonical prose and verified physical positions are separate. No forced saves, identity/scene guesses, stale commits or rewrites of annotation provenance. Changes are synthetic and reversible only within the approved fixture scope.
- **F1:** chapter-only/unmapped Review fallback clears obsolete precise passage/scene/Word target; dirty editors defer without losing drafts. **F2:** stale/unverifiable historical AI-review positions refuse navigation while reading/decisions remain usable.
- Global Narrative Focus, actual Word position, saved objective and session/Review selection stay independent except explicit author actions. Do not implement optional Context/Intent I1 during acceptance.
- Measure real 190k/250k Word opening/verification/edits, typing/scroll/ribbon responsiveness, COM/queue/network/reconciliation metrics per G. Obtain approval for proposed thresholds; absent agreement report measured values with performance acceptance NOT AGREED. Never substitute hashing fixtures, scheduler budgets or aggregate max values for physical responsiveness/percentiles.
Stop immediately on wrong-document/range execution, corrupted/lost data, unexpected account/server/source, invalid signing or material Word unresponsiveness. Preserve evidence and drafts, follow the handover recovery table, and mark dependent rows BLOCKED. Do not silently fix source or repackage during this acceptance task; produce a separate defect reproduction/request for any necessary implementation work.
**5. Evidence, cleanup and documentation-only handoff.**
After clean packaging gates, place only sanitised evidence under `Docs/Writer/Evidence/Phase3B4/<new-UTC-run-id>-windows-<shortSHA>/`. Follow handover schema for environment/package/readiness/results/performance/thresholds/cleanup and concise `report.md`. Never overwrite an earlier run. Keep raw profiles, credentials, cookies, DPAPI state, pairing codes/URLs, certificate keys, registry exports, unsanitised HAR/traces and DOCX contents outside Git.
Complete only authorised synthetic cleanup via supported UI; retain known-good packages and necessary private failure fixtures. Confirm no author data/state changed and normal test-only settings restored. Classify remaining items as confirmed defect, unverified risk, physical qualification requirement or optional improvement. A run with required physical rows blocked is partial, never “Phase 3B.4 passed.”
Fetch safely, commit only qualification documentation/sanitised evidence on the shared branch, push normally, preserve unrelated changes. No force push, installer binaries, native/application code changes, Production operation or server deployment. Final response: actual source/package/installed/server versions, physical results and blocked cases, performance/threshold decision, cleanup, evidence/report paths and commit hash. Stop after reporting; no distribution/Production rollout is implied.
---

View File

@ -0,0 +1,313 @@
# Phase 3B.4 Windows/Word execution handover
Prepared on Atlas, 20 November 2026. **Preparation only: no Windows build, installation or physical acceptance was performed.** Run the [acceptance matrix](Writer-Phase3B4-Acceptance-Matrix.md) in order using the [Windows Codex prompt](Writer-Phase3B4-Windows-Codex-Prompt.md). All repository paths below are relative to the checkout root. Windows paths containing placeholders must be resolved locally; none identifies an available package by assertion.
## 1. Exact source and server baseline
- Shared branch: `codex/word-companion-native-phase1-20261104`. Atlas preparation started at `5b7eb27`; fetch its documentation descendants. The exact handover commit is the commit containing these documents. Record the full actual build SHA; do not hardcode a future documentation commit into package metadata.
- Required application ancestry: `bcef86e1cc47764ae2165e4d9d1232fd666bbe13` (3B.1), `80f7cb516b52bcf1a0d42493700f0bde85ac776c` (3B.2/3B.3). `5b7eb27` contains its completion evidence. Later application/native/script changes require review before using this baseline; documentation-only descendants are expected.
- Required matched add-in/agent **1.0.0.41**, MSI **1.0.41**. `PlotDirector.NativeCompanion/DeveloperVersion.props`, `Vsto/Properties/AssemblyInfo.cs` and `WindowsValidation/Setup/Release.json` agree. ProductCode `{EF24354B-9ADC-4C69-9F8C-9BD261CB0291}`; UpgradeCode `{641A087B-9779-458C-B290-BCBBAD49319A}`. **Source metadata does not establish an existing .41 package or installed version.**
- Server: **https://dev.plotdirector.com/** only. At 2026-11-20 23:51 UTC: service active since 22:45:45 UTC; deployed informational version **`1.0.0+80f7cb516b52bcf1a0d42493700f0bde85ac776c`**. DLL SHA-256 `5d7f9b4db127f89a7fb866a932b2c14af5d5b7b96cae4b1bd25fc43e10d3c16d`; `writer-word.js` SHA-256 `58123f11f50145323db3c086768c0dd77e3442d16fe8b1d9d8720c7f9b130d54`, matching Phase 3B.3 deployment evidence. No discrepancy found. Read-only recheck at 2026-11-21 00:04 UTC returned the same version/hashes. [Atlas readiness evidence](Evidence/Phase3B4/20261120T235104Z-atlas-preparation/readiness.json) and [static command/path qualification](Evidence/Phase3B4/20261120T235104Z-atlas-preparation/script-contracts.json) are retained separately from future physical runs.
- TLS-validated anonymous GET `/` and `/Account/Login`: 200. Native GET `/api/native-companion/connection`, `/api/native-companion/books`, `/api/native-companion/books/0/chapter-sync`: 401 as expected; website status/connection/Writer GETs redirect to login. Source confirms protected endpoint definitions. This is route/version readiness, **not authenticated API or book qualification**. Atlas created no account, authenticated no author, sent no write request, queried no database and restarted/deployed nothing for this task.
- No new migration or configuration delta is required by .41: changes from the preceding deployed implementation introduce only native/UI safeguards and tests; no SQL/Program/appsettings delta. Existing installed schema/feature configuration was not re-audited by direct DB access. Earlier actual Development fixture acceptance is in `Docs/Writer/Writer-Phase3B2-3B3-Completion.md`. Windows must still establish its authorised account/book, runtime feature eligibility and native connection before importing.
Authority reconciliation: `Docs/Writer/Writer-Phase3B-Word-Companion-Integration-Audit.md` identifies F1/F2/R1/R2; 3B.1 fixes F1/F2; 3B.2/3B.3 fixes the reproduced R1/R2 software paths. Current code supersedes old version pins, migration instructions, memory-only-auth claims and standalone investigation/popover layouts in historical README files. Do not replay old migrations or redesign the present three-column Review. The setup README's version21 heading is historical; current `Release.json` is authoritative.
Contracts to carry into execution:
| Contract | Current authority / qualification implication |
| --- | --- |
| Pipe protocol | `PlotDirector.NativeCompanion/Protocol/Messages.cs`: protocol 1; required `sessions-v1,positional-selection-v1,batched-snapshot-v1`; unchanged handshake. `Client/AgentLink.cs` offers acknowledged-navigation, chapter-range/live-text/native-position, chapter-sync, paragraph, capture and existing workflow capabilities. Verify negotiated capabilities, not just a version label. |
| R1 | `Vsto/WordAdapter.cs` timestamps selection **before COM reads** with optional `Message.WordObservedUtc`. `Agent/TrayCoordinator.cs` withholds saved/cursor/chapter/scene proof at age >=45s, while preserving document transport. It rejects stale navigation at queueing and delivery. Old frames can fall back to receipt time; matched .41 is required. No new polling subsystem. An inactive document can become ineligible until observed again. |
| Navigation | Browser `/WriterWord/Availability`, POST `/WriterWord/Navigate`, GET `/WriterWord/Navigation`; native `/api/native-companion/instances/{instance}/documents/{session}/presence`. Exact grant/book/manuscript/instance/session/revision, saved-state proof and capability checks remain. Commands expire after 25s in `PlotLine/Services/NativeCompanion/NativePresenceStore.cs`. 202 means requested; only matching actual adapter result establishes completion. |
| R2 | `PlotLine/wwwroot/js/writer-word.js` retains explicit instance/session choice in account/book-scoped **tab** sessionStorage; disappeared choice stays disconnected, never silently becomes another copy. Same-session recovery differs from a new-session reopen. Storage-unavailable fallback retains choice in page memory only; record storage policy and test refresh in normal supported storage conditions. Separate tabs/windows need independent explicit selection. |
| Authentication / association | `Docs/WordCompanion/Persistent-Authorisation.md`, `Client/DocumentBinding.cs`: existing PKCE browser approval, same-user DPAPI-protected installation state, rotating renewal and account/site-scoped bindings. Restart does not require resetting approval. Website logout can revoke installations. Never copy `installation-state.dat` or bearer credentials to evidence. |
| Synchronisation | Word unsaved content, accepted canonical prose and current verified positions are separate. `Docs/WordCompanion/2026-11-12-vsto-range-synchronisation.md` and `WindowsHandover/2026-11-12-v1.0.0.33-post-edit-synchronisation.md` explain saved-state fencing, selective reconciliation, reuse and periodic range checks. No forced save, no guessed association. |
| Writer / Review | Global Focus is independent of Word cursor and saved objective. `Docs/Navigation/FocusSynchronisationCorrection.md`, Phase 3B.1 report: chapter-only/unmapped fallback clears obsolete precise targets, dirty editors defer; historical reviews need original live source/content proof. Context/Intent I1 is optional and is not added to this qualification implementation scope. |
## 2. Windows prerequisites
Inspect and record rather than install/repair anything automatically:
- Normal authorised Windows desktop user with the existing checkout and desktop session. Current package requires **x64 Windows**; agent target is `net10.0-windows10.0.19041.0`, framework-dependent `win-x64`. Target build 19041 is a compile target, not proof of Microsoft's current OS support. Record actual OS edition/build, architecture, hardware, power plan and free disk space; verify the machine supports its installed .NET 10 runtime. ARM64/x86 Windows are not qualified by this package.
- Licensed **desktop Microsoft Word with VSTO** (not Word web/macOS/mobile). Actual edition/build/channel and 32/64-bit architecture must be read from Word About. VSTO is AnyCPU/.NET Framework 4.8; project OfficeVersion 15.0 and Office 16.0 debug registry configuration are not a guarantee covering every Office version. Qualify the actual installed Word; if both Office bitnesses are claimed, separate runs are needed.
- Existing Visual Studio Office/VSTO workload (`Microsoft.VisualStudio.Workload.Office`), Office PIAs, Framework 4.8 developer pack, VSTO runtime, .NET 10 SDK and **x64 Windows Desktop 10 runtime**. `vswhere.exe`, VS MSBuild, NETFX 4.8 `mage.exe`, Framework64 `csc.exe`, Windows `makecab.exe` and Windows Installer COM must exist. No IDE launch/F5/Clean is necessary; Office Clean can unregister the installed add-in.
- Existing **PowerShell 7 x64** for the packaging commands: current setup scripts use modern .NET APIs (`SHA256.HashData`, `Convert.ToHexString`) unavailable in Windows PowerShell 5.1. Record `$PSVersionTable`. Use **Windows PowerShell `powershell.exe -STA`** only for the optional chapter COM measurement script, which uses Framework `Marshal.GetActiveObject`.
- Existing approved developer signing certificate with accessible private key in `Cert:\CurrentUser\My`, correct Code Signing usage, valid dates and approved signer identity. Inspect public metadata only. Never export keys, invent a thumbprint, create a certificate, alter trust stores or disable security. The script can discover the installed/remembered certificate; obtain human confirmation of the selected signer if uncertain.
- Existing Chromium browser (Edge/Chrome/etc.), normal website login and an **actually installed Development PWA**, version/installation scope recorded. If PWA/browser/runtime/workload is missing, stop for human provision approval; Linux simulated standalone acceptance does not cover it.
- Human-approved disposable Development account or permission to create one through normal UI; authorised empty project/books and import/synchronisation/annotation/session/AI costs. No credentials in chat/Git. This preparation provisioned nothing. Never use Production account data or an existing author's books as a shortcut.
- DNS/TLS access to Development, normal browser approval for Companion, correct server and eligible book shown in Companion. Existing `%LOCALAPPDATA%\PlotDirector\Companion\installation-state.dat` and `server-url.txt` are private; do not dump/reset them. If binding is wrong, ask the human before switching an existing account.
- Existing diagnostic tools: Word/Companion Troubleshooting, `WindowsValidation/Measure-Processes.ps1`, Task Manager; WPR/VS debugger only if already available and explicitly authorised. Do not enable system-wide tracing or attach/suspend Word merely to manufacture a stall.
## 3. Build and package commands
Run from the repository root in an existing x64 PowerShell 7 session. Stop on any nonzero native exit code; PowerShell does not automatically throw for `git`/`dotnet`. Do not use an execution-policy bypass. Keep raw staging/evidence **outside the repository** until the update/build gates finish: `Update-WordCompanion.ps1` refuses *any* dirty/untracked worktree.
```powershell
$ErrorActionPreference = 'Stop'
function Check-Exit { if ($LASTEXITCODE -ne 0) { throw "Native command failed: $LASTEXITCODE" } }
$branch = 'codex/word-companion-native-phase1-20261104'
git status --short --branch; Check-Exit
# If any local changes or another branch: preserve them and stop; do not reset/stash/switch automatically.
if ((git branch --show-current).Trim() -ne $branch) { throw 'Wrong shared branch' }
if (git status --porcelain=v1) { throw 'Preserve local changes before building' }
git fetch origin; Check-Exit
git pull --ff-only; Check-Exit
$source = (git rev-parse HEAD).Trim(); Check-Exit
git merge-base --is-ancestor 80f7cb516b52bcf1a0d42493700f0bde85ac776c HEAD; Check-Exit
git merge-base --is-ancestor 5b7eb27 HEAD; Check-Exit
git diff --name-only 80f7cb5..HEAD -- PlotLine PlotDirector.NativeCompanion PlotLine.Tests
# Expected: no application/native/test changes at this handover baseline. Stop/reconcile unexpected changes.
$native = 'PlotDirector.NativeCompanion'
$wv = "$native/WindowsValidation"
$release = Get-Content "$wv/Setup/Release.json" -Raw | ConvertFrom-Json
$version = ([xml](Get-Content "$native/DeveloperVersion.props" -Raw)).Project.PropertyGroup.ApplicationVersion
if ($version -ne '1.0.0.41' -or $release.version -ne $version -or $release.msiVersion -ne '1.0.41') { throw 'Wrong native release' }
Get-Content "$native/Vsto/Properties/AssemblyInfo.cs" | Select-String 'AssemblyVersion|AssemblyFileVersion'
. "$wv/DeveloperPackage.ps1"
$runId = [DateTime]::UtcNow.ToString('yyyyMMddTHHmmssZ') + '-windows-' + $source.Substring(0,8)
$stage = Join-Path (Get-DownloadsFolder) ("PlotDirectorQualification/" + $runId)
if (Test-Path -LiteralPath $stage) { throw 'Run staging directory already exists' }
New-Item -ItemType Directory -Path $stage -Force | Out-Null
$PSVersionTable
dotnet --info; Check-Exit
dotnet --list-runtimes; Check-Exit
$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio/Installer/vswhere.exe'
& $vswhere -latest -requires Microsoft.VisualStudio.Workload.Office -property installationVersion; Check-Exit
```
The supported complete pipeline is `PlotDirector.NativeCompanion/WindowsValidation/Update-WordCompanion.ps1`. Set `$thumbprint` to the **locally verified approved existing** certificate's thumbprint (public identifier, no key material). Run once:
```powershell
& "$wv/Update-WordCompanion.ps1" -CertificateThumbprint $thumbprint -NoSync
# Script throws on checked failures. It builds/tests/signs a developer payload; NEVER installs.
```
`-NoSync` is valid only after the explicit safe fetch/fast-forward above; script requires the tracked remote tip to be an ancestor. It verifies source cleanliness and ancestry, discovers Office-equipped MSBuild and Desktop runtime, then executes:
1. `dotnet build PlotLine.slnx -c Release --disable-build-servers -m:1 /p:UseSharedCompilation=false` (implicit restore).
2. Release native foundation and six focused application native suites (`--native-companion`, `--native-companion-http`, `--native-workflow`, `--native-tray`, `--native-import`, `--intent-assessment`). These are disposable tests, not live Word acceptance.
3. VS MSBuild `PlotDirector.NativeCompanion\Vsto\PlotDirector.WordAddIn.csproj /restore '/t:Build;VisualStudioForApplicationsBuild' /p:Configuration=Release /p:PrepareForRunDependsOn=CopyFilesToOutputDirectory /p:SignManifests=true /p:ManifestCertificateThumbprint=$thumbprint /p:ApplicationVersion=1.0.0.41`.
4. Installed NETFX 4.8 `mage.exe` updates the publisher/application digest and signs the VSTO deployment manifest with SHA256RSA.
5. `dotnet publish PlotDirector.NativeCompanion/Agent/PlotDirector.Companion.Agent.csproj -f net10.0-windows10.0.19041.0 -c Release -r win-x64 --self-contained false -o <staging>/Agent`.
6. Inventories hashes, source SHA and signer into `package.json`, validates and atomically promotes the developer package. An existing package at the computed path is **validated and returned without rebuilding/rerunning tests**. Record whether this occurred; rerun the explicit managed checks below and verify the package SHA matches `$source`. Do not silently delete/relabel the existing package to force a pass.
The ordinary solution excludes classic Office build dependencies; `NativeCompanion.Windows.sln` is the native Windows solution. Do not replace the VS MSBuild step with `dotnet build` of VSTO, use the legacy `Build-Developer.ps1`/direct-registration install path, or run Office Clean/F5.
Additional required managed checks not supplied by the update script:
```powershell
dotnet run --no-build -c Release --project "$native/Tests/PlotDirector.Companion.Tests.csproj"; Check-Exit
dotnet run --no-build -c Release --project "$native/Tests/PlotDirector.Companion.Tests.csproj" -- --word-observation; Check-Exit
dotnet run --no-build -c Release --project "$native/Tests/PlotDirector.Companion.Tests.csproj" -- --chapter-sync; Check-Exit
dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj; Check-Exit
```
Expected Atlas reference counts are 304 foundation, 453 chapter and 633 application PASS checks, not fixed Windows performance targets. Investigate a failure; never edit production logic just to satisfy a count. If the update script reused a package, run its six named focused native application suites explicitly using the same `dotnet run --no-build -c Release --project PlotLine.Tests/PlotLine.Tests.csproj -- <switch>` syntax. No `dotnet test` substitute.
Package and inspect using actual script parameters:
```powershell
. "$wv/DeveloperPackage.ps1"
$package = Join-Path (Get-DownloadsFolder) "PlotDirectorWordCompanion/$version-$($source.Substring(0,8))"
$inventory = Test-DeveloperPackage $package
if ($inventory.commit -ne $source -or $inventory.version -ne '1.0.0.41') { throw 'Wrong payload source/version' }
# $stage: a NEW private directory outside the repo; never an existing baseline/package directory.
$setup = Join-Path $stage 'setup'
& "$wv/Setup/Test-DeveloperPayload.ps1" -PackagePath $package -ReportPath (Join-Path $stage 'payload.json')
& "$wv/Setup/Build-Setup.ps1" -PackagePath $package -ExpectedSourceCommit $source -OutputDirectory $setup -CertificateThumbprint $thumbprint
# $baselineMsi: locate and verify a preserved signed older-family MSI. No path is assumed to exist.
& "$wv/Setup/Test-SetupPackage.ps1" -PackagePath $package -SetupDirectory $setup -BaselineMsi $baselineMsi -ReportPath (Join-Path $stage 'package.json')
# Optional artefact input: set to a locally verified historical failed-setup directory if available.
$failedSetup = $null
if ($failedSetup) {
& "$wv/Setup/Test-UpgradeRegression.ps1" -FailedSetupDirectory $failedSetup -CorrectedSetupDirectory $setup -ReportPath (Join-Path $stage 'upgrade-regression.json')
} else {
'BLOCKED historical failed-setup negative control: artefact unavailable' | Set-Content (Join-Path $stage 'upgrade-regression-blocked.txt')
}
Get-FileHash (Join-Path $setup 'PlotDirectorCompanionSetup.exe') -Algorithm SHA256
Get-FileHash (Join-Path $setup 'PlotDirectorCompanion.msi') -Algorithm SHA256
Get-AuthenticodeSignature (Join-Path $setup 'PlotDirectorCompanionSetup.exe') | Select-Object Status,StatusMessage,SignerCertificate
Get-AuthenticodeSignature (Join-Path $setup 'PlotDirectorCompanion.msi') | Select-Object Status,StatusMessage,SignerCertificate
```
Do not execute the conditional upgrade command with undefined/fabricated paths. If the baseline MSI is unavailable, package/CAB upgrade qualification is **BLOCKED**, not waived; ask for the preserved artefact. Build-Setup verifies both manifests with the SDK `mage.exe -Verify`, exact application file versions, source ancestry and product/upgrade codes, then creates/signs the embedded MSI/EXE with existing tools. It writes `setup-evidence.json`. The independent package test verifies MSI/CAB, every payload hash, upgrade range, component GUIDs, per-user/asInvoker registration and embedded MSI.
Signing policy: a matching hash alone is insufficient. Record `mage` verification, approved signer thumbprint, certificate validity and Authenticode status/message. The repository permits developer **trust-only** `NotTrusted`/`UnknownError` statuses; `Test-SetupPackage.ps1` restricts these to a message indicating untrusted developer chain. This is not public distribution trust or permission to alter trust stores. Any changed signer, invalid digest, expiry, missing private key or other UnknownError stops packaging/installation. Have the human explicitly review the existing developer trust prompt when needed; never recommend disabling signing/security.
## 4. Installation and verification procedure
**Stop after producing a reviewable package and preflight report.** Obtain the human's scheduled interactive installation/physical-test authorisation, identify package path/hash/signer, account and disposable fixture scope. Have the human save and close **all** Word windows normally and resolve save prompts. Do not terminate Word, other users' agents or Visual Studio.
Before and after installation, in the actual normal user's context:
```powershell
& "$wv/Setup/Inspect-UserInstallation.ps1" -OutputPath (Join-Path $stage 'installation-before-private.json')
```
This uses supported native MSI inventory/context/SID APIs; raw output contains identity/profile information and stays private. Do not use `Win32_Product` (may trigger repairs). Capture a sanitised summary of version, MSI feature state, registration target, file hashes and same-user context.
Have the human run **`PlotDirectorCompanionSetup.exe` from normal File Explorer**. Do not run `--install` to evade its review prompt; it is an internal supported relaunch argument, not an unattended/silent acceptance command. Bootstrapper installs per-user under `%LOCALAPPDATA%\Programs\PlotDirector Companion`, preserves application state, checks Word is closed, stops only the exact same-session installed agent, exports registration/VSTA metadata, and starts the tray after a successful upgrade. It does not install prerequisites or establish certificate trust. A packaged Codex child can relaunch through WMI into the normal user context; the initial process returning zero is not proof installation finished.
Re-run `Inspect-UserInstallation.ps1` to a new private filename. Verify through supported inventory:
- Correct current user, per-user unmanaged context 2, ProductCode .41, MSI version 1.0.41, Complete feature **Local=3**, not Advertised.
- Installed `PlotDirector.WordAddIn.dll`, `Agent\PlotDirector.Companion.Agent.exe` **and** `Agent\PlotDirector.Companion.Agent.dll` file versions 1.0.0.41; SHA-256s equal the signed .41 package. Client/Protocol may retain stable assembly versions: compare exact package hashes, do not demand .41 library versions.
- Exactly the intended Word add-in registration; Manifest targets the installed `.vsto|vstolocal`, LoadBehavior 3. Inspect Word File → Options → Add-ins/COM Add-ins and actual loaded ribbon/Diagnostics after human opens the disposable document. Registration alone does not establish load.
- Actual running agent executable belongs to the installed path and current session, not a checkout/debug folder. Confirm PID/start time, `.41` diagnostics, visible Open Companion and IPC. Window X hides the tray; it does not prove exit.
- Existing Startup shortcut points to that installed tray. Launch/inspect it only during the authorised window. No reboot is required/authorised by this handover.
- Companion server is Development, author/account and eligible disposable book are correct, browser approval completes if needed, protected reconnection works. Do not reset existing approval/preferences to force success.
Read-only installed-byte checks (keep raw user paths private):
```powershell
$installRoot = Join-Path $env:LOCALAPPDATA 'Programs/PlotDirector Companion'
foreach ($relative in @('PlotDirector.WordAddIn.dll','Agent/PlotDirector.Companion.Agent.exe','Agent/PlotDirector.Companion.Agent.dll')) {
$installedFile = Join-Path $installRoot $relative
$fileVersion = [Diagnostics.FileVersionInfo]::GetVersionInfo($installedFile).FileVersion
if ($fileVersion -ne '1.0.0.41') { throw "Installed version mismatch: $relative" }
if ((Get-FileHash $installedFile).Hash -ne (Get-FileHash (Join-Path $package $relative)).Hash) { throw "Installed bytes differ: $relative" }
}
Get-ItemProperty 'HKCU:\Software\Microsoft\Office\Word\Addins\PlotDirector.WordAddIn' | Select-Object Manifest,LoadBehavior
Get-CimInstance Win32_Process -Filter "Name='PlotDirector.Companion.Agent.exe'" | Select-Object ProcessId,SessionId,ExecutablePath
```
Logs: `%LOCALAPPDATA%\PlotDirector\InstallerBackup\<timestamp>\setup.log`, `windows-installer.log` (and optional local-feature log); agent `%LOCALAPPDATA%\PlotDirector\Companion\agent.jsonl` and `.previous`; Word Tools → Diagnostics and Companion Troubleshooting. Retain private raw logs, publish only sanitised extracts. Never restore registry exports blindly.
## 5. Fixture preparation
Create fixtures only after explicit permission for disposable local files and Development test data; use a new run directory, never real author files. Keep originals, per-test working copies and file hashes. Word must open them without repair before measurements count.
Existing pure-OOXML generator (no Word/server calls):
```powershell
& "$wv/Generate-Fixtures.ps1" -OutputDirectory (Join-Path $stage 'raw-generated')
```
It creates `Discovery-190k.docx` (190,000 prose words/60-word paragraphs), `Reckoning-250k.docx` (250,000/60), two optional stress variants and `fixtures.json`. Word totals include headings. It embeds arbitrary legacy project/book IDs 1/101–104 and PD tags. **Do not open raw outputs while connected and assume these IDs are safe.** Create neutral working copies first, removing legacy bindings/tags. The following documented helper only edits new copies of these generated files; never feed it an author file:
```powershell
Add-Type -AssemblyName System.IO.Compression.FileSystem
$raw = (Resolve-Path (Join-Path $stage 'raw-generated')).Path
$fixtures = Join-Path $stage 'fixtures'
New-Item -ItemType Directory -Path $fixtures -ErrorAction Stop | Out-Null
function New-NeutralFixture([string]$rawName,[string]$name,[int]$limit=0) {
if ($rawName -notin @('Discovery-190k.docx','Reckoning-250k.docx')) { throw 'Only generator outputs allowed' }
$src = Join-Path $raw $rawName; $dst = Join-Path $fixtures $name
if (Test-Path -LiteralPath $dst) { throw 'Never overwrite a fixture' }
Copy-Item -LiteralPath $src -Destination $dst -ErrorAction Stop
$zip = [IO.Compression.ZipFile]::Open($dst,[IO.Compression.ZipArchiveMode]::Update)
try {
foreach ($entryName in @('docProps/custom.xml','word/document.xml')) {
$entry = $zip.GetEntry($entryName); $reader = [IO.StreamReader]::new($entry.Open())
try { [xml]$xml = $reader.ReadToEnd() } finally { $reader.Dispose() }
if ($entryName -eq 'docProps/custom.xml') {
foreach ($node in @($xml.DocumentElement.ChildNodes)) {
if ($node.GetAttribute('name').StartsWith('PlotDirector.')) { [void]$node.ParentNode.RemoveChild($node) }
}
} else {
$ns = [Xml.XmlNamespaceManager]::new($xml.NameTable); $ns.AddNamespace('w','http://schemas.openxmlformats.org/wordprocessingml/2006/main')
foreach ($tag in @($xml.SelectNodes('//w:tag',$ns))) {
if ($tag.GetAttribute('val',$ns.LookupNamespace('w')) -match '^PD-(CHAPTER|SCENE)-') { [void]$tag.ParentNode.RemoveChild($tag) }
}
if ($limit -gt 0) {
$body = $xml.SelectSingleNode('/w:document/w:body',$ns); $count = 0
foreach ($node in @($body.ChildNodes)) {
if ($node.LocalName -eq 'sectPr') { continue }
if ($count -ge $limit) { [void]$body.RemoveChild($node); continue }
if ($node.LocalName -eq 'p') { $count++ }
}
}
}
$entry.Delete(); $replacement = $zip.CreateEntry($entryName)
$writer = [IO.StreamWriter]::new($replacement.Open(),[Text.UTF8Encoding]::new($false))
try { $writer.Write($xml.OuterXml) } finally { $writer.Dispose() }
}
} finally { $zip.Dispose() }
Get-FileHash -LiteralPath $dst -Algorithm SHA256
}
New-NeutralFixture 'Discovery-190k.docx' 'Small.docx' 30
New-NeutralFixture 'Discovery-190k.docx' 'Medium.docx' 500
New-NeutralFixture 'Discovery-190k.docx' 'Large-190k.docx'
New-NeutralFixture 'Reckoning-250k.docx' 'Large-250k.docx'
```
This helper is documentation-only and **not Windows-executed on Atlas**. Verify XML/property removal and Word opening before importing. If it fails, retain generated files and stop fixture preparation; do not repair Office or switch to author documents. Small has ~1,800 prose words; in Word insert two additional Heading 1 paragraphs before plain paragraphs 11 and 21 to make three clearly named chapters. Medium has ~30,000 prose words and five original chapter headings; verify actual structure/counts in Word. Add distinctive synthetic sentinel text at each chapter's first/middle/last paragraph, including one same-length replacement pair, then save and hash working baselines. No real names/content needed.
Use a new owned disposable project and distinct books for small, medium, 190k and 250k. Associate through Companion/import wizard and normal saved metadata only after inspecting the correct Development account/site/book; preview import/chapter mapping before confirmation. Never trust numeric legacy tags, filename or word count as association proof. Record actual assigned IDs locally; evidence may use stable aliases. Establish mapped and deliberately unmapped scenes through supported UI without assigning every paragraph by guesswork.
F2 fixture prerequisite: identify an existing **authorised synthetic** native AI review and its original captured saved document/session, or a locally verified supported UI path to create it with approved AI cost. The current compact tray does not justify inventing an old analyser button; this handover has not established a new review-seeding UI procedure. The known review/decision route is `/native-companion/reviews/{reviewId}`. If no genuine disposable fixture can be supplied, F13 is BLOCKED; do not seed SQL, use a private author's historical review, or treat the existing managed source-provenance fixture as physical evidence.
For B tests: make a new **copy of the associated small working fixture** in a separate directory under the same filename so it retains properties; record GUID equality and distinct live sessions. Do not strip this intentional copy. Also open the independent neutral medium fixture. Keep closed originals for recovery. For boundary tests use per-case working copies of the accepted small/medium baselines; record starting revision/paragraph IDs and expected topology, then insert/split/merge/reorder in Word. No real-author backups, Production import, bulk account reset or direct SQL fixture forging.
## 6. Ordered acceptance checklist
Execute [matrix](Writer-Phase3B4-Acceptance-Matrix.md) groups **A → B → C → D → E → F → G**. Stop on unsafe/wrong-document execution, corruption, identity substitution, unexpected source/server, invalid signature or material Word responsiveness loss. Preserve drafts/logs before recovery. A missing physical control/hook is BLOCKED, not PASS. Dependency-blocked later rows must still be recorded.
A build/package gate can finish unattended. Installation/Word/PWA interaction and synthetic Development mutations require the concrete interactive authorisation described above. That authorisation may cover the scheduled matrix once; do not request it again for each already approved ordinary test. Additional debugger/network fault injection, trust changes, account switching, uninstallation/rollback or terminating a process outside normal UI needs its own explicit scope. No uncontrolled hangs, debugger suspension, crash tests, global firewall rules or author-app closure.
No safe dedicated production observation-stall hook was found in `Vsto`, `Client` or `Agent`. The `Tests/WordObservationTests.cs` controlled clock is **managed fixture coverage**, not a physical hook. C04–C06 and fault-dependent D rows have explicit blocked paths. An inactive-document observation gap is a safe separate physical case, not proof of blocked COM. Do not add a runtime test switch or improvise a risky stall during this acceptance task.
Performance sources: `WindowsValidation/README.md` historical initial practical UI slices ~20–30ms and investigate >100ms COM calls; current `Client/WordAccessScheduler.cs` defaults 16 steps/15ms, nominal Word timer 25ms. These are scheduling budgets, not preemptible COM guarantees. `WindowsHandover/2026-11-12-v1.0.0.33-post-edit-synchronisation.md` records ~16s historical 48-chapter opening, an unmet 5–10s target and 19.615s recovered pass; these used another manuscript/device/version, **not acceptance guarantees** for synthetic 190k/250k.
Proposed thresholds needing approval before G (record APPROVED / DECLINED / NOT AGREED): no typing/scroll/ribbon p95 regression >20% **and** >50ms over matched add-in-disabled baseline; no unresponsive episode >1s; investigate every measured COM call >100ms; recovery to useful fresh context <=10s after work can safely resume; initial full verification <=60s on 190k and <=90s on 250k; saved one-chapter edit accepted <=15s after save/quiescence. These are proposed engineering gates, not historical promises. Report actual distributions even if no threshold is approved; mark performance acceptance NOT AGREED, not green. R1's 45s evidence policy and server's 25s command expiry are correctness contracts, not proposals.
## 7. Evidence recording instructions
Run ID: `<UTC-yyyyMMddTHHmmssZ>-windows-<shortSHA>`; never reuse a directory. Stage privately outside Git during clean builds; publish sanitised results under `Docs/Writer/Evidence/Phase3B4/<run-id>/` after packaging. Atlas preparation evidence is separately under `20261120T235104Z-atlas-preparation` and proves no physical run.
Suggested layout: `environment.json`, `package.json` (sanitised inventory metadata), `readiness.json`, `results.jsonl`, `performance.csv`, `thresholds.json`, `report.md`, `cleanup.json`, plus `logs/`, `screenshots/`, `failures/`. A JSONL row for **every** stable matrix ID:
```json
{"id":"B04","startUtc":"<ISO8601>","endUtc":"<ISO8601>","result":"PASS|FAIL|BLOCKED|NOT_RUN","mode":"physical|managed-only","fixture":"small-copy-A","source":"<40-char SHA>","expected":"explicit A retained disconnected","actual":"<observation>","evidence":["screenshots/B04.png"],"blocker":null,"cleanup":"<result>"}
```
Record environment: Windows edition/build/architecture, CPU/RAM/storage/power, Word product/build/bitness/channel, VS/MSBuild/tool versions, SDK/Desktop/Framework/VSTO versions, PowerShell version, browser/PWA product/version/scope, loaded add-in/actual agent versions and paths (sanitised), actual source SHA, package filenames/SHA-256, signer/status/manifest verification, server URL and version/hash or Atlas attestation with time. Record test start/end UTC and local/UTC clock offset; correctness evidence relies on timestamps.
Capture native operation/queue metrics through Diagnostics/Troubleshooting and rotated agent logs before/after each case. `Measure-Processes.ps1 -OutputFile <new.csv> -Seconds 600` samples Word/agent process CPU totals, memory and handles once/sec without COM; compute CPU utilisation from delta total CPU / elapsed / logical processors, retain raw totals and PID changes. It buffers until complete: let it finish normally. No author process tracing.
Optional real selected-chapter measurement, only after the human has closed other disposable Word windows normally, verified a single intended Word process/document, selected a complete saved synthetic chapter and authorised read-only COM instrumentation:
```powershell
powershell.exe -STA -File "$wv/Measure-ChapterSync.ps1" -ProtocolAssembly (Join-Path $package 'PlotDirector.Companion.Protocol.dll') -OutputFile (Join-Path $stage 'selected-chapter.json')
```
Do not use `-IncludeLegacyParagraphXml` for ordinary acceptance. This attaches to running Word, does not select/save/close, and measures cross-process COM wall times; it is **not typing responsiveness**. For UI COM p50/p95/p99 only use complete measured samples from already-approved diagnostics; current aggregates provide counts/total/max and over-threshold counts, so record percentiles unavailable if samples are absent. Do not infer p95 from a maximum or timestamp after a stall.
Performance CSV fields: `run,id,fixture,trial,coldWarm,startUtc,endUtc,openMs,addinMs,firstContextMs,verifyMs,saveToAcceptMs,typingP95Ms,scrollP95Ms,ribbonP95Ms,comP95Ms,comMaxMs,cpuDeltaSeconds,wordPrivatePeak,agentPrivatePeak,queuePeak,chapterRequests,transferredBytes,reuses,reconciliations,cancelMs,recoveryMs,result,evidence`. Use at least three comparable trials for each size/action, add-in-disabled baseline then enabled; record unavailable counters explicitly. Obtain agent transferred bytes only from a verified existing native counter or an approved agent-specific network trace. Browser DevTools/HAR measures browser traffic, not the agent HTTPS channel; it cannot establish agent upload bytes. No ready per-agent byte-capture script was established by this preparation. Record UNAVAILABLE/BLOCKED for that metric if safe instrumentation is absent; do not install an interception proxy or change TLS trust. If browser HAR is used for UI traffic, keep it private and export only redacted counts/timings, never headers/tokens/request prose. Hashing-only fixtures never substitute for physical timing.
Never commit credentials, cookies, pairing codes/URLs, DPAPI state, private keys, registry exports, full raw installation identity, author paths/content, unsanitised HAR or system traces. Local fixture prose can remain outside Git; commit fixture metadata/hashes, not large DOCX files. Record failure reproduction, last safe state, session/revision aliases, expected/actual, missing prerequisite and cleanup outcome. Commit evidence/results documentation only on the shared branch, normal push; no force push or application changes.
## 8. Troubleshooting and rollback
| Failure | Safe supported response |
| --- | --- |
| Build/dependency restore | Retain command/tool/source/error output. Check existing SDK/Office workload/mage paths. No IDE repair/install/Clean, source regeneration or silent dependency upgrade. Stop for provision approval if absent. |
| Signing | Stop before installation; inspect public certificate validity/usage/identity, mage result and exact digest. Missing key or trust failure is not permission to export keys/change trust/disable checks. |
| Package inspection | Preserve .41 output and baseline separately. Missing older MSI/failed setup artefact is BLOCKED; do not fake a baseline or relabel a file. |
| Failed installation | Preserve InstallerBackup logs/export privately and native MSI inventory. Do not rerun in loops, kill Word or edit ACLs/registry. After diagnosis and explicit approval, re-running the same valid unified EXE uses supported repair/recache. Verify files and Complete=3, not just exit code. |
| Add-in not loading | Human checks Word COM Add-ins/Disabled Items; record load error, registration Manifest and actual file hashes, duplicate registrations and existing trust. No automatic re-enable/reset/LoadBehavior edits, ClickOnce purge or broad registry import. Use normal VSTO trust UI only with approval. |
| Agent not starting | Verify installed exe/DLL hashes, Desktop 10 x64 runtime, current-session PID, Startup shortcut, private agent logs and paused state through diagnostics. Open Companion normally with approval; do not delete paused/auth files or kill another session. |
| Pairing/server failure | Verify clock, TLS, Development URL, normal website login/account and approved installation status. Use normal browser approval/retry only in authorised scope. Website logout/revocation has real effects; never reset binding/token state merely to pass. |
| Word unresponsive | Stop generating input/tests; note last action/elapsed time, retain existing private logs and allow natural recovery. Ask human to save/recover normally. No forced termination, debugger suspension or crash induction. A dump/trace/termination requires separate explicit approval; mark dependent cases BLOCKED. |
| Synchronisation failure | Leave accepted Reader/provenance intact; record current saved/accepted/verified revisions. Retry existing Synchronise, or explicit Repair Synchronisation on the disposable fixture only after checking diagnostics and authorisation; never erase accepted data/reimport over an author's book. Compare with closed pristine fixture copy. |
| Development incompatibility | Stop connected tests; record exact server version/status/source discrepancy. Do not deploy, change flags/schema, restart services or apply historical migrations from Windows. Request Atlas investigation separately. |
Rollback is an explicitly authorised installation operation, not a build step. Current unified MSI uninstall is **Windows Settings → Apps → PlotDirector Companion → Uninstall**; it removes installed components/registration/shortcuts, not author manuscripts/application state. Current installer refuses a downgrade over a newer family product, so do not invoke an old MSI directly to bypass it. With human approval, close Word normally, preserve private state/backups, uninstall current product through Settings, then use a **locally verified** known-good signed unified installer and recheck inventory/load/connection. Never delete document properties or account state as rollback.
Historical evidence identifies version10 EXE SHA-256 `9526E3781EB2EF9936132786E1E2242633349933A553E93E7A7D0B038160A7FF` (`WindowsValidation/Setup/Qualification-2026-11-05.md`). The .33 handover records EXE `1DB75F88DB540367542CDF6015EA204FB3DAB9B581AB5D25CEDF3D23136C2525` and MSI `4320A4A67FB779F164F97156F818FDFCD1F35986F8AC44E82EFA4097C2089D54`, installed then, with live post-edit acceptance pending. **Atlas has verified neither present availability nor suitability of either as today's rollback package.** Locate the human's current known-good preserved package and verify signer/hash/version/source locally before installation. If none exists, installation rollback readiness is BLOCKED. Legacy `Install-WordCompanion.ps1 -Rollback` restores a different developer-registration workflow and is not the current MSI rollback procedure.
## 9. Completion criteria
A–G each have individual results/evidence/cleanup; prerequisites, source, package/signatures, installed matching bytes, actual Word/agent/PWA and server binding established. R2, F1/F2 and navigation exact-target contracts must pass physically where executable; managed-only and blocked fault cases remain explicit. R1 genuine stalled-UI coverage cannot be claimed without a safe authorised mechanism. No missing performance measure or unapproved threshold may be converted to PASS. A run with blocked required physical cases is a **partial qualification**, not full Phase 3B.4 completion. Submit concise results and blockers for review; no release/distribution or Production approval is implied.
Clean up only the run's owned local copies/test records through normal supported UI after human confirms evidence retained. Resolve active session/drafts, close disposable documents normally, restore approved test-only network/diagnostic settings, remove only authorised synthetic project/account data, confirm real author data/state untouched. Do not delete a shared test account or retained known-good packages. Leave failed fixture/evidence private if needed for investigation and record why.
## 10. Outstanding assumptions requiring Windows confirmation
1. Actual OS/Word/VS/runtime/PowerShell/signing/tool availability and architecture; installed Companion version/normal-user registry context.
2. Presence and integrity of older-family MSI/static upgrade fixtures and a suitable human-approved rollback installer. Source history is evidence of past packages, not availability.
3. Authorised disposable Development account/books/import/AI use, current authenticated native capability negotiation and feature eligibility; Atlas readiness is anonymous/read-only.
4. Safe dedicated stalled-observation/late-command mechanism: **none found in current runtime**. Do not improvise. Inactive-document and managed-clock cases qualify different facts.
5. Actual installed PWA/sessionStorage policy, physical safe return behaviour, performance instrumentation and approval of proposed thresholds.
6. Documentation fixture neutralisation helper and OOXML opening on the actual Word build; no Windows fixture helper execution claimed on Atlas.