fix(pipeline): Windows compat — nocase matching, CRLF normalization, SIGKILL#96
Merged
Merged
Conversation
…SIGKILL
- Add `nocase: process.platform === 'win32'` to all minimatch calls in
ProfileFilterStage, FileLoadingStage, and SecretsGuardStage (AlwaysIncludeStage
already had this; it served as the reference)
- Normalize CRLF and lone CR to LF in FileLoadingStage text reads and
fileLoader utility so output is deterministic across platforms
- Replace child.kill('SIGKILL') with child.kill() in GitleaksAdapter timeout
handler; no-arg kill sends SIGTERM on POSIX and calls TerminateProcess on
Windows — the documented cross-platform behaviour
- Add unit tests: ProfileFilterStage (nocase win32/linux), FileLoadingStage
(CRLF normalization + edge cases + nocase), SecretsGuardStage (nocase
win32/linux), GitleaksAdapter (updated kill assertion)
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
Addresses three independent Windows compatibility gaps identified in issue #87.
Closes #87
Changes Made
A) Case-insensitive pattern matching (
nocase)nocase: process.platform === 'win32'to allminimatchcalls inProfileFilterStage,FileLoadingStage, andSecretsGuardStageAlwaysIncludeStagealready had this option and served as the reference implementationREADME.MDnow correctly match patterns likeREADME.mdB) CRLF normalization
.replace(/\r\n/g, '\n').replace(/\r/g, '\n')after UTF-8 reads inFileLoadingStageandfileLoader.js\r\nor bare\r, matching git'score.autocrlfbehaviourC) Cross-platform process termination
child.kill('SIGKILL')withchild.kill()inGitleaksAdaptertimeout handlerkill()sendsSIGTERMon POSIX and callsTerminateProcesson Windows — the documented cross-platform behaviourTests
tests/unit/pipeline/stages/ProfileFilterStage.test.js— nocase win32/linux behaviourtests/unit/pipeline/stages/FileLoadingStage.test.js— CRLF normalization (7 cases) + nocasetests/unit/pipeline/stages/SecretsGuardStage.test.js— nocase exclusion win32/linuxtests/unit/services/GitleaksAdapter.test.js— kill assertion updated to no-arg