fix(engine): match dot-prefixed dirs in ctx.glob() and ADR file scopes#223
Merged
Conversation
#222) `Bun.Glob.scan({ dot: false })` silently dropped dot-prefixed path segments (`.github/`, `.husky/`, `.vscode/`) — even when the pattern explicitly named the directory. This turned rules targeting `.github/workflows/*.yml` into no-ops on Windows while still working on Linux CI, because Bun's glob behavior differs across platforms. Change `dot: false` → `dot: true` in three call sites: - `ctx.glob()` in src/engine/runner.ts - `ctx.grepFiles()` in src/engine/runner.ts - `resolveScopedFiles()` in src/engine/git-files.ts The git-tracked-files filter in `resolveScopedFiles` already excludes gitignored files, so `dot: true` does not surface unwanted entries. Closes #222
Deploying archgate-cli with
|
| Latest commit: |
dcc1467
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7904d2ea.archgate-cli.pages.dev |
| Branch Preview URL: | https://claude-heuristic-villani-20e.archgate-cli.pages.dev |
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.
Summary
Fixes #222 —
ctx.glob()in.rules.tsfiles and ADRfiles:scope resolution silently dropped dot-prefixed directories (.github/,.husky/,.vscode/) on Windows.Bun.Glob.scan({ dot: false })skips path segments starting with., even when the pattern explicitly names the directory. Behavior also differs across platforms — Windows reliably drops the match while Linux may still match, so rules appeared to "work in CI" but no-op'd on local Windows runs.dot: false→dot: truein three call sites:ctx.glob()insrc/engine/runner.tsctx.grepFiles()insrc/engine/runner.tsresolveScopedFiles()insrc/engine/git-files.tsresolveScopedFilesalready excludes gitignored files, sodot: truedoes not surface unwanted entries.Test plan
glob matches dot-prefixed directories— creates.github/workflows/{release,ci}.yml, asserts exact,*, and**glob patterns all matchgrepFiles matches dot-prefixed directories— verifiesctx.grepFiles()finds content inside.github/workflows/*.ymlresolves dot-prefixed paths— verifiesresolveScopedFiles()includes.github/workflows/*.ymlin ADR scoped filesbun run validatepasses (668 tests, 22/22 ADR rules, build compiles)