Conversation
Author
|
👋 |
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.
Problem
PR #70 added a hard timeout around HomeKit characteristic reads, but the resulting success/failure value is discarded before
get_accessoryis serialized.When
HMCharacteristic.readValuetimes out or returns an error,HMCharacteristic.valuecan still contain its previous value. The socket then returns that last-known value insidesuccess: true, and neither the CLI nor the stdio MCP server can tell whether it was observed by the current request.Changes
get_accessorywire contract:refreshedread_attemptedandread_succeededcountsread.succeededread.observed_atfor successful reads onlygetfail nonzero for failed, missing, malformed, or internally inconsistent freshness metadata.getpath.--no-refresh/no_refresh: true.lib/*changes cannot be skipped by an incomplete mtime check.Example successful metadata:
{ "refreshed": true, "read_attempted": 1, "read_succeeded": 1, "services": [ { "characteristics": [ { "read": { "succeeded": true, "observed_at": "2026-09-10T14:00:00.125Z" } } ] } ] }A failed read emits
succeeded: falsewithout an observation timestamp and makes the request-levelrefreshedvalue false.Scope
This PR attests the request-oriented
get_accessorypath. Bulk cache-warming policy is intentionally unchanged and can be hardened independently without coupling this wire fix to cache-generation semantics.Verification
swift test— 187 tests passednpm ci— 0 vulnerabilitiesnpm run test:mcp— 3 tests passednpm run build:mcp— passedHomeClawbuild — passed with Xcode 26.6node --check) — passedThe automated Catalyst build is intentionally unsigned, matching this repository's CI. The freshness behavior uses deterministic payload tests rather than timing-based sleeps.