Repository navigation
0.7.7
0.7.7 — 2026-10-17
This file accumulates everything landed since the 0.7.6 release; 0.7.7 is the
next release. It starts with correctness fixes surfaced while reviewing the
remaining items of the 0.7.6 post-release audit, plus a layer/cleanup pass. Two
of the fixes change detection/scan results on real binaries; all of them are
covered by new regression tests. It then adds the synthetic dump generator and
the golden corpus built on it, and the contribution wizard — the tooling half of
this release, which is what a new ECU family now arrives through.
Added
- Contribution wizard (
openremap contribute) — the engine that turns "I own
a dump of an unsupported ECU" into a pull request. The problem it solves is not
writing the extractor: it is knowing which bytes are stable in that family
and absent from every family the engine already recognises, which nobody can
answer by reading their own file. Two verbs:openremap contribute extractor dump.bin --also dump2.bin --brand X --family Y
measures: who claims the dump today, ranked candidate signatures each tested
against every known family, collision offsets, and candidate identity fields
split into constant in the family (belongs incan_handle()) versus
varies per dump (what amatch_keyneeds).--writeadditionally emits
four artifacts: the fixture recipe that goes in the PR instead of the
dump, an extractor skeleton that already satisfies the review bar
(measured marker, size gate, exclusion guards harvested from the colliding
family's own ident token, evidence tags on everyreturn False), the
fixture-driven test, and a PR report with a Not verified section.openremap contribute check <extractor.py>runs the same bar over an
existing extractor: it still claims its own fixture, it accepts no other
family's, a rejected binary leaves no stale evidence,supported_families
matches whatextract()reports, everyFalsepath clears the evidence
(checked by parsing the module, not by pattern-matching text), and the
extractor is reachable from the registry.
The wizard executes the skeleton it just rendered against all 89
known-family fixtures before calling anything verified, and exits non-zero when
no marker is collision-free or no guard can work — a generated file that has
never been run is worse than no file. It never writes the contributor's dump
anywhere, and it refuses a marker that does not occur in their own dumps (that
would produce a working fixture for a signature the family does not carry).
Business logic inopenremap/core/services/wizard/, thin gates in
openremap/api/commands/contribute.pyandopenremap/core/cli/commands/.
Documented where a reader actually looks:README.md(the Supported ECUs
section, where somebody checks whether their car is covered, and the
Contributing section with the two commands) and
contributing/extractors.md. The known-family fixtures are the repository's own
_dev/contrib/recipes/— committed, so anybody with a checkout has them, and
deliberately not copied into the package. An installed wheel therefore has
no recipes, and the default refuses with instructions rather than degrading
silently;--measure-only(the service'smeasure_only) is the explicit opt-in
for the half that is pure local computation — who claims the dump, the runs
stable across the dumps, the family name the dump suggests — with no collision
check, no recommended marker and no artifacts, and it says all three. It also
needs neither--brandnor--family: a first look should not require the
answer it exists to produce (those two name the family the extractor declares,
so they stay required for the full run). Same
strict-by-default shape ascook --allow-non-unique. Contributing means opening
a pull request, which needs a clone anyway; a second copy of the fixtures inside the wheel was tried and
removed, because it duplicated the knowledge and made the wizard blind to a
recipe it had itself just written.
- Synthetic dump generator (
openremap.core.synth) — builds ECU-like
binaries from scratch: flash layout, calibration axes, smooth map surfaces,
a known ground truth, and no byte of any real ROM. Because it is
deterministic (same parameters + seed → identical bytes), the file can be
regenerated everywhere instead of shipped: usable as a test fixture, a demo,
or a reproducer in a bug report — none of which was possible before, since
real dumps can neither be committed (copyright) nor handed to users.
Exposed three ways, like every other feature:generate_dumpover the API /
stdio RPC (payload base64) andopenremap synth -o file.binon the CLI.
Generated files carry no manufacturer fingerprints, soidentifyreports
Unknownfor them — by design, and pinned as such. - Golden corpus over synthetic dumps (
tests/corpus/) — cases are
parameter sets inmanifest.json, so the corpus is committable (~50 KB for
three cases) and runs in CI, with no ECU data and no personal data
involved. Eachcases/<id>/golden.jsonpins: input hashes, planted maps,
identity, detected map candidates and their scores, the cooked.remap
recipe (wall-clock fields normalised), the re-patch result — including the
round-trip propertyapply(cook(a, b), a) == b— and both refusal layers
for a tampered recipe (ctx→ the patcher refuses with an actionable
message;ob→ strict validation refuses silently; either way nothing is
written). Regeneration is a reviewed act:_dev/corpus/update_golden.py,
read the diff, commit it with the change that caused it.
Fixed
- VAG part-number scan no longer stops at an all-digit lookalike. The shared
scanner (manufacturers/bosch/_vag.py::find_vag_part_number, used by the
EDC15/EDC16/EDC17/EDC3.x extractors) took the first structurally matching
run in the dump and applied its "a part number must contain a letter" guard
afterwards. An all-digit Bosch calibration code of the same shape sitting
earlier in the file therefore ended the search: the dump reported no part
number at all even though a valid one existed further on. The scan now walks
every structural match and returns the first that contains a letter.
Corpus sweep (1,685 files, before/after): exactly two fields change, both
gains — two VW Crafter 2.5 TDI EDC16 dumps that reported no OEM part number
now resolve074906032ATand074906032AG(both confirmed by their source
filenames). No other field moved anywhere in the corpus: no dump lost a part
number, and nomatch_keyor family changed. scan_map_tablesno longer serves a stale cached result. The two-stage
map-scan caches were keyed on(path, mtime, size)alone, so parameters were
ignored whenever the cache was warm: a second call on the same file with a
differentmin_table_scorereturned the first call's tables (reproduced:
0.55→ 120 tables, then0.99→ the same 120 instead of 0). Both caches
now include every parameter that shapes the result, so an identical request
still hits the cache while a changed one recomputes.- Two-stage map scanning decodes HEX/S-Record containers.
scan_map_axes
andscan_map_tablesread the file with a raw byte read, bypassing the shared
loader, so a text Intel HEX / Motorola S-Record input produced axes over ASCII
text while every other command decoded it first. Both stages now load through
the API's sharedload_binary. CONTRIBUTING.mdno longer points at a layout that was deleted. Eleven
references tosrc/openremap/tuning/manufacturers/…— including the import
line in the copy-paste example — survived the package re-layout, so the
public "Adding a New ECU Extractor" guide dead-ended at step 1: the directory
does not exist and the module does not import. Paths now read
openremap/core/manufacturers/…. While repairing it, two more gaps in the
same guide were closed: the worked example now shows the evidence-tag
contract (_set_evidence()plus tags such asSIZE_MATCH,
EXCLUSION_CLEAR,FAMILY_STRING) that the confidence scorer depends on and
which the guide had omitted entirely, and the test-tree snippet no longer
invents a per-brand sub-directory undertests/tuning/manufacturers/. Two
further drifts in the same file were corrected: the "Submitting a Pull
Request" steps saidmasterwhile the default branch ismain.CONTRIBUTING.mdis now an index, not a textbook. It had grown to 311
lines of which ~130 were the extractor guide alone — the loudest domain had
swallowed the page, and every other area of the codebase (checksums,
decoders, map scoring, instruction scanners, tests) was compressed into a
table row or missing. It is now an intro plus the binding cross-cutting rules
(safety notice, setup, code style, PR process, bug reports, binary-file
policy) and routes to per-domain guides incontributing/:
extractors.md,checksums.md,decoders.md,map-scoring.md,
scanners.mdandtests.md. Each guide states where the code lives, the
conventions of that area, and what a PR must demonstrate — which is the
part that genuinely differs per domain (an extractor must not steal another
family's claims; a checksum needs family consensus; a decoder needs oracle
parity; a scoring change must show a corpus before/after).
Changed
scan_map_tablesdeclares the axis parameters it already read. The
fallback branch (stage 2 without a prior stage 1) readmin_axis_length,
max_axis_length,min_stepandmax_step, but none were in the method's
input_schema— invisible tolist_methodsconsumers and exempt from the
registry's default/validation handling. All four are now declared, matching
scan_map_axes.- RPC
list_methodshonourskind. The handler acceptedparamsand
called the registry with no argument, so a filter request silently returned
the full list, while the in-processlist_methods(kind=…)filtered correctly.
The parameter is now declared in the schema and applied; an unrecognised kind
returns an empty list rather than an error.
Internal
- Wizard fixture corpus (
_dev/contrib/). A committed, deterministic
mimic corpus for the contribution wizard (not yet built): files the real
extractors accept, so the wizard can answer "does your candidate
signature also fire on another family's file?" without anybody owning a dump.
Each recipe is fill byte + planted payloads, with provenance recorded as a
real file's sha256 where the payload came from one — no binaries, and the
snapshot was already checked to carry no VINs.build_corpus.pyrebuilds
deterministically;build --checkcompares both the corpus on disk and
the recipes against the manifest hashes, so a hand-edited fixture cannot pass
review silently. The identity gate is manufacturer +ecu_family, plus
ecu_variantwhere a recipe declares one — the EDC16 extractor hardcodes
ecu_family="EDC16"and reports C31/C34/CP33 as variants, so the family alone
would gate nothing for those twelve fixtures; reproducing every other
extracted field would buy the wizard nothing.
Corpus files use a.mimicextension because the repository gitignores
*.bin.
Scope, after the derivation tools:_dev/contrib/derive_recipes.pyderives
recipes from the extractors themselves — introspecting each module's
constants, byte literals,sliceoffsets and the bare hex offsets that appear
indata[...], then searching size × fill × payload × anchor in cheapest-first
phases and finally minimising the result — and_dev/contrib/derive_families.py
then steers each working recipe to every family key its extractor declares,
through five mechanisms (token substitution, marker harvest, regex instances,
header magic bytes, file size, minimal recipes) plus hand-authoring for the
structural remainder. Final measured state: 89 fixtures, 89/89 verify, 38 of
38 extractors, 89 of 104 declared family keys; 44 MB of corpus compresses to
~68 KB in git.build_corpus.py coveragere-measures that on demand and also
checks the claimer (the fixture must be won by an extractor that declares the
key) — a check whose absence had briefly "covered"ME7910with a file the ME7
extractor claimed. The 15 declared keys with no fixture are a finding, not a
gap:EDC2,EDC15C2/C3/C5/C7/M/VM+,M2.81,M3.8.1/.3/.81/.82/.83,
M5.92andME7910are declared insupported_familiesbut no code path can
return them (hardcoded family values, or a normalisation map that collapses
them), and no real dump produces them either; they are itemised with their root
cause in_dev/contrib/README.mdfor a decision. - Guard against over-declared families.
supported_familiesis what the TUI
families browser lists and what the wizard will read to decide which files a
candidate signature must not collide with, but 15 of the 104 declared keys
cannot be returned by any code path (EDC2,EDC15C2/C3/C5/C7/M/VM+,
M2.81,M3.8.1/.3/.81/.82/.83,M5.92,ME7910). The declarations stay —
they are deliberate for the seven that a resolver normalises onto a parent
family, and droppingM3.8.3would delete a string a real owner searches for.
Insteadtests/tuning/manufacturers/test_declared_families.pypins the
invariant in both directions: a newly declared key must have a corpus fixture
or an entry in itsKNOWN_UNREPORTABLEtable (with a reason and the declaring
module), and an entry there fails if the key ever becomes reportable. It
reads onlymanifest.json, not the 44 MB of fixtures, and skips when the
corpus is absent. - Contribution intake (
/.github) — the repository had no issue templates at
all, so the only route to "please support my ECU" was a blank text box, which
is where such requests usually die. Added: a New ECU family request form
that asks for the output ofopenremap contribute extractor --measure-only
(one command, no checkout, no family name needed), the vehicle, and how many
dumps the reporter has — and states plainly that firmware must not be attached;
a Bug report form (version, platform, exact command, expected vs actual,
and which kind of file was involved, with an explicit "describe it, do not
attach it" option for real-car dumps); an issue chooser that keeps blank issues
enabled and points questions at Discussions; and a pull request template
carrying the review bar this repository already applies (registry position and
why, evidence cleared on everyFalse, fixture recipe included and corpus in
sync, and a Not verified section). Templates label with existing labels
only (enhancement,bug) — no new label is required. - Map CSV export is now a pure renderer.
services/maps/map_exporter.py
grewrender_tables_csv(data, tables) -> {filename: csv text}; writing the
files moved to the CLI (_write_csv_files), which is where the other output
paths write too. The emitted bytes are unchanged — but the module no longer
takes aPathor touches the filesystem, which restores the service-layer
contract (tests assert it by sabotagingopen()), and the WinOLS grid format
is now unit-testable: 2D header rows, 1D two-column tables,u8/u16naming,
big-endian, and compound (stride) tables. - Rust: five compiler warnings removed, no behaviour change. Three dropped
parameters that were dead because their callers already do the check —
c166.rs::exts_name(b0),c166.rs::operands(size), and
map_hunter.rs::try_axis_at(min_len)(the callers filter with
run >= min_axis_length/run >= min_y_length) — plus the unused
MAX_SERIES_TABLESconst and the never-calledchecksum.rs::read_store.
cargo check --all-targetsis warning-free; a rebuilt extension produces
byte-identicalc166_disasm/ map-scan results. - Documentation: one roadmap, not three.
docs/internal/roadmap.mdand
docs/internal/0.7.x-roadmap.mdwere removed — the milestone roadmap lives in
README.md("Where the project is going"), which a release already sweeps for
stale text. Citations of a numbered "roadmap item N" (which referenced a list
that no longer exists anywhere) were dropped from live docs and docstrings;
released changelogs and dated audits keep their point-in-time wording. - New guard:
tests/test_doc_paths.py. Every committed living document is
now checked for local markdown links and backticked repo paths that no longer
exist. Dated audits and released changelogs are exempt by rule (they record a
moment; the unreleased changelog is detected by its header and joins the
check automatically). Markdown link targets resolve relative to the document
that contains them; backticked paths follow the repo convention of being
relative to the root. A deliberate-example allowlist covers files a
contributor is being told to create.
The first version of this guard could not have caught the bug that
motivated it: it only looked at tokens starting with a known top-level
directory, and the stale path began withsrc/, so it was invisible — a human
found it instead. The rule now also checks any path with a directory component
and a code/doc extension, which is verified by probe to flag
src/openremap/tuning/manufacturers/base.pywhile still ignoring example
filenames (stock.bin) and placeholders (openremap/<brand>/x.py).