Skip to content

host tools: run path-layer tests on Windows and macOS runners #818

Done

Description

@scuttletoby

The per-OS path layer for host tools (PR #816) is tested on Linux CI only. Some of its safety depends on how Windows and macOS file systems really behave, which Linux cannot show. The tests for these are written and skip themselves off-platform (apps/server/src/hostTools/hostPath.test.ts, "Windows adapter" and "macOS adapter").

Please run them on a Windows and a macOS hosted runner (a small job, or a manual workflow run), and check:

Windows (NTFS)

  • Kelvin sign: does vault.Kdbx (K) open vault.kdbx? The layer must then refuse it or give a secretKey ending in vault.kdbx.
  • Volume junction: a junction to \\?\Volume{guid}\ (from mountvol C: /L) is reported by Node's lstat as a plain folder. The native realpath check must refuse a path through it.
  • subst drive: a path on a subst letter must be refused (the realpath check sees the real folder).

macOS (APFS)

  • Folding of ſ, ς, µ and ß: does APFS open .ssh for .ſſh or .ßh? Either way the layer must refuse it or give the folded secretKey.
  • Firmlinks: /System/Volumes/Data/<home> and /System/Volumes/Preboot/../Data/<home> give the same compareKey as <home>.
  • /.vol/... and /dev/fd/0 are refused.

Background: review lens A #816 (comment) (B1, B3, M1, M2) and lens B #816 (comment) (B2, M1). Both asked for this.

Done when: both runners run these two tests (not skipped) and pass, or the results show what the layer must change.

Activity

  1. scuttletoby commented on Nov 21, 2026

    @scuttletoby
    OwnerAuthor

    macOS half: done, all PASS (real APFS, case-insensitive volume; PR #816 head 77b017b).

    hostPath.test.ts: 19 passed, 1 skipped (the Windows adapter, as expected). The "macOS adapter" block really ran and passed.

    Checked by hand against the real layer, with throwaway files:

    • .ſſh / .ſsh / .ßh / .ẞh: APFS opens .ssh for each; the layer refuses each ("resolves to another place").
    • ς, µ: σςµ, σσµ, σςμ all open the stored σσμ; the layer refuses all three. Upper-case ΣΣΜ is accepted with the folded secretKey (.../.ssh/σσμ), which is correct.
    • Firmlinks: /System/Volumes/Data/<home>, /System/Volumes/Preboot/../Data/<home> and /System/Volumes/Data/<home>/../<user> give the same compareKey as <home>.
    • /.vol/...: refused, including a real /.vol/<dev>/<ino> that a plain read opens, /.VOL/..., and a symlink into /.vol.
    • /dev/fd/0: refused, also /DEV/fd/0, /dev/null, /private/../dev/fd/0, and symlinks to /dev/fd/0 and /dev.

    The layer needs no change. Test gaps (all checked by hand above): the test's /.vol/1/2 does not exist, so a real /.vol path is not covered; ς/µ only appear next to .ſſh/.ßh; real symlinks into /.vol and /dev appear only in the fake tables. Optional small test follow-up.

    Windows half still open.

    🤖 Generated with Claude Code

  2. added
    area:ci
    size:medium
    type:test
    on Nov 29, 2026
  3. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer is taking the Windows half. It runs hostPath.test.ts alone on GitHub's windows-2025 runner (a manual run of "Fork Windows tests" from a throwaway branch that narrows the Test step to this file, as that workflow's header describes) and reports the result here. The nightly run does not show it: its apps/server leg hits its 45-minute limit before the file is reached.

    🤖 Generated with Claude Code

  4. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Windows half: done, PASS. Both halves have now run on real runners, so this closes.

    Run: https://github.com/scuttletoby/t3code/actions/runs/46271641240 (GitHub windows-2025, NTFS, main at 22a8a3e plus a throwaway workflow change that ran only apps/server/src/hostTools/hostPath.test.ts, verbose). Result: 19 passed, 1 skipped (the macOS adapter, as expected). "Windows adapter: Kelvin sign on NTFS, a volume junction and a subst drive are refused or folded" ran and passed (74 ms):

    • a path through a junction to \\?\Volume{guid}\ (from mountvol) is refused;
    • a path on a subst drive letter is refused;
    • vault.Kdbx (Kelvin sign) is refused or gets a secretKey ending in vault.kdbx.

    The layer needs no change. Test gaps, optional: the Kelvin assertion passes whichever way NTFS answers, so the log does not say which happened; the subst part returns without asserting when Q: to Y: are all taken (not the case on a hosted runner). The throwaway branch is deleted.

    🤖 Generated with Claude Code

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

    area:cisize:mediumtype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions