Skip to content

dotbot/cli: carry the spin radius over into a site made by site init - #342

Open
geonnave wants to merge 1 commit into
DotBots:mainfrom
geonnave:site-init-spin-radius
Open

geonnave wants to merge 1 commit into
DotBots:mainfrom
geonnave:site-init-spin-radius

Conversation

@geonnave

@geonnave geonnave commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Based on main.

Problem

dotbot site init --from-calibration ID wrote a site pack without spin_radius_mm, even when the spins behind the calibration were measured on a floor with its own radius (a site with spin_radius_mm = 53.0). The next collect --spin in the new site then silently fell back to the robot model's 51.4 mm, a 3% scale error on every distance.

Change

The new site takes its radius from the calibration itself rather than from the site it was collected in: each [[track]] records the radius_mm it was solved with, which also covers a --spin-radius override and survives the source site being renamed or gone. The newest round's radius is used (the most common value in it), and the site pack gets spin_radius_mm = ... beside extent_mm. A calibration with no tracks writes no key.

Validation

Unit: test_site_init_carries_the_spin_radius_over collects in a site with spin_radius_mm = 53.0, runs site init, and reads 53.0 back from the new pack; it fails without the fix. test_calibration_spin.py and test_cli_site.py pass (79). Not run on hardware. Formatting (black) is deferred to the pass after review.

File + -
dotbot/tests/test_calibration_spin.py +15 -0
dotbot/calibration/conics.py +10 -0
dotbot/cli/site_cmd.py +6 -1
Total, 3 files +31 -1

@geonnave
geonnave force-pushed the site-init-spin-radius branch from d49e80f to 9a9216c Compare October 15, 2026 11:26
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.56%. Comparing base (7a76840) to head (3db2d61).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #342   +/-   ##
=======================================
  Coverage   88.56%   88.56%           
=======================================
  Files         230      230           
  Lines       37623    37632    +9     
  Branches     2367     2368    +1     
=======================================
+ Hits        33319    33328    +9     
  Misses       4300     4300           
  Partials        4        4           
Flag Coverage Δ
console 82.18% <ø> (ø)
python 91.44% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dotbot/cli/site_cmd.py 91.58% <ø> (ø)
dotbot/tests/test_calibration_spin.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@geonnave
geonnave force-pushed the site-init-spin-radius branch 5 times, most recently from ef1666e to 201a742 Compare October 16, 2026 14:07
@geonnave
geonnave force-pushed the site-init-spin-radius branch from 201a742 to 3db2d61 Compare October 16, 2026 14:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant