Skip to content

bug(validation): /metrics likely fails on an unscored phase, and trends are placeholder data #20523

Closed

Description

@mrveiss

Problem

Found while building the validation screen (#18278), from reading the code:

  • /validation-dashboard/metrics compares p["completion_percentage"] >= 95.0 (validation_dashboard.py, around line 395), and the generator returns None for an unscored phase, so the route likely raises. Not run.
  • _generate_trend_data builds trends from a fixed formula, marked "Mock trend data", not from stored history. The screen labels them as placeholder.

Acceptance criteria

  • /metrics handles an unscored phase, with a test.
  • Trends come from stored history, or the API says they are not available, and the screen note follows.

Activity

  1. mrveiss commented on Nov 3, 2026

    @mrveiss
    OwnerAuthor

    Checked against main at merge ae35848 (the merge train, PR #20713; member #20656).

    AC Evidence
    /metrics handles an unscored phase, with a test DELIVERED. autobot-backend/api/validation_dashboard_summary.py summarise_phases (used by validation_dashboard.py). Tests in autobot-backend/tests/api/test_validation_dashboard_metrics_20523.py: test_an_unscored_phase_does_not_break_the_route, test_an_unscored_phase_is_neither_complete_nor_failing
    Trends from stored history, or the API says they are not available, and the screen note follows DELIVERED (the API says so). validation_dashboard.py get_trend_data returns "available": has_trend_history(trend_data); the report carries trends_available (autobot-slm-frontend/src/composables/useValidationDashboardApi.ts:88). Tests: test_trends_say_they_are_unavailable_instead_of_inventing_a_series, test_the_trends_route_flags_that_there_is_no_history; screen: ValidationDashboard.test.ts "says trend history is not available, with no series, when the report flags it". Trends are not computed from stored history; the criterion allowed the unavailable answer
  2. mrveiss commented on Nov 3, 2026

    @mrveiss
    OwnerAuthor

    Every acceptance criterion is ticked with evidence from main at merge ae35848 (the merge train, PR #20713); see the table above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions