Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 3, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@augmentcode
Copy link

augmentcode bot commented Feb 3, 2026

🤖 Augment PR Summary

Summary: This PR bumps the vendored sourcemeta/core dependency and updates JSON BinPack to the new Core APIs.

Changes:

  • Updated the Core pinned revision in DEPENDENCIES to fe450b98….
  • Adjusted schema-transformer callbacks to match Core’s updated callback signature.
  • Reworked JSON Pointer hashing to better combine multi-word property hashes.
  • Optimized SchemaFrame analysis by switching several caches from std::map to std::unordered_map and caching the standalone() result.
  • Improved reachability analysis for dynamic anchors by indexing dynamic anchor locations by fragment.
  • Changed the JSON Schema wrap() API to accept a pre-analysed SchemaFrame + Location and to return additional “base” pointer information.
Technical Notes: The Core upgrade changes callback semantics (mutability/applied flag) and relies more heavily on WeakPointer hashing behavior.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

assert(false);
const sourcemeta::core::SchemaTransformRule::Result &,
const bool applied) -> void {
assert(applied);
Copy link

Choose a reason for hiding this comment

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

SchemaTransformer::apply() can still call the callback for the final non-mutating rules pass (with the boolean argument set to false), so assert(applied) could trip in debug builds even though this is meant to be a no-op callback.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

-> std::size_t {
#if defined(__SIZEOF_INT128__)
const auto *parts =
reinterpret_cast<const std::uint64_t *>(&hash.a); // NOLINT
Copy link

Choose a reason for hiding this comment

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

This reinterpret_cast<const std::uint64_t *>(&hash.a) reads a __uint128_t through a uint64_t*, which can violate strict-aliasing/alignment and is undefined behavior under optimization. Since this feeds WeakPointer hashing for unordered_* containers, any UB here can cause very hard-to-debug misbehavior.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 3898774 into main Feb 3, 2026
13 checks passed
@jviotti jviotti deleted the core-fe branch February 3, 2026 13:30
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.

2 participants