Require series evidence for D50 and record newly exposed D05 gate blocker
This commit is contained in:
parent
77b899c542
commit
424dccc736
112
Docs/WritingSolver/CuratedV2/D50Correction/Report.md
Normal file
112
Docs/WritingSolver/CuratedV2/D50Correction/Report.md
Normal file
@ -0,0 +1,112 @@
|
||||
# Focused D50 correction — stopped at the next semantic gate
|
||||
|
||||
1 November 2026. Continues from `77b899c`. Development candidate files only. **No database access, publication, deployment or indexing.**
|
||||
|
||||
## D50 correction
|
||||
|
||||
Only three graph values changed, all within D50:
|
||||
|
||||
| Parameter | Before | After |
|
||||
|---|---:|---:|
|
||||
| `signals.overwhelm` | 2 | Removed, equivalent to 0 |
|
||||
| `signals.scale` | 2 | Removed, equivalent to 0 |
|
||||
| `threshold` | 20 | 12 |
|
||||
|
||||
The existing `series: 3` and `continuity-conflict: 1` coefficients remain unchanged. No other diagnosis, route, choice weight, signal vocabulary, feature mapping, wording, ID or slug changed.
|
||||
|
||||
Removing the two generic coefficients prevents scale/overwhelm from generating a series diagnosis. Lowering the threshold to 12 preserves the genuine four-point series witness: four series points at coefficient three contribute 12. Increasing the series coefficient instead would risk allowing D50 to overtake D51 in the long-running-thread case. The selected correction retains that distinction.
|
||||
|
||||
Across all **11,325 reachable states**, a state with no `series` evidence scores at most **9** for D50, below the new threshold **12**. There are **zero** qualifying D50 states without series evidence. The maximum no-series score comes from ordinary continuity-conflict evidence, not generic signals. Pure generic evidence now contributes zero to D50. A focused regression checks this bound over the full traversal and checks genuine D50/D51 cases.
|
||||
|
||||
## Case 30 and the new blocker
|
||||
|
||||
Path unchanged:
|
||||
|
||||
```
|
||||
entry/too-much → scale-what/scenes → track-structure/too-many
|
||||
```
|
||||
|
||||
Signals unchanged:
|
||||
|
||||
```json
|
||||
{"overwhelm":3,"scale":8,"scene-purpose":5,"checking":3}
|
||||
```
|
||||
|
||||
| Result | Before D50 correction | After D50 correction |
|
||||
|---|---|---|
|
||||
| Primary | D33=43 | D33=43 |
|
||||
| Supporting | D52=28, D50=22 | D52=28, **D05=20** |
|
||||
| D50 score | 22, threshold 20 | **0**, threshold 12 |
|
||||
|
||||
The candidate's case-30 metadata now uses the previously approved corrected expectation `[d33,d52]` and explicitly forbids D50. The route, complaint and answers were not changed. D50's forbidden-result check passes.
|
||||
|
||||
However, removing D50 exposes another recommendation which was previously below the three-result cutoff: **D05, “You're not sure what some scenes are contributing.”**
|
||||
|
||||
The author only said that navigating many scenes was cumbersome. They did not express uncertainty about scene purpose or contribution. D05 was already scoring 20 against threshold 20 before the correction; D50's higher score had kept it out of the displayed top three. Its appearance is a latent issue exposed by the focused fix, not a change to D05's scoring.
|
||||
|
||||
The source of D05's evidence is explicit:
|
||||
|
||||
| Selected choice | `scene-purpose` weight |
|
||||
|---|---:|
|
||||
| `scale-what/scenes`: “Scenes and chapters” | 1 |
|
||||
| `track-structure/too-many`: “There are simply too many scenes” | 4 |
|
||||
| Total | 5 |
|
||||
|
||||
D05 applies coefficient 4 to those five points, reaching 20. These selectors concern the manuscript's size/organisation rather than doubt about individual scenes' purpose. This is an evidence-semantics issue; it is **not** a generic-only leak, because the graph labels that evidence `scene-purpose`.
|
||||
|
||||
I did not retune D05, remove its evidence, alter its threshold, hide it in rendering or add it to acceptable supporting results. The instruction to stop upon another genuine diagnostic-model problem was applied here.
|
||||
|
||||
## Genuine series witnesses
|
||||
|
||||
All three supplied witness cases retain their exact expected result sets and prefixes:
|
||||
|
||||
| Case | Evidence | Result after correction |
|
||||
|---|---|---|
|
||||
| 47 — established facts across books | `series=4` | D50 primary, **12/12** |
|
||||
| 48 — deliberate long-running mystery | `series=7`, thread/setup evidence | D51 primary **30/22**; D50 supporting **21/12** |
|
||||
| 59 — relationship progression across books | `series=7` | D50 primary, **21/12** |
|
||||
|
||||
D51's coefficients, threshold and routing were not changed.
|
||||
|
||||
## Verification
|
||||
|
||||
- Normal solution build: passed, with the two existing nullable warnings in the regression harness.
|
||||
- Focused D50 regression: verifies all no-series states, genuine cases 47/48/59 and absence of D50 in case 30.
|
||||
- Complete .NET engine replay: **59/60 cases**, **184/185 exact prefix-result expectations** pass. The only failure is case 30's additional D05 result. All forbidden-result checks pass, including the corrected prohibition of D50.
|
||||
- State exploration: **11,325**, complete and below the ceiling. **44/44 nodes**, **52/52 solutions**, and every solution remains capable of being primary.
|
||||
- Curated path lengths: 2–4, median 3, mean 3.08.
|
||||
- The actual validator still reports the existing, independent `existing-barrier` neutral-endpoint blocker. No validator weakening or special case was introduced.
|
||||
- Full regression and page/browser suites were not run after the stop condition; no runtime UI changes were made.
|
||||
|
||||
Complete scores, prefixes, the maximum no-series D50 witness and all node/solution witnesses are in `results.json`.
|
||||
|
||||
Reproduce the focused regression:
|
||||
|
||||
```
|
||||
dotnet run --no-build --project PlotLine.Tests -- --writing-solver-d50
|
||||
```
|
||||
|
||||
Reproduce the full, deliberately failing gate audit:
|
||||
|
||||
```
|
||||
dotnet run --no-build --project PlotLine.Tests -- --writing-solver-curated-v2 \
|
||||
--report Docs/WritingSolver/CuratedV2/D50Correction/results.json
|
||||
```
|
||||
|
||||
The latter returns nonzero because case 30 has the unexpected D05 supporting result and the neutral-endpoint framework change has not yet been implemented. The original historical V2 reports remain unchanged; the live candidate acceptance file now contains the approved case-30 correction.
|
||||
|
||||
## Deferred at the stop condition
|
||||
|
||||
The broader generic-only audit of all 52 diagnoses has **not** been completed: the new blocker appeared during the prerequisite focused audit, before that step could be reached. No assertion is made that the remaining diagnoses satisfy the generic-evidence rule.
|
||||
|
||||
The neutral-endpoint schema/validator extension, tailored adoption presentation, remaining acceptance-metadata reconciliation, all-page/browser testing and final full regression gate remain deferred. Their approved scope has not been abandoned or expanded, but the instructions require a stop and report before tuning around this newly exposed diagnosis.
|
||||
|
||||
## Files changed
|
||||
|
||||
- `PlotLine/Content/WritingSolver/Candidates/curated-v2/writing-solver-curated-v2.json`: the three D50 scoring edits above.
|
||||
- `PlotLine/Content/WritingSolver/Candidates/curated-v2/acceptance-paths.json`: case 30 excludes and forbids D50; wording, route and other cases unchanged.
|
||||
- `PlotLine.Tests/WritingSolverCuratedV2Tests.cs`: optional state observer, no-series evidence audit, focused D50/D51 regressions; reachability assertion now checks the actual ceiling and primary reachability instead of pinning a historical state count.
|
||||
- `PlotLine.Tests/Program.cs`: focused D50 test entry point and regression registration.
|
||||
- `Docs/WritingSolver/CuratedV2/D50Correction/`: this report, complete engine results and command output.
|
||||
|
||||
No application runtime, schema, controller, view, CSS or SQL changes were made. The development site's published demo is untouched.
|
||||
@ -0,0 +1,5 @@
|
||||
Actual validator: FAIL; Dead end without diagnostic evidence: existing-barrier
|
||||
Exploration: 11325 states, 44/44 nodes, 52/52 solutions, complete=True.
|
||||
D50 without series: maximum score 9, threshold 12, qualifying states 0.
|
||||
Acceptance: 59/60. Lengths 2–4, median 3, mean 3.08.
|
||||
Case 30: Prefix 3: results expected [d33,d52], actual [d33,d52,d05].
|
||||
88529
Docs/WritingSolver/CuratedV2/D50Correction/results.json
Normal file
88529
Docs/WritingSolver/CuratedV2/D50Correction/results.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,13 @@ using PlotLine.ViewModels;
|
||||
|
||||
#pragma warning disable CS8321
|
||||
|
||||
if (args.Contains("--writing-solver-d50"))
|
||||
{
|
||||
WritingSolverCuratedV2Tests.D50EvidenceRequirement();
|
||||
Console.WriteLine("PASS focused D50 evidence requirement, no-series bound and genuine D50/D51 witnesses");
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.Contains("--writing-solver-curated-v2"))
|
||||
{
|
||||
WritingSolverCuratedV2Tests.Run(args);
|
||||
@ -58,6 +65,7 @@ if (args.Contains("--plot-lines"))
|
||||
|
||||
var tests = new (string Name, Action Test)[]
|
||||
{
|
||||
("D50 requires actual series evidence and preserves D50/D51 witnesses", WritingSolverCuratedV2Tests.D50EvidenceRequirement),
|
||||
("Curated V2 replays all supplied acceptance prefixes and supporting-result rules", WritingSolverCuratedV2Tests.Acceptance),
|
||||
("Curated V2 exhausts real-engine states and preserves revision/multi-select behaviour", WritingSolverCuratedV2Tests.ReachabilityAndRevision),
|
||||
("Curated V2 records the existing neutral adoption validator boundary", WritingSolverCuratedV2Tests.ExistingValidatorBoundary),
|
||||
|
||||
@ -75,7 +75,7 @@ internal static class WritingSolverCuratedV2Tests
|
||||
|
||||
// Faithful instrumentation of the existing validator traversal, including its exact
|
||||
// history/score key and seen+pending ceiling. This intentionally does not replace it.
|
||||
public static Exploration Explore(SolverGraph graph)
|
||||
public static Exploration Explore(SolverGraph graph, Action<SolverOutcome>? inspect = null)
|
||||
{
|
||||
var pending=new Queue<SolverAnswer[]>();pending.Enqueue([]);
|
||||
var seen=new HashSet<string>();var nodes=new Dictionary<string,SolverAnswer[]>();var solutions=new Dictionary<string,SolverAnswer[]>();
|
||||
@ -87,6 +87,7 @@ internal static class WritingSolverCuratedV2Tests
|
||||
var key=string.Join(",",outcome.Answers.Select(a=>a.Node))+":"+string.Join(",",outcome.Scores.OrderBy(s=>s.Key).Select(s=>$"{s.Key}={s.Value}"))+":"+outcome.Next?.Id;
|
||||
if(!seen.Add(key)) continue;
|
||||
if(seen.Count+pending.Count>100000) {errors.Add("The real validator's seen+pending ceiling was exceeded.");complete=false;break;}
|
||||
inspect?.Invoke(outcome);
|
||||
maximum=Math.Max(maximum,outcome.Answers.Count);
|
||||
foreach(var solution in outcome.Solutions) solutions.TryAdd(solution.Id,outcome.Answers.ToArray());
|
||||
if(outcome.Solutions.FirstOrDefault() is { } winner) primary.Add(winner.Id);
|
||||
@ -111,6 +112,24 @@ internal static class WritingSolverCuratedV2Tests
|
||||
return new(seen.Count,attempts,peak,complete,nodes,solutions,primary.Order(StringComparer.Ordinal).ToArray(),terminals,neutral,maximum,errors.ToArray());
|
||||
}
|
||||
|
||||
public static void D50EvidenceRequirement()
|
||||
{
|
||||
var graph=Graph();var solution=graph.Solutions.Single(s=>s.Id=="d50");var maximum=0;
|
||||
var exploration=Explore(graph,outcome=>
|
||||
{
|
||||
if(outcome.Scores.GetValueOrDefault("series")!=0) return;
|
||||
var score=solution.Signals.Sum(w=>outcome.Scores.GetValueOrDefault(w.Key)*w.Value);
|
||||
maximum=Math.Max(maximum,score);
|
||||
Require(score<solution.Threshold,"D50 qualified without series evidence.");
|
||||
});
|
||||
Require(exploration.Complete && exploration.Errors.Length==0 && exploration.PrimarySolutions.Length==52,"D50 correction lost diagnostic reachability.");
|
||||
Require(maximum==9 && solution.Threshold==12,"Recheck the D50 no-series evidence bound after graph changes.");
|
||||
var cases=Replay(graph);
|
||||
foreach(var id in new[]{47,48,59})
|
||||
Require(cases.Single(c=>c.Id==id).Pass,$"Genuine D50/D51 witness case {id} regressed.");
|
||||
Require(!cases.Single(c=>c.Id==30).Supporting.Contains("d50"),"Case 30 still returns D50.");
|
||||
}
|
||||
|
||||
public static void Acceptance()
|
||||
{
|
||||
var results=Replay(Graph());
|
||||
@ -120,7 +139,7 @@ internal static class WritingSolverCuratedV2Tests
|
||||
{
|
||||
var graph=Graph();var exploration=Explore(graph);
|
||||
Require(exploration.Complete && exploration.Errors.Length==0,string.Join("; ",exploration.Errors));
|
||||
Require(exploration.StateCount==11325,$"Expected the supplied 11,325 states, actual {exploration.StateCount}.");
|
||||
Require(exploration.StateCount<100000 && exploration.PrimarySolutions.Length==52,"Exploration must stay below the ceiling and every diagnosis must remain capable of being primary.");
|
||||
Require(exploration.Nodes.Count==44 && exploration.Solutions.Count==52,"Reachability differs from the supplied assembly report.");
|
||||
foreach(var test in Cases())
|
||||
{
|
||||
@ -179,7 +198,18 @@ internal static class WritingSolverCuratedV2Tests
|
||||
{
|
||||
var pathsIndex=Array.IndexOf(args,"--paths");
|
||||
var pathsFile=pathsIndex<0 ? null : args[pathsIndex+1];
|
||||
var graph=Graph();var validation=WritingSolverValidator.Validate(graph);var exploration=Explore(graph);var results=Replay(graph,pathsFile);
|
||||
var graph=Graph();var validation=WritingSolverValidator.Validate(graph);
|
||||
var d50=graph.Solutions.Single(s=>s.Id=="d50");
|
||||
var maximumWithoutSeries=int.MinValue;SolverAnswer[] maximumWithoutSeriesWitness=[];
|
||||
var noSeriesQualified=0;
|
||||
var exploration=Explore(graph,outcome=>
|
||||
{
|
||||
if(outcome.Scores.GetValueOrDefault("series")!=0) return;
|
||||
var score=d50.Signals.Sum(w=>outcome.Scores.GetValueOrDefault(w.Key)*w.Value);
|
||||
if(score>maximumWithoutSeries) {maximumWithoutSeries=score;maximumWithoutSeriesWitness=outcome.Answers.ToArray();}
|
||||
if(score>=d50.Threshold) noSeriesQualified++;
|
||||
});
|
||||
var results=Replay(graph,pathsFile);
|
||||
var reportIndex=Array.IndexOf(args,"--report");
|
||||
var report=reportIndex<0 ? Path.Combine(Root(),"Docs/WritingSolver/CuratedV2/results.json") : args[reportIndex+1];
|
||||
var lengths=results.Select(r=>r.AcceptedPath.Length).Order().ToArray();
|
||||
@ -192,13 +222,14 @@ internal static class WritingSolverCuratedV2Tests
|
||||
}).ToArray();
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(report))!);
|
||||
File.WriteAllText(report,JsonSerializer.Serialize(new {graph.Version,Counts=new {Signals=signals.Length,Nodes=graph.Nodes.Count,Solutions=graph.Solutions.Count,Features=graph.Features.Count},
|
||||
ValidationPassed=validation.Count==0,ValidationErrors=validation,Exploration=exploration,Passed=results.Count(r=>r.Pass),Total=results.Length,
|
||||
ValidationPassed=validation.Count==0,ValidationErrors=validation,Exploration=exploration,D50Evidence=new {MaximumScoreWithoutSeries=maximumWithoutSeries,MaximumWithoutSeriesWitness=maximumWithoutSeriesWitness,QualifiedStatesWithoutSeries=noSeriesQualified,Threshold=d50.Threshold},Passed=results.Count(r=>r.Pass),Total=results.Length,
|
||||
JourneyLengths=new {Min=lengths.Min(),Median=(lengths[29]+lengths[30])/2.0,Mean=lengths.Average(),Max=lengths.Max(),ContinuingCases=results.Where(r=>r.Next is not null).Select(r=>r.Id).ToArray()},
|
||||
NeutralAdoptionWitnesses=neutral,Results=results},Json)+"\n");
|
||||
Console.WriteLine($"Actual validator: {(validation.Count==0 ? "PASS" : "FAIL")}; {string.Join("; ",validation)}");
|
||||
Console.WriteLine($"Exploration: {exploration.StateCount} states, {exploration.Nodes.Count}/44 nodes, {exploration.Solutions.Count}/52 solutions, complete={exploration.Complete}.");
|
||||
Console.WriteLine($"D50 without series: maximum score {maximumWithoutSeries}, threshold {d50.Threshold}, qualifying states {noSeriesQualified}.");
|
||||
Console.WriteLine($"Acceptance: {results.Count(r=>r.Pass)}/60. Lengths {lengths.Min()}–{lengths.Max()}, median {(lengths[29]+lengths[30])/2.0}, mean {lengths.Average():F2}.");
|
||||
foreach(var result in results.Where(r=>!r.Pass)) Console.WriteLine($"Case {result.Id}: {string.Join(" ",result.Errors)}");
|
||||
if(validation.Count>0 || !exploration.Complete || exploration.Errors.Length>0 || results.Any(r=>!r.Pass)) Environment.ExitCode=1;
|
||||
if(validation.Count>0 || !exploration.Complete || exploration.Errors.Length>0 || noSeriesQualified>0 || results.Any(r=>!r.Pass)) Environment.ExitCode=1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1605,8 +1605,7 @@
|
||||
"expectedNext": null,
|
||||
"expectedResults": [
|
||||
"d33",
|
||||
"d52",
|
||||
"d50"
|
||||
"d52"
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -1616,9 +1615,10 @@
|
||||
],
|
||||
"requiredSupporting": [],
|
||||
"forbiddenResults": [
|
||||
"d01"
|
||||
"d01",
|
||||
"d50"
|
||||
],
|
||||
"notes": "Literal path curated for v2; optional supporting results need not all appear."
|
||||
"notes": "Literal path curated for v2; optional supporting results need not all appear. D50 is forbidden: this complaint and literal path establish no series evidence."
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
@ -3191,4 +3191,4 @@
|
||||
"notes": "Literal path curated for v2; optional supporting results need not all appear."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -7160,7 +7160,7 @@
|
||||
"active": true,
|
||||
"index": true,
|
||||
"order": 50,
|
||||
"threshold": 20,
|
||||
"threshold": 12,
|
||||
"features": [
|
||||
{
|
||||
"primary": true,
|
||||
@ -7185,9 +7185,7 @@
|
||||
],
|
||||
"signals": {
|
||||
"series": 3,
|
||||
"overwhelm": 2,
|
||||
"continuity-conflict": 1,
|
||||
"scale": 2
|
||||
"continuity-conflict": 1
|
||||
},
|
||||
"questions": [
|
||||
"How do I keep continuity straight across a book series?"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user