Skip to content

Vendor generated fixtures/notebooks; fix .github over-vendoring vs CI detection#9

Merged
nielsbosma merged 1 commit into
mainfrom
fix/vendor-patterns
Jun 23, 2026
Merged

Vendor generated fixtures/notebooks; fix .github over-vendoring vs CI detection#9
nielsbosma merged 1 commit into
mainfrom
fix/vendor-patterns

Conversation

@nielsbosma

Copy link
Copy Markdown
Contributor

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 made FileSystemScanner prune the whole directory during the walk, so .github/workflows/ files never reached InfraScanner — the GitHub 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 when IsVendored(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; no InfraScanner code change was needed.

Verified end-to-end with the CLI on a temp repo: infrastructure now reports GitHub Actions -> .github/workflows/ci.yml, YAML appears in languages (matching specfy's YAML: 1), .github/ISSUE_TEMPLATE is still in ignoredDirectories, and the .ipynb notebook is vendored.

Tests

dotnet test Ivy.StackAnalyzer.slnx -> Passed 95 / 95, 0 failed. No snapshot drift (no .received.yaml produced); no snapshot or test files needed updating (no existing fixture contains .github/workflows/ or the newly-vendored paths).

@nielsbosma
nielsbosma merged commit 1d2d91f into main Jun 23, 2026
1 check passed
@nielsbosma
nielsbosma deleted the fix/vendor-patterns branch June 23, 2026 15:34
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