Skip to content

Fix #298: Clarify drift baseline agent scope and live session rules#323

Merged
anilmurty merged 3 commits into
Metabuilder-Labs:mainfrom
tarun73:fix/298-drift-baseline-messages-text
Jun 26, 2026
Merged

Fix #298: Clarify drift baseline agent scope and live session rules#323
anilmurty merged 3 commits into
Metabuilder-Labs:mainfrom
tarun73:fix/298-drift-baseline-messages-text

Conversation

@tarun73

@tarun73 tarun73 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Explain that behavioral drift baseline thresholds are computed per-agent (rather than globally) and build only from live sessions. Update the empty page warning on the Web UI and the CLI fallback message to explicitly state this.

Summary

  • Web UI: Updated the Drift View empty-state warning message in tokenjam/ui/index.html to clarify the per-agent live threshold.
  • CLI: Updated the fallback warning printed by tj drift when no baselines exist in tokenjam/cli/cmd_drift.py to match the Web UI message.

Tests / Verification

  • Added test_drift_no_baselines_warning_message in tests/integration/test_cli.py to verify that tj drift prints the warning header when no baselines exist.
  • Executed the full test suite successfully (1,154 passed).

What's NOT in this PR (if scope was deliberately limited)

  • Phase 2 (Backfill baseline compilation): Auto-building baselines during tj backfill is deferred to a future follow-up issue/PR.

Related issue

Closes #298

@anilmurty please review

Checklist

  • Tests pass (pytest tests/unit/ tests/synthetic/ tests/agents/ tests/integration/)
  • Lint clean (ruff check tokenjam/)
  • Type check clean (mypy tokenjam/)
  • CLAUDE.md updated (if architecture changed)
  • Test spans use tests/factories.py (not raw NormalizedSpan)
  • Requested @anilmurty as reviewer (or @-mentioned him above)

… session rules

Explain that behavioral drift baseline thresholds are computed per-agent
(rather than globally) and build only from live sessions. Update the empty page
warning on the Web UI and the CLI fallback message to explicitly state this.

Co-Authored-By: Antigravity <noreply@google.com>
@tarun73 tarun73 requested a review from anilmurty as a code owner June 26, 2026 11:15

@anilmurty anilmurty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @tarun73 — exactly the clarity fix for #298, and on both surfaces. The new message states the two things that confused the original (per-agent threshold, and live-only so backfilled sessions won't build a baseline), and CLI + Web UI now match. Good scope call deferring the backfill-baseline compilation to a follow-up — that was the bigger half of #298 and is rightly separate. Test asserts the warning, module JS clean, all four CI green.

Ready to merge.

@anilmurty anilmurty merged commit 6eee57b into Metabuilder-Labs:main Jun 26, 2026
4 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.

[Lens/drift] 'Run at least 10 sessions' shown despite >10 sessions; backfill builds no baselines

2 participants