diff --git a/Docs/WordCompanion/2026-11-05-phase35-integration.md b/Docs/WordCompanion/2026-11-05-phase35-integration.md index 73f601c1..8fcf6f47 100644 --- a/Docs/WordCompanion/2026-11-05-phase35-integration.md +++ b/Docs/WordCompanion/2026-11-05-phase35-integration.md @@ -81,3 +81,21 @@ Evidence and exact final checks/deployment outcome are recorded alongside this r There are no new database migrations or configuration secrets/settings. The server needs the existing desktop pairing/auth infrastructure, subscription entitlement and configured existing AI provider; the Phase 3 migration 230 prerequisite remains. Preparing Windows packages does not alter the working laptop installation. Windows COM semantics, compilation against installed Office, signed manifests, installation, visual DPI/layout and actual typing/scroll/save responsiveness remain unverified on Atlas. Native import commit, native live SignalR following, full prose sync and a complete edit journal remain out of scope. [Windows steps and tonight's checklist](../../PlotDirector.NativeCompanion/WindowsValidation/Phase35-Integration.md) use the existing Update/Install scripts and version 1.0.0.6. + +### Recorded final results + +| Check | Result | +|---|---| +| `dotnet build PlotLine.slnx` | PASS, 0 warnings / 0 errors | +| Full executable application regression harness | **408 PASS** checks | +| Native managed assertions | **183 PASS**, including stationary-cursor snapshot-to-saved-scene refresh | +| `--native-workflow` | PASS saved Context/Intent, ownership/marker membership, importer eligibility, duplicate/overlap/orphan/negative scene range refusal, entitlement and no-write assertions | +| `--native-companion-http` | PASS actual HTTP pairing/antiforgery/bearer/stamp, book/subscription security, canonical AI/idempotency, connection/workspace/preview (synthetic provider, no database) | +| Word Companion Playwright regressions | PASS delayed responses, abort, stale errors, chapter-only identity, both pinned modes and Writer launcher | +| PowerShell | All seven scripts parse; portable package/hash tamper and non-Windows fail-closed tests PASS | +| Native host | Roslyn **syntax only** PASS; no Office compile/runtime/installation/performance claim | +| Release server publish | PASS | + +Development was updated to server source **0075bb5**; subsequent native-only lifecycle/UI changes do not change that server payload. Release: `/srv/apps/plotdirector-dev/releases/native-word-phase35-0075bb5-20261105142037`, with a matching timestamped `current-before` application backup. Pre-restart Development jobs/import gate was idle; migration 230 ownership procedure presence/hash verified read-only. Published and deployed application/protocol SHA-256 hashes match (see evidence). Service active; local GET and public TLS-validated GET returned 200. The new connection/workspace/preview endpoints returned 401 without bearer. No recent service warning/error entries were observed. Live author authentication, saved records and UI interaction still require Windows qualification; no additional paid AI call was needed to test this integration change. + +The existing update script now runs the new workflow regression gate, and version props/assembly metadata agree on **1.0.0.6**. Connect uses a resizable DPI-aware layout and rejects malformed site roots before sending a request. Preparation/installation scripts are source-ready for Windows qualification, not Windows-executed here. No database migration, configuration change, Production deployment or laptop installation was performed. diff --git a/Docs/WordCompanion/Evidence/2026-11-05-phase35/build.txt b/Docs/WordCompanion/Evidence/2026-11-05-phase35/build.txt new file mode 100644 index 00000000..1c1eb470 --- /dev/null +++ b/Docs/WordCompanion/Evidence/2026-11-05-phase35/build.txt @@ -0,0 +1,3 @@ +Final dotnet build PlotLine.slnx: PASS, 0 warnings, 0 errors. +Release dotnet publish PlotLine/PlotLine.csproj: PASS. +VSTO host not built or executed on Linux. diff --git a/Docs/WordCompanion/Evidence/2026-11-05-phase35/development.txt b/Docs/WordCompanion/Evidence/2026-11-05-phase35/development.txt new file mode 100644 index 00000000..ef6d38b2 --- /dev/null +++ b/Docs/WordCompanion/Evidence/2026-11-05-phase35/development.txt @@ -0,0 +1,22 @@ +Verified database: PlotDirector_Development +SQL file: plotdirector-phase2-restart-authorised-gate.sql +Development deployment gate: idle +SQL file completed: plotdirector-phase2-restart-authorised-gate.sql +SQL file: p3-readiness.sql +Ownership procedure present | 1 +Ownership procedure hash | F393C358F4D1315984F06F1ECED164940A8879D36DD8B78DB07751EBFF5F51E0 +SQL file completed: p3-readiness.sql +active +Development server release: /srv/apps/plotdirector-dev/releases/native-word-phase35-0075bb5-20261105142037 +Previous application backup: /srv/apps/plotdirector-dev/current-before-native-word-phase35-0075bb5-20261105142037 +PlotLine.dll publish/deployed SHA256 matches: 035fc68fc7c293dd71c97de03514ed52fdcc90e87f5ec0fd5f744a1060e3e6b7 +PlotDirector.Companion.Protocol.dll publish/deployed SHA256 matches: cd92b34b29427366cd2de365e6412a8b8caab2b015ceaf7327ca16ebf945855c + +GET local /: 200 +GET https://dev.plotdirector.com/: 200 (normal TLS validation) +GET /api/native-companion/connection: 401 without bearer +GET /api/native-companion/books/1/workspace: 401 without bearer +POST /api/native-companion/import-preview: 401 without bearer +Recent service warning/error journal: no entries. +Authenticated routes: synthetic HTTP harness passed; live author session/Word not exercised. +No migration or configuration change. Production and laptop untouched. diff --git a/PlotDirector.NativeCompanion/Vsto/ConnectWindow.cs b/PlotDirector.NativeCompanion/Vsto/ConnectWindow.cs index d585f99e..8ae75c1f 100644 --- a/PlotDirector.NativeCompanion/Vsto/ConnectWindow.cs +++ b/PlotDirector.NativeCompanion/Vsto/ConnectWindow.cs @@ -1,4 +1,5 @@ using System; +using System.Drawing; using System.Windows.Forms; namespace PlotDirector.WordAddIn { @@ -6,13 +7,23 @@ namespace PlotDirector.WordAddIn { public ConnectWindow(WordAdapter adapter) { - Text="Connect PlotDirector";Width=600;Height=210;AutoScaleMode=AutoScaleMode.Dpi; - var layout=new FlowLayoutPanel{Dock=DockStyle.Fill,Padding=new Padding(12),FlowDirection=FlowDirection.TopDown,WrapContents=false}; - layout.Controls.Add(new Label{Text="PlotDirector HTTPS site address (no password or API key):",AutoSize=true}); - var address=new TextBox{Width=540,Text=adapter.ServerUrl};layout.Controls.Add(address); - var connect=new Button{Text="Sign in in browser",AutoSize=true};connect.Click+=(_,__)=>{adapter.ConnectToServer(address.Text.Trim());Close();}; + Text="Connect PlotDirector";Font=new Font("Segoe UI",9F);Width=640;Height=290;MinimumSize=new Size(520,270);AutoScaleMode=AutoScaleMode.Dpi; + var layout=new TableLayoutPanel{Dock=DockStyle.Fill,Padding=new Padding(12),ColumnCount=1,RowCount=5}; + layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent,100)); + for(var row=0;row<4;row++)layout.RowStyles.Add(new RowStyle(SizeType.AutoSize)); + layout.RowStyles.Add(new RowStyle(SizeType.Percent,100)); + layout.Controls.Add(new Label{Text="PlotDirector HTTPS site address (no password or API key):",AutoSize=true},0,0); + var address=new TextBox{Dock=DockStyle.Fill,Text=adapter.ServerUrl,Margin=new Padding(0,8,0,8)};layout.Controls.Add(address,0,1); + var actions=new FlowLayoutPanel{Dock=DockStyle.Fill,AutoSize=true,WrapContents=true}; + var feedback=new Label{Dock=DockStyle.Fill,AutoSize=true,Text="Approve the connection in your normal browser, then check the ribbon or manuscript review for connection status."}; + var connect=new Button{Text="Sign in in browser",AutoSize=true};connect.Click+=(_,__)=>{ + var value=address.Text.Trim();Uri site; + if(!Uri.TryCreate(value,UriKind.Absolute,out site)||site.Scheme!=Uri.UriSchemeHttps||site.AbsolutePath!="/"||!string.IsNullOrEmpty(site.UserInfo)||!string.IsNullOrEmpty(site.Query)||!string.IsNullOrEmpty(site.Fragment)) + {feedback.Text="Enter the HTTPS site root, with no username, password, page path or query. No sign-in request was sent.";address.Focus();return;} + adapter.ConnectToServer(value);Close(); + }; var signout=new Button{Text="Disconnect / forget sign-in",AutoSize=true};signout.Click+=(_,__)=>{adapter.SignOut();Close();}; - layout.Controls.Add(connect);layout.Controls.Add(signout);Controls.Add(layout); + actions.Controls.Add(connect);actions.Controls.Add(signout);layout.Controls.Add(actions,0,2);layout.Controls.Add(feedback,0,4);Controls.Add(layout); } } }