Commit 8ad3365
committed
Close HIGH-impact parity gaps flagged by audit 2026-04-15 — ranks, verdicts, Pass 3 payload
Browser pipeline was diverging from the Python library on decisions users
see: ranks, verdicts, and the signals Pass 3 uses to review structure.
- _computeRanks rewritten to mirror postprocess.compute_ranks: runner → null,
procedural case_of_the_week → A, hybrid case_of_the_week → B, remaining
lines ranked by descending event count with span thresholds A≥75% /
B≥50% / C≥25%. Primary + also_affects count equally. Previous share-based
formula gave A-rank to runners in procedurals.
- _validateRanks ported from Python. Demotes A-rank lines below 25% span
to B and flags >50%-dominant lines. Output fed into Pass 3 as
diagnostics. Called in both Hollywood and narratology pipelines.
- Pass 3 payload now includes weight_per_episode (primary/background/
glimpse/absent per plotline per episode), matching Python.
- _applyVerdicts: target-id validation with console.warn on mismatch,
DROP guard (abort when redistribute leaves events behind), MERGE now
rewrites also_affects lists to replace source → target (with dedup),
CREATE propagates the LLM's rank into reviewed_rank.
- Narratology: new dedupe_arc_inciting_incidents (Python + JS) enforces
one plot_fn=inciting_incident per plotline. Python orchestrator had a
pre-existing ordering bug — orphan/dedupe ran after the final
compute_ranks, so ranks saw pre-assignment counts; moved ahead of
span/rank recompute.
- Tests: 118 → 122. Added 3 dedupe_arc_inciting_incidents cases and a
procedural-runner regression guard for compute_ranks.1 parent c785052 commit 8ad3365
5 files changed
Lines changed: 421 additions & 71 deletions
File tree
- src/tvplot
- html/parts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
0 commit comments