perf(memory): walk the path string instead of a segment array #124
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: checks | |
| on: { push: {}, pull_request: {} } | |
| jobs: | |
| # Tier 0/1 on both hosts. macOS earns its place here rather than being a | |
| # nicety: every one of the 14 cases that failed the first time this suite ran | |
| # on darwin was the suite assuming Linux — host `O_*` handed to a session that | |
| # reads the wire's, host `errno` numbers checked against the transcribed | |
| # table — and nothing on a Linux runner can catch that class again. | |
| checks: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: npm i -fg corepack && corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: { node-version: lts/*, cache: "pnpm" } | |
| - run: pnpm install | |
| - run: pnpm typecheck | |
| - run: pnpm vitest --coverage | |
| - run: pnpm run lint | |
| # - uses: codecov/codecov-action@v5 | |
| # with: { token: "${{ secrets.CODECOV_TOKEN }}" } | |
| # Tier 2: real mounts. Stock Linux runners have `/dev/fuse` and passwordless | |
| # sudo, which is the whole reason root-mode FUSE being pure JS matters — no | |
| # native artifact, no self-hosted runner (IDEA.md, "Testing"). Every file here | |
| # skips itself when not root, so `checks` above covers the same code without | |
| # mounting anything. | |
| # | |
| # pjdfstest is deliberately *not* here: it takes about fifteen minutes, and | |
| # its value is the analysis rather than a pass/fail. It is run locally and its | |
| # results are committed in `.agents/pjdfstest-results.md`. | |
| mount: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: npm i -fg corepack && corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: { node-version: lts/*, cache: "pnpm" } | |
| - run: pnpm install | |
| - run: pnpm test:root | |
| # Tier 2 on macOS, and unprivileged: `mount_nfs` is not setuid and a BSD lets | |
| # an ordinary user mount onto a directory that user owns, so this needs no | |
| # sudo. `pnpm test:rootless` runs the NFS mount column and `mountx/auto` | |
| # against it; the FUSE half skips itself off Linux. | |
| # | |
| # It blocks, like every other job here. The reason to doubt it was macOS's | |
| # network-volume consent gate: a runner is launchd-attributed, the context | |
| # that gate refuses instantly with EPERM rather than prompting (see the macOS | |
| # section of `.agents/environment.md`). The first run settled it — the | |
| # workload case opens, reads, writes and lists through a real mount, and it | |
| # passed here as an ordinary user. The gate does not fire for a mountpoint the | |
| # caller owns, which is what `mkdtemp` gives the suite. | |
| # | |
| # The timeout stays, because the other way that gate presents is a wait nobody | |
| # answers, and a hung runner is worse than a failed one. | |
| mount-macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: npm i -fg corepack && corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: { node-version: lts/*, cache: "pnpm" } | |
| - run: pnpm install | |
| - run: pnpm test:rootless | |
| # Whatever the outcome, say whether anything was left mounted: a leak is | |
| # the failure mode that would otherwise be invisible in a green run. | |
| - if: always() | |
| run: mount | grep -i nfs || echo "no NFS mounts left behind" |