Interface: ConformanceSources
Defined in: src/batteries/sandbox/conformance/index.ts:20
The adapter surfaces the shared conformance battery exercises.
Remarks
A DUCK-TYPE GUARD CANNOT CHECK BEHAVIOUR, which is why this suite exists. implementsX() proves a backend has the right method names; it cannot prove the iterable is lazy, that it emits the mandatory terminal frame, or that signal actually aborts mid-stream. Without those checks a conformant-LOOKING OPFS adapter could silently impose limits the Node one does not, and the boundary would differ by environment.
Every framed surface must be lazy, emit each item frame (there is no count cap to stop at), then EXACTLY ONE terminal done frame matching one union arm exactly. A stream that ends without done is a protocol violation the tools classify as io-failure — never as "no overflow", because silence is precisely what an unannounced truncation looks like.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
findPaths | FramedSource<PathFrame> | Name search: item frames carrying a path, then one terminal frame. | src/batteries/sandbox/conformance/index.ts:24 |
list | FramedSource<ListFrame> | Directory traversal: item frames carrying a path and entry kind, then one terminal frame. | src/batteries/sandbox/conformance/index.ts:22 |
searchContent | FramedSource<HitFrame> | Content search: item frames carrying path, line, and the WHOLE matched line — no per-hit cut. | src/batteries/sandbox/conformance/index.ts:26 |
Methods
read()
read(): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;Defined in: src/batteries/sandbox/conformance/index.ts:28
Must hand back a FRESH stream per call: readers are replayable, not single-use.
Returns
Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>
stat()
stat(): Promise<{
size: number;
version: string;
}>;Defined in: src/batteries/sandbox/conformance/index.ts:38
Metadata, including the opaque change token.
Returns
Promise<{ size: number; version: string; }>
Remarks
version is compared for equality and never parsed, and only ONE direction is sound: a CHANGED token is evidence the file may have changed, while an UNCHANGED token is NOT evidence it did not — a same-size write inside the timestamp resolution preserves it. The suite asserts the safe direction only.