PlotDirector/Docs/Writer/Writer3/Phase3D1A-Diagnostic-Report.md

17 KiB
Raw Blame History

Phase 3D.1A — Guided Investigation diagnostic correction

17 November 2026. This is the corrective diagnostic audit following the deployed Phase 3D.1 foundation, separate from the original architecture batch with a similar label. Shared branch codex/word-companion-native-phase1-20261104; audit baseline be459d2, deployed application baseline 62fa292. Phase 3D.2A exports remain untouched. No Phase 3D.2B implementation, dependency/readiness planner, AI interpretation or production question matrix was introduced.

Proven original behaviour and causes

The engine was not universally unable to recommend. Before correction, the existing simulator passed 228 representative paths / 2,560 answers, and targeted real-evaluator paths demonstrated all 20 concern–hypothesis pairs and all five destination mappings. The original full application harness and original authenticated Development recommendation workflow also passed. No missing mapping or unavailable-capability configuration was necessary to explain the reported symptom.

The reported repeated response was nevertheless reproducible. First/second-option, uncertain and alternating patterns reached the 12-question safety limit with different underlying states, while the Razor result used the same generic paragraph whenever Recommendations.Count == 0. Even its “Two plausible explanations” terminal label could have no supported recommendations: the legacy exhaustion rule counted raw positive support without net evidence or conflicts. The author could not distinguish that from genuine uncertainty or unavailable tools.

Three concrete contributing problems were established:

  1. Selection prioritised declarations rather than substantive effects. At the empty story state, both challenge questions ranked 21, the zero-evidence action preference ranked 16, and the leading discovery questions ranked 7. Priors activated challenge/corroboration bonuses before supporting answers existed. Preference declared five hypotheses and bought five “dimension gaps” despite contributing no evidence. Uncertain/neutral contributions also marked coverage. This wasted the small question budget and made manual interpretation difficult.
  2. Reverse direction was hidden by generic labels. Twenty questions reused “Yes, that describes it” / “No, that does not describe it”, including “Can you…” questions. Direct difficulty yes contributes +3; challenge yes contributes −3 because it confirms the ability is already present. All-yes is therefore conflicting/disconfirming evidence, not strong coherent support. No reversed contribution bug was found: the labels and ordering made the existing polarity difficult to see.
  3. Clarification and terminal presentation were too coarse. All five clarification prompts were identical and required both same-signal questions even when the material conflict came from discovery versus challenge. The author view collapsed weak evidence, opposition, conflict, ambiguity and unavailable tools into the reported sentence. A close rival could also be left short of a useful examination when another hypothesis first qualified.

There was no evidence that persistence retained superseded scoring contributions or that destination availability changed numeric diagnostic evidence. Those invariants were preserved and regression-qualified.

Corrections

A new immutable synthetic-3d1-v2 catalogue opts into EngineVersion: 2. The original synthetic-3d1-v1 bytes and evaluator remain unchanged. An omitted engine version means legacy mode (0); unsupported versions fail validation. Old investigations continue to use their bound catalogue, original labels, question sequence and evaluation semantics. Their author-safe conclusion presentation becomes clearer without changing recorded evidence. Authors can start another investigation to use the corrected preview; no history is silently upgraded or overwritten.

Version 2 selects from actual non-uncertain, nonzero option contributions, rewards uncovered substantive dimensions and discovery, and gives challenge priority only after positive multi-dimensional support. Repeated same-signal corroboration gets no independence-gap bonus. Questions remain dynamically ranked with ordinal ID tie-breaking. Clarification is eligible only when its relevant material conflict exists; its catalogue prerequisite no longer demands redundant questions. Lower initial priority does not prevent selection when later evidence makes a challenge or clarification important.

Before stopping with a supported result, a positively supported rival is allowed a useful remaining question if its potential authored positive contribution could bring it into the existing two-point recommendation band. This is a conservative deterministic bound, not entropy or statistical information gain. A remaining close rival can therefore receive its discrimination/challenge opportunity; the representative story competing path now reaches two supported explanations after 10 answers rather than choosing just one after 9 in the baseline. Safety bounds remain 8–12; a genuinely unresolved investigation is allowed to end without a recommendation.

No evidence weights, independence aggregation, coverage/corroboration requirements, challenge requirements, minimum/maximum lengths or confidence thresholds were weakened or changed. Strongest-sign-per-dimension/group and ±3 dimension caps remain authoritative. Concern priors influence selection/ordering, never the net-evidence qualification threshold. Different-aspect clarification clears only the conflict veto and retains both support and opposition. Readiness/preparation does not enter scoring.

The author result now distinguishes supported next steps, tentative possibilities, competing possibilities, conflicting answers, no clear direction and unavailable tools, without numeric scores or internal terminology. Tentative results do not expose unsupported tool actions. The question limit and safe next actions are explained. Technical/configuration/persistence errors remain explicit HTTP error paths rather than invented diagnoses.

Twenty questions have specific yes/no labels. Five clarification prompts identify the concern; explanatory text clarifies uncertainty, reversal and neutral preference. Two questions now directly ask about the relevant difficulty rather than hypothetical usefulness, justifying publication as a new version even though IDs/weights remain stable. All 28 questions and 89 options are audited in Question-Quality-Audit. This remains synthetic mechanism content.

Diagnostic tooling and evidence

InvestigationDiagnostics.Trace projects the real evaluation: concern priors; per-state selected answers/options; positive/negative/neutral contributions; groups and redundancy; scores/coverage/conflicts; ranked candidates and excluded questions; thresholds; destination mappings/eligibility; stopping limit/exhaustion and conclusion blockers. The admin simulator and JSON diagnostics expose it only through existing Development-gated AdminOnly routes with author/book ownership checks. Administrators cannot read another author’s private investigations. Historical events retain their original evaluation shape; the new trace is computed separately and not appended to legacy payloads.

The test harness exports 76 deterministic representative/adversarial/revision paths before and after, with 633 baseline states and 630 corrected states. Full compressed synthetic-only JSON and summary are in Evidence/Phase3D1A/. No credentials, real author answers or manuscript content are exported. Synthetic-Reachability-Matrix contains every positive witness and its score, distinct dimensions/groups, capability and exact option path.

Representative story outcomes:

Pattern Before Corrected
Each targeted strong hypothesis Supported, all five reachable Supported, all five reachable in 8 answers
Moderate but consistent Supported after enough substantive evidence Supported after enough substantive evidence
All uncertain / weak No recommendations, generic message No clear direction; no recommendations
First option throughout Unqualified “Two plausible explanations”, generic message Ambiguous, no unsupported tools
Second option throughout Unqualified “Two plausible explanations”, generic message Conflicting answers, no unsupported tools
Correlated motivation evidence only More information needed, generic message Tentative possibility, no unsupported tools
Competing motivation/change One supported result after 9 baseline answers Two supported results after 10 answers
Destination unavailable No suitable destination, generic message plus availability line Explicit relevant-area/unavailable-tool explanation
Target’s positive answers revised Original recommendation removed Original recommendation removed; further questions retained

Pattern labels are not diagnoses: “moderate” can accumulate enough independently supported evidence to qualify, and alternating raw options can form a coherent supported answer pattern. Results are assessed against actual contributions, not arbitrary scenario names.

Automated qualification

  • dotnet build PlotLine.slnx: succeeds, zero warnings/errors.
  • dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj: succeeds; 603 PASS records (including diagnostic acceptance output), existing public Problem Solver and Word/Writer regressions green.
  • Existing legacy simulator: 228 paths / 2,560 answers; no loops, repeated questions, premature recommendations, invalid destinations or non-deterministic replay.
  • Corrective acceptance: all 20 actual selected positive witnesses; five distinct destinations; unchanged option IDs/effects and thresholds; exact replay of all 633 captured legacy states; dynamic divergence; genuine conflict clarification; correlated/uncertain non-confidence; unavailable destinations without rescoring; answer revision; private memory persistence/resume; cross-user/book denial; safe exhaustion; two supported competing results and refusal to terminate before a useful rival question.
  • Isolated real MVC/Razor browser and simulated PWA: 20 runs cover five recommendations, uncertainty, conflict, correlation, first-option and competing patterns; per-path save/resume, scoped redirects, cross-user/book isolation, admin trace/replay, revision and narrow overflow. Existing legacy authenticated Development browser/PWA workflow passes before rollout, including CSRF400, stale409 and Help.
  • Existing catalogue and Phase 3D.2A machine-readable audit exports preserved. No Windows/Office binaries changed. Browser checks reject inference-provider requests; the evaluator/trace remain pure, with no external inference service.

Development deployment and acceptance

Application commit 283f6fd7ef14aa615fb6f7e43901d14c3f564e47 was pushed on the shared branch and deployed to Development as 283f6fd-20261117T203948Z. Archive: /srv/apps/plotdirector-dev/releases/283f6fd-20261117T203948Z; pre-install copy: /srv/apps/plotdirector-dev/current-before-283f6fd-20261117T203948Z. A fresh Release publish was used; configuration, keys, uploads and logs were preserved. DLL informational version is 1.0.0+283f6fd7ef14aa615fb6f7e43901d14c3f564e47; published and deployed SHA256 both 8360d3f86c500966af406398b10e41560d26d05f0f68728445ea40a939d1f13d. Service active, local GET200 and TLS-validated public GET200; no warning/error journal entries since rollout, rechecked after acceptance/cleanup.

No schema migration was required. After the compatible application was running, the existing stored procedure published the validated immutable synthetic-3d1-v2 at 20:40 UTC; the original catalogue is retained byte-for-byte. Catalogue publication happened only in Development. Older 62fa292 binaries do not understand the new EngineVersion field: a rollback must retain a compatible catalogue reader or disable the preview; merely restoring the old binary is not a compatible way to resume new v2 investigations.

Before fixture/publication writes, a copy-only/checksum backup was taken at /var/opt/mssql/backup/writer3-phase3d1a-before-20261117.bak, with RESTORE VERIFYONLY and backup metadata verification. Pre-stop checks found only completed import, pipeline, synthesis and enrichment work and no Story Intelligence jobs; no queued/running work was interrupted.

Actual authenticated Development browser and simulated PWA acceptance passed 20 runs: five different supported tool destinations, uninformative answers, contradictions, correlated/tentative evidence, first-option ambiguity and competing explanations. The story competing path renders two supported suggestions. Tests cover save/resume, answer revision triggering clarification, original book/project context, no public Solver/iframe, no inference-provider requests, unauthenticated redirect, cross-book denial, narrow layout and absence of script errors. Each of the five authenticated tool redirects was additionally followed to its actual GET200 page. Two pre-rollout v1 fixture investigations resumed and saved after deployment with original labels, bound catalogue and version increments intact. Existing CSRF/stale controls were verified in the legacy real Development acceptance; admin traces/replay and cross-user ownership were verified in the isolated real MVC host.

After acceptance, guarded project/account deletion removed the disposable author, project/books and all associated investigations/events; four explicit remaining-fixture counts are zero. All ten existing-data aggregate hashes match before/after: Projects, Books, Chapters, Scenes, BookParagraphManuscripts, WriterInvestigations, WriterInvestigationEvents, WriterWorkingObjectives, WriterReviewObservations and WriterWorkSessions. The three pre-existing investigation records and their history remain unchanged. Catalogue count increased only by the deliberate v2 publication; v1 content hash remains identical. No existing author/manuscript data was rewritten. Disposable credentials were removed.

Receipts: qualification, Development browser log, legacy resume, five actual tools, isolated browser. Screenshots contain disposable content only: supported, two supported possibilities, uncertainty, conflict, tentative.

This final reporting commit adds acceptance receipts/screenshots; the deployed web application remains the application commit above. No Production deployment or Windows Companion binary installation occurred.

Remaining limitations and review boundary

These are bounded selected witnesses, not exhaustive enumeration of 3–5 choices across all possible states or production editorial validation. Independence groups and synthetic numeric weights remain authored test assumptions. The five destinations are the original narrow adapters; particularly next-event→Relationships is a deliberately narrow test example. Preference is recorded but does not tailor the tool. Uncertain and “both” remain combined neutral discriminator answers. Free text is not interpreted. Conflict/different-aspect handling retains a single current answer per question; the author must revise answers when understanding changes. A conservative rival bound can use remaining budget; a hard maximum can still end with useful unanswered questions, which diagnostics explicitly show.

Legacy investigations deliberately retain their legacy selection behaviour for reproducible history. The catalogue is Development only; recommendations are not production writing guidance. Physical Windows, Office, installed PWA and screen-reader acceptance are outside this correction; responsive browser/simulated PWA and semantic controls were checked. Public Problem Solver source, routes/content/SEO, Word Companion source/binaries, accepted manuscript data and Phase 3D.2A exports are preserved.

The questionnaire appeared to give the same answer because different inconclusive states shared one result paragraph, while misleading labels and poor early question priorities made those states easy to reach. Supported recommendations were already reachable; the correction makes coherent paths easier to follow and explains the actual outcome. Stop for review before Phase 3D.2B.