Skip to content

[bug] operands with a .. component fail across fs applets (stat/touch/fmt family) — split from #1869 #1872

Done

Description

@caomengxuan666

[bug] operands containing a .. component fail across fs applets (stat/touch/fmt family) — pre-existing wide face split from #1869

Split from #1869 after its fix (PR #1871, shipped in v1.2.3) was verified on a real Windows host (devin-windows, Windows Server 2022). The bare-drive-root face #1871 targeted is fixed and verified; the verification matrix exposed a wider, older face that the baseline shapes happened to include:

Shapes (v1.2.3 release binaries, real host)

  • stat .. from an ordinary directory (resolves to a normal dir, not a drive root): Invalid argument. Same for a mid-path component: stat C:\l4probe\..\l4probe.
  • touch shows the same pattern as stat.
  • fmt/fold/paste: .. operands fail Permission denied; explicit-root operands fail No such file or directory. (Their . / C:\. forms now match the CTRL reference — that part of the fs_win api_path mangles drive-root paths (C:\. -> \?\C:), shared by stat/rm/touch/du/find and more #1869 baseline is green.)
  • . components are fine everywhere tested; find, pathchk, du, ls, rm, tee are green on the full matrix.

Provenance: A/B against v1.2.2 release binaries shows the identical .. failures — this face predates #1871 and is not a regression from it; #1871's improvement is directly visible in the same A/B (. at root was red in 1.2.2, green in 1.2.3). Bench artifacts excluded: the shapes reproduce under PowerShell with no shell conversion layer.

Where to look: #1871's unit pins test imp::api_path directly; the applet layer evidently has a ..-handling path the pins do not cover (verbatim/lexical handling of .. components before or beside api_path). Localize per applet family (fs-meta vs text) — if the mechanism is shared, fix it once at the shared layer; the matrix above is the acceptance set.

Activity

  1. caomengxuan666 commented on Nov 25, 2026

    @caomengxuan666
    MemberAuthor

    Closed by #1873 (merged 3940c003), captain-verified above: dot-segment collapse now lives in api_path itself, the fmt family's directory routing uses the shared attribute-based predicate, the fail-first pins went 9/9 red → 9/9 green on a real Windows host, and the full shape matrix from this issue re-ran green with no regression on the #1869 faces.

  2. added a commit that references this issue on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions