PlotDirector/Docs/Codex/ContextWarnings-122.md
2026-12-02 15:41:28 +00:00

4.0 KiB

Context Warnings — task 122

Implementation uses existing persisted ContinuityWarnings, canonical Timeline order, Context partial lifecycle, shared main-window delegation and existing MarkIntentionalAsync review action. Scene tile selection is local preview state; it does not navigate shared focus or Word. Information remains opt-in. Detection evidence is historical; a changed manuscript predecessor is labelled “now”.

Development migration review required

PlotLine/Sql/341_ContextWarningCheckpoints.sql adds one SELECT-only stored procedure over existing ValidationRuns. It creates no tables, modifies no records and changes no existing numbered migration. Only a completed project or matching book validation establishes coverage, including scenes with no findings. Legacy scene-only runs cannot identify zero-finding scene coverage and are intentionally excluded. Changes since the run started mark results conservatively stale, including cross-book predecessor/structure edits. Unsaved Word changes remain outside saved validation coverage.

The standard code-only Development orchestrator explicitly rejects changed SQL (Tools/Deployment/development_release.py). Before deployment an operator must review/qualify migration 341 using the manifest/history procedure in Docs/Codex/Database.md and Docs/Codex/Deployment.md, verify the Development database identity, take the required backup, apply only the approved migration, and reconcile the code-only baseline as appropriate. Do not deploy dependent code before the procedure exists. No direct SQL application or deployment was attempted by the worker. Production is excluded.

Qualification should exercise the procedure against an isolated fixture for no completed run, completed project run, matching/mismatched book run, incomplete run, and scene-only run; it must not mutate author data. The procedure's result is null when no project/book check covers the selected book.

Acceptance after authorised Development deployment

Verify the full deployed commit/environment/database identity. Use the permanent Development browser identity and a registered disposable project through Tools/BrowserAcceptance/run.py and the reusable dev-acceptance.cjs helper. Create adjacent dated scenes (including a chapter boundary), deliberately validate through the real Warnings toolbar, verify immediate running state, duplicate suppression, completion/error feedback and refreshed summary/results. Open Context Warnings; check numbered tiles/current focus, information toggle, date comparison, evidence and scene-filtered main-window links in light/dark, single/split panes and a second window. Mark a finding intentional and verify counts and persistence after reload and fresh login. Edit a scene date and confirm stale status; revalidation must refresh the checkpoint. Clean up via ordinary scoped project deletion.

Prepared live script: PlotLine.Tests/Browser/context-warnings-acceptance.cjs (run through the launcher after deployment). It has not been executed. Theme, split-window, stale-edit and cross-chapter checks above remain additional live acceptance requirements.

Offline focused checks: node PlotLine.Tests/Browser/context-warnings.cjs and node PlotLine.Tests/Browser/warning-validation.cjs. These use synthetic responses and do not establish Development persistence or physical Word acceptance.

Local verification (2 December 2026)

The solution build passed with zero warnings/errors. The full executable regression harness passed after correcting the new controller fixture to register MVC view services (the initial run stopped on that fixture setup error). Both focused browser scripts passed. C# regressions cover canonical chapter order, cross-book predecessor evidence, intentional/dismissed filtering, zero-finding checkpoint coverage, stale edits during validation, read-only navigation allowlist, server-side duplicate validation suppression and failure lock release. SQL qualification and authenticated Development acceptance remain outstanding; these results must not be reported as deployed acceptance.