Skip to content

docs backend evidence ev support EE 04

AlexandreZanata edited this page Oct 24, 2026 · 1 revision

EE-04 — Rust charging-location preparation

Status: LOCAL_DONE Validation: PASS Integration: INTEGRATION_PENDING

Parent: c3de5c03 (maintained dev, post-PR-#146 merge). Date: 2026-10-22. Depends EE-03, accepted. User-authorized OCM source admission (2026-10-22) for open licenses only. Rules EV-05–09; journeys EV-03/09/12. Risk: untrusted parsing/license/PII (critical: 1,298 files, contact/photo/free-text exclusion, exact numerics).

Before behavior: the admitted whole-Brazil OCM snapshot (pinned commit, all three open-licensed providers) is read locally into minimized places and connection groups with source wording, exact decimal lexemes and source clocks only. Reported quantities stay reported; contacts, telephones, emails, comments, media and private coordinates never leave the reader. Unlicensed providers, foreign places, corrupt JSON, missing identities and inexact numerics quarantine or refuse with no partial output. Recovery: refuse unknown/corrupt/unlicensed data, preserve old output.

Delivered

  • Snapshot acquisition (local, private /tmp/abastevo-ee04-snapshot, 0700): 1,298 BR POIs from pinned commit 8e3bedca48ca94807d96b2f5e7ee02cffe63ae54 via data/BR/ raw paths, each Git blob SHA verified against the pinned tree; 1,816,497 bytes, 2,089 connections. Licenses verified from pinned reference data: provider 1 CC-BY-4.0 (768 POIs), 40 CC-0 (422), 57 CC0 (108). CountryID 36 throughout. PII surface measured (4 emails, 303 telephones, 209+30 comments, 76 media) and excluded by minimization.
  • contracts/ev/preparation-profiles-v1.json: ocm-br-20261021-v1 amended to ADMITTED_20261022_USER_AUTHORIZED with all three providers, license hashes and attribution requirements; shapes frozen, holds updated.
  • tools/station-prep/src/ev_ocm.rs: snapshot reader (PLACE + CONNECTION_GROUP, ev-source-key-v1 identity, assertion digests, exact decimal lexemes from source bytes, frozen connector/current enums with UNKNOWN fallback, power/quantity bounds, clocks).
  • tools/station-prep/src/bin/prepare_charging.rs: local preparer writing manifest.json + entities.ndjson + decisions.ndjson + aliases.ndjson (0600 in 0700 dir, counts-only stdout, deterministic, budget-capped, fail-closed with cleanup).
  • Four unit tests (admission/brazil, place+groups, quarantine, corrupt/identity refusal).

Actual checks

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

  • prepare_charging /tmp/abastevo-ee04-snapshot/pois /tmp/ee04-out → PASS: input 3,387 (1,298 places + 2,089 groups), accepted 3,387, duplicates 0, quarantined 0; entities 2.4 MB, decisions 1.7 MB.
  • Independent Python oracle: raw snapshot counts match manifest exactly (1,298/2,089/3,387); zero emails and zero PII field names in both artifacts; payload shapes match frozen schemas; keys unique; repeat run byte-identical.
  • cargo test --locked → PASS, 174 tests (4 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 charging locations only. No vehicle references (EE-05), Go bridge (EE-06), tariffs, storage, publication, worker or app. The snapshot, preparer output and PII stay outside Git.
  • Admission covers the three verified open licenses with attribution retained; any other provider, contact, comment, photo or private coordinate is excluded or quarantined, never adapted.
  • Coordinates are exact source lexemes (not float conversions); powers are integer watts from finite positive kilowatts; quantities are reported group counts, never EVSE identities.
  • A new snapshot revision needs re-approval with hashes (same pattern as MEX-17/20a); this acceptance pins commit 8e3bedca….
  • No device, no production, no deploy and no release acceptance is claimed.

Next: EE-05 (vehicle-reference preparation) needs the PBE profile plus an approved manufacturer supplement, still missing; it requires its own source artifact before implementation.

Fuel prices wiki

Source: AlexandreZanata/brazil-fuel-prices @ bbd96568180563ced975b96f8f89f7a3c242522e

Clone this wiki locally