Skip to content

Raise the drift analysis cap and make Mark as inaccurate and What the analysis read clearer - #630

Merged
gcko merged 1 commit into
mainfrom
feat/drift-reading-cap-and-result-copy
Oct 16, 2026
Merged

gcko merged 1 commit into
mainfrom
feat/drift-reading-cap-and-result-copy

Conversation

@gcko

@gcko gcko commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Three fixes to the Drift panel on the session page, prompted by reader feedback that the budget line, the "Not accurate?" control and the "What it read" panel were hard to understand.

Analysis limit

  • The cap on reader-requested analyses is 100 per rolling 24 hours (was 12), still shared across sessions and providers. The background "unasked" checks, off unless --unasked-readings is set, keep their own cap of 12.
  • The "N of M left today" line is removed. Under the cap nothing is said.
  • Once the cap is spent, a 2rem banner sticks to the top of the session page: "You've reached the limit of 100 drift analyses for the past 24 hours. You can analyze again at 08:25 AM tomorrow." The refusal under Analyze uses the same words. It says "analyze again at" rather than "resets at" because the rolling window frees one analysis at that time.

Mark as inaccurate (was "Not accurate?")

  • Before the press, a line beside it says what it does: it stops this analysis from setting the drift level or Steer back, and nothing is sent or re-run.
  • After the press, a status beside the control says what changed, the control becomes Undo, and the level's slot says "Drift level hidden because you marked this analysis inaccurate."
  • The control holds its place when the level and Steer back leave the column above it, so the page no longer jumps.

What the analysis read (was "What it read")

  • Grouped under Model, Your intent (version, when saved, where it came from, each line quoted, and a note when the goal is cut at 240 characters), The session (one item per sentence) and Not read.
  • The producer's cutoff sentence is reworded in plain sentences with the same counts, for example "Read all 4 entries after your intent: 1 from you, 3 messages from the agent. The oldest is from about 13h ago." Readings stored before this keep their stored sentence.

Docs: SKILL.md, SECURITY.md, the promise map (and its copy on the visibility board) and a dated amendment in docs/design-reading-a-session.md.

Test plan

  • Ran the canonical pre-PR suite in AGENTS.md § Pre-PR Checks, including frontend lint, strict types, unit and build checks, and the Storybook stories for any UI change, and it is clean. A prose-only diff is not exempt: the validate check is unfiltered and runs the same tests
    • Python: ruff, format, mypy, 4,980 dashboard tests and 1,586 script tests pass. Client contract fixtures regenerated (only the published limit changed).
    • Frontend: 1,764 unit tests, typecheck, style policy, CSS coverage, Storybook build and 175 story tests, test:dev, build and build:check pass. pnpm lint is clean except for broken-symlink warnings from an untracked local .claude/worktrees/ checkout, which CI does not have.
    • New stories in frontend/stories/DriftAnalysisResult.stories.tsx: under the limit, limit reached (sticky at the top after scrolling, at least 2rem tall), mark and undo (control stays within 4px of where it was pressed), already marked, What the analysis read, and a goal drafted from a prompt.
    • Checked by hand in Chrome against a real session on a build of this branch, using a scratch copy of the state directory.
  • Preserved Python 3.11 compatibility; CI's runtime-floor job launches the shipped entry point on that floor
  • Invoked the sync-docs skill — the doc updates for this change ride in this PR, or there was nothing to reconcile
  • Behavior changes to server.py or compass_runtime/ include a regression test
  • No version field was touched (version-guard fails any PR that bumps one)
  • The hand-written CSS record matches the rules and respects the actual PR base
  • PR title, user-facing docs and proposed release text contain no tracker names, issue keys or tracker links, including copied/generated sections; internal traceability stays in this PR body or development records
  • Commits are signed off (git commit -s, DCO)

Not run: the retired Playwright browser proofs (pnpm test:*:browser). The one sentence drift-parity.mjs asserts for a marked result was updated.

🤖 Generated with Claude Code

…at the analysis read

- Reader-requested analyses are capped at 100 per rolling 24 hours (was 12).
  The "N of M left today" line is gone; once the cap is spent a sticky banner
  at the top of the session page names the limit and when the next analysis
  can run, and the refusal under Analyze uses the same words.
- "Not accurate?" is now "Mark as inaccurate". Each state says beside the
  control what the mark does or did, the control becomes Undo, the level's
  slot says why it is empty, and the control holds its place when the level
  and Steer back leave the column above it.
- "What it read" is now "What the analysis read", grouped under Model, Your
  intent, The session and Not read. The producer's cutoff sentence is
  reworded in plain sentences with the same counts.
- Storybook stories cover the limit banner, the mark and undo, and the panel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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     45  90.7%
compass/skills/compass/compass_runtime/interaction_prototype.py      709    222    198     39  65.5%
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                   1430     20    512     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                                                              35952   3327  12700   1373  89.2%

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

@gcko
gcko merged commit 4f6512b into main Oct 16, 2026
20 checks passed
@gcko
gcko deleted the feat/drift-reading-cap-and-result-copy branch October 16, 2026 02:36
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