CM3D-013: Vendor CAD files are fetched with pinned checksums, never committed
Context
The pod electronics models are checked against the CAD files of the vendors: the BIGTREETECH Octopus and TMC5160T Pro STEP files and the M5Stack Mini Scales STL. The Octopus STEP states no licence (all rights reserved) and is 24 MB. build123d reads STEP files directly, so the files can be used as they are.
Decision
-
Registry:
cm3d.tools.vendorlists every vendor file with its URL, its size, its sha256 and its licence. The GitHub URLs are pinned to a commit. The Mini Scales drawing (mini-scales-drawing) is on M5Stack’s documentation server, which has no commits, so only its size and sha256 pin it. -
Location: the files live in
build/vendor/, which is not tracked by git. -
Fetch on command only:
uv run cm3d vendor fetch [NAME]downloads to a.partfile, verifies size and sha256 and then renames it. Tests, export and render never download. -
Tests skip without the files: a file that is missing or differs from the pinned checksum counts as absent, and the test is skipped with the state and the fetch command in the reason.
-
The lean model in the repository carries the sources: each value in the models names the vendor body, region or drawing it comes from, so the models stay usable without the vendor files.
Alternatives considered
-
Git LFS: Rejected, because it would still redistribute files without a licence and needs extra setup on every clone.
-
Lean model only, no vendor comparison: Rejected, because the comparison is what catches a wrong dimension in the lean model.
Consequences
-
Good: A fresh clone runs
uv run cm3d testwithout network and without vendor files. -
Good: A file that is edited, truncated or re-uploaded upstream shows as
mismatchinstead of silently changing the reference geometry. -
Bad: The comparison tests only run after
uv run cm3d vendor fetch. -
Note: The GitHub URLs point to fixed commits, so a moved or deleted upstream file fails the fetch and has to be re-pinned by hand.
-
Note: The Mini Scales drawing can change on M5Stack’s server at the same URL. The checksum then fails the fetch and the file shows as
mismatch.