Commit Graph

1 Commits

  • path-uri: normalize parent segments in absolute joins (#29903)
    ## Why
    
    `PathUri::join` normalized `..` for relative paths, but its
    absolute-path branch rebuilt URIs through `url::PathSegmentsMut::push`,
    which skips dot segments. `/tmp/a/../b` therefore resolved to `/tmp/a/b`
    instead of `/tmp/b`.
    
    ## What changed
    
    Normalize absolute native path segments before constructing the file
    URI. Parent traversal now clamps at POSIX roots, Windows drive roots,
    and UNC share roots, including paths with repeated separators.
    
    Add platform-independent coverage for POSIX, drive, UNC, root-clamping,
    and repeated-separator cases.
    
    ## Manual validation
    
    - `just test -p codex-utils-path-uri`