From 5040deb81e1d9635f4b5fc6d82abac0fb6b86d46 Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Sun, 8 Nov 2026 20:14:57 +0000 Subject: [PATCH] Record deployed capture fix and live long-running authentication verification --- Docs/WordCompanion/2026-11-08-capture-403.md | 39 ++++++++++++++++++- .../2026-11-08-capture-upload-recovery.md | 2 +- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Docs/WordCompanion/2026-11-08-capture-403.md b/Docs/WordCompanion/2026-11-08-capture-403.md index d5ff3406..7d4ddd43 100644 --- a/Docs/WordCompanion/2026-11-08-capture-403.md +++ b/Docs/WordCompanion/2026-11-08-capture-403.md @@ -25,8 +25,43 @@ A preserved legacy manuscript GUID is not itself rejected. Capture submission co No database migration, author-data backfill, automatic import/retry of book 10152 or change to AI analysis is performed. Existing Companion 1.0.0.20 already sends the progress heartbeat needed by the server fix. -## Verification so far +## Verification Controlled-clock tests exercise 27-minute paragraph capture with ten-minute access lease refreshes; durable acknowledgement and same-request retries; retained GUID into a fresh authorised destination; invalid identity/connection/revision renewal refusal; inactivity timeout and meaningful 410; cleanup preserving the failure message; four-hour absolute bound. Existing native capture/durable-source tests pass. Full application regression harness passes 455 checks. -Development deployment and live normal wizard/browser-pairing/renewal/capture evidence are appended after rollout. Any agent resilience follow-up is explicitly separated from the server correction and is not claimed installed on Windows. +The final portable verification passes 455 application regression checks, 271 native foundation checks, seven controlled-clock capture-lifetime checks and six new agent upload-recovery checks. The first broad native run failed during the pre-existing real-pipe handshake with a broken pipe; the repeat passed all 271 checks. This transient setup failure is not represented as a passed first run. + +## Agent recovery follow-up + +Commit `7983c36` preserves the unchanged raw capture separately from its prepared paragraph delta/identities, retries transient upload failures at most three times using the identical prepared request, and reports bounded server rejection detail. On acknowledgement failure, at most one bounded source remains in process memory; it is not a plaintext disk queue. Only another explicitly authorised existing wizard/snapshot request may reuse it. Revision, book, account, document closure and cancellation invalidate it; exiting loses the buffer. Regression checks exercise transient retries, permanent rejection messages, explicit reuse, revision invalidation, book changes and account-context changes. + +No VSTO changes or Windows packaging, signing, installation or Word execution occurred on Atlas. The installed 1.0.0.20 sends the heartbeat required by the server fix already. Agent retention/retry improvements require a later Windows build; see [focused Windows handover](WindowsHandover/2026-11-08-capture-upload-recovery.md). + +## Development deployment + +The deployed server source is `099792c`, release `/srv/apps/plotdirector-dev/releases/099792c-20261108T195153Z`. Published and running `PlotLine.dll` SHA-256: + +`f10f6f3cd0eec721f2e71a52182c9c67e05054511c543195e14f62caa636713d` + +The normal active-import/Story Intelligence guard passed before restart. Service startup and public HTTPS GET passed; no database migration or Production change. Later agent-only/documentation commits do not require another web deployment. + +## Live Development protocol verification + +A dedicated synthetic account used the public HTTPS application and normal login/antiforgery paths, existing onboarding wizard, project/book creation, browser-approved persistent installation pairing and the existing SignalR `StartOnboardingManuscriptScan` command. The document first appeared in a prior authorised book, then as an unassociated session with the same retained manuscript GUID; the wizard selected the fresh destination **book 10154, project 8175**. No author book was used as a fixture. + +From **19:52:11 to 20:13:24 GMT**, the protocol harness sent exact-session authenticated progress every ten seconds and renewed the actual rotating installation access credential twice. This intentionally holds a small synthetic source across more than 21 minutes; it is a real server lifetime/authentication test, not a claim of measured Word extraction performance. + +- Deliberately wrong manuscript GUID: **403**, named `capture_document_mismatch`; the valid pending request was preserved. The server journal records this precise reason at 20:13:24. +- Intended capture with the retained GUID: **200**, three canonical paragraph identities. +- Identical capture retry: **200**, the same three identities. +- Explicit installation revocation: subsequent native book-list request **401**. +- Direct Development record comparison before cleanup: exactly **one** durable capture; three distinct paragraph IDs; exact original paragraph text and ordering, including carriage returns; no core build/chapters started. +- Author book **10152** still has no accepted capture and its Welcome/setup state and timestamp remain unchanged. Reckoning was neither restarted nor modified. + +The temporary account's books/project and captures were removed through the normal account-deletion workflow after verification. That workflow exposed an existing synthetic-onboarding cleanup foreign-key residue: after verifying the test email namespace, no project access and no fixture books remained, only that test account's onboarding-state row was removed, then normal account deletion completed. No author rows were deleted. Private test credentials were removed. No AI calls or Story Intelligence jobs were started by this verification. + +## Remaining qualification and next attempt + +The original failed capture was not accepted and the old Companion cleaned it up, so its vanished local payload cannot be reconstructed on the server. Book 10152 was not reset or automatically retried. Request capture explicitly through the existing wizard again with the intended Word document active. + +The server now accepts the intended authenticated wizard/book-association workflow beyond the old deadline, including a retained manuscript GUID and access renewal. Actual Word extraction responsiveness and the agent recovery changes still require Windows qualification. No claim is made that a full real-Word manuscript import or its later AI stages were executed on Atlas. diff --git a/Docs/WordCompanion/WindowsHandover/2026-11-08-capture-upload-recovery.md b/Docs/WordCompanion/WindowsHandover/2026-11-08-capture-upload-recovery.md index 9bef2122..5a8ad970 100644 --- a/Docs/WordCompanion/WindowsHandover/2026-11-08-capture-upload-recovery.md +++ b/Docs/WordCompanion/WindowsHandover/2026-11-08-capture-upload-recovery.md @@ -10,7 +10,7 @@ Server commit `099792c` changes a capture request's fixed 20-minute deadline int - `PlotDirector.NativeCompanion/Agent/CloudGateway.cs`: safely parses bounded capture rejection codes/messages, distinguishes transient failures, and retains existing authentication/renewal mechanisms. - `PlotDirector.NativeCompanion/Agent/TrayCoordinator.cs`: prepares a capture once, retries transient uploads at most three times with short backoff, and retains at most one failed unchanged source in bounded process memory. A subsequent explicit request from the existing web import wizard may reuse it. Changing document revision, book, account, closing the document or exiting invalidates the buffer. It is not a plaintext disk queue and does not automatically upload prose on reconnect. -- `PlotDirector.NativeCompanion/Tests/NativeCaptureUploadTests.cs`: portable regressions for retries, meaningful failure reporting, explicit retained-source replay and revision invalidation. +- `PlotDirector.NativeCompanion/Tests/NativeCaptureUploadTests.cs`: portable regressions for retries, meaningful failure reporting, explicit retained-source replay, revision invalidation, book changes and account-context changes. There is **no VSTO/COM/IPC-contract change**, no version bump, no signing/packaging/install operation performed on Atlas. Follow existing version and unified-installer procedures for a later release; do not assume a new installation is necessary just to retry the server-corrected import.