Skip to content

feat: add copyable no-progress trace - #88

Merged
SignalLayerLabs merged 2 commits into
SignalLayerLabs:mainfrom
abhinandanjoshii:demo/no-progress-trace-snippet
Sep 11, 2026
Merged

SignalLayerLabs merged 2 commits into
SignalLayerLabs:mainfrom
abhinandanjoshii:demo/no-progress-trace-snippet

Conversation

@abhinandanjoshii

Copy link
Copy Markdown
Contributor

Add an illustrative no-progress trace with a copy control and clear Shadow Mode / Earned Enforcement boundary.

Closes #38

Problem

The Killer Demo makes the allocation decision watchable, but the mechanism behind it is not
quotable. There is no compact form of the no-progress pattern that can be pasted into an issue, a
blog post or a reproduction report. demos/killer-demo/RESULTS.md already tells the reader that
"the no-progress repetition sequence shown in the HTML is an explicitly labeled runtime-pattern
illustration" ,but no such sequence was in the HTML.

Solution

A new #no-progress section on the demo page, plus a nav entry, containing a plain-text trace:

  • build_no_progress_trace() replays the shipped NoProgressDetector over a fixed synthetic
    observation sequence. The reason codes are produced by the control, not written by hand, so the
    snippet cannot drift from the mechanism it illustrates;
  • each line carries the semantic action, so the sequence reads as the issue describes it: a patch
    produces new evidence, a verification produces new evidence, the same verification repeats
    against unchanged state, and the repetition becomes a no-progress candidate —
    NO_PROGRESS_CLEAR, NO_PROGRESS_CLEAR, NO_PROGRESS_OBSERVED,
    NO_PROGRESS_ENFORCEMENT_ELIGIBLE, with the detector's own reason strings and the
    max_same_evidence_completions threshold printed in the header;
  • the snippet header labels it an illustrative deterministic sequence, "not provider telemetry, not
    an enforcement benchmark", consistent with the existing TRUTH BOUNDARY card;
  • the closing lines keep the authority boundary explicit: Shadow Mode records the stop
    recommendation and still executes the action; Earned Enforcement is separate and is not granted
    by anything on the page.

Copy affordance and accessibility:

  • a COPY TRACE button using navigator.clipboard.writeText with a selection-based fallback and
    no network call (the existing "fetch(" not in js assertion still holds);
  • result announced through a role="status" aria-live="polite" line rather than only visually,
    cleared on each attempt so a repeated copy is re-announced;
  • the fallback path restores focus to the copy button, so a keyboard user does not lose their
    place;
  • the trace is a focusable scroll region (tabindex="0") with a visible :focus-visible ring;
  • PRE added to the tag list the global key handler ignores, so Space and → keep driving the
    race and do not fire while the trace region has focus;
  • no new animation or transition; the existing prefers-reduced-motion block still covers the
    section.

User impact

The demo page gains one section. No behaviour change to the policy, ledger, adapters or CLI.

Validation

  • Tests added or updated
  • ruff format --check .
  • ruff check .
  • mypy src/marginal
  • pytest -q
  • Documentation updated
  • Public API, schemas, examples, roadmap, and changelog are consistent
  • Performance claims are reproducible and honestly labeled
  • New persisted fields have an explicit privacy classification
  • Strict telemetry contains no free text or unreviewed metadata
  • Privacy fixtures use synthetic identifiers and no real user data

Security and compatibility

No new public export, no schema change, no serialization change. build_no_progress_trace and
render_no_progress_trace live in marginal.killer_demo alongside the other renderers and are not
re-exported from marginal/__init__.py, matching the existing surface.

Privacy review

  • Privacy profile(s) affected: none
  • New or changed persisted fields: none
  • Quasi-identifiers considered: every value in the snippet is invented — synthetic state and
    evidence digests (w#4f2a, e#2d77), a generic semantic action, no path, repository, model,
    customer or run identifier.
  • Key-management or export implications: none

Add an illustrative no-progress trace with a copy control and

clear Shadow Mode / Earned Enforcement boundary.

Closes SignalLayerLabs#38
@SignalLayerLabs

Copy link
Copy Markdown
Owner

Please fix the CI / Test failed and than we can push it

@SignalLayerLabs SignalLayerLabs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the failed CI / tests

@SignalLayerLabs
SignalLayerLabs merged commit c45a05e into SignalLayerLabs:main Sep 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

demo: add a copyable no-progress trace snippet

2 participants