Skip to content

Repository files navigation

Fitment

Fitment is an open-source validator for ACES 4.2 catalog exports (with read support for 4.0 and 4.1) in the automotive aftermarket. I built it to catch structural and reference-data problems before files reach distributors and PIM systems—without tying validation to a single vendor toolchain.

The CLI streams large XML files, loads AutoCare reference data into a local DuckDB database, and reports findings in formats that work in terminals and CI (human, JSON, NDJSON, SARIF).

Status: v0.1 — ACES 4.2 only. This is a focused subset validator, not a full replacement for commercial tools yet.

Why Fitment

Aftermarket catalogs are large, rules are easy to get wrong, and reference data changes on a schedule. I wanted something that:

  • Runs on Linux, macOS, and Windows from a single static binary
  • Validates multi‑million application files in minutes, not hours
  • Separates structural checks from VCdb / PCdb / Qdb checks
  • Emits SARIF and JSON for pipelines, not only human-readable logs
  • Keeps AutoCare data out of the repository (you import your own member drops)

What it does (v0.1)

Area Rules Description
Structure FIT001 ACES 4.2 XSD subset (no libxml2): version, required elements, app actions
Catalog hygiene FIT002–004 Duplicate apps, overlaps, CNC (configuration notes conflict)
VCdb FIT005–006 Base vehicle exists; vehicle attribute combinations match reference rows
PCdb FIT007 Part type, position, and part-type/position pairs
Qdb FIT008 Qualifier IDs
Diff Stable app identity and net-change report between two ACES files

Suppressions are supported via .fitment-ignore. See docs/cli.md for flags and rule details.

Performance

On a real-world export (~1.29M applications, ~460MB XML), on Apple Silicon:

Configuration Typical time
Structural checks only (no refdb) ~2 minutes
Full validation with imported refdb ~40–45 seconds

Reference lookups use an in-memory index loaded once per run; the refdb is not queried per application row. Importing VCdb/PCdb/Qdb from AutoCare ASCII is a separate, offline step.

Match your imported VCdb drop to the VcdbVersionDate (and related dates) in the ACES header. If the catalog was built against a newer VCdb than you imported, you will see FIT005 (unknown base vehicle) and duplicate FIT006 noise for the same apps.

Requirements

  • Rust 1.78+ (see rust-toolchain.toml)
  • AutoCare member ASCII drops for reference validation (VCdb, PCdb, Qdb)
  • An ACES 4.2 XML file to validate

Fitment does not ship AutoCare reference data.

Quick start

Build

git clone https://github.com/fitment-validator/fitment.git
cd fitment
cargo build --release -p fitment-cli
# binary: target/release/fitment

Or install from the workspace:

cargo install --path crates/fitment-cli

Import reference data

Point each command at the extracted AutoCare ASCII folder (e.g. AutoCare_VCdb_NA_LDMDHDPS_enUS_ASCII_20260129/). Fitment discovers dated filenames such as 20260129_BaseVehicle.txt.

export REFDB="$HOME/fitment-refdb.duckdb"

fitment import-vcdb /path/to/AutoCare_VCdb_NA_..._ASCII_YYYYMMDD --to "$REFDB"
fitment import-pcdb /path/to/AutoCare_PCdb_enUS_ASCII_YYYYMMDD --to "$REFDB"
fitment import-qdb  /path/to/AutoCare_Qdb_enUS_ASCII_YYYYMMDD  --to "$REFDB"

See docs/refdb.md for supported tables and layout.

Validate

fitment validate catalog.xml --refdb "$REFDB"
fitment validate catalog.xml --refdb "$REFDB" --severity error
fitment validate catalog.xml --refdb "$REFDB" --format sarif > results.sarif

Exit code 1 when any error-severity finding remains (after suppressions).

Diff two catalogs

fitment diff previous.xml current.xml
fitment diff previous.xml current.xml --format json

Output formats

Format Use case
human Local debugging (default, colorized)
json Single document with summary and all findings
ndjson One finding per line for streaming
sarif GitHub, Azure DevOps, and other SARIF 2.1.0 consumers

SARIF shape and rule help URIs are documented in docs/sarif.md.

Project layout

crates/fitment-core   — parser, model, checks, diff
crates/fitment-refdb  — DuckDB schema, ASCII importers, lookups
crates/fitment-report — formatters
crates/fitment-cli    — fitment binary
fixtures/             — synthetic ACES and mini refdb (no AutoCare data)
docs/                 — CLI, refdb, SARIF, architecture

Development

Quality is gated locally (not via GitHub Actions CI, to avoid cloud cost):

cargo run -p xtask -- check

That is equivalent to:

cargo fmt --all -- --check
cargo clippy --workspace --exclude fitment-desktop --all-targets -- -D warnings
cargo test --workspace --exclude fitment-desktop

Other helpers:

cargo run -p xtask -- generate-fixtures

Contributing: CONTRIBUTING.md. Agent-oriented notes: AGENTS.md.

Roadmap

Planned directions (not committed timelines):

  • HTTP API for CI and PIM integration
  • Declarative rule configuration (YAML)
  • VCdb coverage and cross-file analytics
  • Clearer reporting when FIT005 and FIT006 overlap
  • PIES validation
  • Desktop UI (Tauri) — see docs/desktop.md

Design notes: docs/architecture.md.

License

Licensed under the MIT License.

Acknowledgments

ACES and AutoCare database names refer to standards and products of the AutoCare Association. Fitment is an independent project and is not endorsed by AutoCare.

About

Modern ACES-Validator

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages