Skip to content

0.7.7

Choose a tag to compare

@v-arapidis v-arapidis released this 17 Oct 00:53
· 3 commits to main since this release

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 in can_handle()) versus
      varies per dump (what a match_key needs). --write additionally 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 every return 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 what extract() reports, every False path 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 in openremap/core/services/wizard/, thin gates in
      openremap/api/commands/contribute.py and openremap/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's measure_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 --brand nor --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 as cook --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_dump over the API /
    stdio RPC (payload base64) and openremap synth -o file.bin on the CLI.
    Generated files carry no manufacturer fingerprints, so identify reports
    Unknown for them — by design, and pinned as such.
  • Golden corpus over synthetic dumps (tests/corpus/) — cases are
    parameter sets in manifest.json, so the corpus is committable (~50 KB for
    three cases) and runs in CI, with no ECU data and no personal data
    involved. Each cases/<id>/golden.json pins: 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 property apply(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 resolve 074906032AT and 074906032AG (both confirmed by their source
    filenames). No other field moved anywhere in the corpus: no dump lost a part
    number, and no match_key or family changed.
  • scan_map_tables no 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
    different min_table_score returned the first call's tables (reproduced:
    0.55 → 120 tables, then 0.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
    and scan_map_tables read 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 shared load_binary.
  • CONTRIBUTING.md no longer points at a layout that was deleted. Eleven
    references to src/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 as SIZE_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 under tests/tuning/manufacturers/. Two
    further drifts in the same file were corrected: the "Submitting a Pull
    Request" steps said master while the default branch is main.
  • CONTRIBUTING.md is 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 in contributing/:
    extractors.md, checksums.md, decoders.md, map-scoring.md,
    scanners.md and tests.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_tables declares the axis parameters it already read. The
    fallback branch (stage 2 without a prior stage 1) read min_axis_length,
    max_axis_length, min_step and max_step, but none were in the method's
    input_schema — invisible to list_methods consumers and exempt from the
    registry's default/validation handling. All four are now declared, matching
    scan_map_axes.
  • RPC list_methods honours kind. The handler accepted params and
    called the registry with no argument, so a filter request silently returned
    the full list, while the in-process list_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.py rebuilds
    deterministically; build --check compares 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_variant where 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 .mimic extension because the repository gitignores
    *.bin.
    Scope, after the derivation tools: _dev/contrib/derive_recipes.py derives
    recipes from the extractors themselves — introspecting each module's
    constants, byte literals, slice offsets and the bare hex offsets that appear
    in data[...], 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 coverage re-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" ME7910 with 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.92 and ME7910 are declared in supported_families but 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.md for a decision.
  • Guard against over-declared families. supported_families is 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 dropping M3.8.3 would delete a string a real owner searches for.
    Instead tests/tuning/manufacturers/test_declared_families.py pins the
    invariant in both directions: a newly declared key must have a corpus fixture
    or an entry in its KNOWN_UNREPORTABLE table (with a reason and the declaring
    module), and an entry there fails if the key ever becomes reportable. It
    reads only manifest.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 of openremap 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 every False, 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
    grew render_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 a Path or touches the filesystem, which restores the service-layer
    contract (tests assert it by sabotaging open()), and the WinOLS grid format
    is now unit-testable: 2D header rows, 1D two-column tables, u8/u16 naming,
    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_TABLES const and the never-called checksum.rs::read_store.
    cargo check --all-targets is warning-free; a rebuilt extension produces
    byte-identical c166_disasm / map-scan results.
  • Documentation: one roadmap, not three. docs/internal/roadmap.md and
    docs/internal/0.7.x-roadmap.md were 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 with src/, 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.py while still ignoring example
    filenames (stock.bin) and placeholders (openremap/<brand>/x.py).