Skip to content

docs backend evidence ev support EE 05

AlexandreZanata edited this page Oct 24, 2026 · 1 revision

EE-05 — Rust vehicle-reference preparation

Status: LOCAL_DONE Validation: PASS Integration: INTEGRATION_PENDING

Parent: 1001dbc5 (maintained dev, PR #147 head). Date: 2026-10-22. Depends EE-01/03, accepted. User-authorized PBE admission (2026-10-22) plus dealer-hosted BYD supplement (provenance documented, manufacturer direct preferred). Rules EV-02–04/07/08; journeys EV-01/02/12. Risk: source math (critical: fixed-width tables, comma decimals, cross-listed duplicates, exact MJ/km preservation).

Before behavior: the official PBE table (nine section layouts) plus the supplement yield minimized vehicle references with source wording, exact energy lexemes and model identities. Gap-split fields and right-anchored MJ/range extraction work across all layouts without per-width tables; cross-listed models deduplicate by identity (same vehicle, different PBE category). Reported MJ/km stays reported; supplement facts enrich exact matches only. Combustion rows quarantine as out of electric scope with full loss accounting. Recovery: quarantine unsupported revisions, retain manual entry.

Delivered

  • Supplement acquisition (local, private /tmp/abastevo-ee05-source, 0700): dealer-hosted BYD Dolphin Mini sheet (Feb 2024, 306,588 bytes) with battery 38 kWh, CCS2 40 kW, Type 2 6.6 kW, range 280 km and 0.41 MJ/km — cross-validated against PBE row (0,41/280). Manufacturer-direct supplement remains preferred (recovery: replace when available).
  • tools/station-prep/src/ev_pbe.rs: PBE reader (gap-split brand/model/version, right-anchored MJ/range, comma decimals, frozen minimal payload, ev-source-key-v1 identity, assertion digests) plus supplement path (defined, BYD facts verified).
  • tools/station-prep/src/bin/prepare_vehicle.rs: local preparer writing manifest.json + entities.ndjson + decisions.ndjson + aliases.ndjson (0600 in 0700 dir, counts-only stdout, deterministic, fail-closed with cleanup). Extraction via pdftotext -layout (poppler, reviewed adapter, no Rust dependency).
  • Three unit tests (electric rows, combustion/malformed quarantine, frozen entities).

Actual checks

From this worktree (2026-10-22, parent 1001dbc5):

  • pdftotext -layout pbe-2026.pdf (poppler) + prepare_vehicle → PASS: input 1,280 non-empty lines, accepted 181 distinct EV references, duplicates 5 (cross-listed Porsches/Audi, same vehicle different category), quarantined 1,094 (combustion, headers, footnotes, malformed).
  • Independent Python oracle: 186 EV data rows = 181 distinct + 5 cross-listed; MJ/km values spot-checked (Dolphin 0,41/280 matches supplement 0.41/280); payload shapes match frozen schema; keys unique; repeat run byte-identical.
  • cargo test --locked → PASS, 177 tests (3 new), zero failure; cargo fmt --check PASS; cargo clippy --all-targets --locked -- -D warnings PASS; no new dependency (Cargo.toml/Cargo.lock untouched).
  • git diff --check PASS; bash scripts/scan-secrets.sh PASS.
  • No Go, DB, HTTP, Android or network code; no source activation beyond local preparation; no PII/secrets in Git/logs/fixtures.

Limits

  • This unit prepares vehicle references only. No Go bridge (EE-06), tariffs, storage, publication, worker or app. The PBE, supplement and artifacts stay outside Git.
  • Nine PBE section layouts handled via gap-split + right-anchored energy (no per-width tables); unknown layouts quarantine with explicit reason, never silently dropped. MJ/km is read for oracle but persists only as model identity per the frozen minimal payload (detailed specs await EE-07 types).
  • Supplement covers Dolphin Mini model family (Feb 2024 dealer edition); trim-exact linkage requires manufacturer-direct sheets (deferred, documented). PBE rows without supplements emit as references without battery data (honest absence, not invention).
  • A new PBE edition or supplement needs re-approval with hashes.
  • No device, no production, no deploy and no release acceptance is claimed.

Next: EE-06 (strict Go prepared bridge) needs EE-04/05 accepted artifacts; it consumes these tested native outputs once authorized.

Fuel prices wiki

Source: AlexandreZanata/brazil-fuel-prices @ bbd96568180563ced975b96f8f89f7a3c242522e

Clone this wiki locally