9.4 KiB
Native Word capture rejection — 8 November 2026
Evidence and failure mechanism
The failed author attempt is The Alpha Flame, book 10152. No test restarts that book or Reckoning.
Sanitised Development access-log reconstruction shows the capture-command-sized native presence reply at 18:12:16 GMT, followed at 18:12:17 by the capture-request-ID-bearing heartbeat. One native Word-instance/document-session path continues through 18:38:56, with maximum heartbeat gap 16 seconds. Desktop credential renewals succeeded (HTTP 200), including 18:35:48. At 18:39:06, capture POST returned 403 and the client's cleanup DELETE returned 200. Onboarding was not reset until 18:49; book ownership and wizard book/project had not changed before submission.
The deployed pre-fix NativeManuscriptCapture.Start authorisation expired 20 minutes after creation. Progress updated the scan percentage but never renewed that deadline. NativeCaptureExpiry, registered as a hosted service, swept every 15 seconds and removed expired pending requests through Fail. Therefore this roughly 27-minute extraction outlived its request authorisation despite continuous authenticated progress. In Accept, the missing/expired pending-request check was folded into one UnauthorizedAccessException, and the controller returned a blank 403. After the sweep it is the pending.TryGetValue absence check; without a sweep the same compound expression rejects request.Expires <= now.
Historical logs did not record a per-branch rejection code or retain the submitted payload; response sizes are used to locate the native command/capture interval, not represented as logged response bodies. The code/timeline demonstrate the fixed deadline violation independently of HTTP 403. Exact historic payload bytes cannot be reconstructed. A controlled-clock regression replays 27 minutes of the same live-session progress and access-renewal pattern; live Development protocol verification is recorded below.
Legacy identity and security
A preserved legacy manuscript GUID is not itself rejected. Capture submission compares its GUID to the same selected live document lease, not to a globally unique book binding. The destination comes from the authorised wizard/book and is rechecked before persistence. A fresh authorised book can import a retained GUID; an actually different document/session/instance, changed revision, different account/connection or inaccessible destination remains rejected. Native book IDs, old marker IDs or names do not establish destination authority. No Word property is removed or rewritten by this correction.
Server correction
- The existing 20-minute deadline is now an inactivity deadline, renewed only by the existing authenticated capture progress heartbeat matching the exact user/connection/request/Word instance/session/manuscript/revision.
- Progress cannot revive an expired/revoked/mismatched request. A bounded four-hour absolute limit remains. Existing short-lived access and installation revocation checks are unchanged; no permanent bearer credential or new pairing system.
- Expiry retains bounded request metadata briefly to return a precise timeout/disconnection reason. It does not create another session store. Failed scan text survives subsequent client cleanup.
- Named rejection codes distinguish inactive request, timeout/disconnection, authority mismatch, document mismatch, changed revision/capability, changed wizard and lost book access. Lifecycle conflicts return 409/410; genuine authority/document access failures remain 403. Current authentication failures remain 401.
- Safe structured logs include request/book/user IDs and failure code/elapsed time, never credentials or manuscript prose.
- Transient durable-storage failures return a meaningful 503 with retryability; no success is claimed until existing durable capture persistence completes. Accepted same-ID/same-payload retries remain idempotent.
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
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.
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.
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.