+ Same semantic action, successful outcome, unchanged workspace state, no new evidence.
+ That is the sequence MARGINAL treats as a no-progress repetition candidate. The trace
+ below is replayed from the shipped control over a fixed synthetic observation
+ sequence, so it is an illustration of the mechanism and not provider telemetry,
+ a production run, or an enforcement benchmark.
+
+
+
+ no-progress-trace.txt
+
+
+
# MARGINAL no-progress pattern
+# illustrative deterministic sequence, replayed from the shipped control
+# not provider telemetry, not an enforcement benchmark
+# threshold: max_same_evidence_completions=2
+
+t1 patch:apply outcome=success state=w#4f2a evidence=e#91c0 -> NO_PROGRESS_CLEAR
+ state or completion evidence changed
+t2 verify:targeted outcome=success state=w#8b13 evidence=e#2d77 -> NO_PROGRESS_CLEAR
+ state or completion evidence changed
+t3 verify:targeted outcome=success state=w#8b13 evidence=e#2d77 -> NO_PROGRESS_OBSERVED
+ unchanged completion evidence remains below the stop threshold
+t4 verify:targeted outcome=success state=w#8b13 evidence=e#2d77 -> NO_PROGRESS_ENFORCEMENT_ELIGIBLE
+ successful completions repeated without state or evidence change
+
+Shadow Mode records the stop recommendation; the action still executes.
+Earned Enforcement is separate. It requires an adapter with real blocking
+ capability and sufficient local evidence, and this
+ illustration grants none of it.
+
+
+
+
+ Shadow Mode records that recommendation and still lets the action execute. Earned
+ Enforcement is a separate authority that an adapter has to earn from local evidence,
+ and nothing on this page grants it.
+
+ Same semantic action, successful outcome, unchanged workspace state, no new evidence.
+ That is the sequence MARGINAL treats as a no-progress repetition candidate. The trace
+ below is replayed from the shipped control over a fixed synthetic observation
+ sequence, so it is an illustration of the mechanism and not provider telemetry,
+ a production run, or an enforcement benchmark.
+
+
+
+ no-progress-trace.txt
+
+
+
{{NO_PROGRESS_TRACE}}
+
+
+
+ Shadow Mode records that recommendation and still lets the action execute. Earned
+ Enforcement is a separate authority that an adapter has to earn from local evidence,
+ and nothing on this page grants it.
+
+
+
+
MARGINAL Killer DemoSame verified outcome. Far fewer tokens, lower cost, lower latency.
@@ -1685,6 +1873,7 @@ def render_killer_demo_html(result: dict[str, Any]) -> str:
"{{SCENARIO}}": html.escape(str(result["scenario"])),
"{{VERIFIER}}": html.escape(str(result["defect"]["verifier"])),
"{{DISCLAIMER}}": html.escape(str(result["disclaimer"])),
+ "{{NO_PROGRESS_TRACE}}": html.escape(render_no_progress_trace()),
"{{BASELINE_TOKENS}}": f"{baseline['tokens']:,}",
"{{MARGINAL_TOKENS}}": f"{marginal['tokens']:,}",
"{{BASELINE_CALLS}}": str(baseline["calls"]),
diff --git a/tests/test_killer_demo_interactive.py b/tests/test_killer_demo_interactive.py
index 571e5f9..28100e4 100644
--- a/tests/test_killer_demo_interactive.py
+++ b/tests/test_killer_demo_interactive.py
@@ -2,11 +2,14 @@
from pathlib import Path
+from marginal.controls import ActionOutcomeStatus, NoProgressDetector
from marginal.killer_demo import (
build_killer_demo_playback,
+ build_no_progress_trace,
render_killer_demo_css,
render_killer_demo_html,
render_killer_demo_js,
+ render_no_progress_trace,
run_killer_demo,
)
@@ -89,3 +92,80 @@ def test_committed_interactive_assets_are_generated(tmp_path: Path) -> None:
for name in ("demo.css", "demo.js"):
assert (committed / name).read_bytes() == (tmp_path / name).read_bytes()
+
+
+def test_no_progress_trace_is_replayed_from_the_shipped_control() -> None:
+ rows = build_no_progress_trace()
+
+ assert [row["reason_code"] for row in rows] == [
+ "NO_PROGRESS_CLEAR",
+ "NO_PROGRESS_CLEAR",
+ "NO_PROGRESS_OBSERVED",
+ "NO_PROGRESS_ENFORCEMENT_ELIGIBLE",
+ ]
+ assert [row["should_recommend_stop"] for row in rows] == [False, False, False, True]
+ assert [row["enforcement_eligible"] for row in rows] == [False, False, False, True]
+
+ assert [row["action"] for row in rows] == [
+ "patch:apply",
+ "verify:targeted",
+ "verify:targeted",
+ "verify:targeted",
+ ]
+
+ detector = NoProgressDetector()
+ for row in rows:
+ signal = detector.evaluate(row["action"], row["state"], row["evidence"])
+ assert signal.reason_code == row["reason_code"]
+ assert signal.reason == row["reason"]
+ detector.observe(
+ row["action"],
+ row["state"],
+ row["evidence"],
+ ActionOutcomeStatus.SUCCESS,
+ )
+
+
+def test_no_progress_snippet_is_labeled_and_keeps_the_authority_boundary() -> None:
+ snippet = render_no_progress_trace()
+
+ assert "illustrative deterministic sequence" in snippet
+ assert "not provider telemetry, not an enforcement benchmark" in snippet
+ assert "max_same_evidence_completions=2" in snippet
+ assert "t2 verify:targeted" in snippet
+ assert "t4 verify:targeted" in snippet
+ assert "Shadow Mode records the stop recommendation" in snippet
+ assert "Earned Enforcement is separate." in snippet
+
+
+def test_interactive_html_publishes_a_copyable_no_progress_trace() -> None:
+ rendered = render_killer_demo_html(run_killer_demo())
+
+ required = (
+ 'id="no-progress"',
+ 'data-action="copy-trace"',
+ 'id="no-progress-trace"',
+ 'id="copy-status"',
+ 'aria-live="polite"',
+ 'aria-label="Illustrative no-progress trace"',
+ "tabindex=",
+ "NO_PROGRESS_ENFORCEMENT_ELIGIBLE",
+ "not provider telemetry",
+ )
+ for phrase in required:
+ assert phrase in rendered, phrase
+
+
+def test_copy_affordance_keeps_keyboard_and_reduced_motion_support() -> None:
+ css = render_killer_demo_css()
+ js = render_killer_demo_js()
+
+ assert ".snippet-body" in css
+ assert ".snippet-body:focus-visible" in css
+ assert "prefers-reduced-motion" in css
+
+ assert "function copyTrace" in js
+ assert "restore.focus()" in js
+ assert '"PRE"' in js
+ assert "ArrowRight" in js
+ assert "fetch(" not in js