feat(shell): add --exec flag; fix broken firmware-ping just recipe#62
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restores just firmware-ping as an end-to-end hardware smoke test by adding a non-interactive --exec <COMMAND> mode to telepath-shell, and documents when contributors should run that hardware check to catch FW/host wire-format skew.
Changes:
- Add
--exec <COMMAND>totelepath-shellto run a single discovered command and exit. - Update
just firmware-pingto use--exec pingand assert the0xDEADBEEFsentinel. - Document in
AGENTS.mdwhenjust firmware-pingshould be run on PRs that may affect the wire interface.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/telepath-shell/src/main.rs | Adds --exec CLI flag and non-interactive dispatch path. |
| Justfile | Fixes firmware-ping recipe to run ping via --exec and assert expected output. |
| AGENTS.md | Documents when hardware smoke testing via just firmware-ping is expected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
`just firmware-ping` was invoking `cargo run -- ping` which fails immediately because `ping` was removed as a CLI subcommand in #51 (the shell became a discovery-driven REPL). This PR fixes that by adding `--exec <COMMAND>` to telepath-shell for non-interactive single-command execution, and rewiring firmware-ping to use it with a sentinel grep so wire-format skew fails loudly. AGENTS.md is updated to prompt the developer to run `just firmware-ping` on PRs touching wire / macros / server / client / shell / nrf52840-ping. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…firmware-ping - --exec changed from Option<String> to Vec<String> with num_args=1.. so multi-token commands like --exec add 1 2 no longer require shell quoting. - --exec help [CMD] now routes through print_help / print_command_help matching REPL behaviour; empty commands bail with a clear error message. - firmware-ping recipe replaces the fixed /tmp path with a single pipeline tee /dev/stderr | grep -qF — no on-disk state remains after the run. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
tarotene
force-pushed
the
feat/shell-exec-and-firmware-ping-fix
branch
from
May 24, 2026 07:41
69e23eb to
7ee4a67
Compare
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.
Summary
just firmware-pingwas callingcargo run -- pingwhich fails immediately —pingwas removed as a CLI subcommand in feat(shell): discovery-driven REPL + RTT ch0 log redirection #51 when the shell became a discovery-driven REPL. Nobody noticed because the recipe was never used by CI.--exec <COMMAND>flag totelepath-shellfor non-interactive single-command execution, enabling scripting fromjust.firmware-pingto use--exec pingwith agrep -qF "ping -> 0xDEADBEEF"assertion so wire-format skew between FW and host now fails loudly.AGENTS.mdto document thatjust firmware-pingSHOULD be run on PRs touching wire / macros / server / client / shell / nrf52840-ping, sincejust cicannot detect this class of breakage without hardware.Test plan
just firmware-pingagainst connected nRF52840-DK — passes, outputsping -> 0xDEADBEEFcargo run -- --helpshows--exec <COMMAND>in the options listcargo run(no args) still opens the interactive REPL as beforecargo build+cargo clippy -- -D warnings+cargo fmt -- --checkall green🤖 Generated with Claude Code