test(drive): declare PROPPATCH over a minimal filesystem unsupported
Opting out skipped the test entirely, leaving the path with no coverage. The tri-state capability with a forbidden alias keeps the assertions that the call rejects and the properties are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ This file records all work in this repository that was assisted or authored by a
|
||||
- **`@webnet/sftp` — stable keyless server identity**: GPT-5.6 Luna fixed `SFTPServer` to lazily generate and cache one ephemeral host key per server instance, and added a regression test covering sequential connections and host-key fingerprints.
|
||||
- **`@webnet/vfs` — canonical path helpers**: Codex (GPT-5.6 Luna) added public POSIX VFS path utilities for normalization, resolution, parents, basenames, and joining. The helpers clamp traversal at the VFS root, preserve backslashes and Unicode names, and are covered by focused edge-case tests. MemoryVFS, FsaVFS, FTP, and SFTP now reuse the shared implementation; NodeVFS retains its separate traversal-rejection guard.
|
||||
|
||||
- **`@webnet/vfs`, `@webnet/drive`, `@webnet/ftp`, `@webnet/sftp` — conformance over a minimal backing filesystem (issues #181, #177)**: Claude Code (Claude Opus 5) added `withoutOptional` and `unsupportedOptional` to `@webnet/vfs/conformance`, replacing the copies in the fallback tests and the WebDAV tests, and gave each protocol package a second `testAsyncVFSConformance` run whose *server* is handed a filesystem reduced to the required operations. The client under test is unchanged, so the suite's existing assertions — inclusive range ends, byte-for-byte comparisons, copy replacing rather than merging — now apply to the servers' fallback paths, which were never entered when every server was backed by a full `MemoryVFS`. That run reproduces #177 before it is fixed: the WebDAV server's Range fallback discarded `range.start` and streamed from byte zero while advertising the requested window, so a resumed download or a media seek silently stored the wrong bytes at the wrong offset; `readFileRangeFallback` now windows the stream and removes the branch, and the unit test that only asserted a 206 status asserts the body and the framing headers. The three remaining differences the second run exposed are declared rather than shimmed, because each is a legitimate protocol answer from a server that cannot do the work: WebDAV PROPPATCH answers 403 (dead properties cannot be built from the required operations), and FTP RNFR/RNTO and SFTP RENAME answer 502 and `SSH_FX_OP_UNSUPPORTED`, which reach the client as `unsupported`. Whether those three should shim instead is the decision #179 exists to make. `@webnet/smb2` has no server over an `AsyncVFS` — its test server is a wire-protocol mock over its own store — so nothing there to reduce.
|
||||
- **`@webnet/vfs`, `@webnet/drive`, `@webnet/ftp`, `@webnet/sftp` — conformance over a minimal backing filesystem (issues #181, #177)**: Claude Code (Claude Opus 5) added `withoutOptional` and `unsupportedOptional` to `@webnet/vfs/conformance`, replacing the copies in the fallback tests and the WebDAV tests, and gave each protocol package a second `testAsyncVFSConformance` run whose *server* is handed a filesystem reduced to the required operations. The client under test is unchanged, so the suite's existing assertions — inclusive range ends, byte-for-byte comparisons, copy replacing rather than merging — now apply to the servers' fallback paths, which were never entered when every server was backed by a full `MemoryVFS`. That run reproduces #177 before it is fixed: the WebDAV server's Range fallback discarded `range.start` and streamed from byte zero while advertising the requested window, so a resumed download or a media seek silently stored the wrong bytes at the wrong offset; `readFileRangeFallback` now windows the stream and removes the branch, and the unit test that only asserted a 206 status asserts the body and the framing headers. The three remaining differences the second run exposed are declared rather than shimmed, because each is a legitimate protocol answer from a server that cannot do the work: WebDAV PROPPATCH answers 403 (dead properties cannot be built from the required operations), and FTP RNFR/RNTO and SFTP RENAME answer 502 and `SSH_FX_OP_UNSUPPORTED`, which reach the client as `unsupported`. All three are declared with the tri-state capability rather than skipped, so the suite still checks that the call rejects and changes nothing; the WebDAV run aliases `forbidden` to `unsupported` for that, since 403 is the answer the protocol gives here. A Claude Sonnet 5 review caught that this run originally opted out of `setProps` altogether, which left PROPPATCH over a minimal filesystem with no coverage at all — the gap #181 exists to close. Whether those three should shim instead is the decision #179 exists to make. `@webnet/smb2` has no server over an `AsyncVFS` — its test server is a wire-protocol mock over its own store — so nothing there to reduce.
|
||||
|
||||
This project was set up with the assistance of [Claude Code](https://claude.ai/code) (Anthropic). The following were written by Claude Code:
|
||||
|
||||
|
||||
@@ -2019,8 +2019,10 @@ testAsyncVFSConformance({
|
||||
return { vfs: client, close }
|
||||
},
|
||||
// Dead properties cannot be built out of the required operations, so PROPPATCH answers 403 as
|
||||
// WebDAV allows rather than reporting the operation as unsupported.
|
||||
capabilities: { createdAt: true, setProps: false },
|
||||
// WebDAV allows rather than reporting the operation as unsupported; the call still has to reject
|
||||
// and leave the properties alone, which is what the alias tests.
|
||||
capabilities: { createdAt: true, setProps: "unsupported" },
|
||||
errorCodes: { unsupported: ["forbidden"] },
|
||||
})
|
||||
|
||||
suite("DAVClient + server over loopback", () => {
|
||||
|
||||
Reference in New Issue
Block a user