Skip to content

chore: bump WebARKitLib submodule for matcher STL determinism fix#586

Merged
kalwalt merged 7 commits into
devfrom
copilot/investigate-validate-matcher-determinism-fix
Jun 4, 2026
Merged

chore: bump WebARKitLib submodule for matcher STL determinism fix#586
kalwalt merged 7 commits into
devfrom
copilot/investigate-validate-matcher-determinism-fix

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Three std::unordered_map typedefs in FreakMatcher produce implementation-defined iteration order, causing the matcher to resolve borderline ties differently across libstdc++, MSVC STL, and Emscripten/libc++. This was caught via cross-platform divergence in WebARKitLib-rs (WebARKitLib#39).

Bumps the WebARKitLib submodule from 656436e678535f (fix/matcher-stl-determinism), which converts:

  • hash_t in hough_similarity_voting.h — vote tally consumed by getMaximumNumberOfVotes; tied bins now resolve via ascending key order
  • keyframe_map_t in visual_database.hquery() first-wins tie-breaking is now platform-independent
  • cluster_map_t in binary_hierarchical_clustering.h — BHC tree topology no longer varies across STL implementations

All three are unordered_mapmap. N is small for each, so the O(log N) vs O(1) tradeoff is negligible.

Existing Karma tests (8/8) and Node.js NFT smoke test (pinball marker tracking) pass against the current pre-built WASM artifacts. A full Emscripten rebuild is required to produce WASM that includes the determinism fix at runtime.

Updates the WebARKitLib submodule from 656436e to 678535f, which
includes the fix from WebARKitLib#39: three std::unordered_map
typedefs in FreakMatcher converted to std::map for deterministic
iteration order across platforms.

Changed typedefs:
- hash_t in hough_similarity_voting.h (vote tally)
- keyframe_map_t in visual_database.h (keyframe collection)
- cluster_map_t in binary_hierarchical_clustering.h (BHC clusters)

This ensures the matcher produces consistent results across
libstdc++, MSVC STL, and Emscripten/libc++ builds.
Copilot AI changed the title [WIP] Investigate matcher determinism fix from WebARKitLib#39 against jsartoolkitNFT chore: bump WebARKitLib submodule for matcher STL determinism fix Jun 2, 2026
Copilot AI requested a review from kalwalt June 2, 2026 20:13
@kalwalt kalwalt changed the base branch from master to dev June 3, 2026 11:33
@kalwalt kalwalt force-pushed the copilot/investigate-validate-matcher-determinism-fix branch from cf01dcf to 30e4b6e Compare June 3, 2026 13:40
@kalwalt kalwalt marked this pull request as ready for review June 3, 2026 13:55

@kalwalt kalwalt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok to be merged.

@kalwalt kalwalt merged commit 48b10f0 into dev Jun 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

investigate: validate matcher determinism fix from WebARKitLib#39 against jsartoolkitNFT (build + dual-mode parity)

2 participants