Skip to content

Fixes IsReparsePoint fail-open and PopoverMenu.DefaultKey binding collision (release v2.4.17 blockers)#5583

Merged
tig merged 1 commit into
developfrom
fix/release-ci-and-cr-feedback
Jul 7, 2026
Merged

Fixes IsReparsePoint fail-open and PopoverMenu.DefaultKey binding collision (release v2.4.17 blockers)#5583
tig merged 1 commit into
developfrom
fix/release-ci-and-cr-feedback

Conversation

@tig

@tig tig commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the two blockers on release PR #5582:

1. Codex CR feedback — IsReparsePoint must fail closed

When reading Attributes throws, FileSystemTreeBuilder.IsReparsePoint returned false, 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/GetChildren and FileDialog.SearchState do not traverse it. The existing unreadable-attributes tests (CanExpand → false, GetChildren → empty) still hold.

2. CI failure — FileDialog ctor crash: "A binding for Ctrl+P exists"

Parallel Unit Tests (windows-latest) failed in AllViews_HasFocus_Changed_Event(SaveDialog) because FileDialog's ctor did _tableView.KeyBindings.Add (PopoverMenu.DefaultKey, Command.Context) while PopoverMenu.DefaultKey read Ctrl+P — a key TableView already binds to Command.Up (emacs-style nav).

Root cause: MecDottedKeyTests.ApplyToStaticFacades_BindsFlatDottedKeyTypedProperty temporarily swaps the process-wide PopoverMenuSettings.Defaults (to assert "PopoverMenu.DefaultKey": "Ctrl+P" binds), and its [Collection ("StaticSettingsTests")] had no CollectionDefinition — 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.DefaultKey to any already-bound key made every FileDialog (and CharMap) throw at construction.

Fixes:

  • FileDialog/CharMap bind the context-menu key with KeyBindings.ReplaceCommands instead of Add — the user's configured key wins instead of crashing.
  • Added [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 existing Logging Tests / Environment Variable Tests collections).

Tests

  • IsReparsePoint_WhenAttributesUnreadable_FailsClosed
  • FileDialog_Ctor_DoesNotThrow_WhenDefaultKeyCollidesWithTableViewBinding
  • CharMap_Ctor_DoesNotThrow_WhenDefaultKeyCollidesWithExistingBinding

Full UnitTestsParallelizable suite (17,547) and integration FileDialogTests (42) pass locally.

After this merges to develop, #5582 should be closed and Prepare Release (stable) re-run.

🤖 Generated with Claude Code

…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>
@tig tig merged commit 6d9f096 into develop Jul 7, 2026
14 checks passed
@tig tig deleted the fix/release-ci-and-cr-feedback branch July 7, 2026 03:27
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