Skip to content

Windows: sessions under vanished directories never match --cwd filter #66

Description

@Drix10

What happened?

On Windows, txcript list --cwd . hides sessions whose recorded cwd no longer exists. under_dir canonicalizes both sides and compares with
starts_with, but canonicalize prepends \\?\ only when the path still exists: a live dir becomes \\?\C:\... while a deleted session_cwd stays
C:\..., so the prefix check always fails. Forward-slash spellings (C:/...) and case differences (c:\users vs C:\Users) fail the same way on a
case-insensitive filesystem.

Expected: under_dir strips the verbatim-device prefix and compares case-insensitively on Windows, so vanished directories compare as plain components.

How to reproduce

On Windows, from a repo checkout with a session recorded under it, delete (or rename) the session's directory, then run txcript list --cwd . — the
session is missing.

Verified with scratch tests on unpatched main (both fail): a live tempdir paired with a nonexistent child path, and a mixed-case drive-letter path
(c:\Some\Repo\... vs C:\some\repo). Both pass with the fix; the PR adds them as permanent tests.

Versions

  • txcript: 0.14.4
  • Agents and their versions: n/a (CLI filtering)
  • Operating system: Windows

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions