8.2 KiB
Development paragraph synchronisation completion — 7 November 2026
Delivered behaviour
The existing Word import wizard automatically requests paragraph capture when Development paragraph tracking is enabled and the selected Companion advertises support (1.0.0.18). No extra adoption or individual scene approval is required. The durable server import initializes paragraph/Word-position, chapter and scene correspondence after canonical scene creation; browser disconnection does not skip initialization. Existing checkpoint reuse and invalid-boundary whole-chapter fallback remain intact.
Word remains authoritative. On-save deltas use the existing authenticated session and paragraph protocol, without permanent Word markers, prose rewriting or automatic AI reanalysis. Uncertain correspondence fails safely; stale or unavailable Word cannot supply a live scene. Context and Intent show a visible live chapter/scene label and preserve independent manual navigation.
UI
- Start a fresh import through Projects → Import a manuscript, selecting the connected Word document in the existing wizard.
- Book details → Manuscript structure and evidence (
/manuscript/paragraphs?bookId=<book>). Existing split, boundary, merge, undo, evidence inspection/confirmation and synchronization controls use the PWA theme and book scope. The workspace is also linked from Context/Intent. - Open Context or Intent through the website. Follow Word shows the current chapter and scene; pause/manual selection shows saved scene context instead.
- Use the existing Back up books / Restore books wizard; no separate paragraph export tool.
Portability contract
Tracked backups use outer package 2.1, project snapshot 1.5. Untracked packages retain 2.0/1.4; historical readers remain supported. Paragraph occurrence/manuscript/scene/evidence GUIDs, exact prose, groupings, undo layouts and author evidence decisions are canonical portable data. Typed book/project/chapter/scene/event database IDs are remapped through the existing authorized recovery engine. Payload validation and post-write comparison occur inside the existing transaction/file rollback boundary.
Restored incoming roots clear live session, revision and request authority and default OnSave to Manual. Reconnect the intended Word document and request a snapshot before enabling save synchronization; backups do not resume an old device session. Unrelated live destination roots retain their bindings. Legacy snapshots cannot silently replace an existing tracked project while omitting its paragraph state. No blanket backup restriction remains.
Database and rollout
Forward migrations 240_ParagraphManuscripts.sql and 241_ParagraphRecovery.sql are required in that order. Existing 240 is unchanged. 241 extends the established transactional recovery procedures and preserves StructuralFallback provenance and active-analysis save protections. Development uses the existing Features__ParagraphManuscripts=true setting; no new release gates. Production and Windows installations are untouched.
Verification
- Solution build: zero warnings/errors.
- Full managed harness: 455 passing checks; paragraph workflow/backup checks: 39.
- Guarded real SQL recovery round trips: 38 passing checks, including new/existing projects, cross-account IDs, exact paragraph/prose/grouping/evidence/undo preservation, archived capacity, partial rollback and duplicate-safe imports.
- Native capture tests verify ordinary import automatically requests paragraph tracking from 1.0.0.18.
- Browser regressions cover live scene label, manual follow isolation, import connectivity and structure actions.
- Live Development AI configuration accepted the strict chapter schema and mapped two proposed scenes within four synthetic submitted paragraphs. No author prose or secrets were logged.
- Real Word COM/cursor/save responsiveness remains for the author's Windows test. Atlas did not package, install or drive Word.
Deployment and authenticated running-site results are appended after rollout. The exact deployed application commit is recorded below; subsequent documentation-only commits do not change its binaries.
Actual Development deployment evidence
Application commit 5021586c9f was pushed and deployed to https://dev.plotdirector.com/. Release: /srv/apps/plotdirector-dev/releases/5021586-20261107T223620Z; previous application preserved in the matching current-before-5021586-20261107T223620Z directory. The published and deployed DLL SHA-256 both equal 75ef095f9805642daaa19d00e04e6f10aad2b09b5129e512049e4729cd60ea6a. The service is active; public HTTPS and local GET both returned 200. Recent warning/error journal inspection was empty.
Before migration: PlotDirector_Development_before_paragraph_240_241_20261107-223500.bak, SQL container path /var/opt/mssql/backup/, 159,543,296 bytes; COPY_ONLY/CHECKSUM and RESTORE VERIFYONLY succeeded. Migrations 240 and 241 applied successfully to PlotDirector_Development using the application's database principal; required tables, recovery export/restore hooks and procedures were subsequently checked. The pre-existing feature is enabled in the Development service environment, with its prior environment file preserved. Production was not accessed.
The activity check passed immediately before migration and service replacement: no queued/running Story Intelligence, synthesis/enrichment, core import/marker or active SQL import work. This rollout did not interrupt an active import.
Authenticated browser testing against the actual deployed HTTPS site used a dedicated temporary account and synthetic book:
- Validated and explicitly confirmed a selective 2.1/1.5 backup restore through the normal wizard; opened its saved paragraph/evidence workspace from Book details.
- The comprehensive synthetic fixture initially failed safely on unavailable test vocabulary, with no mutation; only the test file was adapted to existing Development vocabulary. No application validation or database vocabulary was weakened/changed.
- Opened Context and Intent and verified their visible current-scene status element; normal onboarding route rendered.
- Used normal browser approval and bearer authentication to register a synthetic 1.0.0.18-compatible document, explicitly request a snapshot, post original paragraphs and receive the exact canonical GUID sequence.
- Subsequent cursor-presence requests resolved distinct saved scene IDs. A newer unsynchronized Word revision and a Word-unavailable update returned no scene, preventing stale live context.
- Executed scene merge then undo through authenticated antiforgery-protected workspace forms; both completed successfully.
Browser evidence: /tmp/pd-paragraph-deployed-browser.log and /tmp/pd-paragraph-development-workspace.png. SQL recovery tests ran in the existing guarded synthetic database, not a new environment. The temporary Development project/files were removed through the normal account deletion workflow. Account cleanup exposed an existing FK_UserOnboardingState_AppUser omission after visiting onboarding: the project was deleted, but the test account retained its welcome-state row. After a narrowly guarded deletion of that isolated test account's onboarding row (no project access remained), normal account deletion completed and its private credential file was removed. This unrelated account-deletion defect was not expanded into application changes in this sprint.
Windows acceptance still required
With the installed 1.0.0.18 Companion, start a fresh normal Word import; finish existing chapter/scene detection and any normal location/character review stages. Individual scene approval is not required. Check the structure workspace contains paragraphs immediately. Open Context/Intent, enable following for the intended document, move between scenes, save a small author-owned test edit and confirm synchronization/scene mapping. Exercise split/boundary/merge/undo and download/restore a test backup. Use a disposable book for these edits, not a primary manuscript. Real Word event delivery, COM responsiveness and laptop reconnect/save behaviour cannot be established by Atlas HTTP/browser tests. No additional native build is required by this server-only completion.