Fixes IsReparsePoint fail-open and PopoverMenu.DefaultKey binding collision (release v2.4.17 blockers)#5583
Merged
Merged
Conversation
…lision Two fixes flagged on release PR #5582: 1. Codex CR feedback: FileSystemTreeBuilder.IsReparsePoint returned false when reading Attributes throws, so an unreadable symlink/junction was treated as safe to traverse — recreating the directory-cycle risk the guard exists to prevent. Now fails closed (treats unreadable status as a reparse point), so CanExpand/GetChildren and FileDialog.SearchState do not traverse it. 2. CI failure (Parallel Unit Tests, windows): FileDialog's ctor crashed with "A binding for Ctrl+P exists" when PopoverMenu.DefaultKey read Ctrl+P — a key TableView already binds to Command.Up. Root cause was MecDottedKeyTests mutating the process-wide PopoverMenuSettings.Defaults while running in parallel with view-constructing tests; but the crash is also reachable by real users who configure PopoverMenu.DefaultKey to an already-bound key. - FileDialog/CharMap now use KeyBindings.ReplaceCommands instead of Add for the context-menu key (the user's configured key wins). - The "StaticSettingsTests" xUnit collection now has a CollectionDefinition with DisableParallelization = true, so the five Mec* test classes that swap static settings facades no longer race the rest of the suite. Tests: fail-closed IsReparsePoint regression test; FileDialog/CharMap ctor no-throw tests under a colliding DefaultKey. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 7, 2026
Closed
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
Fixes the two blockers on release PR #5582:
1. Codex CR feedback —
IsReparsePointmust fail closedWhen reading
Attributesthrows,FileSystemTreeBuilder.IsReparsePointreturnedfalse, so an unreadable symlink/junction was treated as safe to traverse — recreating the directory-cycle risk the guard exists to prevent. It now fails closed: unreadable reparse status → treated as a reparse point →CanExpand/GetChildrenandFileDialog.SearchStatedo not traverse it. The existing unreadable-attributes tests (CanExpand→ false,GetChildren→ empty) still hold.2. CI failure —
FileDialogctor crash: "A binding for Ctrl+P exists"Parallel Unit Tests (windows-latest)failed inAllViews_HasFocus_Changed_Event(SaveDialog)becauseFileDialog's ctor did_tableView.KeyBindings.Add (PopoverMenu.DefaultKey, Command.Context)whilePopoverMenu.DefaultKeyread Ctrl+P — a keyTableViewalready binds toCommand.Up(emacs-style nav).Root cause:
MecDottedKeyTests.ApplyToStaticFacades_BindsFlatDottedKeyTypedPropertytemporarily swaps the process-widePopoverMenuSettings.Defaults(to assert"PopoverMenu.DefaultKey": "Ctrl+P"binds), and its[Collection ("StaticSettingsTests")]had noCollectionDefinition— so it serialized only against its sibling Mec* classes and still raced every other test in the suite.The crash is also reachable by real users: configuring
PopoverMenu.DefaultKeyto any already-bound key made everyFileDialog(andCharMap) throw at construction.Fixes:
FileDialog/CharMapbind the context-menu key withKeyBindings.ReplaceCommandsinstead ofAdd— the user's configured key wins instead of crashing.[CollectionDefinition ("StaticSettingsTests", DisableParallelization = true)]so the five Mec* test classes that swap static settings facades no longer run in parallel with the rest of the suite (same pattern as the existingLogging Tests/Environment Variable Testscollections).Tests
IsReparsePoint_WhenAttributesUnreadable_FailsClosedFileDialog_Ctor_DoesNotThrow_WhenDefaultKeyCollidesWithTableViewBindingCharMap_Ctor_DoesNotThrow_WhenDefaultKeyCollidesWithExistingBindingFull
UnitTestsParallelizablesuite (17,547) and integrationFileDialogTests(42) pass locally.After this merges to
develop, #5582 should be closed and Prepare Release (stable) re-run.🤖 Generated with Claude Code