Skip to content

Fix some validation edge cases due to over optimisations in validate --fast#785

Merged
jviotti merged 1 commit into
mainfrom
new-blaze-fix
Jun 20, 2026
Merged

Fix some validation edge cases due to over optimisations in validate --fast#785
jviotti merged 1 commit into
mainfrom
new-blaze-fix

Conversation

@jviotti

@jviotti jviotti commented Jun 20, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

… --fast`

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 7 files

Re-trigger cubic

@augmentcode

augmentcode Bot commented Jun 20, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR updates the vendored Blaze dependency and fixes validation edge-cases introduced by aggressive validate --fast optimizations, primarily around Draft 3 object-closure and disallow handling.

Changes:

  • Bumps the Blaze vendor revision and adjusts the Draft 3 canonical meta-schema to better model `extends` and `type`-union nodes.
  • Adds a new alter-schema canonicalizer rule, DisallowDoubleNegation, to collapse nested single-element disallow chains (double negation) when it’s safe with respect to references.
  • Fixes a fast-mode compiler lifetime issue by ensuring concatenated schema pointers outlive the temporary SchemaContext that references them.
  • Introduces properties_enforce_closed_object and refines the additionalProperties: false fast-path so closure is not incorrectly skipped for the “single required property” case.
  • Tightens post-processing so “property type assertion” conversions only happen when the instance-location path consists solely of object-property tokens (avoids misclassification for array-index paths).

Technical Notes: The intent is to preserve correctness while keeping the fast validator’s closure-elision optimizations when they are provably redundant.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

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

}

if (inner.is_object()) {
schema.merge(inner.as_object());

@augmentcode augmentcode Bot Jun 20, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

vendor/blaze/src/alterschema/canonicalizer/disallow_double_negation.h:68schema.merge(inner.as_object()) will overwrite any existing wrapper-node members with the inner schema’s members; if the wrapper carries location-affecting keywords (e.g., id), collapsing the negation chain could unintentionally change reference resolution/identifiers.

Severity: medium

Fix This in Augment

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

@jviotti jviotti merged commit 022932f into main Jun 20, 2026
15 checks passed
@jviotti jviotti deleted the new-blaze-fix branch June 20, 2026 00:45
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.

1 participant