docs(writer): record Phase 1 Development acceptance and release

This commit is contained in:
Nick Beckley 2026-11-16 15:20:29 +00:00
parent c769e1119a
commit 5d18f6cbe2
6 changed files with 125 additions and 7 deletions

View File

@ -13,7 +13,7 @@
| Session | Explicit session book/chapter | Existing WriterWork state/start binding remains authoritative, including UUID/activity/native lease. Slot supports composition by future shell; dashboard does not invent a session from objective or URL. |
| VerifiedWord | Exact instance/document/manuscript, observed and accepted revision with resolved selection | Set only after existing saved-document, live-lease, accepted-position and race checks in WritingController. Invalidated target is cleared; no raw query ID is proof. |
Dashboard populates Scope, SavedObjective and Working. Resolved Context/Intent pages populate pinned/exploration and, after native verification, VerifiedWord; unresolved pages have no projected reference. Reader exposes its independent Reader slot. Active session remains fetched through existing WriterWork API/client polling; its identity/kind/native binding are not replaced by a route selection. There is no schema change, localStorage global focus, new native protocol or automatic state fan-out.
Dashboard populates Scope, SavedObjective and Working. Resolved Context/Intent pages populate pinned/exploration and, after native verification, VerifiedWord; unresolved pages have no projected reference. Reader exposes its independent Reader slot. Active session remains fetched through existing WriterWork API/client polling; its identity/kind/native binding are not replaced by a route selection. The projection adds no persisted schema, localStorage global focus, new native protocol or automatic state fan-out.
Existing standalone windows, SignalR follow, exact native/session/grant checks, accepted manuscript revision boundaries, explicit Word navigation and named-window placement remain intact. Phase1 records these contracts and consumes them in view models/selection-role metadata; interactive cross-destination focus persistence/selection indicators belong to Phases2–4, not a hidden Phase1 shell redesign.

View File

@ -0,0 +1,14 @@
{
"checks": [
"All four selected-book queues render the correct canonical fixture scene",
"Pinned Intent displays canonical Outlined without overwriting legacy draft data",
"Real setup/confirmation, empty/scoped Preview, activate/deactivate return filters and validation dependencies pass",
"Browser: empty Reader, native incomplete-session refusal, out-of-scope plan404 and Help full article pass",
"All four selected-book queues render the correct canonical fixture scene",
"Pinned Intent displays canonical Outlined without overwriting legacy draft data",
"Real setup/confirmation, empty/scoped Preview, activate/deactivate return filters and validation dependencies pass",
"Simulated PWA: empty Reader, native incomplete-session refusal, out-of-scope plan404 and Help full article pass"
],
"physicalWindows": false,
"installedPWA": false
}

View File

@ -0,0 +1 @@
{"Result":"PASS scoped cap, four canonical queues and legacy blocked compatibility; fixture rolled back"}

View File

@ -19,7 +19,7 @@ No new workspace shell in this phase. Existing Overview/Journey/Workspaces route
- Acceptance: Queue >40 other-book fixture; permissions and cross-book IDs; status divergence; independently selected session/Reader/pinned targets; browser/PWA forms; native-follow regression; Development smoke.
- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative.
- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage.
- Status / Development deployment: In progress; not deployed at tracker creation.
- Status / Development deployment: Development-qualified; deployed c769e11; physical acceptance pending.
### Phase 2 — Writer Home and workspace shell
@ -307,12 +307,16 @@ Classification describes destination intent; Phase1 only repairs foundations.
| Batch | Implementation | Automated / fixture qualification | Development |
|---|---|---|---|
|1A queues / book scope|Implemented264; optional BookID reaches SQL before TOP40; legacy queues retained|Transactional Development fixture passes4 statuses,45 other-book scenes,40 per-book cap,legacy Blocked; rolled back|Copy-only checksum backup succeeded;264 applied; no data conversion|
|1B canonical status / independent context|Canonical Intent status; immutable independent selection projection on desk/reference/Reader; existing native checks retained|Context separation/cross-scope/invalid mapping tests and full harness pass; physical host manual|Application deployment pending|
|1C scheduling / validation / navigation|Scoped Preview selection/returns; reviewed data retained on rebalance GET; validation loads after jQuery; queue/waiting copy corrected|Service/controller tests pass; isolated browser/PWA suites passing; live post-deploy pending|Application deployment pending|
|1D Help / qualification / release|62-feature Help ownership map; existing articles corrected; new context/plan articles and existing tag-helper icons|Build0warnings; full harness exit0; Reader/Intent/standalone browser suites pass|Release/post-deploy pending|
|1B canonical status / independent context|Canonical Intent status; immutable independent selection projection on desk/reference/Reader; existing native checks retained|Context separation/cross-scope/invalid mapping tests and full harness pass; physical host manual|Deployed c769e11-20261116T151427Z; authenticated browser/simulated PWA acceptance passed|
|1C scheduling / validation / navigation|Scoped Preview selection/returns; reviewed data retained on rebalance GET; validation loads after jQuery; queue/waiting copy corrected|Service/controller tests pass; isolated browser/PWA and live post-deployment acceptance passed|Deployed c769e11-20261116T151427Z; authenticated browser/simulated PWA acceptance passed|
|1D Help / qualification / release|62-feature Help ownership map; existing articles corrected; new context/plan articles and existing tag-helper icons|Build0warnings; full harness exit0; Reader/Intent/standalone browser suites pass|Deployed; matching DLL hash/metadata; HTTP200/service active; no warnings; synthetic fixtures removed|
Physical Windows Word, actual media playback, installed Windows PWA and multiple-monitor placement are manual acceptance gates; a Chromium simulated PWA is labelled as such. Stop after Phase1 report. Recommended Phase2 first batch: Home/destination route state and static viewport layouts, retaining old URLs and utilities before resizable composition.
## Bounded follow-up after Phase 1
Legacy rebalance operations remain callable but no replacement rebalance review UI is added here; unify their presentation and explain Automatic mode in Phase6 after its scheduling design. Existing project change in setup is still server-validated rather than introducing a new dependent-selector API; visual goal-first planning replaces this in Phase6. Phase1 typed context is a projection/adaptation layer, not persisted cross-window global focus; explicit interactive indicators/returns and independent exploration commands are Phases2–4. Timed sprints, overlapping passes, collaboration assignments and signed provenance remain outstanding Writer2 requirements recorded above; none is falsely labelled delivered. No author-data semantics or native protocol changed.
## Phase 1 completion — 16 November 2026
Implementation/deployed source: `c769e1119a2542e256374db3c48eeb324c2663ab`. Release `c769e11-20261116T151427Z`. Build and full harness passed (543 PASS records, exit0). Scoped transactional SQL regression and authenticated Development browser/simulated PWA acceptance passed. Live canonical status remained Outlined while legacy DraftStatus remained Planned, confirming presentation repair without conversion. All dedicated fixture projects/account removed; RemainingSyntheticAccounts=0. Physical Windows/installed PWA/multi-monitor acceptance remains manual. See [Phase1 report](Phase1-Report.md) for commands, limits and release evidence. Phase2 is not started and requires explicit acceptance.

View File

@ -0,0 +1,93 @@
# Writer 3.0 Phase 1 — delivery and Development qualification
Date: 16 November 2026 (London). Shared branch: `codex/word-companion-native-phase1-20261104`.
Implementation and deployed source: **`c769e1119a2542e256374db3c48eeb324c2663ab`**. The following documentation/test-only commit records final live acceptance; it does not change the deployed application binary. Phase2 has not begun.
## Delivered foundation
- Added migration264 to reconcile the live readiness-only queue procedure with current canonical queue requests. Optional BookID reaches SQL before TOP40, including default dashboard book selection. Existing legacy queues, subtitle output and ordering remain compatible. Queues remain bounded at40 scenes per selected book; Help explains the bound.
- Intent Checklist now displays the scene's canonical Revision Status through its existing lookup. Legacy DraftStatus/readiness fields are retained. Live synthetic verification: canonical Outlined with legacy Planned still stored. No status backfill or manuscript-data conversion.
- Introduced immutable shared context/selection projections with separate scope, saved objective, working, exploration, pinned, Reader, session and verified Word slots. Dashboard, resolved reference page models and Reader use adapters; reference-role metadata is emitted. Construction is not authorisation or a navigation command. Existing entity access, exact native document/lease/accepted-position validation and race checks remain authoritative. Unresolved scene URLs cannot become valid pinned selections. Active sessions retain the existing UUID/activity/chapter/native binding and polling rather than following a global selector.
- Book/project scope is preserved by plan-list preview links and activation/deactivation/deletion/legacy-regeneration returns. Preview filters plans before choosing its default, includes All Books plans, and rejects an explicit out-of-scope plan. Empty scoped previews retain book context. Rebalance GET reuses the normal preview loading path so reviewed allocations remain available; no premature replacement of either scheduling store.
- Setup/edit validation partials now load in the Scripts section after layout jQuery. Queue terminology matches In Progress/Final Pass. Sparse Context messages no longer falsely claim a supplied book ID was missing.
- Existing Help architecture reused: corrected workspace/queue/goal articles, new working-context and plan articles, existing tag-helper icons on affected surfaces, and a 62-unit Help ownership register.
- Permanent eight-phase tracker includes implementation batches, reuse/data/dependency/risk/test/Help/deployment gates, explicit mapping of all62 features and96 interaction families, and Writer2 reconciliation. Timed sprints, richer passes, collaborator assignments and signed provenance remain honestly recorded as outstanding requirements rather than silently retired.
## Files and components
| Component | Changed files |
|---|---|
| Context contract | `PlotLine/Services/Writer/WriterContext.cs`; context/dashboard/preview models in `PlotLine/ViewModels/CoreViewModels.cs`; Reader adapter in `Services/Manuscript/ManuscriptReaderService.cs` |
| Queue and plan plumbing | `PlotLine/Controllers/WriterController.cs`, `PlotLine/Services/CoreServices.cs`, `PlotLine/Data/Repositories.cs`, `PlotLine/Sql/264_WriterFoundationQueues.sql` |
| Reference verification/projection | `PlotLine/Controllers/WritingController.cs`; `Views/Writing/Context.cshtml`, `Intent.cshtml`, `_WritingIntentChecklist.cshtml` |
| Existing Writer surfaces | `Views/Writer/Index.cshtml`, `_WriterSceneQueue.cshtml`, `WritingPlans.cshtml`, `ScheduleSetup.cshtml`, `SchedulePreview.cshtml`, `EditWritingPlan.cshtml` |
| Regression protection | `PlotLine.Tests/WriterFoundationTests.cs`, `WritingIntegrationTests.cs`, harness registration in `Program.cs`, `Sql/WriterFoundation.sql`, `Browser/writer-foundation-live.cjs` |
| Help | `PlotLine/Help/Articles/Workspace/{Overview,WriteNext,RevisionQueue,PolishingQueue,ChapterGoals,WorkflowSummary,WorkingContext,WritingPlans}.md` |
| Programme documentation | `Docs/Writer/Writer3/{Master-Specification,Implementation-Tracker,Context-Contract,Help-Coverage,Phase1-Report}.md` and sanitised acceptance evidence |
No native add-in/agent/protocol code, styles, production settings or author story semantics changed. The unrelated untracked CanonicalManuscriptArchitectureAssessment document was preserved.
## Database qualification
Effective Development configuration was parsed privately with SqlConnectionStringBuilder and DB_NAME verified as `PlotDirector_Development`. Before writes/migration, a fresh copy-only checksum backup succeeded and its nonempty container file was checked:
`/var/opt/mssql/backup/writer3-before-264-20261116-phase1.bak`
An earlier optional RESTORE VERIFYONLY attempt was refused because the application SQL account lacks CREATE DATABASE permission. No privilege escalation, restore/reset or database overwrite was attempted. Backup command completion/file existence is verified; a restore test is not claimed.
Applied only264, with ANSI_NULLS and QUOTED_IDENTIFIER enabled. It changes one procedure and adds no tables, columns or destructive migration. Earlier numbered migrations remain unchanged. The old application remains compatible with the optional parameter and retained queue names.
`PlotLine.Tests/Sql/WriterFoundation.sql` ran against verified Development inside a transaction and rolled back. It established45 scenes in another book cannot exclude the selected-book target, the selected-book cap remains40, all four canonical statuses map correctly, and legacy Blocked still works. Follow-up metadata verified BookID scope and zero remaining transactional fixture projects. Fixtures contain no actual author manuscript.
## Automated and browser results
| Gate | Command / coverage | Result |
|---|---|---|
| Build | `dotnet build PlotLine.slnx --no-restore` | Exit0;0warnings/errors |
| Full harness | `dotnet run --no-build --project PlotLine.Tests/PlotLine.Tests.csproj` | Exit0;543 PASS records, no FAIL records; includes new context/queue/plan tests plus existing native auth, manuscript, intent, activity and security regressions |
| Standalone windows | `node writer-workspace.cjs` | Browser/simulated PWA pass: initial failure/retry, per-window identity/reuse, selected-book isolation, denied/unavailable display API and plan navigation |
| Native-follow simulation | `node writing-context-follow-recovery.cjs` | Pass: exact-session queries, pending/invalid mappings, races/cancellation, cross-chapter updates and trusted explicit navigation; simulated protocol, not Word |
| Reader | `node manuscript-reader.cjs` | Pass: real Razor/controller, escaped text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus;3widths×4themes×browser/PWA |
| Intent | `node intent-assessment.cjs` | Pass: explicit assessment/saved-result load/cancellation/scene isolation/permission feedback with isolated fixtures; no paid production AI execution |
| Chapter goals | `node writer-goal-navigation.cjs` | Pass: unsaved guard, cancel/discard, antiforgery saves, Unicode, save-and-leave failure/retry/concurrent edits; browser/PWA |
| Work/audio UI | `node writer-intelligent.cjs` | Pass:4themes,2widths,browser/PWA; fixed-rule suggestions, session start/end/note, periodic controls, seeks/stale/recovery under simulated media, month/year activity |
| Dashboard | `node writer2-dashboard.cjs` | Pass:48theme/viewport/history/PWA combinations; navigation, selected book, empty states and chart links |
| Live post-deployment | `PD_WRITER_FOUNDATION_IDENTITY=<private fixture file> node PlotLine.Tests/Browser/writer-foundation-live.cjs` | Browser and simulated PWA pass; [sanitised observations](Evidence/Development-Browser-Acceptance.json) |
Isolated browser tests used the existing loopback fixture host, never the deployed Production service or database. The live test used normal Development login and only dedicated disposable entities. It exercised four populated queues, pinned canonical status, empty-book entry, real setup/confirmed allocations, scoped/empty Preview, activation/deactivation returns, out-of-scope plan404, incomplete native-session400, empty Reader, and validation load without JavaScript errors. Help microcontent and browser popup, PWA contextual ribbon/drawer and full article GET were checked. Initial test iterations were corrected to target promoted PWA Help and wait for its asynchronous content; no application failure was hidden.
The synthetic owner/projects/books/scenes/plans were removed using guarded existing project/account deletion procedures. Final query returned RemainingSyntheticAccounts=0; the temporary credential file was removed. The transactional queue fixture also left no rows. No real manuscripts were used for writes.
## Development deployment
Release: **`c769e11-20261116T151427Z`**.
- Fresh Release publish archived at `/srv/apps/plotdirector-dev/releases/c769e11-20261116T151427Z`.
- No queued/processing Story Intelligence jobs, active core imports, synthesis or character enrichment found before service stop; existing states were Complete/Completed.
- Prior physical current directory retained at `/srv/apps/plotdirector-dev/current-before-c769e11-20261116T151427Z`.
- Replaced Development current via rsync while stopped, preserving appsettings, environment files, App_Data, uploads and logs. Ownership restored; service restarted.
- `systemctl is-active plotdirector-dev`: active. Local GET `http://127.0.0.1:5050/`:200. Public TLS-validated GET `https://dev.plotdirector.com/`:200.
- Published/deployed PlotLine.dll SHA256 both `7ebc3af6895af46d6be2e353f6d9c3595796fb9023fbe7852f743caeb3ee2a39`.
- Deployed informational metadata: `1.0.0+c769e1119a2542e256374db3c48eeb324c2663ab`.
- Recent warning/error journal clear. Authenticated changed-route acceptance passed after deployment.
The initial nonprivileged deployed-file hash check was permission denied; it was repeated successfully with sudo. Deployment itself succeeded. Application rollback can use the retained prior directory without reversing264; optional BookID and legacy queue support retain compatibility. Production was not touched.
## Limitations and bounded follow-up
Physical Windows Word, installed Windows PWA, actual ElevenReader playback/Pause on Edit latency, and monitor placement have not been tested on Atlas. Existing protocol/fixture regressions passed; they are not physical acceptance. No AI-generated creative decisions were accepted into story records. No new global working selector or integrated pane was introduced. The shared projection supports future shell work while retaining independent authorities.
Legacy/reviewed schedule stores and completion semantics remain separate. Richer visual unification, milestones/exceptions, dynamic planning controls and a complete rebalance-review interface remain Phase6 work. Setup still validates project/book compatibility on the server rather than introducing a new selector API. Other missing-data and full-graph audit gaps remain recorded; this foundation release does not claim to complete all Writer2 or Writer3 features.
## Specific manual acceptance
1. On Windows, open an existing linked saved manuscript. Confirm ribbon book/chapter/scene and live standalone Context/Intent follow the accepted mapping; unsaved or mapping-pending states must not guess a scene.
2. Open Context and Intent on separate monitors. Check Detect displays with allowed/denied permission, named-window reuse, focus, reconnect and changed monitor topology. Verify existing fallback and Windows-controlled Word placement.
3. Keep a pinned reference on another scene; explore plot/metric/map references. The saved working objective and session target must remain unchanged. Only an explicit Word-navigation control should request a cursor move.
4. Select a different Reader chapter while a session is active. Confirm Reader text changes independently and the active session remains associated with its original chapter. Check actual accepted-text refresh and Focus reading with the installed Windows PWA.
5. Start Audio Review after compatible Companion/player registration. Check repeated Play/Pause/±15s, actual text-edit pause, cursor/scroll negative cases, source loss/recovery, explicit resume, End tracking versus external Pause, and Journey evidence with no duplicated duration.
6. In the installed Windows PWA, open page Help through the contextual ribbon and inspect full article/drawer. Check plan returns with multiple books and All Books plans. Repeat inaccessible-book checks using a genuine collaborator account without owner evidence authority.
## Next phase
Await explicit acceptance before Phase2. Recommended first batch:2A Home/destination route states and viewport/keyboard interaction sketches using the existing application shell, preserving all legacy routes and Utilities. Then implement the three Home choices and five destinations before the resizable main/companion composition. Do not remove standalone Context/Intent.

View File

@ -47,8 +47,14 @@ const assert=require('node:assert/strict');
const help=page.locator('[data-help-key="workspace.writingPlans"]').first();
const heading=await help.getAttribute('data-help-url');assert(heading);
assert((await help.locator('[data-help-micro]').getAttribute('data-help-micro')).includes('measured'));
await help.locator('button').click();await page.locator('.plotline-help-popover').waitFor();
assert((await page.locator('.plotline-help-popover').innerText()).includes('Reviewed allocations'));
if(pwa){
await page.locator('[data-help-open="workspace.writingPlans"]:visible').click();
await page.locator('[data-help-drawer]').waitFor({state:'visible'});
await page.waitForFunction(()=>document.querySelector('[data-help-drawer]')?.innerText.includes('Writing plans'));
}else{
await help.locator('button').click();await page.locator('.plotline-help-popover').waitFor();
assert((await page.locator('.plotline-help-popover').innerText()).includes('Reviewed allocations'));
}
const fullHelp=await page.request.get(base+heading);assert.equal(fullHelp.status(),200);assert((await fullHelp.text()).includes('recorded work'));
checks.push('Real setup/confirmation, empty/scoped Preview, activate/deactivate return filters and validation dependencies pass');
const otherPlan=await page.request.get(`${base}/Writer/SchedulePreview?writingPlanId=${plan}&bookId=${w.other}`);assert.equal(otherPlan.status(),404);