Skip to content

Reject meta-schemas with unknown required vocabularies even if not used#782

Draft
jviotti wants to merge 1 commit intomainfrom
required-vocabulary-blaze
Draft

Reject meta-schemas with unknown required vocabularies even if not used#782
jviotti wants to merge 1 commit intomainfrom
required-vocabulary-blaze

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Mar 25, 2026

Signed-off-by: Juan Cruz Viotti [email protected]

Copy link

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

Choose a reason for hiding this comment

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

No issues found across 3 files

@augmentcode
Copy link

augmentcode bot commented Mar 25, 2026

🤖 Augment PR Summary

Summary: Improves how the CLI reports Blaze compilation failures caused by schemas requiring unsupported vocabularies.

Changes:

  • Pass the build-time Resolver into Blaze template generation so custom metaschemas/vocabularies can be resolved during analysis/compile.
  • Catch SchemaVocabularyError during plan execution and rethrow as FileError<SchemaVocabularyError> when a schema entry is known, attaching the originating file path.
  • Extend top-level error handling to print the offending vocabulary URI (and schema path when available).
  • Add a CLI regression test covering a custom metaschema that requires an unknown vocabulary.

🤖 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. No suggestions at this time.

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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark Index (community)

Details
Benchmark suite Current: a3b200d Previous: 27a390b Ratio
Add one schema (0 existing) 19 ms 19 ms 1
Add one schema (100 existing) 25 ms 26 ms 0.96
Add one schema (1000 existing) 77 ms 77 ms 1
Add one schema (10000 existing) 660 ms 660 ms 1
Update one schema (1 existing) 18 ms 20 ms 0.90
Update one schema (101 existing) 25 ms 27 ms 0.93
Update one schema (1001 existing) 79 ms 79 ms 1
Update one schema (10001 existing) 683 ms 667 ms 1.02
Cached rebuild (1 existing) 10 ms 10 ms 1
Cached rebuild (101 existing) 12 ms 12 ms 1
Cached rebuild (1001 existing) 34 ms 33 ms 1.03
Cached rebuild (10001 existing) 269 ms 265 ms 1.02
Index 100 schemas 126 ms 163 ms 0.77
Index 1000 schemas 1079 ms 1166 ms 0.93
Index 10000 schemas 13841 ms 14141 ms 0.98

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark Index (enterprise)

Details
Benchmark suite Current: a3b200d Previous: 27a390b Ratio
Add one schema (0 existing) 22 ms 24 ms 0.92
Add one schema (100 existing) 29 ms 27 ms 1.07
Add one schema (1000 existing) 89 ms 79 ms 1.13
Add one schema (10000 existing) 753 ms 648 ms 1.16
Update one schema (1 existing) 20 ms 20 ms 1
Update one schema (101 existing) 28 ms 26 ms 1.08
Update one schema (1001 existing) 91 ms 79 ms 1.15
Update one schema (10001 existing) 752 ms 652 ms 1.15
Cached rebuild (1 existing) 12 ms 11 ms 1.09
Cached rebuild (101 existing) 14 ms 13 ms 1.08
Cached rebuild (1001 existing) 40 ms 35 ms 1.14
Cached rebuild (10001 existing) 315 ms 270 ms 1.17
Index 100 schemas 123 ms 118 ms 1.04
Index 1000 schemas 1009 ms 1015 ms 0.99
Index 10000 schemas 14505 ms 13204 ms 1.10

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti jviotti force-pushed the required-vocabulary-blaze branch 3 times, most recently from 49519f9 to d960e71 Compare March 25, 2026 20:56
@jviotti jviotti marked this pull request as draft March 25, 2026 21:01
@jviotti jviotti force-pushed the required-vocabulary-blaze branch 3 times, most recently from 1ac1100 to 43aac1c Compare March 26, 2026 19:53
@jviotti jviotti changed the title Better catch Blaze unsupported required vocabulary errors Reject meta-schemas with unknown required vocabularies even if not used Mar 26, 2026
@jviotti jviotti force-pushed the required-vocabulary-blaze branch 2 times, most recently from f84a688 to cc1bf4c Compare March 26, 2026 20:36
@jviotti jviotti force-pushed the required-vocabulary-blaze branch from cc1bf4c to a3b200d Compare March 26, 2026 20:40
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