Skip to content

fix(config): match trigger globs with slash-native path.Match - #450

Merged
joshua-temple merged 1 commit into
mainfrom
fix/config-slash-native-glob
Jul 5, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/config-slash-native-glob

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The shared trigger-glob evaluator in internal/config/triggers.go used filepath.Match, whose path separator is OS-specific. On Windows the separator is a backslash, so / is treated as an ordinary character and * matches across /. A cascade CLI run on Windows would over-match trigger patterns and disagree with the GitHub Actions paths filter (evaluated on Linux) that is generated from the same pattern list.

Fix

Use path.Match, which always treats / as the separator regardless of OS, so * is bounded to a single path segment everywhere. Behavior on Linux and macOS is unchanged; this aligns Windows CLI change detection with the emitted filter.

Verification

go build ./..., go test ./... -race -count=1, and golangci-lint run ./... all clean locally. Added table cases that lock the slash-boundary semantics (single * does not cross /).

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit a6d6bd6 into main Jul 5, 2026
19 checks passed
@joshua-temple
joshua-temple deleted the fix/config-slash-native-glob branch July 5, 2026 01:13
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