Skip to content

Verify cross-platform claim in CI + fix filepath.Match on Windows#7

Merged
lex0c merged 1 commit intomainfrom
chore/cross-platform-ci
Apr 20, 2026
Merged

Verify cross-platform claim in CI + fix filepath.Match on Windows#7
lex0c merged 1 commit intomainfrom
chore/cross-platform-ci

Conversation

@lex0c
Copy link
Copy Markdown
Owner

@lex0c lex0c commented Apr 20, 2026

Two related changes that close the gap between "cross-compiles" and "actually works on Windows/macOS":

  1. CI now runs go vet + go test on ubuntu, macos, and windows runners via a matrix strategy. Release workflow has been publishing five OS/arch binaries, but CI only ever ran on ubuntu — any regression from filepath semantics, signal handling, or temp-file quirks would have surfaced in a user report, not a PR. Split into test (portable) and dogfood (linux-only, uses make + ./gitcortex) so the quality-gate steps don't need POSIX-tooling workarounds.

  2. ShouldIgnore used filepath.Match, which is OS-aware and uses the platform separator ("\" on Windows) for glob metacharacters. Paths from git arrive forward-slash on every OS, so a pattern like "src/generated/*.go" could silently fail to match "src/generated/types.go" on Windows. Swapped to path.Match (the URL/unix-style variant that always uses "/"). The parameter path was renamed to p to avoid shadowing the stdlib package name.

Test fixture gained two cases covering the multi-segment glob behavior that motivated the fix; all existing cases still pass.

Two related changes that close the gap between "cross-compiles" and
"actually works on Windows/macOS":

1. CI now runs go vet + go test on ubuntu, macos, and windows runners
   via a matrix strategy. Release workflow has been publishing five
   OS/arch binaries, but CI only ever ran on ubuntu — any regression
   from filepath semantics, signal handling, or temp-file quirks
   would have surfaced in a user report, not a PR. Split into `test`
   (portable) and `dogfood` (linux-only, uses make + ./gitcortex) so
   the quality-gate steps don't need POSIX-tooling workarounds.

2. ShouldIgnore used filepath.Match, which is OS-aware and uses the
   platform separator ("\\" on Windows) for glob metacharacters.
   Paths from git arrive forward-slash on every OS, so a pattern
   like "src/generated/*.go" could silently fail to match
   "src/generated/types.go" on Windows. Swapped to path.Match (the
   URL/unix-style variant that always uses "/"). The parameter `path`
   was renamed to `p` to avoid shadowing the stdlib package name.

Test fixture gained two cases covering the multi-segment glob
behavior that motivated the fix; all existing cases still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lex0c
Copy link
Copy Markdown
Owner Author

lex0c commented Apr 20, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lex0c lex0c merged commit 04e3ac2 into main Apr 20, 2026
4 checks passed
@lex0c lex0c deleted the chore/cross-platform-ci branch April 20, 2026 02:57
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