fix(activity): preserve Windows paths across casing - #545
Open
sylvesterkaczmarek wants to merge 2 commits into
Open
fix(activity): preserve Windows paths across casing#545sylvesterkaczmarek wants to merge 2 commits into
sylvesterkaczmarek wants to merge 2 commits into
Conversation
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
Preserve live and saved scan activity paths when Windows repository/path casing differs.
Fixes #544.
Reproduction / evidence
Current upstream
mainat37bf87a692fc72d41f7312cc48808d699d204fbanormalizes Windows separators but compares the concrete repository prefix with case-sensitivestartsWith().For example:
The path denotes the same ordinary Windows repository location, but current
mainreturnspaths: [].The same prefix logic is used for saved-session tool calls and absolute paths embedded in shell commands.
Root cause
Path separators were normalized independently of path-comparison semantics. Windows drive and UNC roots therefore passed through POSIX-style case-sensitive prefix matching.
Fix
$CODEX_SECURITY_REPOSITORYplaceholder matching case-sensitive;The logic is based on the repository path shape rather than
process.platform, so saved/synthetic Windows events remain correct when rendered on another host.Tests / validation
Added
scan-activity-windows-case.test.tscovering:The branch is based directly on current upstream
mainat37bf87a692fc72d41f7312cc48808d699d204fbaand is not behind it.Full repository tests cannot be run in this execution environment because the repository cannot be cloned here. Pushed-head CI remains the authoritative full-suite validation.
Risk
Low. The behavior changes only for Windows-shaped absolute repository prefixes. Relative display casing is preserved and POSIX semantics are unchanged.