You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test bundled protocol schema through the production loader - #2772
The protocol smoke test only checks WhoopProtocolInfo.schemaResourceURL, an accessor with no runtime callers. A URL can exist while the schema's dynamic-field decoders are disconnected from parseFrame.
Remove that unused accessor and test the real loadSchema startup path instead. The smoke test checks the bundled packet roster, resolves every packet through the dispatch index, and verifies that every declared post-hook is registered. This catches missing hook registration or a schema hook typo before fields silently disappear.
The removed API is specific to SwiftPM resource packaging and has no Kotlin twin. Runtime schema loading, decoding, wire bytes and schema data are unchanged.
Type of change
Refactor / cleanup
CI / tooling (regression tests)
How it was tested
Full Linux WhoopProtocol suite with noop-dev run-brief -- swift test --jobs 1: 816 tests, one skipped, zero failures.
Private isolated package mutation removing post-hook registration: clean compile succeeded, then the new smoke test failed all seven missing-hook assertions. No mutation is committed.
Guarded parity snapshot refresh passed (289 known findings); the diff removes one file, one function and one test-only finding without changing shared pair sets or dispositions. Core Tools: 153 tests passed. Source-comment hygiene, diff-scoped i18n and whitespace checks passed.
Native CI at unchanged head 86fcb79ef0e96ba4deeebed4531d3f58d91703d6: all 17 expected checks passed, with a stable complete roster confirmed twice.
Swift Packages CI: all eight package and three tool jobs passed. Native WhoopProtocol ran 816 tests, one skipped, zero failures; SmokeTests.testBundledSchemaLoadsAndWiresEveryPacketDecoder explicitly passed. Backfill has no test target and remains build-only.
Apple CI: universal macOS Strand build and iOS NOOPiOS build passed; macOS StrandTests ran 2,279 tests, two skipped, zero failures. iOS is compile-only; its test step was skipped by workflow design.
Parity Governance CI: 160 tests passed. Tools CI: 234 capture, 50 repository acceptance, 2 R-R preservation and 153 core tests passed. Hygiene and i18n also passed.
No warnings naming the changed test or removed source file in native protocol/macOS/iOS logs. Apple merge-current-main steps were skipped, so validation covers the actual PR head rather than a hypothetical merge with later main.
No strap/radio hardware test performed. No BLE commands, connection state or live transport behavior changes.
Checklist
Changed Swift package suite passes
Native package/app checks verified at PR head
No warnings naming changed files in native build logs
No UI styling or protocol literals added
Conventions followed; SwiftPM-only removal has no Kotlin counterpart
No generated build output, identifiers, private notes or secrets committed
Reviewed and verified locally. Green at 86fcb79, 17/17.
WhoopProtocolInfo had exactly one reference anywhere in the tree, the assertion this PR replaces, so the removal is clean and the Packages/WhoopProtocol test-only-callsite count going 30 to 29 matches it.
The new assertion is a genuine upgrade rather than a reshuffle. registerPostHooks() is called from inside loadSchema() at Schema.swift:230, so walking schema.packets and requiring postHooks[packet.post] to resolve exercises the registration side that a resource URL could never see. I checked the expected set against the shipped whoop_protocol.json: the seven packet names match exactly, and every packet carries a post hook, so the XCTUnwrap(packet.post) line pins something real rather than passing vacuously.
The alias loop is a no-op today since no packet declares aliases, but it costs nothing and is ready for the first one that does.
Ledger counts line up with a single unpaired Swift function leaving scope: files 510 to 509, functions 4538 to 4537, unpaired_files 370 to 369, unpaired_functions 4099 to 4098.
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
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.
What this PR does
The protocol smoke test only checks
WhoopProtocolInfo.schemaResourceURL, an accessor with no runtime callers. A URL can exist while the schema's dynamic-field decoders are disconnected fromparseFrame.Remove that unused accessor and test the real
loadSchemastartup path instead. The smoke test checks the bundled packet roster, resolves every packet through the dispatch index, and verifies that every declared post-hook is registered. This catches missing hook registration or a schema hook typo before fields silently disappear.The removed API is specific to SwiftPM resource packaging and has no Kotlin twin. Runtime schema loading, decoding, wire bytes and schema data are unchanged.
Type of change
How it was tested
WhoopProtocolsuite withnoop-dev run-brief -- swift test --jobs 1: 816 tests, one skipped, zero failures.86fcb79ef0e96ba4deeebed4531d3f58d91703d6: all 17 expected checks passed, with a stable complete roster confirmed twice.SmokeTests.testBundledSchemaLoadsAndWiresEveryPacketDecoderexplicitly passed. Backfill has no test target and remains build-only.StrandTestsran 2,279 tests, two skipped, zero failures. iOS is compile-only; its test step was skipped by workflow design.Checklist
Related issues
Refs #2708