fleet_hazard 0.6.2 copy "fleet_hazard: ^0.6.2" to clipboard
fleet_hazard: ^0.6.2 copied to clipboard

Geographic clustering of scattered vehicle reports into map-ready hazard zones with severity aggregation. Pure Dart, pluggable.

0.6.2 #

Documentation and test names only. No library code change. Two corrections. The scenario-coverage file said stale-report expiry was covered; it is not, and it now says so — HazardAggregator.aggregate() does not filter by age. And earlier versions said a monthly watch tracked JIS / JASO and APPI updates; no output from that watch has been found, so the safety-boundary record no longer says so.

Comments and documentation that used this project's internal shorthand now say the same thing in plain words. Where earlier entries in this changelog used that shorthand, they were reworded; no fact in them changed.

  • sngnav_coverage.yaml: corrected against the code. Every covered_by named something that does not exist in this package (HazardCluster, GeoClusterer, HazardZoneBuilder, HazardReport.expiresAt); each now names the API that actually provides it. Two statuses were wrong. "Stale report expiry" was covered and is now partial: FleetReport.isRecent() exists, but the caller applies it, and HazardAggregator.aggregate() selects on condition only — so a report of any age can build a zone. If you need freshness, filter before you aggregate. "Zone merge when clusters overlap" was partial, claiming a radius overlap check this package has never had, and is now uncovered. The file's own declared package version and date were stale and are current, and its totals are recounted: the scenario registry holds 66 ids, not the 62 this file declared.
  • test/fleet_report_test.dart: one test's name. It read "default confidence is 0.8". confidence has been required since 0.6.0, and the test passes 0.8 itself. The test's code is unchanged.
  • analysis_options.yaml: the comment above the analyzer's strict modes now says what the modes do, instead of pointing at an internal review note.
  • SAFETY_BOUNDARY.md: the safety-boundary record is reworded the same way. No boundary moved: the changed lines lost internal names and references, and nothing changed about what the package does, what it does not do, or what it leaves to you. One statement in it is corrected: earlier versions said a monthly watch tracked JIS / JASO and APPI updates for fleet-telemetry packages. No output from that watch has been found, so the record no longer says so. A quotation in it now matches its source word for word.
  • CHANGELOG.md: the 0.5.0 and 0.3.0 entries.

Apart from pubspec.yaml (the version) and the files listed above, the published files are identical to 0.6.1.

0.6.1 #

  • Widen latlong2 from ^0.9.1 to >=0.9.1 <0.11.0.

    latlong2 0.10.0 shipped 2026-04-25 and flutter_map 8.x resolves it, so the old ceiling made this package uninstallable alongside current flutter_map — version solving failed for every published version. No source change; the cap was gratuitous. Verified on latlong2 0.10.1: analyze clean, 46/46 tests pass.

Changelog #

0.6.0 #

Safety defect in 0.5.0 and earlier — please read #

Up to and including 0.5.0, this package asserted a confidence nobody gave it, and reported a number for a road nobody had driven.

Two fabrications, both fixed here, both BREAKING to fix:

  • FleetReport.confidence defaulted to 0.8. A caller who never stated a confidence had one manufactured on their behalf — and that invented 0.8 was then averaged into HazardZone.averageConfidence, inflating how certain a hazard zone appeared to be. If you constructed FleetReport without passing confidence, every one of your reports has been claiming 80% certainty that you never expressed. confidence is now required. A confidence you did not state is not a confidence.

  • HazardZone.averageConfidence returned 0 for a zone with no observations. That is a NUMBER, and a consumer could not tell it apart from observations that genuinely carried zero confidence. "Nobody has reported this road" and "everybody who reported it was certain of nothing" are different facts, and a driver deserves them kept apart. It now returns double? — null means NOT KNOWN, and never means zero.

Migration #

  • Pass confidence: explicitly to FleetReport. If you were relying on the old default, the honest port is to decide what your confidence actually is and say it. 0.8 is available to you — but now it is your claim, not ours.
  • averageConfidence is now double?. Handle null as unknown: do not coalesce it to 0, and do not render it as a percentage. An empty zone has nothing to tell the driver.

Why this was found #

A standing scanner (fabrication_sweep.sh) that looks for one thing — an absent, failed, or unmeasured input silently resolving to a safe-looking value. This defect was missed by a full adversarial review and by every human who read the file. The machine found it on its first run.

0.5.0 #

Breaking — anonymization fix. A retained HazardZone no longer carries a re-identifiable per-vehicle trail. Previously a zone retained the full List<FleetReport>, including each report's vehicleId — so the "anonymized, aggregated" claim in the safety boundary was false: a zone held a vehicleId mapped to its sequence of position + timestamp, which is a per-vehicle trail. This release protects the fleet-contributor drivers: their participation no longer leaves a reconstructable trail in the aggregate.

  • New ZoneObservation — the anonymized atom a zone retains: position, condition, timestamp, confidence, and no vehicleId.
  • HazardZone.reports is now List<ZoneObservation> (was List<FleetReport>). zone.reports[i].vehicleId no longer exists — by design. FleetReport (with vehicleId) remains the input atom to aggregation.
  • HazardZone.vehicleCount is now a stored final int, computed at aggregation time from the input reports' unique vehicleIds before the key is stripped. It can no longer be derived from reports. The honest "N vehicles reported" count is preserved without retaining the re-id key.
  • averageConfidence is unchanged (still derived; confidence is retained on each ZoneObservation).
  • HazardAggregator.aggregate(List<FleetReport>) is unchanged in signature and clustering behavior; it now drops vehicleId when constructing each zone.

Migration: construct HazardZone with reports: <ZoneObservation>[...] and a vehicleCount:; build observations with ZoneObservation.fromReport(report).

0.4.1 #

  • Republish from the embedded-target Dart 3.10.1 SDK (Flutter 3.38.3) to correct a stale ^3.11.0 SDK floor in the previously-published artifact. No source or behavior change; the source already declared sdk: ^3.10.0. Restores pub get for embedded/automotive Dart consumers on Dart 3.10.x.

0.4.0 — 2026-05-10 — Pana score recovery + dart format alignment #

  • Trim pubspec description to ≤180 characters so search-engine snippets surface the package's purpose cleanly.
  • Apply dart format across lib/ and test/ (9 files reformatted) to clear pana static-analysis formatter findings.
  • No SDK source changes; metadata + formatter pass only.

0.3.0 #

  • Harmonize package version to 0.3.0, in step with the other packages in this repository.
  • Align internal ecosystem dependency constraints to ^0.3.0 where applicable.
  • No breaking API changes in this package for this release.
0
likes
160
points
808
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Geographic clustering of scattered vehicle reports into map-ready hazard zones with severity aggregation. Pure Dart, pluggable.

Repository (GitHub)
View/report issues
Contributing

Topics

#fleet #hazard #automotive #navigation #winter-driving

License

BSD-3-Clause (license)

Dependencies

equatable, latlong2

More

Packages that depend on fleet_hazard