Skip to content

Fuzz the indexer CLI and fix circular identifier/dialect URIs crash#773

Merged
jviotti merged 3 commits intomainfrom
consolidate-errors
Mar 25, 2026
Merged

Fuzz the indexer CLI and fix circular identifier/dialect URIs crash#773
jviotti merged 3 commits intomainfrom
consolidate-errors

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Mar 24, 2026

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

@jviotti jviotti force-pushed the consolidate-errors branch 4 times, most recently from 550a5af to 6971d85 Compare March 25, 2026 15:06
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the consolidate-errors branch from 6971d85 to 94c4624 Compare March 25, 2026 15:26
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the consolidate-errors branch from 94c4624 to 11aa1f4 Compare March 25, 2026 15:28
@jviotti jviotti changed the title [WIP] Fuzz the indexer CLI Fuzz the indexer CLI Mar 25, 2026
@jviotti jviotti marked this pull request as ready for review March 25, 2026 15:29
@augmentcode
Copy link

augmentcode bot commented Mar 25, 2026

🤖 Augment PR Summary

Summary: This PR hardens the schema resolver against circular metaschema resolution and significantly expands the negative/"fuzz" test coverage for the one index CLI.

Changes:

  • Added a re-entrancy/cycle guard in Resolver::operator() to prevent infinite recursion when metaschema chains are circular.
  • Implemented per-thread tracking of “currently resolving” schema identifiers and early-return of nullopt on cycles.
  • Renamed many index CLI failure tests to a consistent fail-* naming scheme and updated test/cli/CMakeLists.txt accordingly.
  • Added new CLI failure tests for circular configuration extends/include scenarios and include-chain cycles.
  • Added new failure tests for invalid configuration JSON, invalid schema JSON/YAML, and non-schema inputs (arrays/booleans/empty objects).
  • Added coverage for schema dialect/id type errors, unknown dialects, and metaschema self/cycle scenarios.
  • Added option parsing/validation failure tests (missing values, non-numeric numeric options, invalid limits).

Technical Notes: Many new tests stabilize output via --concurrency 1 and thread-info stripping to make stderr comparisons deterministic.

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

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 51 files

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
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: c74f43a Previous: dba66cf Ratio
Add one schema (0 existing) 21 ms 22 ms 0.95
Add one schema (100 existing) 26 ms 27 ms 0.96
Add one schema (1000 existing) 79 ms 77 ms 1.03
Add one schema (10000 existing) 672 ms 650 ms 1.03
Update one schema (1 existing) 19 ms 19 ms 1
Update one schema (101 existing) 26 ms 27 ms 0.96
Update one schema (1001 existing) 79 ms 79 ms 1
Update one schema (10001 existing) 669 ms 644 ms 1.04
Cached rebuild (1 existing) 11 ms 11 ms 1
Cached rebuild (101 existing) 12 ms 12 ms 1
Cached rebuild (1001 existing) 29 ms 28 ms 1.04
Cached rebuild (10001 existing) 206 ms 199 ms 1.04
Index 100 schemas 153 ms 120 ms 1.27
Index 1000 schemas 1148 ms 999 ms 1.15
Index 10000 schemas 13711 ms 13794 ms 0.99

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: c74f43a Previous: dba66cf Ratio
Add one schema (0 existing) 23 ms 21 ms 1.10
Add one schema (100 existing) 26 ms 25 ms 1.04
Add one schema (1000 existing) 76 ms 67 ms 1.13
Add one schema (10000 existing) 649 ms 540 ms 1.20
Update one schema (1 existing) 21 ms 20 ms 1.05
Update one schema (101 existing) 26 ms 25 ms 1.04
Update one schema (1001 existing) 80 ms 69 ms 1.16
Update one schema (10001 existing) 609 ms 681 ms 0.89
Cached rebuild (1 existing) 11 ms 11 ms 1
Cached rebuild (101 existing) 13 ms 12 ms 1.08
Cached rebuild (1001 existing) 29 ms 26 ms 1.12
Cached rebuild (10001 existing) 198 ms 178 ms 1.11
Index 100 schemas 120 ms 118 ms 1.02
Index 1000 schemas 1101 ms 982 ms 1.12
Index 10000 schemas 14639 ms 13247 ms 1.11

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

@jviotti jviotti changed the title Fuzz the indexer CLI Fuzz the indexer CLI and fix circular identifier/dialect URIs crash Mar 25, 2026
@jviotti jviotti merged commit a52e00f into main Mar 25, 2026
6 checks passed
@jviotti jviotti deleted the consolidate-errors branch March 25, 2026 15:56
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