Skip to content
API reference

internal/woodstock/storage-conformance

Import
import * as api from "@fungi.computer/shiitake/storage-conformance";
Kind Export Description
type alias WoodstockStorageProvider Calls use exactly once with an empty, writable owner of the host under test, then releases the owner. It resolves after use returns.
type alias WoodstockConformanceCase One named case.
function createWoodstockStorageConformance() Create the runner-independent cases for one Woodstock storage host.

Runner-independent conformance cases for one Woodstock Session storage host.

Adapted from Pi Durable’s src/testing/storage-conformance.ts (earendil-works/pi at 8efd314f): every host that backs Woodstock with a SqliteOwner — the local node:sqlite owner and the Durable Object’s ctx.storage — runs the same cases through Woodstock’s own writers and readers. Fungi delta: Pi’s suite checks a generic record store (ID minting, task and document tables); Woodstock’s store is the parent-pointer Session tree, so these cases check atomic admission, request-ID replay, bounded lineage reads, branch, fork, placeholder completion, deletion and the inbox. The cases import no test runner, only node:assert, so they run inside a Worker with nodejs_compat too.

WoodstockStorageProvidertype alias

Section titled “WoodstockStorageProvider”
Signature
type WoodstockStorageProvider = (use) => Promise<void>;

Calls use exactly once with an empty, writable owner of the host under test, then releases the owner. It resolves after use returns.

Parameter Type
use (owner) => void

Promise<void>


WoodstockConformanceCasetype alias

Section titled “WoodstockConformanceCase”
Signature
type WoodstockConformanceCase = Readonly<{
name: string;
run: () => Promise<void>;
}>;

One named case.

createWoodstockStorageConformance()function

Section titled “createWoodstockStorageConformance()”
Signature
function createWoodstockStorageConformance(withOwner): readonly Readonly<{
name: string;
run: () => Promise<void>;
}>[];

Create the runner-independent cases for one Woodstock storage host.

Parameter Type
withOwner WoodstockStorageProvider

readonly Readonly<{ name: string; run: () => Promise<void>; }>[]