Repository navigation
duck-sim: make first-run setup and status failures actionable - #442
Open
Amidwestnoob wants to merge 2 commits into
Open
Amidwestnoob wants to merge 2 commits into
Amidwestnoob wants to merge 2 commits into
Conversation
Three setup failures a fresh checkout hits, each now named with its fix:
- An older rustc than the workspace's rust-version failed deep in the
dependency graph ("tof@0.17.8 requires rustc 1.89"). duck-sim now
checks rustc against rust-version before building and says how to
update.
- DUCK_SIM_RL defaulted to ~/Pollen/microduck_rl while the docs say to
clone the two repos side by side. A sibling ../microduck_rl is now
found on its own (~/Pollen stays the fallback), and the error names
both the sibling path and DUCK_SIM_RL.
- With the sim down, `status` printed a ConnectionRefusedError
traceback and exited 0, and `simlog` failed in tail. Both now say the
sim is not running and exit non-zero; simlog after `down` shows the
last lines of the old log instead of following it.
docs/robot/simulation.md gets a short before-the-first-run note.
Validate the active compiler before teardown, retain rustup diagnostics, and report failed health/body probes. Cover first-run discovery, compiler boundaries, log behavior and isolated shutdown with entry-point regressions. Assisted-by: GPT-6 Astra
This branch has not been deployed
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.
A fresh
scripts/duck-simrun can miss a siblingmicroduck_rlcheckout or fail deep in Cargo with an old compiler. With the simulator stopped,statuscould print a Python traceback and report success, whilesimlogeither failed intailor followed a stale log indefinitely.The script now uses a nonempty
DUCK_SIM_RLoverride, then the sibling checkout, then the historical home-directory fallback. It checks the active Rust compiler against the workspace MSRV before teardown, preserves toolchain errors, and explains how to select an updated compiler. Status preserves failed health/body probes; stopped logs return their last 50 lines and exit 1, while live logs still follow. The simulation guide documents these behaviors.Validation:
python3 scripts/tests/duck_sim_setup.py: 39 passing tests covering discovery precedence, paths with spaces, missing prerequisites, compiler versions/failures, live/stopped status and logs, and isolated shutdown. The same harness reports 23 assertion failures against the original base, including the stale-log hang.bash -n,sh -n,shellcheck --shell=sh scripts/duck-sim, and workspace formatting pass.DUCK_SIM_RL: stand,drive 0.30, status, live log follow, down, and post-down status/logs. The body moved 0.946 m in eight seconds, remained upright, and reported 50 Hz with zero missed ticks. All five simulator processes stopped.The existing 0.15 m/s drive default produced little displacement in a separate run; this change leaves that default unchanged. Container, camera, and hardware operation were not exercised.