Pass SmartShift parameters as a typed struct at the next PROTOCOL_VERSION bump
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 675
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
`Agent::set_smartshift(route, mode: SmartShiftMode, auto_disengage: u8, tunable_torque: u8)` threads three loose values through five layers, where `0` is a magic "do not change" sentinel documented only at the bottom (`write/smartshift.rs`). The right encoding already exists — hidpp's `SmartShiftEnhancedStatusChange` uses `Option`.
Fold the trio into a Change/Params struct end to end. The tarpc method signature is append-only wire format, so this must ride the next `PROTOCOL_VERSION` bump (regenerate the `wire_format.rs` goldens) rather than ship alone.
Surfaced by the standards audit behind #381.
Contributor guide
No contributing guide indexed for this repository
Research direction
Trace Agent::set_smartshift and the three values through the five layers, starting with write/smartshift.rs and the existing hidpp::SmartShiftEnhancedStatusChange encoding. Review the tarpc method signature and wire_format.rs goldens before the next PROTOCOL_VERSION bump. Done means the values travel as a typed Change/Params struct, the wire-format goldens are regenerated, and the sentinel semantics are preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100