Skip to content

Home follows the runtime switcher: no OpenClaw gateway, no other runtimes' run health, activity, autonomy, anomalies or eval tile - #6017

Merged
vivekchand merged 5 commits into
mainfrom
fix/overview-runtime-scoped-cleanup
Sep 15, 2026
Merged

vivekchand merged 5 commits into
mainfrom
fix/overview-runtime-scoped-cleanup

Conversation

@vivekchand

Copy link
Copy Markdown
Owner

Problem

On app.clawmetry.com with Codex selected, Home still showed things that belong to other runtimes:

Verified live before the fix, by decrypting the snapshot in the page: healthTimeline.runtimes = ["claude_code:30"], system carries ["Gateway","Running"], and the sh-services pill rendered Gateway :18789 under ?runtime=codex.

Fix

Card Now
System Health services drops OpenClaw*, a bare Gateway, and port 18789 off OpenClaw/NemoClaw
Run Health ?runtime= on /api/health-timeline (reads deeper, keeps that runtime's newest); page renders only that runtime's row. Daemon slice adds each runtime's own recent sessions via query_recent_sessions_by_runtime, memoised 120 s
30-day activity /api/activity-heatmap?runtime= filters by session-id prefix and echoes runtime; page hides the card if the answer is not scoped
Independence /api/autonomy?runtime= reads only that runtime's user turns; empty (never node-wide) when it has none. New snapshot slice autonomyByRuntime, memoised 300 s
Session quality tile /api/evals/summary?runtime= + LocalStore.query_eval_summary(runtime=); echoes runtime
Anomaly Detection keeps only the runtime's sessions; node-wide aggregate rows and baselines left out
Reliability has no per-runtime form (daemon heartbeats + all errors), hidden under a runtime
Runtime switch resets the loadAll 2 s coalesce so Home re-scopes immediately

The cloud-only leaks (the cm-cloud-runtimes chip row listing every runtime, the /api/system-health interceptor's Gateway, the autonomy/health-timeline/live-activity/diagnostics interceptors) are fixed in a companion clawmetry-cloud PR, which reads autonomyByRuntime from this release.

Verification

  • tests/test_overview_runtime_scope.py: 16 tests (Flask routes, real DuckDB for autonomy and eval summary, fake store for the daemon slice, node harness running the real loadHealthTimeline). All 16 fail with the source changes reverse-applied, all pass with them.
  • tests/test_system_health_runtime_scope.py, test_autonomy_v3_shape.py, test_health_timeline_route_gate.py, test_evals_route_gates.py, and a 209-test runtime/snapshot/overview/evals subset pass. Two pre-existing local failures reproduce on unchanged source (test_eval_runner.py x5: "no judge API key configured"; test_device_snapshot.py::test_empty_store_returns_valid_zero_payload reads a live alert) and are not touched here.

Product record: https://factory.8090.ai/project/b415065f-ab2f-4f53-8864-0c009fd098cb/requirements/8e389016-a9c8-4352-9121-72f0e361fdf6 (Runtime and Session Observability; FLYWHEEL §0a gate 2 and §1c runtime-filter rule).

🤖 Generated with Claude Code

… runtimes' run health, activity, autonomy, anomalies or eval tile

With Codex selected on the hosted dashboard, System Health still listed
"Gateway :18789" (the snapshot names it plain "Gateway", which the OpenClaw
name filter missed), Run Health drew a claude_code row, and 30-day activity,
autonomy, anomalies, reliability and the eval tile counted every runtime.
The snapshot's Run Health slice had no Codex row at all because the newest
60 sessions were all Claude Code.

- /api/activity-heatmap, /api/health-timeline, /api/autonomy and
  /api/evals/summary take ?runtime= and echo it; the page hides a card
  rather than show a node-wide answer under one runtime's name.
- Anomaly panel keeps only the runtime's sessions; Reliability (no
  per-runtime form) is hidden under a runtime.
- Daemon: Run Health slice adds each runtime's own recent sessions
  (query_recent_sessions_by_runtime) with a 120 s memo; new
  autonomyByRuntime slice with a 300 s memo.
- A runtime switch resets the loadAll coalesce so Home reloads at once.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@8090-software-factory

Copy link
Copy Markdown

✅ Drift Bot (ClawMetry): no drift detected

Drift Bot analyzed the changed files against this project's blueprints and requirements and found no drift.

Copy link
Copy Markdown
Owner Author

visual-diff failing by design — this PR intentionally changes which tiles are visible under runtime filtering (tiles that belong to other runtimes are hidden when a runtime is selected). The baseline screenshots pre-date that behaviour change and no longer match.

To clear the check: regenerate the Playwright visual-diff baselines locally with npx playwright test --update-snapshots (or whatever the repo's update command is), commit the updated .png snapshots, and push. The diff itself is not a regression.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

blocked on author decision — skipping (auto-mergeability sweep): PR is UNSTABLE because visual-diff (non-required, continue-on-error: true) shows pixel diffs from the intentional runtime-scoped UI changes. All 52 required checks pass including E2E Gate. The visual-diff failure is expected for this PR and cannot be resolved without reverting the UI change; author should review the diff screenshots and approve.


Generated by Claude Code

@8090-software-factory

Copy link
Copy Markdown

✅ Drift Bot (ClawMetry): no drift detected

Drift Bot analyzed the changed files against this project's blueprints and requirements and found no drift.

@8090-software-factory

Copy link
Copy Markdown

✅ Drift Bot (ClawMetry): no drift detected

Drift Bot analyzed the changed files against this project's blueprints and requirements and found no drift.

@github-actions

Copy link
Copy Markdown
Contributor

Visual diff

Bot run failed before producing screenshots. Check the workflow logs.

This check is non-blocking.

@8090-software-factory

Copy link
Copy Markdown

✅ Drift Bot (ClawMetry): no drift detected

Drift Bot analyzed the changed files against this project's blueprints and requirements and found no drift.

The merge commit from main raised the unlisted test count from 913 to
914 (total test files grew from 1188 to 1189 as PRs merged since this
branch was cut). No new unwired tests added by this PR itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R2qvyzQXsAhnjfrCt4izc8
@8090-software-factory

Copy link
Copy Markdown

✅ Drift Bot (ClawMetry): no drift detected

Drift Bot analyzed the changed files against this project's blueprints and requirements and found no drift.

@vivekchand
vivekchand merged commit d168cf1 into main Sep 15, 2026
70 of 76 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.

2 participants