Skip to content

Resolve custom linter rules through the collection they belong to - #1295

Merged
jviotti merged 1 commit into
mainfrom
fix-resolve-nested
Sep 30, 2026
Merged

jviotti merged 1 commit into
mainfrom
fix-resolve-nested

Conversation

@jviotti

@jviotti jviotti commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

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

Review in cubic

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

augmentcode Bot commented Sep 30, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR makes custom linter-rule resolution honor the collection that declares the rule.

Changes:

  • Adds a collection-aware Resolver::operator() overload.
  • Applies collection resolve mappings before normal resolver lookup.
  • Reuses that overload when determining a registered schema’s identity.
  • Uses it while compiling enterprise custom lint rules.
  • This lets a rule’s custom $schema dialect resolve through its collection mapping.
  • Preserves callback forwarding so dynamically resolved schema files remain tracked.
  • Adds community and enterprise CLI coverage for collection-mapped meta-schemas.
  • Adds enterprise coverage for a custom lint rule using a collection-mapped dialect.
  • Registers the new CLI tests in the relevant CMake test suites.
Technical Notes: The implementation routes only the initial identifier through the collection mapping, then delegates to the existing resolver pipeline for normalization, caching, and fallback behavior.

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

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

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

All reported issues were addressed across 7 files

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Benchmark (community)

Details
Benchmark suite Current: 49ca950 Previous: 598fa7d Ratio
Add one schema (0 existing) 251 ms 263 ms 0.95
Add one schema (100 existing) 41 ms 33 ms 1.24
Add one schema (1000 existing) 104 ms 205 ms 0.51
Add one schema (10000 existing) 770 ms 834 ms 0.92
Update one schema (1 existing) 33 ms 25 ms 1.32
Update one schema (101 existing) 42 ms 33 ms 1.27
Update one schema (1001 existing) 99 ms 88 ms 1.13
Update one schema (10001 existing) 800 ms 810 ms 0.99
Cached rebuild (1 existing) 13 ms 10 ms 1.30
Cached rebuild (101 existing) 14 ms 11 ms 1.27
Cached rebuild (1001 existing) 41 ms 40 ms 1.02
Cached rebuild (10001 existing) 307 ms 284 ms 1.08
Index 100 schemas 510 ms 552 ms 0.92
Index 1000 schemas 1494 ms 1262 ms 1.18
Index 10000 schemas 13888 ms 13222 ms 1.05
Index 10000 schemas (custom meta-schema) 15821 ms 15976 ms 0.99
Index 10000 schemas ($ref fan-out) 16642 ms 17615 ms 0.94
test/e2e/html: Schema Fetch (p50) 414 us 303 us 1.37
test/e2e/html: Schema Fetch (p99) 494 us 373 us 1.32

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Benchmark (enterprise)

Details
Benchmark suite Current: 49ca950 Previous: 598fa7d Ratio
Add one schema (0 existing) 229 ms 347 ms 0.66
Add one schema (100 existing) 117 ms 120 ms 0.97
Add one schema (1000 existing) 174 ms 178 ms 0.98
Add one schema (10000 existing) 762 ms 834 ms 0.91
Update one schema (1 existing) 80 ms 113 ms 0.71
Update one schema (101 existing) 144 ms 124 ms 1.16
Update one schema (1001 existing) 140 ms 181 ms 0.77
Update one schema (10001 existing) 1003 ms 885 ms 1.13
Cached rebuild (1 existing) 9 ms 13 ms 0.69
Cached rebuild (101 existing) 10 ms 18 ms 0.56
Cached rebuild (1001 existing) 27 ms 51 ms 0.53
Cached rebuild (10001 existing) 197 ms 330 ms 0.60
Index 100 schemas 565 ms 640 ms 0.88
Index 1000 schemas 1044 ms 1671 ms 0.62
Index 10000 schemas 11658 ms 14336 ms 0.81
Index 10000 schemas (custom meta-schema) 14584 ms 16443 ms 0.89
Index 10000 schemas ($ref fan-out) 20464 ms 18343 ms 1.12
enterprise/e2e/auth: Schema Anonymous (p50) 218 us 410 us 0.53
enterprise/e2e/auth: Schema Anonymous (p99) 291 us 518 us 0.56
enterprise/e2e/auth: Schema API Key Identity (p50) 224 us 413 us 0.54
enterprise/e2e/auth: Schema API Key Identity (p99) 297 us 542 us 0.55
enterprise/e2e/auth: Schema API Key SHA256 (p50) 230 us 420 us 0.55
enterprise/e2e/auth: Schema API Key SHA256 (p99) 316 us 532 us 0.59
enterprise/e2e/auth: Schema JWT (p50) 345 us 552 us 0.63
enterprise/e2e/auth: Schema JWT (p99) 460 us 707 us 0.65
test/e2e/html: Schema Fetch (p50) 243 us 418 us 0.58
test/e2e/html: Schema Fetch (p99) 313 us 523 us 0.60

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

@jviotti
jviotti merged commit 4093cda into main Sep 30, 2026
6 checks passed
@jviotti
jviotti deleted the fix-resolve-nested branch September 30, 2026 21:17
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