fix(agent): queue HID requests before response timeout - #936
Open
sh3ll3x3c wants to merge 3 commits into
Open
Conversation
Greptile SummaryThis PR serializes agent-owned HID++ operations per physical transport so queued requests receive their full response timeout while preserving wheel-mode reconciliation on every configuration reload.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/openlogi-agent-core/src/hardware.rs | Adds transport-aware request serialization and moves queue waits outside each HID transaction's response timeout. |
| crates/openlogi-agent-core/src/orchestrator.rs | Owns the shared I/O gates and continues reconciling configured wheel mode on every reload. |
| crates/openlogi-agent-core/src/hook_runtime.rs | Threads the shared transport gates through SmartShift and DPI action dispatch. |
| crates/openlogi-agent/src/main.rs | Supplies the runtime's shared transport gates when constructing the action dispatcher. |
| crates/openlogi-agent/src/pairing.rs | Updates the pairing test runtime fixture for the new shared gate field. |
Sequence Diagram
sequenceDiagram
participant Reload as Config reload
participant Wheel as Wheel reconciliation
participant Gate as Transport turnstile
participant Smart as SmartShift write
participant HID as HID transport
Reload->>Wheel: Reapply configured wheel mode
Wheel->>Gate: Wait for transport turn
Smart->>Gate: Wait for same transport turn
Gate->>HID: Run one transaction
HID-->>Gate: Complete or timeout
Gate->>HID: Run next transaction with full timeout budget
Reviews (3): Last reviewed commit: "fix(agent): queue HID requests before re..." | Re-trigger Greptile
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
Queue agent-owned HID++ requests per physical transport before starting their device-response timeout. A slow background wheel reconciliation can now finish without consuming the queued SmartShift write or confirmation read's five-second budget, while the reconciliation itself remains intact for recovery from earlier failures.
Changes
Testing
RUSTFLAGS='-D warnings' cargo test -p openlogi-agent-core -p openlogi-agent --lockedcargo xtask ci rustfmt clippy rustdocNot runtime-tested on hardware. To verify, repeatedly change SmartShift mode and sensitivity on a Bluetooth-direct mouse while a config reload also reconciles native wheel settings; each write should confirm without entering the retry state.
Fixes #780