Skip to content

fix(dashboard): qualify observed player and RAM totals (OSS-438) - #710

Merged
athNdev merged 2 commits into
mainfrom
codex/oss438-dashboard-telemetry
Nov 20, 2026
Merged

athNdev merged 2 commits into
mainfrom
codex/oss438-dashboard-telemetry

Conversation

@athNdev

@athNdev athNdev commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

OSS-438

The packaged Dashboard at c04a5c69582b92c8b8ee1dbecab777265771144c showed 0 PLAYERS ONLINE and 100% UTILIZED for two running servers that supplied no current count or RAM reading. The RAM tile was using their 12 GiB of configured allocation as measured usage.

  • Sum only qualified observations on running servers. Preserve a confirmed zero player count and label partial reporting.
  • Compare RAM usage with the configured allocation of the same reporting servers. Show fleet RAM allocation and configured player slots separately.
  • The legacy RAM scalar has no sample-presence indicator. A raw zero stays unavailable. This change uses the existing wire format.

Verification

Head 80b94df13ed06ea144d2158cff1ad835c0c62786, base c04a5c69582b92c8b8ee1dbecab777265771144c.

  • bun test --conditions=browser on Bun 1.4.2, 478 pass, 6 pre-existing opt-in diagnostic checks skipped.
  • bun run check and scoped Prettier and ESLint passed.
  • Production Vite/adapter-static build used Node 26.13.1 and the same build entry point as scripts/web-build.sh.
  • node scripts/manual-review/e2e/a11y-check.mjs --dashboard-telemetry-only passed the real packaged Dashboard at 360 px and 1024 px with pinned Playwright 1.61.0 and Chromium 149.0.7827.55. Only Connect responses were fixture data. The browser verified unavailable readings, a measured zero, partial reporting, independent allocation and no tile overflow. Rendered dark-theme screenshots were inspected.
  • Knowledge lint and all 40 retrieval checks passed.

The local WSL deployment remains on its pinned Stable release.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features
    • Dashboard player and memory totals reflect telemetry from running servers, distinguishing unavailable player data from a reported zero-player count.
    • Partial reporting is identified. Memory utilization appears only when reporting servers have valid limits, while configured capacity and allocated memory remain separate from reported usage.
  • Bug Fixes
    • Outdated or mismatched memory observations are no longer included in server and dashboard RAM reporting.
  • Documentation
    • Added guidance on dashboard totals, reporting coverage, and how unavailable metrics are represented.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Dashboard telemetry

Layer / File(s) Summary
Docker RAM sample freshness
internal/metrics/collector.go, internal/metrics/registry_test.go, internal/rpc/services/server_join_observation.go, internal/rpc/services/server_stale_slp_test.go, knowledge/decisions/dashboard-telemetry-coverage.md
Docker stats samples record their container, poll start, and expiry. RPC responses include RAM only when the sample is current for the server’s container and start time. Tests cover successful and failed polls and current, missing, expired, replaced-container, and pre-restart samples. The decision record describes the reporting rules.
Dashboard telemetry summary
web/carbon-panel/src/lib/features/servers/dashboard-telemetry.ts, web/carbon-panel/src/lib/features/servers/dashboard-telemetry.test.ts, knowledge/decisions/index.md
A summary function calculates running-server counts, reported player and memory totals, capacity, allocation, and utilization. It returns unavailable values when the data does not support a total. Unit tests cover missing and stale observations, zero-player reports, partial metrics, and an empty fleet.
Dashboard metric display
web/carbon-panel/src/routes/+page.svelte
The dashboard uses the summary for running-server, player, and memory metrics. It displays unavailable and partial-reporting states and shows memory usage with reported utilization.
Packaged-server telemetry checks
scripts/manual-review/e2e/a11y-check.mjs, scripts/manual-review/e2e/dashboard-telemetry.mjs
The manual review script adds a telemetry-only mode and checks missing, zero-player, and partial-reporting cases against the packaged server. The checks validate KPI text and tile overflow, and can capture screenshots when configured.

Suggested reviewers: nickheyer

Change: Bug fix

Merge Risk: Minimal · up to f50d2

The change makes dashboard player and RAM totals reflect only current observations, and it shows unavailable or partial reporting explicitly. No actionable merge-blocking risk was found.

Security architecture risk: Minimal · up to f50d2

The change distinguishes unavailable telemetry from observed usage without expanding access or privileges. No material regression affecting security, isolation, rollback, or ownership was identified in the inspected change.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed RAM contract reaches server-list and server-detail responses and their displays. The inspected path changes reported resource information, not allocation limits or server lifecycle authority. No introduced privilege-bearing consumer was identified within that traced scope; external consumers were not established.

Trust Boundaries and Controls

  • inferred — The new gate takes container identity and start time from the loaded server record, provenance from the collector and time from the local clock. It introduces no additional request-controlled target or authority input and changes response projection rather than authorization decisions.

Resilience and Maintainability Implications

  • observed — Failed Docker polls leave the previous sample unchanged, and disk refreshes update separate fields without extending RAM expiry. Added tests encode expiry after failed polling and disk activity, plus rejection of missing, stale, replaced-container and pre-restart samples through both server RPCs. These assertions were inspected but not executed during this review.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 5
  • Waived: $1.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50c042e7-3374-431f-9763-b46cf098e057
Commits

Reviewing files that changed from the base of the PR and between 80b94df and f50d2c2.

Files selected for processing: 6

  • internal/metrics/collector.go
  • internal/metrics/registry_test.go
  • internal/rpc/services/server_join_observation.go
  • internal/rpc/services/server_stale_slp_test.go
  • knowledge/decisions/dashboard-telemetry-coverage.md
  • scripts/manual-review/e2e/dashboard-telemetry.mjs
Files skipped from review as they are similar to previous changes: 1

  • knowledge/decisions/dashboard-telemetry-coverage.md

Limit details: You’ve used all 10 included reviews currently available.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

RAM freshness follow-up

Verified head f50d2c23d526bc17e853abeb9773f5ac6e27d3f6.

Server inventory and detail only report RAM from a successful Docker poll for the current container within two configured poll intervals and since its last recorded start. Disk and player refreshes retain the original RAM expiry. The shared registry publishes replacement snapshots so values and Docker provenance stay coherent. The protobuf shape and existing player, disk, CPU and raw metrics behavior are preserved.

  • The collector regression drove a successful Docker stats response, a failed poll, then the real disk collector.
  • The mounted ListServers and GetServer regression covered fresh, absent, expired, replaced and restarted samples, preserving known zero players and disk telemetry.
  • WSL Go 1.26.11 test -tags=integration_live and vet -tags=integration_live passed for metrics, RPC handlers and services, RPC, and scheduler. Both new regressions passed three race runs.
  • The production build and packaged Chromium dashboard fixture passed at 360 and 1024 CSS pixels, including known zero players with unavailable RAM. All five dashboard telemetry unit tests and both knowledge lint passes passed.

The browser uses seeded Connect responses. The backend uses a loopback Docker daemon and temporary fixtures.

@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Exact-head review f50d2c23d526bc17e853abeb9773f5ac6e27d3f6. Confirmed the dashboard sums eligible observations, labels measured zero players separately from missing data, and keeps configured allocation distinct. Docker success records the sample's own expiry and container identity. The typed Server RPC projection omits expired RAM even after other collectors refresh the snapshot. The published snapshot now keeps value and provenance together for readers. The collector and mounted RPC regressions, WSL Go suites and race repetitions, packaged 360 and 1024 tests, and all 24 hosted checks passed.

@athNdev
athNdev merged commit 890fae2 into main Nov 20, 2026
24 checks passed
@athNdev
athNdev deleted the codex/oss438-dashboard-telemetry branch November 20, 2026 19:48
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