Document Writer sprint qualification, deployment and remaining scope

This commit is contained in:
Nick Beckley 2026-11-15 01:05:37 +00:00
parent 364842f0a3
commit 58ee48d94a
3 changed files with 111 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

View File

@ -0,0 +1,111 @@
# Writer 2.0 overnight sprint results
Status: implemented, qualified and deployed to Development. Production, Test and Master were not deployed. Windows Word/COM, native installer and physical monitor acceptance were not performed.
Requirements baseline: [Writer 2.0 specification](../../Investigations/Writer2Audit/Writer2_Spec.md) and all seven [audit deliverables](../../Investigations/Writer2Audit/README.md). [Implementation and privacy decisions](Implementation.md) describe the capture contract and operational boundaries.
## Delivered — Phase 1
- Durable append-only accepted activity metadata with event/request identity, actor/source, schema/metric versions, manuscript/book/project, optional transport session/chapter and paragraph/scene associations. No second canonical manuscript or retained copy of prose.
- Canonical acceptance and activity recording share a transaction and row/revision checks. Exact retries do not inflate output; conflicting identities are refused. Lost acknowledgements remain idempotent after later document identity changes.
- Observed additions, removals and net changes use a bounded deterministic paragraph/token comparison. Recognised paragraph moves and whitespace-only changes do not create word growth. Large comparisons explicitly disclose minimum estimates. Source observations have no accepted snapshot reference or growth counts.
- Current baselines are created automatically for eligible existing accepted manuscripts, without changing canonical content/revisions or counting existing words as new writing. Owner pause/erase settings are respected. Manual baseline recording remains available.
- Owner-private history and bounded cursor/date reads, JSON evidence export, pause, retention (365 days default; 30–3650 configurable), confirmed erasure and daily pruning. Compact retry receipts survive event expiry/erasure until permanent book deletion, as disclosed in the interface.
- Native agent source connects existing unsaved chapter observations to a bounded, protected, account/site-scoped durable outbox. Exact acknowledgements, retry/backoff, fair selection of retryable records, restart/account-switch safety and protected-state downgrade guards are portable-qualified. Existing installed clients gain server-side accepted-change capture without a forced upgrade. **The new agent queue is not installed on Windows by this deployment.**
## Delivered — Phase 2
- Book-scoped Writer overview with current work, continuation/Reader links, next planned opportunity, observed word-change indicators, workflow revision queue, receipt-date calendar, drillable change bars and recent evidence.
- Five navigable workspaces: Write Next, In Progress, Revision, Final Pass, Story Health. Scene/chapter goals and notes retain real destinations. Existing plan setup, management, preview, complete and skip operations remain accessible.
- Contextual Writer ribbon for implemented Overview/Journey/Plan/Workspaces/Reports actions and Display Setup. One direct Writer navigation entry; legacy Write/Write/Index redirects preserve project/book scope.
- Project/book selection stays in the common shell, and switching a book there stays in Writer. Schedule rows now carry BookID/ChapterID and are filtered before choosing upcoming work, so another book cannot consume the selected book's opportunities.
- Existing Context/Intent reference windows remain usable. Linked-Word controls are hidden without the selected linked document. Display setup is progressively disclosed, with existing permission-aware discovery/fallback. Word activity in another book cannot retarget the dashboard.
- Existing theme/ribbon/PWA conventions and responsive layouts retained. The book heading remains meaningful PWA content instead of disappearing into toolbar extraction.
The current Writing Journey is a useful read-only activity calendar/evidence view with planned upcoming tasks. It is **not** the later zoomable, multi-pass dependency timeline. No placeholder focus-session feature is presented as working.
## Commits and branch
Shared branch: `codex/word-companion-native-phase1-20261104`. Fetched before work and again before release; no competing branch or force-push.
| Commit | Change |
|---|---|
| `0520326` | Complete audit and authoritative specification retained in repository documentation |
| `a1c616f` | Atomic activity capture, retention/privacy controls and native queue integration |
| `a369e7d` | Retry fairness/durability, downgrade protection and bounded comparison hardening |
| `364842f` | Integrated dashboard, contextual ribbon, book-scoped planning, evidence read models and baseline discovery |
The deployed application corresponds to code commit `364842f0a314e052e037d612e531479a017fe9f9`. This report/images are documentation follow-up; they do not change the deployed binary.
Existing untracked `Docs/Investigations/CanonicalManuscriptArchitectureAssessment.md` was preserved and excluded from sprint commits.
## Database changes and review
New forward-only migrations:
1. `PlotLine/Sql/259_WritingActivityFoundation.sql`: new settings, receipt and event tables, authorised activity operations and pruning.
2. `PlotLine/Sql/260_WriterActivitySummary.sql`: bounded summaries/day reads, book-specific reminders, schedule BookID/ChapterID projection, hardened activity references/receipt handling and baseline discovery.
No previously existing canonical synchronisation migration/procedure was replaced. Migration 260 updates the newly introduced activity procedure and makes its snapshot reference nullable for observations. Existing schedule consumers use named Dapper fields; extra book/chapter fields preserve their existing result fields. Metadata tables cascade on permanent book deletion; no chapter/scene foreign key obstructs existing reorganisation.
Qualification used a new disposable database restored to separate files from a checksum-verified copy-only Development backup. SQL fixtures, concurrency tests and forced-failure triggers touched only newly created synthetic records in that copy. The disposable database was removed after qualification.
Before live application, the effective target was verified as `PlotDirector_Development`, active import/analysis guards passed, and a fresh copy-only/checksum backup was created and verified:
`/var/opt/mssql/backup/writer2-qualified-20261115T004241Z-376804c3.bak`
Both migrations applied successfully to Development. All 14 existing manuscript revisions and snapshot hashes matched before/after migration, startup baselining and temporary live-fixture cleanup. There was one active eligible accepted book; it received one System baseline with **zero additions/removals**, and discovery reported zero pending eligible baselines. No historical writing was backfilled.
## Verification results
Builds and executable regression runs were serial. The final solution build passed with zero warnings/errors; Release publish also succeeded.
| Check | Result / scope |
|---|---|
| Normal executable regression harness | 508 PASS checks, no failures |
| Portable native foundation suite | 279 checks passed; Linux protocol/agent/state tests, not Word/COM |
| Focused writing activity database suite | 18 cases passed in disposable copy: baseline/gross/net, deduplication/conflicts, lost acknowledgement after identity switch, owner isolation, clock skew, concurrent updates, forced append rollback, privacy, automatic baseline discovery and canonical preservation |
| Focused chapter synchronisation | 71 PASS checks |
| Native HTTP suite | Passed actual pairing, antiforgery, bearer/stamp and access tests; added anonymous-activity refusal and malformed native-activity admission checks before database access; synthetic provider, no paid AI |
| Writer 2 dashboard browser suite | 48 combinations: four themes × three widths × empty/populated evidence × browser/simulated PWA; single navigation, shell book routes, truthful empty state, chart links, no overflow and contextual controls |
| Existing navigation/theme browser suite | Passed Writer direct navigation and Context/Intent four-theme/full/embedded/browser/PWA coverage |
| Updated reference-window browser suite | Passed initial connection failure/retry, distinct window identities/reuse, pinned book, denied/unavailable display permission, plan navigation and browser/PWA |
| Chapter-goal browser regression | Passed unsaved navigation guard, cancel/discard, antiforgery/controller saves, Unicode persistence, concurrent edits and failure/retry |
| Live authenticated Development | Temporary separate author/owned book: Writer, Workspaces, Journey and Activity HTTP 200; actual evidence export reconciled zero-growth baseline and one added word; foreign-book evidence HTTP 404; legacy redirect preserved scope |
The temporary live identity was provisioned using normal account repositories/confirmation and authenticated with normal login/antiforgery. Only its own synthetic project/book was seeded through existing repositories. It and its data were removed through normal account cleanup; the private credential file was deleted. No real author's prose or credentials were exported into this report. The loopback browser fixture host was stopped.
## Deployment evidence
Development: [https://dev.plotdirector.com/](https://dev.plotdirector.com/).
- Release: `364842f-20261115T004407Z`.
- Archived application: `/srv/apps/plotdirector-dev/releases/364842f-20261115T004407Z`.
- Previous physical application: `/srv/apps/plotdirector-dev/current-before-364842f-20261115T004407Z`.
- Service `plotdirector-dev`: active after deployment and verification.
- Local real GET: HTTP 200. Public HTTPS real GET: HTTP 200 with normal TLS validation.
- Authenticated live checks above passed; baseline discovery completed without capture warnings.
- Published and deployed `PlotLine.dll` SHA-256 both: `a6532ddb9c7b4983cbd2c7eabbdfe0e9c808927668f4db268d7a5f2213abe496`.
- Assembly informational version: `1.0.0+364842f0a314e052e037d612e531479a017fe9f9`.
- Existing appsettings/environment, data-protection state, uploads and logs were preserved. Protected-work idle checks passed immediately before service replacement. No Production/Test/Master deployment or native installer publication occurred.
An application rollback can use the retained previous directory with the additive schema left in place. An older application will not continue the new capture path; that creates an evidence gap, not an uninterrupted history. Follow `Docs/Codex/Deployment.md`; do not restore/reset the Development database as an ordinary application rollback.
## Remaining scope and known limitations
- Windows VSTO/agent install/upgrade, actual offline Word editing/restart, Word responsiveness, real installed-PWA and physical monitor acceptance remain unverified. Bump/package and qualify a Windows agent release before rolling out the new queue; do not overwrite pending schema-2 protected state during downgrade.
- Native observations are metadata signals, not durable offline prose or every keystroke. Unobserved/undone changes and precise focus duration cannot be reconstructed. Saved final changes still use existing synchronisation. Blocked/old/full observation queues retain pending evidence and require resolution; a richer queue-management UI is future work.
- Statistics are accepted snapshot differences, with explicitly qualified minimum estimates for expensive comparisons. Current calendar days are **server receipt dates in UTC**, not measured author-local writing sessions or opportunity compliance. No writing-pattern/profile inference is shipped.
- Activity metadata is operational history and is not carried in the current portable manuscript/project backup format. Database backups and downloaded exports are separate copies; erasing live events does not erase those copies. Full historical prose snapshots/reconstruction, privacy-preserving provenance verification and production retention/backup policy remain future decisions.
- Flexible Writing Rhythm wizard/availability/exceptions, measured Focus Sessions, parallel manuscript passes, full zoomable/reforecasting journey, insight thresholds, scoped editorial collaboration and signed provenance reports remain later gates. The Focus Sessions ribbon destination is not exposed as a dead placeholder.
- Display setup retains the existing Context/Intent placement infrastructure. Arbitrary monitor role/profile management, native Word window placement and physical 1–4+ monitor qualification are not complete.
- Existing broad project collaboration remains unchanged. New activity evidence is owner-private; this is not delivery of chapter-scoped editor permissions.
Recommended next work: Windows agent packaging/qualification first; then flexible rhythm/opportunity planning, followed by explicit focus sessions and independent passes. Retain the event/source/coverage distinctions throughout. Production deployment requires separate authorisation.
## Visual evidence
These are synthetic isolated-fixture screenshots from the real Razor/theme pipeline, not real author data or fabricated statistics in the deployed UI. Reference-window controls are expanded during interaction testing.
- [Desktop overview](Images/Overview-Desktop-Fixture.png)
- [Small-screen overview](Images/Overview-Small-Fixture.png)