Skip to content

Automatically ignore configuration files in collection paths#779

Merged
jviotti merged 6 commits intomainfrom
ignore-configs
Mar 25, 2026
Merged

Automatically ignore configuration files in collection paths#779
jviotti merged 6 commits intomainfrom
ignore-configs

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Mar 25, 2026

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

jviotti added 2 commits March 25, 2026 14:32
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
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: a0472d1 Previous: 947760f Ratio
Add one schema (0 existing) 21 ms 21 ms 1
Add one schema (100 existing) 26 ms 29 ms 0.90
Add one schema (1000 existing) 88 ms 74 ms 1.19
Add one schema (10000 existing) 725 ms 622 ms 1.17
Update one schema (1 existing) 18 ms 18 ms 1
Update one schema (101 existing) 33 ms 25 ms 1.32
Update one schema (1001 existing) 90 ms 76 ms 1.18
Update one schema (10001 existing) 746 ms 643 ms 1.16
Cached rebuild (1 existing) 11 ms 10 ms 1.10
Cached rebuild (101 existing) 13 ms 12 ms 1.08
Cached rebuild (1001 existing) 38 ms 27 ms 1.41
Cached rebuild (10001 existing) 298 ms 194 ms 1.54
Index 100 schemas 125 ms 147 ms 0.85
Index 1000 schemas 1013 ms 1175 ms 0.86
Index 10000 schemas 14105 ms 14868 ms 0.95

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: a0472d1 Previous: 947760f Ratio
Add one schema (0 existing) 22 ms 22 ms 1
Add one schema (100 existing) 28 ms 27 ms 1.04
Add one schema (1000 existing) 83 ms 75 ms 1.11
Add one schema (10000 existing) 697 ms 793 ms 0.88
Update one schema (1 existing) 22 ms 21 ms 1.05
Update one schema (101 existing) 28 ms 26 ms 1.08
Update one schema (1001 existing) 88 ms 77 ms 1.14
Update one schema (10001 existing) 668 ms 608 ms 1.10
Cached rebuild (1 existing) 12 ms 12 ms 1
Cached rebuild (101 existing) 14 ms 13 ms 1.08
Cached rebuild (1001 existing) 36 ms 28 ms 1.29
Cached rebuild (10001 existing) 276 ms 198 ms 1.39
Index 100 schemas 143 ms 124 ms 1.15
Index 1000 schemas 1014 ms 1048 ms 0.97
Index 10000 schemas 14656 ms 14118 ms 1.04

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review March 25, 2026 19:03
@augmentcode
Copy link

augmentcode bot commented Mar 25, 2026

🤖 Augment PR Summary

Summary: This PR prevents JSON/YAML configuration files from being mistakenly treated as schemas when a collection path points at (or includes) the configuration directory.

Changes:

  • Extended Configuration::read with an overload that collects all configuration-related file paths (root config + extends/include chain).
  • Tracked referenced configuration files during dereferencing and returned the parsed configuration as before.
  • Updated the indexer to pass a set to Configuration::read and skip those files during recursive collection scanning.
  • Added CLI tests to ensure collection paths like "." and "" no longer fail due to self-detection.
  • Added a regression test ensuring extended/included config JSON files are skipped while real schema files are still indexed.

Technical Notes: Uses std::filesystem::weakly_canonical(...).native() strings for path identity across the read + index phases.

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

Fix All in Augment

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

}

if (configuration_files.contains(
std::filesystem::weakly_canonical(entry.path()).native())) {
Copy link

Choose a reason for hiding this comment

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

std::filesystem::weakly_canonical(entry.path()) can throw (e.g., permission issues or odd filesystem states) and abort the whole indexing run; consider using an error_code overload or otherwise handling failures so a single problematic file doesn’t stop directory scanning.

Severity: medium

Fix This in Augment

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

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

jviotti added 3 commits March 25, 2026 15:07
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 1275841 into main Mar 25, 2026
6 checks passed
@jviotti jviotti deleted the ignore-configs branch March 25, 2026 19:33
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