fix: localize dashboard evidence, explain blocked vehicles, clarify pending odometers

Three content defects found by a live reviewer:

- Dashboard attention subtext was raw, untranslated evidence.summary text, and for
  11 of 15 seeded issues that text was literally "Synthetic deterministic seed
  issue". AttentionItem now exposes evidence_signals (stable code + params, same
  shape as the issue detail page) instead of a detail string; the frontend renders
  them through a shared describeEvidenceSignal() used by both the dashboard and the
  issue detail page. Every previously-placeholder seed row now cites a real,
  per-rule-type fact (a genuinely crossed service threshold, a genuinely blank
  field, or a real pair of booking odometer readings) instead of invented prose.

- 5 of 7 blocked vehicles had no quality issue at all and one had only a resolved
  one, so "needs attention" led nowhere. Each now has a real open
  missing_required_field issue backed by a genuinely blank field (no schema change,
  no migration -- reuses the existing data-quality pipeline).

- Booking odometer fields showing a bare "-" for 25 reserved + 1 active booking now
  show a localized explanation ("trip hasn't started yet" / "not yet closed").
  MO-024's rented-but-service-overdue contradiction was already caught by the
  vehicle-status evaluator (DQ-SCAN, vehicle.manual_review_required) -- added a
  regression test rather than new logic.

Also fixed a related bug the above exposed: the vehicle entity_snapshot omitted
registration_number entirely, so the "provide missing fields" form always showed
it blank regardless of the real value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
NuklearRabbit
2026-08-05 17:44:32 +02:00
co-authored by Claude Sonnet 5
parent 3808bbe132
commit 4faac24b5a
21 changed files with 349 additions and 132 deletions
+17 -11
View File
@@ -3,14 +3,20 @@ DQ-DEMO-DUPLICATE,possible_duplicate_customer,CUS-0012,CUS-0178,high,open,exact
DQ-DEMO-OVERLAP,booking_overlap,MO-016,BK-DEMO-OVERLAP-A|BK-DEMO-OVERLAP-B,high,open,controlled legacy import overlap
DQ-DEMO-STATUS,vehicle_status_conflict,MO-016,,high,open,vehicle marked available while reserved bookings conflict
DQ-DEMO-ATTENTION,missing_required_field,MO-031,BK-DEMO-NEXT,high,open,near-future booking; required operational inspection missing
DQ-0005,vehicle_status_conflict,MO-036,,high,open,Synthetic deterministic seed issue
DQ-0006,missing_required_field,MO-043,,low,open,Synthetic deterministic seed issue
DQ-0007,odometer_regression,MO-050,,medium,open,Synthetic deterministic seed issue
DQ-0008,vehicle_status_conflict,MO-007,,high,open,Synthetic deterministic seed issue
DQ-0009,missing_required_field,MO-014,,low,open,Synthetic deterministic seed issue
DQ-0010,odometer_regression,MO-021,,medium,open,Synthetic deterministic seed issue
DQ-0011,vehicle_status_conflict,MO-028,,high,open,Synthetic deterministic seed issue
DQ-0012,missing_required_field,MO-035,,low,resolved,Synthetic deterministic seed issue
DQ-0013,odometer_regression,MO-042,,medium,resolved,Synthetic deterministic seed issue
DQ-0014,vehicle_status_conflict,MO-049,,high,resolved,Synthetic deterministic seed issue
DQ-0015,missing_required_field,MO-006,,low,resolved,Synthetic deterministic seed issue
DQ-0005,vehicle_status_conflict,MO-036,,high,open,Recommended status: maintenance (44660 km reported against a 44000 km service threshold)
DQ-0006,missing_required_field,MO-043,,low,open,Missing: location
DQ-0007,odometer_regression,MO-050,,medium,open,Booking BK-H-0007 recorded 51700 km, below the 51892 km recorded by earlier booking BK-H-0057.
DQ-0008,vehicle_status_conflict,MO-007,,high,open,Recommended status: available (marked rented with no active booking)
DQ-0009,missing_required_field,MO-014,,low,open,Missing: location
DQ-0010,odometer_regression,MO-021,,medium,open,Booking BK-H-0010 recorded 31150 km, below the 31298 km recorded by earlier booking BK-H-0060.
DQ-0011,vehicle_status_conflict,MO-028,,high,open,Recommended status: maintenance (38959 km reported against a 38000 km service threshold)
DQ-0012,missing_required_field,MO-035,,low,resolved,Missing: registration_number
DQ-0013,missing_required_field,MO-042,,low,resolved,Missing: location
DQ-0014,missing_required_field,MO-049,,low,resolved,Missing: registration_number
DQ-0015,missing_required_field,MO-006,,low,resolved,Missing: location
DQ-0016,missing_required_field,MO-009,,medium,open,Missing: location
DQ-0017,missing_required_field,MO-025,,medium,open,Missing: location
DQ-0018,missing_required_field,MO-026,,medium,open,Missing: registration_number
DQ-0019,missing_required_field,MO-041,,medium,open,Missing: location
DQ-0020,missing_required_field,MO-045,,medium,open,Missing: location
DQ-0021,missing_required_field,MO-049,,medium,open,Missing: location
1 public_ref public_ref,rule_type,entity_ref,related_ref,severity,status,evidence rule_type entity_ref related_ref severity status evidence
3 DQ-DEMO-OVERLAP DQ-DEMO-OVERLAP,booking_overlap,MO-016,BK-DEMO-OVERLAP-A|BK-DEMO-OVERLAP-B,high,open,controlled legacy import overlap booking_overlap MO-016 BK-DEMO-OVERLAP-A|BK-DEMO-OVERLAP-B high open controlled legacy import overlap
4 DQ-DEMO-STATUS DQ-DEMO-STATUS,vehicle_status_conflict,MO-016,,high,open,vehicle marked available while reserved bookings conflict vehicle_status_conflict MO-016 high open vehicle marked available while reserved bookings conflict
5 DQ-DEMO-ATTENTION DQ-DEMO-ATTENTION,missing_required_field,MO-031,BK-DEMO-NEXT,high,open,near-future booking; required operational inspection missing missing_required_field MO-031 BK-DEMO-NEXT high open near-future booking; required operational inspection missing
6 DQ-0005 DQ-0005,vehicle_status_conflict,MO-036,,high,open,Recommended status: maintenance (44660 km reported against a 44000 km service threshold) vehicle_status_conflict MO-036 high open Synthetic deterministic seed issue
7 DQ-0006 DQ-0006,missing_required_field,MO-043,,low,open,Missing: location missing_required_field MO-043 low open Synthetic deterministic seed issue
8 DQ-0007 DQ-0007,odometer_regression,MO-050,,medium,open,Booking BK-H-0007 recorded 51700 km, below the 51892 km recorded by earlier booking BK-H-0057. odometer_regression MO-050 medium open Synthetic deterministic seed issue
9 DQ-0008 DQ-0008,vehicle_status_conflict,MO-007,,high,open,Recommended status: available (marked rented with no active booking) vehicle_status_conflict MO-007 high open Synthetic deterministic seed issue
10 DQ-0009 DQ-0009,missing_required_field,MO-014,,low,open,Missing: location missing_required_field MO-014 low open Synthetic deterministic seed issue
11 DQ-0010 DQ-0010,odometer_regression,MO-021,,medium,open,Booking BK-H-0010 recorded 31150 km, below the 31298 km recorded by earlier booking BK-H-0060. odometer_regression MO-021 medium open Synthetic deterministic seed issue
12 DQ-0011 DQ-0011,vehicle_status_conflict,MO-028,,high,open,Recommended status: maintenance (38959 km reported against a 38000 km service threshold) vehicle_status_conflict MO-028 high open Synthetic deterministic seed issue
13 DQ-0012 DQ-0012,missing_required_field,MO-035,,low,resolved,Missing: registration_number missing_required_field MO-035 low resolved Synthetic deterministic seed issue
14 DQ-0013 DQ-0013,missing_required_field,MO-042,,low,resolved,Missing: location odometer_regression MO-042 medium resolved Synthetic deterministic seed issue
15 DQ-0014 DQ-0014,missing_required_field,MO-049,,low,resolved,Missing: registration_number vehicle_status_conflict MO-049 high resolved Synthetic deterministic seed issue
16 DQ-0015 DQ-0015,missing_required_field,MO-006,,low,resolved,Missing: location missing_required_field MO-006 low resolved Synthetic deterministic seed issue
17 DQ-0016,missing_required_field,MO-009,,medium,open,Missing: location
18 DQ-0017,missing_required_field,MO-025,,medium,open,Missing: location
19 DQ-0018,missing_required_field,MO-026,,medium,open,Missing: registration_number
20 DQ-0019,missing_required_field,MO-041,,medium,open,Missing: location
21 DQ-0020,missing_required_field,MO-045,,medium,open,Missing: location
22 DQ-0021,missing_required_field,MO-049,,medium,open,Missing: location