dotbot/cli: add --local-root to the device flash commands - #280
Merged
Conversation
AI-assisted: Claude Opus 5
AI-assisted: Claude Opus 5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #280 +/- ##
===========================================
+ Coverage 83.27% 83.50% +0.23%
===========================================
Files 119 121 +2
Lines 11120 11237 +117
Branches 570 570
===========================================
+ Hits 9260 9384 +124
+ Misses 1857 1850 -7
Partials 3 3
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
dotbot device flash-swarmit-sandboxandflash-mari-gatewaygain--local-root, and every-f localflash now prints where each image actually came from.Why
-f localreads~/.dotbot/artifacts/swarmit-local/, a directory of symlinks into a build tree. Two problems in practice:dotbot fw fetch -S swarmit -f local --local-root <path>run, possibly days earlier. Working out of a git worktree, the obvious command (flash-swarmit-sandbox -f local --local-root <worktree>) was rejected with "No such option".Changes
--local-rooton both role-flash commands, passed through toflash_role, which re-links before flashing. Same flag name asdotbot fw fetch, so this is the existing two-step collapsed into one. Rejected with a clear message when--fw-versionis notlocal, checked before the J-Link probe so it fails instantly.describe_image()resolves a symlinked image and appends the target plus its build timestamp:A dangling link reports
(BROKEN LINK)instead of the previous bare missing-file error.Not done
_link_local_assetsstill maps all four assets from one root and fails if any is missing, so pointing--local-rootat a tree that only builds the device images (no mari gateway) errors out. Linking per-role would fix that; it is a separate change.Test
pytest dotbot/tests/test_device.py dotbot/tests/test_cli_deployment_fetch.py- 49 pass. Fullpre-commit run --all-filesclean. Exercised against real hardware artifacts: provenance output verified on live symlinks, guard verified to reject--local-rootwithout-f local.