Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Jan 28, 2026

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode
Copy link

augmentcode bot commented Jan 28, 2026

🤖 Augment PR Summary

Summary: Bumps vendored sourcemeta/core to 6db6600� and adapts schema transformation rules to a new reframing contract.

Key changes: Updates DEPENDENCIES core SHA; adds reframe_after_transform type trait to mapper and alterschema rules.

Transformer behavior: SchemaTransformer now stores (rule, mutates, reframe) metadata and conditionally re-analyzes the schema frame after each transform.

Looping logic: The main apply loop only restarts when references were rewritten or when a rule requests reframing.

Compatibility: Enforces presence of mutates and reframe_after_transform via static_assert when registering rules.

Intent: Allows rules that don’t require full reframing to avoid extra frame analysis work.

🤖 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.

/// MyRule() : sourcemeta::core::SchemaTransformRule("my_rule") {};
///
/// using mutates = std::true_type;
/// using reframe_after_transform = std::true_type;
Copy link

Choose a reason for hiding this comment

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

This doc example now mentions reframe_after_transform, but the transform override shown later in the snippet doesn’t match the actual virtual signature (transform(JSON&, const Result&)). Consider updating the example so it compiles for readers.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


analyse_frame(frame, schema, walker, resolver, default_dialect,
default_id);
if (reframe_after_transform) {
Copy link

Choose a reason for hiding this comment

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

When reframe_after_transform is false, apply() still uses frame.traverse()/frame.vocabularies() after rule->transform() without rebuilding the frame. Please double-check that all rules opting out can’t invalidate SchemaFrame’s cached state (e.g., by changing subschema structure, resource boundaries, or dialect/vocabulary info), otherwise this can lead to stale frame reads.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@jviotti jviotti merged commit 7e33ab4 into main Jan 28, 2026
13 checks passed
@jviotti jviotti deleted the core-reframe-linter branch January 28, 2026 18:00
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