Skip to content

test(core): add hires_wheel to the inventory equality test helper#417

Merged
AprilNEA merged 1 commit into
masterfrom
fix/capabilities-test-helper
Jul 18, 2026
Merged

test(core): add hires_wheel to the inventory equality test helper#417
AprilNEA merged 1 commit into
masterfrom
fix/capabilities-test-helper

Conversation

@AprilNEA

Copy link
Copy Markdown
Owner

Summary

Master's test build is broken: cargo test fails to compile openlogi-core with missing field hires_wheel in initializer of Capabilities.

#287 was branched before the wheel-resolution work (feat(gui): expose wheel resolution setting) added hires_wheel to Capabilities. The two never conflicted textually, so #287 stayed mergeable and its branch CI was green — but squash-merging its stale diff onto the newer master left the inventory() test helper it added missing the new field, a semantic merge break that neither branch CI nor the mergeability check catches.

Changes

  • openlogi-core: add hires_wheel: false to the Capabilities literal in the inventory() test helper.

Testing

  • cargo test -p openlogi-core — 94 passed (was: compile error).

Un-breaks the default branch.

#287 was branched before the wheel-resolution work added `hires_wheel` to
`Capabilities`; squash-merging its stale diff onto the newer master left the
`inventory()` test helper missing that field, breaking `cargo test`'s build.
Add the field so the test tree compiles again.
@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a semantic merge break on master where the inventory() test helper in openlogi-core was missing the hires_wheel field after an unrelated PR added it to Capabilities. The change is a one-line addition of hires_wheel: false to the struct literal, restoring compilation.

  • crates/openlogi-core/src/device.rs: Adds hires_wheel: false to the Capabilities initializer inside the inventory() test helper, matching the field added by the wheel-resolution feature work.

Confidence Score: 5/5

Safe to merge — restores compilation with a single boolean field addition to a test helper; no production code is touched.

The change adds one field to a struct literal inside a #[cfg(test)] helper. The value false accurately reflects the absence of HiRes wheel capability on the fixture device, and the Capabilities struct definition confirms hires_wheel: bool is the correct type. There is no logic change and no production path is affected.

No files require special attention.

Important Files Changed

Filename Overview
crates/openlogi-core/src/device.rs Adds hires_wheel: false to the Capabilities struct literal in the inventory() test helper, fixing a compile error introduced by a semantic merge conflict; change is correct and minimal.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["feat: add hires_wheel to Capabilities struct\n(#[serde(default)] pub hires_wheel: bool)"] --> B["PR #287 branched before this change"]
    B --> C["PR #287 merged onto updated master\n(squash merge)"]
    C --> D["inventory() test helper missing hires_wheel\n→ compile error on master"]
    D --> E["This PR: add hires_wheel: false\nto Capabilities literal in inventory()"]
    E --> F["cargo test -p openlogi-core\n✅ 94 passed"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["feat: add hires_wheel to Capabilities struct\n(#[serde(default)] pub hires_wheel: bool)"] --> B["PR #287 branched before this change"]
    B --> C["PR #287 merged onto updated master\n(squash merge)"]
    C --> D["inventory() test helper missing hires_wheel\n→ compile error on master"]
    D --> E["This PR: add hires_wheel: false\nto Capabilities literal in inventory()"]
    E --> F["cargo test -p openlogi-core\n✅ 94 passed"]
Loading

Reviews (1): Last reviewed commit: "test(core): add hires_wheel to the inven..." | Re-trigger Greptile

@AprilNEA
AprilNEA merged commit 8548abe into master Jul 18, 2026
12 checks passed
@AprilNEA
AprilNEA deleted the fix/capabilities-test-helper branch July 18, 2026 14:14
This was referenced Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant