You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface walker-pruned subtrees and add walker filter test coverage
Walker-level path-filter prunes were previously silent: pathFilterIntercept
short-circuits before any strategy reaches the directory, and there was no
log trail explaining why a project the user expected didn't appear in the
analyze summary. The post-summary note even pointed at `fossa list-targets`
as a workaround, which deliberately ignores all filters.
Wire `Has Logger sig m` through `walkWithFilters'` and `pathFilterIntercept`
so the walker can speak. Per-prune log lines fire at debug level (one per
strategy, ~28 strategies = noisy at info). Add `enumeratePrunedSubtrees`,
a one-shot pre-discovery walk that returns the list of subtrees the filter
will reject; analyze invokes it once before strategies run and logs each
pruned path at info level. Result for a `.fossa.yml` with
`paths.exclude: ["**/zip/**"]`:
Active exclude glob filters: **/zip/**
Skipping path "zip/" (excluded by paths filter)
The Has Logger ripple touches every strategy that uses walkWithFilters'
(~32 single-line constraint sites, ~7 multi-line). Each carrier already
provides Logger via DiscoverTaskEffs, so the change is purely a constraint
propagation — no new effects, no runtime cost.
Add three Walker spec tests (test/Discovery/WalkSpec.hs):
- include-path filter: mirror of the existing exclude test, asserts the
walker accepts ancestors + included subtree and prunes siblings.
- WalkSkipSome merge: strategy returns WalkSkipSome ["a"], filter
excludes "b", both should be pruned. Catches the
`pathFilterIntercept`/`skipDisallowed` merge logic.
- YAML-to-walker end-to-end: parses a YAML config string with a glob
exclude, runs it through `collectConfigFileFilters`, executes the
walker, asserts pruning. Catches "globs parse but never reach the
walker" wiring regressions — the exact class of bug we hit earlier.
Cannot exercise the new tests locally because the test binary's startup
reads test/Container/testdata/emptypath.tar (a git-LFS pointer not
materialized in this environment); CI's Linux/macOS/Windows jobs will
validate. Library and test-binary builds pass with no warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Changelog.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
3
3
## 3.17.4
4
4
5
-
- Config: `paths.only` and `paths.exclude` in `.fossa.yml` now accept glob patterns (e.g. `**/vendor/**`, `node_modules/*`). Entries containing `*`, `?`, or `[` are parsed as globs; other entries keep their existing directory-tree semantics. ([#1703](https://github.com/fossas/fossa-cli/pull/1703))
5
+
- Config: `paths.only` and `paths.exclude` in `.fossa.yml` now accept glob patterns (e.g. `**/vendor/**`, `node_modules/*`). An entry is treated as a glob if it contains `*`; other entries keep their existing directory-tree semantics. Glob matching follows [`System.FilePattern`](https://hackage.haskell.org/package/filepattern) semantics: `*` matches any sequence of characters within a single path segment, and `**` matches any number of segments. Patterns use forward slashes; backslashes are normalized so Windows-native patterns also work. ([#1703](https://github.com/fossas/fossa-cli/pull/1703))
6
+
- Analyze: At startup, `fossa analyze` now prints (a) the active `paths.only`/`paths.exclude` filters from `.fossa.yml` and (b) the directories the walker will prune as a result. Each pruned subtree is reported once at info level so users can correlate a missing project with a configured filter. Per-prune trace logging during discovery is at debug level and visible with `--debug`. ([#1703](https://github.com/fossas/fossa-cli/pull/1703))
0 commit comments