Skip to content

A bound dashboard widget's dims: selector can miss a series that reports rarely beside a busy one #3293

Closed

Description

@AndriiPasternak31

Summary

A dashboard widget bound to a declared metric can name one series with dims: (for example dims: {channel: google}). The binding finds that series only among the points the metric read already loads: the 200 newest points of the metric across all its series (LATEST_POINTS_PER_METRIC) and at most 50 series (MAX_SERIES_PER_METRIC). A channel that reports rarely next to a channel that reports often can fall outside that window. Its tile then says metric_series_not_found ("no recent data") although the series has a perfectly recent point of its own.

Context

This is a documented limit of the dims: selector added for abilityai/trinity-enterprise#730: the tile states the window as facts (binding_detail.window_points, series_cap) and the hint says a rarely-reporting series can drop out. The bound is not new. The ent#479 binding reads the same window. But a per-series selector makes it visible: one busy series can crowd a quiet series out of a tile that names it.

Example: a metric ad_spend with dimensions: [channel]; one channel records a point every few minutes, another once a day. After about 200 points from the busy channel, the quiet channel's tile reads "no recent data" even though its last point is from today.

Acceptance Criteria

  • A bound widget with a valid dims: selector resolves that series' latest point and history regardless of how many points OTHER series of the same metric recorded since (no fixed larger limit, which only moves the boundary).
  • The refusal metric_series_not_found still fires when the selected series truly has no recent point, and still never falls back to the cross-series fold.
  • The unselected (no dims:) tile and the objective join keep reading the same fold as today (_latest_entry unchanged; the ent#479 parity tests stay green).
  • A test pins a quiet series beside a busy one (more than 200 newer points from the busy series) and proves the quiet tile binds.
  • The "known limit" sentence in docs/memory/requirements/lifecycle-observability.md §49.6 and the user doc docs/user-docs/advanced/dynamic-dashboards.md are updated.

Technical Notes

  • src/backend/services/metric_read_service.py: _select_series matches against latest_by_series / series built from the windowed read. The fix is a selector-specific latest-point (and bucket) lookup for the one selected series, keyed by canonical_dims, rather than a larger shared window.
  • Keep the read bounded per selected widget (one indexed lookup per selector), so a dashboard with many selected tiles does not multiply the cost of the shared read.

Activity

  1. added
    priority-p1
    type-bug
    theme-ui-ux
    status-ready
    on Oct 6, 2026
  2. added
    complexity-medium
    on Oct 8, 2026
  3. added
    status-in-progress
    and removed
    status-ready
    on Oct 9, 2026
  4. added
    status-in-dev
    and removed
    status-in-progress
    on Oct 10, 2026
  5. removed
    status-in-dev
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-mediumpriority-p1theme-ui-uxtype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions