Skip to content

Add a view-only sample session that shows Intent and drift - #629

Merged
gcko merged 1 commit into
mainfrom
feat/sample-session
Oct 14, 2026
Merged

gcko merged 1 commit into
mainfrom
feat/sample-session

Conversation

@gcko

@gcko gcko commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What a reader gets

A "See a sample session (view only)" link above the Sessions list opens an example session that drifted. It shows the Session page as every session gets it: the saved goal and two expected outcomes, a High drift level, a stored reading that cites the entries it rests on (Show cited entries tints them), and the Steer back correction Compass composed. Seven numbered (i) marks say what each part is for. They open on hover, press and keyboard, and the banner repeats every note as text. Nothing in it is saved, sent or run.

The route is #n=session:acme%2Fdashboard:claude:sample.

How it works

  • The sample is a real Claude Code session, anonymized by a rerunnable script. Its page data (board row, context, prompts, record, composed correction) was captured from an isolated Compass server and is bundled in the page.
  • It is drawn by the real SessionView over a second shell with an in-memory server and storage, so it never touches the board the page is polling. Its own fetch refuses writes, and a press that would edit, save, allow or run is held in the page.
  • Tailwind now reads frontend/src/sample; without that the marks drew unstyled.
  • docs/design-sample-session.md owns the decisions and what was rejected. sample-session/README.md says what is real and what is authored.

Policy exception: a transcript is committed

This commits an anonymized session transcript (sample-session/example-session.jsonl), an exception to the policy in tests/README.md that the owner approved for this one session. Please review it as such:

  • scripts/sanitize_session.py replaces every name, path, project word, id and date from a mapping that is not committed (.gitignore refuses a mapping file in sample-session/). Thinking blocks are dropped. It verifies that no original appears in plain, lower-case, URL-encoded or JSON-escaped form.
  • Two rounds of review by readers who held only the anonymized file, plus a final scan of every changed file against the mapping.
  • The intent (goal and two outcomes) is authored, because the session did not use Compass. Two failed test runs are recorded as failures (sample-session/shaping.json) so the live level reads High. The stored reading and the correction are real. All of this is listed in the README.

Verification

  • ruff, format, mypy, validate_plugins.py, bump_version.py --current: clean. No version field moved.
  • pnpm lint, typecheck, test:styles, test (1,759), build:storybook, test:stories (168, 4 new in SampleSession.stories.tsx), test:dev, build, build:check: pass.
  • Dashboard suite (4,980) and scripts suite (1,586) pass; coverage gate passes.
  • The view-only guard was mutation-checked three ways (no click hold, no native beforeinput hold, popover content exempt) and each turns a test red. An independent review found that popovers and disclosures were exempt wholesale, which let Clear empty the goal; that is fixed and tested.

Not run: Windows, and the Playwright proofs (retired from the gate).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PF35LmEnuGcmhAEqrQd8us

A new reader can open "See a sample session (view only)" from the top of
Sessions and see the Session page on a session that drifted: its saved
goal and expected outcomes, a High drift level, a stored reading that cites
the entries it rests on, and the Steer back correction Compass composed.
Seven numbered (i) marks say what each part is for, and the banner repeats
them as text.

The sample is a real Claude Code session, anonymized by a rerunnable
script, with its page data captured from an isolated Compass server and
bundled in the page. It is drawn by the real SessionView over a second
shell with an in-memory server, so it never touches the board the page is
polling. Writes are refused by its own fetch and held in the page before
they reach a handler. Tailwind now reads frontend/src/sample for the marks.

The anonymized transcript is committed under sample-session/. That is an
owner-approved exception to the policy against committed transcripts,
recorded in sample-session/README.md, tests/README.md and SECURITY.md; the
mapping that holds the originals is never committed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PF35LmEnuGcmhAEqrQd8us
Signed-off-by: Jared Scott <jared.scott@variable.team>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Name                                                               Stmts   Miss Branch BrPart  Cover
----------------------------------------------------------------------------------------------------
compass/skills/compass/agy_hook.py                                    86     15     28      7  78.9%
compass/skills/compass/compass_runtime/__init__.py                     0      0      0      0 100.0%
compass/skills/compass/compass_runtime/aggregate.py                  339      2    116      2  99.1%
compass/skills/compass/compass_runtime/annotations.py               1006     22    402     20  97.0%
compass/skills/compass/compass_runtime/asks.py                       110      0     28      0 100.0%
compass/skills/compass/compass_runtime/claude_data.py                385     42    174     16  89.6%
compass/skills/compass/compass_runtime/cli.py                        258     21     64      6  91.0%
compass/skills/compass/compass_runtime/collectors/__init__.py          0      0      0      0 100.0%
compass/skills/compass/compass_runtime/collectors/antigravity.py     427     41    178     24  87.6%
compass/skills/compass/compass_runtime/collectors/claude.py          321     17    122     15  92.3%
compass/skills/compass/compass_runtime/collectors/codex.py           258     18     96     15  90.7%
compass/skills/compass/compass_runtime/collectors/copilot.py         153      4     52      2  97.1%
compass/skills/compass/compass_runtime/collectors/cursor.py          287     19    108     16  90.6%
compass/skills/compass/compass_runtime/collectors/droid.py            34      3      6      1  90.0%
compass/skills/compass/compass_runtime/collectors/gemini.py           54      7     16      4  84.3%
compass/skills/compass/compass_runtime/collectors/goose.py            95      6     28      4  91.9%
compass/skills/compass/compass_runtime/collectors/opencode.py        124      4     44      4  95.2%
compass/skills/compass/compass_runtime/collectors/pi.py              328     34    152     20  88.8%
compass/skills/compass/compass_runtime/config.py                     279      3     26      2  98.4%
compass/skills/compass/compass_runtime/copied_corrections.py         315     27     94     19  88.8%
compass/skills/compass/compass_runtime/correction.py                 226      4     76      3  97.7%
compass/skills/compass/compass_runtime/deliveries.py                 128     12     30      7  88.0%
compass/skills/compass/compass_runtime/departures.py                 135      6     30      6  92.7%
compass/skills/compass/compass_runtime/diagnostics.py                 89      3     26      3  94.8%
compass/skills/compass/compass_runtime/dismissals.py                 111      3     32      3  95.8%
compass/skills/compass/compass_runtime/ends.py                        86      5     18      0  95.2%
compass/skills/compass/compass_runtime/entry_numbers.py              121      5     38      5  93.7%
compass/skills/compass/compass_runtime/events.py                     230      1     86      3  98.7%
compass/skills/compass/compass_runtime/focus.py                       72      2     20      2  95.7%
compass/skills/compass/compass_runtime/frontend_dev.py               142      8     46      9  91.0%
compass/skills/compass/compass_runtime/git_status.py                  59      1     22      2  96.3%
compass/skills/compass/compass_runtime/history.py                    236      9     60      7  94.6%
compass/skills/compass/compass_runtime/http_api.py                  1469    135    470     44  90.8%
compass/skills/compass/compass_runtime/interaction_prototype.py      709    221    198     38  65.7%
compass/skills/compass/compass_runtime/io.py                         301      8     72      6  96.2%
compass/skills/compass/compass_runtime/irreversible.py                39      0      6      0 100.0%
compass/skills/compass/compass_runtime/levels.py                     312      4    102      5  97.8%
compass/skills/compass/compass_runtime/lifecycle.py                  451     53    162     20  86.8%
compass/skills/compass/compass_runtime/live_estimate.py              282     17     84     13  91.8%
compass/skills/compass/compass_runtime/notifications.py              264     11     92      6  95.2%
compass/skills/compass/compass_runtime/observation.py                412      5    122      2  98.7%
compass/skills/compass/compass_runtime/observer.py                   595     28    218     16  94.6%
compass/skills/compass/compass_runtime/probe.py                       44      0     18      1  98.4%
compass/skills/compass/compass_runtime/project_context.py           4002    229   1662    159  92.5%
compass/skills/compass/compass_runtime/quota.py                      392      7    144      6  97.2%
compass/skills/compass/compass_runtime/reach.py                       78      6     30      4  90.7%
compass/skills/compass/compass_runtime/reading.py                   1418     20    508     19  98.0%
compass/skills/compass/compass_runtime/reading_jobs.py               223     14     52      4  93.5%
compass/skills/compass/compass_runtime/reading_policy.py             228      3     66      4  97.6%
compass/skills/compass/compass_runtime/reading_route.py              296     11     94      3  96.4%
compass/skills/compass/compass_runtime/record_pages.py               223     11     72     10  92.9%
compass/skills/compass/compass_runtime/records.py                    398      8    166     11  96.6%
compass/skills/compass/compass_runtime/semantic_history.py           332     13    126     16  93.7%
compass/skills/compass/compass_runtime/sessions.py                   220      5     84      3  97.4%
compass/skills/compass/compass_runtime/snapshot.py                    43      0      6      0 100.0%
compass/skills/compass/compass_runtime/spacedock.py                  516     50    264     26  90.0%
compass/skills/compass/compass_runtime/state.py                       90      0      2      0 100.0%
compass/skills/compass/compass_runtime/stream.py                      57      0      8      0 100.0%
compass/skills/compass/compass_runtime/supervise.py                  431     95    126     10  78.3%
compass/skills/compass/compass_runtime/transcripts.py                673     42    328     29  92.9%
compass/skills/compass/compass_runtime/tripwires.py                  233     11     94     11  93.3%
compass/skills/compass/compass_runtime/turns.py                      209     11    104     12  92.7%
compass/skills/compass/compass_runtime/unasked.py                    138      2     38      1  98.3%
compass/skills/compass/compass_runtime/web/__init__.py                 0      0      0      0 100.0%
compass/skills/compass/compass_runtime/web/page.py                   114      8     42      6  91.0%
compass/skills/compass/event_hook.py                                 218      6     92      4  96.8%
compass/skills/compass/mcp_server.py                                 382     23    112     14  92.1%
compass/skills/compass/notify_hook.py                                 49     15      6      1  67.3%
compass/skills/compass/server.py                                       3      0      2      1  80.0%
compass/skills/compass/statusline_hook.py                            136     14     46      8  86.8%
scripts/abstention_ledger.py                                         440     42    148     18  89.8%
scripts/analyze_campaign.py                                          776     64    290     59  88.5%
scripts/bench_collect.py                                             214     13     54      6  92.9%
scripts/bench_event_latency.py                                        67     21     14      1  67.9%
scripts/build_sample_fixture.py                                       96     50     26      3  53.3%
scripts/bump_version.py                                               60     12     24      5  77.4%
scripts/capture_focus_raise.py                                       729    131    236     16  79.4%
scripts/capture_hook.py                                              293     30     90     11  88.8%
scripts/capture_team_registry.py                                     172     33     48      6  80.5%
scripts/capture_terminal_identity.py                                 347    108    104     14  66.3%
scripts/claude_route_verification.py                                 334     25     38      5  90.9%
scripts/derive_prompt_shapes.py                                      210     16     88     14  89.3%
scripts/drift_closure_grading.py                                     400     14    204     14  95.4%
scripts/drift_closure_operator.py                                    329     31    126     33  85.9%
scripts/drift_replay.py                                             1643    230    600    106  83.1%
scripts/drift_study.py                                               239     23     98     16  88.4%
scripts/drift_study_controls.py                                      154     11     42      9  89.8%
scripts/frontend_inventory.py                                        143    143     66      0   0.0%
scripts/frozen_page.py                                                13      0      4      0 100.0%
scripts/levels_cases.py                                              778     99    254     30  85.4%
scripts/live_analyze_campaign.py                                      58      4     14      3  90.3%
scripts/mark_abstention.py                                          1272    168    462     66  84.8%
scripts/ordinary_turn_driver.py                                      475     33    156     30  90.0%
scripts/redact_session.py                                            173     25     50      7  83.9%
scripts/regen_client_fixtures.py                                     561     56     68      7  86.8%
scripts/release_transition.py                                        344     73    114      5  75.5%
scripts/run_tests.py                                                 187     37     60      5  78.1%
scripts/sanitize_session.py                                          244     36     72      9  83.2%
scripts/score_abstention.py                                         1527    110    554     58  91.8%
scripts/shape_sample_session.py                                       61     16     22      3  72.3%
scripts/store_paths.py                                                 7      0      0      0 100.0%
scripts/update_marketplace.py                                         59      3     18      2  93.5%
scripts/validate_plugins.py                                          839    218    466     66  71.6%
scripts/verify_release_archive.py                                    222     21     50      4  90.8%
----------------------------------------------------------------------------------------------------
TOTAL                                                              35940   3326  12696   1371  89.2%

Threshold: fail_under in pyproject.toml · label coverage-exception to bypass (visible in PR timeline).

@gcko
gcko merged commit 4f629fb into main Oct 14, 2026
20 checks passed
@gcko
gcko deleted the feat/sample-session branch October 14, 2026 14:16
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.

1 participant