Skip to content

Handle SchemaVocabularyError with file paths during indexing#791

Merged
jviotti merged 1 commit intomainfrom
vocabulary-handlers
Mar 27, 2026
Merged

Handle SchemaVocabularyError with file paths during indexing#791
jviotti merged 1 commit intomainfrom
vocabulary-handlers

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Mar 27, 2026

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

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

@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 1 file

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 27, 2026

🤖 Augment PR Summary

Summary: Improves indexing error reporting by attaching schema file paths to SchemaVocabularyError failures.
Changes: Wraps SchemaVocabularyError in execute_plan() with FileError and prints vocabulary URI + file path in main() when this error occurs.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@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. 1 suggestion posted.

Fix All in Augment

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

std::cerr << "error: " << error.what() << "\n";
return EXIT_FAILURE;
} catch (
const sourcemeta::core::FileError<sourcemeta::core::SchemaVocabularyError>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

main() only handles FileError<SchemaVocabularyError> here; if a plain SchemaVocabularyError escapes without an entry (e.g., execute_plan() rethrows when action.data is empty), it will fall through to the generic std::exception handler and be reported as an "unexpected error" without the vocabulary URI/path context.

Severity: medium

Fix This in Augment

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

Copy link
Copy Markdown
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: 4a30cdb Previous: 27a390b Ratio
Add one schema (0 existing) 20 ms 19 ms 1.05
Add one schema (100 existing) 26 ms 26 ms 1
Add one schema (1000 existing) 78 ms 77 ms 1.01
Add one schema (10000 existing) 676 ms 660 ms 1.02
Update one schema (1 existing) 18 ms 20 ms 0.90
Update one schema (101 existing) 26 ms 27 ms 0.96
Update one schema (1001 existing) 80 ms 79 ms 1.01
Update one schema (10001 existing) 687 ms 667 ms 1.03
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) 274 ms 265 ms 1.03
Index 100 schemas 149 ms 163 ms 0.91
Index 1000 schemas 1156 ms 1166 ms 0.99
Index 10000 schemas 14288 ms 14141 ms 1.01

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

Copy link
Copy Markdown
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: 4a30cdb Previous: 27a390b Ratio
Add one schema (0 existing) 23 ms 24 ms 0.96
Add one schema (100 existing) 27 ms 27 ms 1
Add one schema (1000 existing) 78 ms 79 ms 0.99
Add one schema (10000 existing) 636 ms 648 ms 0.98
Update one schema (1 existing) 22 ms 20 ms 1.10
Update one schema (101 existing) 27 ms 26 ms 1.04
Update one schema (1001 existing) 81 ms 79 ms 1.03
Update one schema (10001 existing) 658 ms 652 ms 1.01
Cached rebuild (1 existing) 12 ms 11 ms 1.09
Cached rebuild (101 existing) 14 ms 13 ms 1.08
Cached rebuild (1001 existing) 36 ms 35 ms 1.03
Cached rebuild (10001 existing) 270 ms 270 ms 1
Index 100 schemas 124 ms 118 ms 1.05
Index 1000 schemas 1064 ms 1015 ms 1.05
Index 10000 schemas 13670 ms 13204 ms 1.04

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

@jviotti jviotti merged commit 8279528 into main Mar 27, 2026
6 checks passed
@jviotti jviotti deleted the vocabulary-handlers branch March 27, 2026 13: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.

1 participant