Three shareable demo / benchmark writeups modeled on the existing
`docs/evals/phase6_comparative_demo.md` treatment, each accompanied
by an asciinema-rendered GIF for at-a-glance viewing on the repo page.
- docs/evals/anti_regression_demo.md — three-gate defense; per-gate
table; honesty paragraph about the synthetic regression in S2 (real
ReplayEvidence shape via documented run_replay= kwarg); sample run
output; falsifiable claims index.
- docs/evals/learning_loop_demo.md — headline before/after; CORE-vs-
pretraining comparison table; trust-boundary code snippet showing
the _CORPUS_PATH swap; per-scene table; full sample run; subject-
selection rationale (pack-resident ∧ no active chain ∧ deterministic
intent classification).
- docs/evals/teaching_loop_bench.md — what's byte-identical and why
it matters per artifact; 100-run reference numbers (unique=1 across
all five artifacts; mean=1.849s p50=1.838s p95=1.851s); pairing
paragraph with ADR-0045 (read vs write determinism).
GIF captures (rendered with asciinema 3.2.0 + agg 1.8.1, github-dark
theme, JetBrains Mono):
- docs/evals/assets/anti_regression.gif (120K, 944x843)
- docs/evals/assets/learning_loop.gif (332K, 944x1039)
- docs/evals/assets/teaching_loop_bench.gif (64K, 860x1000)
Raw .cast files preserved alongside the GIFs for re-rendering at
different themes / speeds / sizes without re-recording.
README.md — added writeup-link column to the Inter-Session Memory
three-demo table.
Closes the 6-phase ADR-0024 chain with a focused comparative demo
that distinguishes CORE (inner-loop + margin + typed refusals) from
the in-system boundary-only baseline (ADR-0023 ablation).
Three conditions, all passing under contract tests:
C1. Replay determinism
baseline: 8/8 stable across 5 reruns
CORE: 8/8 stable across 5 reruns
CORE additionally folds refusal_reason into trace hash so
refusal events are replayable evidence.
C2. Traced rejection
baseline emits forbidden: 3/3 (admits=False but walk continues)
CORE corrects-or-refuses: 3/3
CORE rejection in trace: 3/3
Demonstrates that inner-loop is causally responsible for the
selection difference between baseline and CORE.
C3. Coherent refusal
baseline typed refusals: 0/3 (never raises typed refusal)
baseline emits inadmissible: 3/3
CORE typed refusals: 3/3 (all INNER_LOOP_EXHAUSTION)
Demonstrates that typed refusal with rejected_attempts evidence
is new in CORE, not present in boundary-only.
Why in-system baseline (not LLM):
A transformer-LLM comparison would be non-deterministic by
construction, could not be CI-enforced, and would be apples-to-
oranges (different corpus / training / sampling). The honest
comparison is the ablation: same codebase with the Phase 2-5
additions disabled.
Files:
evals/forward_semantic_control/phase6_demo.py
evals/forward_semantic_control/public/v2_phase6_demo/cases.jsonl (8 cases)
evals/forward_semantic_control/results/phase6_demo_report.json
tests/test_phase6_demo.py (17 passing)
docs/evals/phase6_comparative_demo.md
Tests: 1085 passed, 2 skipped (+17 from Phase 5 baseline).
This closes the ADR-0024 6-phase chain:
Phase 1 — pack-grounded fixture + architectural finding (3940290)
Phase 2 — typed refusals + trace fold (310793a)
Phase 3 — ADR-0026 ranked-with-margin (639e107)
Phase 4 — ADR-0025 rotor / frame admissibility (542e13d)
Phase 5 — stratified 5-family mechanism-isolation (b664984)
Phase 6 — comparative demo (this commit)
Authors a 20-case corpus stratified across five geometric failure-mode
families and a separate 10-case benign corpus for the
EXHAUSTION_CEILING lane:
A. near_forbidden_correct_endpoint (6 cases, gaps 0.002 to 0.55)
B. near_equal_admissible (5 cases, diffs ≤ 0.01)
C. no_admissible_path (3 cases, honest refusal)
D. multi_step_admissibility (3 chained cases)
E. heterogeneous_relation (3 chained cases, blade-switching)
phase5_runner runs each case under BOTH threshold and ADR-0026 margin
modes and reports per-family pass_rate, refusal_rate, and (for Family
A) rejection_traced_rate + boundary_overridden_rate.
Headline:
pass_rate_threshold = 1.00 (20/20)
pass_rate_margin = 1.00 (20/20)
mechanism_isolated = true (both modes, all five families)
replay determinism = byte-identical across 3 reruns
Family C refuses with RefusalReason.INNER_LOOP_EXHAUSTION in both
modes (load-bearing evidence for ADR-0024 Phase 2 typed refusals).
Family B refuses under margin mode (validates ADR-0026 δ=0.4 gate).
Benign inner-loop corpus for EXHAUSTION_CEILING ≤ 0.05 gate:
boundary_only: exhaustion 0.00, pass 1.00
null_control: exhaustion 0.00, pass 1.00
inner_loop_t0: exhaustion 0.00, pass 1.00
inner_loop_tpos: exhaustion 0.00, pass 1.00 (threshold 0.25)
Geometric finding documented while authoring the benign corpus:
23 of 85 pack tokens have negative self-cga_inner under Cl(4,1).
Tokens with self-score ≤ 0 cannot serve as single-token expected
endpoints in threshold mode — the algebra's Lorentzian signature
forbids this geometrically. Phase 5 benign corpus draws expected
endpoints from the 62-token positive-self-score subset. This is
consistent with Phase 4 characterization: no static threshold
delivers separation_quality ≥ 0.8 — the margin lane survives
because margin compares differences, not absolute scores.
Files:
evals/forward_semantic_control/public/v2_phase5/cases.jsonl
evals/forward_semantic_control/public/inner_loop_benign/cases.jsonl
evals/forward_semantic_control/phase5_runner.py
evals/forward_semantic_control/phase5_mine.py
evals/forward_semantic_control/results/phase5_report.json
evals/forward_semantic_control/results/phase5_benign_inner_loop_report.json
tests/test_phase5_corpus.py (20 passing)
docs/evals/phase5_stratified_findings.md
Tests: 1068 passed, 2 skipped (+20 from Phase 4 baseline).