1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# Specification baseline
The baseline is Plan 9's 9P2000 manual, read before defining the package boundary.
Reference implementations are comparison partners, not the specification.
| Requirement | Primary source | Implementation |
|---|---|---|
| Little-endian framing, counted strings, tags, qids | [intro(9P)](https://9fans.github.io/plan9port/man/man9/intro.html) | `wire.zig` |
| First-message negotiation, NOTAG, msize, session reset | [version(9P)](https://9fans.github.io/plan9port/man/man9/version.html) | `Client`, `Server.negotiate`; backend releases fids |
| Authentication and attach | [attach(9P)](https://9fans.github.io/plan9port/man/man9/attach.html) | All wire/client messages; backend authentication |
| Tag reservation and cancellation completion | [flush(9P)](https://9fans.github.io/plan9port/man/man9/flush.html) | Client reservations; server Rflush retires oldtag |
| Walk bounds, cloning and partial walks | [walk(9P)](https://9fans.github.io/plan9port/man/man9/walk.html) | Codec and count checks; backend commits only full walks |
| Opening, creation, permissions and iounit | [open(9P)](https://9fans.github.io/plan9port/man/man9/open.html) | All wire/client messages; backend filesystem behavior |
| Read/write counts and directory records | [read(9P)](https://9fans.github.io/plan9port/man/man9/read.html) | Reply count checks; backend directory offsets and records |
| Fid release, including failed removal | [clunk(9P)](https://9fans.github.io/plan9port/man/man9/clunk.html), [remove(9P)](https://9fans.github.io/plan9port/man/man9/remove.html) | Client messages; backend releases handles |
| Double stat lengths and atomic metadata changes | [stat(9P)](https://9fans.github.io/plan9port/man/man9/stat.html) | `Stat`, wire length checks; backend atomic updates |
| Error replies | [error(9P)](https://9fans.github.io/plan9port/man/man9/error.html) | Counted errors, frame-size truncation, no Rerror for Tflush |
The local 24-byte session floor and fixed request capacities are resource choices,
not additional wire requirements. TCP, Unix, and QUIC adapters carry unchanged
9P2000 frames. QUIC ALPN and authentication policy are not defined by 9P2000.
[Tiger Style](https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TIGER_STYLE.md)
informs bounded memory, explicit ownership, assertions for internal invariants,
recoverable errors for external input, and deterministic tests. Zig standard
library conventions take precedence for names: functions use camelCase, values
use snake_case, and types use PascalCase. The code is formatted with `zig fmt`.
The wire codec and initial client were extracted from Pardes and checked against
these rules. Cloud9 adds the reusable server connection, missing client
operations, cancellation bookkeeping, bounds checks, shared transports, and
independent conformance harness. Pardes regression tests remain with its adapter;
wire regression tests moved with the codec.
|