Skip to content

test(9p): run the conformance special-files cases over the wire - #16

Merged
pi0 merged 1 commit into
mainfrom
feat/driver-mknode
Jul 31, 2026
Merged

test(9p): run the conformance special-files cases over the wire#16
pi0 merged 1 commit into
mainfrom
feat/driver-mknode

Conversation

@pi0x

@pi0x pi0x commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

The 9P half of #14: the conformance suite's five special files cases run
over the 9P column instead of skipping — 10 new cells in
.agents/conformance-matrix.md.

What moved

  • test/9p/client.tsp9Driver gains mountx.mknod. It is a Tmknod,
    with dev coming apart into major/minor the same 8-bit way
    P9Session.#mknod puts it back together. The client decides nothing: 9P2000.L
    carries the whole mode, type bits included, and the session hands it to the
    driver's extension unchanged, so EEXIST, ENOENT and EPERM-for-a-directory
    are the memory driver's own answers arriving as Rlerror.
  • test/9p/conformance.test.tsTHROUGH_9P declares
    extensions: ["mknod"] (THROUGH_9P_REOPENED spreads it). The node-fs oracle
    target overrides it back to []: that driver implements no mountx.mknod and
    #mknod rightly answers ENOSYS there, which is the difference between a
    capability and a claim.
  • test/matrix.ts, .agents/testing.md — the "only the loopback column has
    it" prose is replaced by which columns offer the extension by name and why each
    of the others does not.

What it buys over the session tests

test/9p/session.test.ts:1788 already proves the dispatch. These cases put a
FIFO through the rest of the surface over the wire: stat and readdir agreeing
on the seven type predicates decoded from Rgetattr's own mode, rdev surviving
the major/minor split and the single rdev[8] rejoining it, a special file
renamed and unlinked as an ordinary name, and each refusal arriving as this
transport's error reply.

On invariant 5

Declaring the extension here is not faking a capability: the client routes a real
Tmknod to a real session, resolveCapabilities would infer the same thing from
Object.keys(driver.mountx) anyway (src/harness.ts:44-45), and the columns
already declare capabilities as transport claims rather than driver truths. The
old "no wire representation" justification was the weaker half — Tmknod is one.
What keeps it honest is that the declaration names what that target delivers,
hence the oracle's override.

Not in scope

NFSv3 and NFSv4.1 keep the skip, and #14 now tracks why: both put the file type
in ftype3/nfs_ftype4 rather than in the mode, so two of the five cases cannot
route faithfully — NF4DIR is mkdir and NF4REG is NFS4ERR_BADTYPE — and
expressing partial carriage needs a suite change, not a wiring change. FUSE and S3
stay out for the reasons they always had.

pnpm test green (2985 passed, 310 skipped); pnpm matrix regenerated, the 9P
column moving from 192 passed / 18 skipped to 202 / 8.

🤖 Generated with Claude Code

`p9Driver` gains `mountx.mknod` — a `Tmknod`, with `dev` split the way
`P9Session` puts it back together — so the five special-files cases run
over the 9P column instead of skipping: `stat` and `readdir` agreeing on
the type predicates off `Rgetattr`'s own encoding, `rdev` surviving the
`major`/`minor` round trip, a FIFO renamed and unlinked as an ordinary
name, and `EEXIST`/`ENOENT`/`EPERM` arriving as `Rlerror`.

`THROUGH_9P` declares the extension for what it carries; the node-fs
oracle overrides it back to `[]`, because that target implements no
`mountx.mknod` and `#mknod` answers `ENOSYS` there — which is the
difference between a capability and a claim.

The other columns keep the skip for reasons of their own, now named
where the blanket "no wire representation" line used to be.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mountx Ready Ready Preview Jul 31, 2026 10:36pm

Request Review

@pi0
pi0 marked this pull request as ready for review July 31, 2026 23:38
@pi0
pi0 merged commit 5c4b3fe into main Jul 31, 2026
12 checks passed
@pi0
pi0 deleted the feat/driver-mknode branch July 31, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants