Bump kanata engine: report-set sync + stamped telemetry (MAL-57 Layer 3); fix engine cache hash#898
Conversation
Code Review — PR #898Overall: Clean, well-scoped PR. Two targeted fixes with no extraneous changes. Approachable. OverviewTwo changes:
What's Good
Issues / Suggestions1. Missing alternative C++ file extensions (minor) The fix covers
If # Quick audit of what's actually in the crate:
find External/kanata -path "*/c_src/*" | grep -v target | sortConsider widening slightly: find . \( -name "*.rs" -o -name "*.toml" -o -name "*.lock" \
-o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" \
-o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" \) \2. Build scripts excluded from hash (pre-existing, worth noting)
3.
VerdictApprove with optional follow-up. The cache hash fix correctly closes the silent-stale-engine footgun for the known case (.cpp/.hpp in driverkit). Item 1 above is worth a quick check — if the c_src directory already uses only the covered extensions, this is ready to merge as-is. |
There was a problem hiding this comment.
💡 Codex Review
https://github.com/malpern/KeyPath/blob/0e794100c5df7c1a44faa39f78d54e24bf545cee/External/kanata/driverkit/c_src/driverkit.cpp#L37
Clear every report set before returning unready
When sink_ready is false, this now returns 2 after inserting the code into whichever per-page report set was selected. If the event is a press for a non-keyboard page (for example consumer/media, top-case, or generic-desktop) and the recovery loop releases input before the physical release is captured, that set is left dirty; release_input_only() only clears keyboard.keys, so the next successful report for that page can reassert the stale key indefinitely. Either avoid retaining dropped presses across recovery or clear all per-page report sets on the unready/release-input path.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… 3); fix engine cache hash Pulls malpern/kanata#28: a Release dropped while the VHID sink is unready no longer desyncs the C++ full-state report set (which could re-press a released key indefinitely on the next report), and every client connection event is now timestamped, including the previously silent heartbeat-deadline reconnect path. Also fixes Scripts/build-kanata.sh cache invalidation: the source hash only covered *.rs/*.toml/*.lock, so a C++-only change in the vendored driverkit crate served a stale cached engine. Include *.c/*.cpp/*.h/*.hpp. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0e79410 to
2fe33c4
Compare
Code Review — PR #898OverviewTwo targeted changes: a submodule bump pulling the MAL-57 Layer 3 fix into
|
Summary
Submodule bump pulling malpern/kanata#28 (closes the MAL-57 fix-layer plan; fixes kanata#27):
send_keyreturned unready before the per-page template mutated the full-state key set, so a dropped Release left a stale key that the next report re-pressed indefinitely. The readiness check now lives after the mutation: dropped events still update intent, only the post is skipped, and the next successful report converges.Also fixes a real build-system bug found while preparing this bump: the engine cache hash in
Scripts/build-kanata.shonly covered*.rs/*.toml/*.lock, so this C++-only change served a stale cached engine on first build. The hash now includes C/C++ sources.Fast-forward proof for the fork bump (
6a05a4a → 12b64a6): merge commit's first parent is the old tip;git merge-base --is-ancestorconfirms append-only.Test plan
cargo build+cargo testgreen (42 tests) on the fork branchbuild-kanata.sh: cache correctly invalidated, binary contains the Layer 3 telemetry marker, signs and smoke-testsvhid-client:lines in the daemon stdout log