Repository navigation
dotbot/cli: refuse fw build --as into a set built from another folder - #340
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #340 +/- ##
==========================================
+ Coverage 88.17% 88.21% +0.04%
==========================================
Files 227 227
Lines 36028 36179 +151
Branches 2323 2323
==========================================
+ Hits 31769 31917 +148
- Misses 4255 4258 +3
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
HIL on the bench (2026-10-15), five DotBot v3 on swarm A001, all on bootloader/netcore Swarm-side bootloader read (
Compatible app passes. Mismatched app is refused before anything is sent:
One wording nit: "was built for another bootloader than these robots run (NSC table e7cf414f0f65)" reads as if the robots' table were |
8d60841 to
73b1538
Compare
AI-assisted: Claude Opus 5.5
73b1538 to
14f38f0
Compare
dotbot fw build --as <set>collects images into a named set in the cache, and nothing stopped a second build into that set from a different source folder (another worktree, say). The set then mixes images from two checkouts that can disagree with each other, for example on the swarmit NSC veneer table a sandboxed app is linked against, and nothing in the set says so.The build manifest now records the source folder of every image. A build into a set whose recorded folder differs from the one being built is refused, naming the set's folder and the ways out:
--path <that folder>, or another--as.--forcebuilds into it anyway, and the set then names the new folder. The "Building ..." line now also says which folder it builds from and whether that came from--pathor the configured source.Split out: the NSC interface check. An earlier version of this PR also hashed the NSC table each image was linked against into the manifest and refused a
dotbot swarm flashonto robots whose bootloader exports another table. That part is dropped from here. The NSC table is swarmit's interface, and swarmit has its own flash paths (theswarmit flashCLI, the local and HTTP clients, the dashboard webserver) that a PyDotBot-only guard would not cover. The check moves to swarmit, ideally with the bootloader reporting its NSC id in device info and the app image carrying the id it was linked against.dotbot/cli/fw.pydotbot/tests/test_fw_sources.pydotbot/cli/_fw_sources.pyIndependent of the open LH2 calibration PRs; branched from
mainat #332 and merges cleanly onto currentmain.Validation: unit tests only, not run against robots for this version.
test_fw_sources.py,test_fw.pyandtest_swarm_flash.pypass (164 passed). The full suite gives 1727 passed, 2 failed; both failures (test_camera_service.py::test_a_registration_without_controls_warns_about_nothing,test_controller.py::test_controller_dotbot_simulator) fail identically on the base commit and are unrelated. What is left here is host-side only (fw buildand its manifest), so a bench run would add little beyond onefw build --asfrom two folders to read the refusal.