fleet_hazard 0.6.2
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. Everycovered_bynamed 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" wascoveredand is nowpartial:FleetReport.isRecent()exists, but the caller applies it, andHazardAggregator.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" waspartial, claiming a radius overlap check this package has never had, and is nowuncovered. 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".confidencehas been required since 0.6.0, and the test passes0.8itself. 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
latlong2from^0.9.1to>=0.9.1 <0.11.0.latlong2 0.10.0shipped 2026-04-25 andflutter_map 8.xresolves it, so the old ceiling made this package uninstallable alongside currentflutter_map—version solving failedfor every published version. No source change; the cap was gratuitous. Verified onlatlong2 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.confidencedefaulted to0.8. A caller who never stated a confidence had one manufactured on their behalf — and that invented0.8was then averaged intoHazardZone.averageConfidence, inflating how certain a hazard zone appeared to be. If you constructedFleetReportwithout passingconfidence, every one of your reports has been claiming 80% certainty that you never expressed.confidenceis now required. A confidence you did not state is not a confidence. -
HazardZone.averageConfidencereturned0for 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 returnsdouble?—nullmeans NOT KNOWN, and never means zero.
Migration #
- Pass
confidence:explicitly toFleetReport. If you were relying on the old default, the honest port is to decide what your confidence actually is and say it.0.8is available to you — but now it is your claim, not ours. averageConfidenceis nowdouble?. Handlenullas unknown: do not coalesce it to0, 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 novehicleId. HazardZone.reportsis nowList<ZoneObservation>(wasList<FleetReport>).zone.reports[i].vehicleIdno longer exists — by design.FleetReport(withvehicleId) remains the input atom to aggregation.HazardZone.vehicleCountis now a storedfinal int, computed at aggregation time from the input reports' uniquevehicleIds before the key is stripped. It can no longer be derived fromreports. The honest "N vehicles reported" count is preserved without retaining the re-id key.averageConfidenceis unchanged (still derived;confidenceis retained on eachZoneObservation).HazardAggregator.aggregate(List<FleetReport>)is unchanged in signature and clustering behavior; it now dropsvehicleIdwhen 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.0SDK floor in the previously-published artifact. No source or behavior change; the source already declaredsdk: ^3.10.0. Restorespub getfor embedded/automotive Dart consumers on Dart 3.10.x.
0.4.0 — 2026-05-10 — Pana score recovery + dart format alignment #
- Trim pubspec
descriptionto ≤180 characters so search-engine snippets surface the package's purpose cleanly. - Apply
dart formatacrosslib/andtest/(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.