Skip to content

Add indexing tests on schemas / collection id duplication#828

Merged
jviotti merged 1 commit intomainfrom
duplicate-id-tests
Apr 16, 2026
Merged

Add indexing tests on schemas / collection id duplication#828
jviotti merged 1 commit intomainfrom
duplicate-id-tests

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Apr 16, 2026

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

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

augmentcode bot commented Apr 16, 2026

🤖 Augment PR Summary

Summary: This PR expands the CLI indexing test suite to cover cases where schema routing would otherwise hit duplicated path segments.

Changes:

  • Registers three new one index CLI tests in test/cli/CMakeLists.txt when ONE_INDEX is enabled.
  • Adds a test where a schema filename matches the collection key (foo/foo.json under collection foo).
  • Adds a test where a schema $id path begins with the collection key (collection bar, $id ending in /bar/test).
  • Adds a test where an on-disk subdirectory repeats the collection key (baz/baz/test.json under collection baz).
  • Each test validates the exact generated output layout by comparing a sorted find manifest against an expected manifest.

Technical Notes: These tests help prevent regressions where collection IDs and schema-derived paths collide or are mishandled during index generation.

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

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

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

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: ab907f0 Previous: 2b5a294 Ratio
Add one schema (0 existing) 22 ms 19 ms 1.16
Add one schema (100 existing) 23 ms 24 ms 0.96
Add one schema (1000 existing) 75 ms 73 ms 1.03
Add one schema (10000 existing) 882 ms 630 ms 1.40
Update one schema (1 existing) 16 ms 16 ms 1
Update one schema (101 existing) 23 ms 23 ms 1
Update one schema (1001 existing) 80 ms 75 ms 1.07
Update one schema (10001 existing) 914 ms 635 ms 1.44
Cached rebuild (1 existing) 9 ms 9 ms 1
Cached rebuild (101 existing) 11 ms 11 ms 1
Cached rebuild (1001 existing) 31 ms 31 ms 1
Cached rebuild (10001 existing) 260 ms 243 ms 1.07
Index 100 schemas 133 ms 105 ms 1.27
Index 1000 schemas 951 ms 989 ms 0.96
Index 10000 schemas 12954 ms 13133 ms 0.99

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: ab907f0 Previous: 2b5a294 Ratio
Add one schema (0 existing) 19 ms 20 ms 0.95
Add one schema (100 existing) 25 ms 24 ms 1.04
Add one schema (1000 existing) 74 ms 75 ms 0.99
Add one schema (10000 existing) 853 ms 855 ms 1.00
Update one schema (1 existing) 18 ms 19 ms 0.95
Update one schema (101 existing) 25 ms 24 ms 1.04
Update one schema (1001 existing) 76 ms 75 ms 1.01
Update one schema (10001 existing) 840 ms 809 ms 1.04
Cached rebuild (1 existing) 10 ms 10 ms 1
Cached rebuild (101 existing) 13 ms 12 ms 1.08
Cached rebuild (1001 existing) 32 ms 33 ms 0.97
Cached rebuild (10001 existing) 321 ms 296 ms 1.08
Index 100 schemas 112 ms 114 ms 0.98
Index 1000 schemas 1005 ms 1107 ms 0.91
Index 10000 schemas 13080 ms 13140 ms 1.00

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

@jviotti jviotti merged commit d82ae1c into main Apr 16, 2026
6 checks passed
@jviotti jviotti deleted the duplicate-id-tests branch April 16, 2026 01:02
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