Limit how often the same command can repeat
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- embedded-iot
Research direction
Start with docs/commands.md and the CommandRequirements::check entry point named in the issue; trace how commands are admitted before frames are built. Decide the guard’s scope, where it lives, and how each command declares an interval, then add host tests and document the rule. Done means every implemented command declares its interval and repeated commands are rejected as described.
Written by the indexing model from the issue text.
Description
Part of the prerequisites for real commands (#75). Related: #73, #15.
Problem
Nothing stops the same command from reaching the car many times in a row. A stuck button, an app bug or a replayed message would send its frames to the bus again and again. #15 dedupes a redelivered message_id, but a stuck button sends a new message_id each time, so it doesn't help here.
Proposal
- A minimum interval between two runs of the same command, checked right after the command requirements (
CommandRequirements::check, seedocs/commands.md) and before any frame is built. - A command inside the interval gets a failed
CommandResponsewithCOMMAND_STATUS_CODE_REJECTED_UNAVAILABLEand a clear message, like any other rejection. Whether it is also reported unavailable until the interval has passed is to decide: it would grey the button out, but flickers after every press. - The interval is per command, set by each command's PR from how the car behaves (a door lock and a climate target temperature step don't need the same). Commands that are meant to be repeated quickly, such as stepping the target temperature, can use a short one or none.
To decide
- Per command, per phone (
source_device_id), or both? - Where the check lives: a small generic guard in
core-interfacenext to the requirements, with each vehicle passing its intervals. - What counts as a run: any admitted command, or only one that was sent to the bus.
Done when
There is a guard with host tests, the docs describe the rule, and each implemented command declares its interval.
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 15h 26m
- Merged PRs (30d)
- 22
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenCarControls/firmware
-
e-gmp enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
OpenCarControls/firmware#75 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
OpenCarControls/firmware#74 ·
Maintainers usually reply within 1 day
-
e-gmp enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
OpenCarControls/firmware#71 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
OpenCarControls/firmware#70 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 51/100
OpenCarControls/firmware#68 ·
Maintainers usually reply within 1 day
All issues in OpenCarControls/firmware
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
memory_patch_page drops the `#` of headings like `## Notes on C#`Possibly taken @viniciusdsandrade claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
akitaonrails/ai-memory#1859 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wealthfolio/wealthfolio#2376 ·
Maintainers usually reply within 1 day
-
kind/bug kind/security
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
spiceai/spiceai#15826 · 1 comment ·
Maintainers usually reply within 1 day
-
area:cli bug dotnet good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day