Skip to content

fix(validation): the report likely fails when every phase is unscored #20655

Closed

Description

@mrveiss

Found while fixing #20523, from reading the code; not run. _calculate_current_metrics in autobot-infrastructure/shared/scripts/validation_dashboard_generator.py (about lines 312-320) divides by len(completion_scores) and calls min and max on the list. With every phase unscored that list is empty, so /validation-dashboard/report likely raises.

Acceptance criteria

  • The report answers when every phase is unscored, with a test that first reproduces the failure.
  • completion_statistics can say there is no score, and the SLM validation screen shows that state, with a test.

Refs #20523, #18278.

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
    The report answers when every phase is unscored, with a test that first reproduces the failure DELIVERED, with a caveat. autobot-infrastructure/shared/scripts/validation_dashboard_generator.py:314-321 filters to scored phases and uses ... if completion_scores else None and min/max(default=None). Test: tests/api/test_validation_dashboard_metrics_20523.py::test_the_real_generator_reports_no_figure_when_every_phase_is_unscored runs the real generator on an all-unscored set. That it failed before the fix is read from the old division by len(completion_scores), not re-run
    completion_statistics can say there is no score, and the SLM screen shows it, with a test DELIVERED. average_completion/min_completion/max_completion are number | null (useValidationDashboardApi.ts:81); ValidationOverview.vue:36 renders phases.notScored. Test: ValidationDashboard.test.ts "says the completion figures are not scored, never 0%, when every phase is unscored"
  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