Vendor generated fixtures/notebooks; fix .github over-vendoring vs CI detection#9
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements two reviewed suggestions (data-only changes in
data/vendor.yml).1. Vendor generated fixtures / notebooks (
vendor-add-generated-fixture-patterns.md)Large generated/recorded files were counted at full byte weight. Added vendor patterns:
(^|/).*\.ipynb$— Jupyter notebooks (type=markup, so the prose/data language filter does NOT drop them; this is the only thing that excludes their base64 output cells which inflate byte share ~1000x).(^|/)cassettes/and(^|/)[Tt]ests?/cassettes/— VCR.py / betamax recorded HTTP fixtures.(^|/)NOTICES\.txt$and(^|/)THIRD[-_]PARTY[-_ ]?NOTICES(\.[A-Za-z]+)?$— generated third-party notices.(^|/)memory-tests/and(^|/)perf-tests/— large generated test-session fixtures.2. Fix
.github/over-vendoring vs CI detection (github-dir-over-vendored-kills-ci-detection.md)Vendoring the entire
.github/tree madeFileSystemScannerprune the whole directory during the walk, so.github/workflows/files never reachedInfraScanner— theGitHub Actions(ci) signal could never fire for any repo, and the workflow YAML was dropped from language stats.Approach used: a refined Option A (data-only). The literal Option A from the suggestion (
(^|/)\.github/(?!workflows/)) does NOT work here, because the directory walker prunes a subdir whenIsVendored(rel + "/")matches — and.github/(empty after the slash) still satisfies a bare negative lookahead, so the whole tree would be pruned before.github/workflows/is ever reached. Instead used:- "(^|/)\.github/(?!workflows(/|$))."The trailing
.requires at least one char after.github/, so the bare.github/directory does NOT match (walker descends into it), while.github/workflows/and its files do NOT match either (visible to InfraScanner + counted in language stats), and everything else under.github/(issue templates, FUNDING, dependabot, docs) stays vendored. This is the data-only fix; noInfraScannercode change was needed.Verified end-to-end with the CLI on a temp repo:
infrastructurenow reportsGitHub Actions->.github/workflows/ci.yml,YAMLappears in languages (matching specfy'sYAML: 1),.github/ISSUE_TEMPLATEis still inignoredDirectories, and the.ipynbnotebook is vendored.Tests
dotnet test Ivy.StackAnalyzer.slnx-> Passed 95 / 95, 0 failed. No snapshot drift (no.received.yamlproduced); no snapshot or test files needed updating (no existing fixture contains.github/workflows/or the newly-vendored paths).