internal/woodstock/storage-conformance
Import
Section titled “Import”import * as api from "@fungi.computer/shiitake/storage-conformance";Exports
Section titled “Exports”| 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”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
use |
(owner) => void |
Returns
Section titled “Returns”Promise<void>
WoodstockConformanceCasetype alias
Section titled “WoodstockConformanceCase”type WoodstockConformanceCase = Readonly<{ name: string; run: () => Promise<void>;}>;One named case.
createWoodstockStorageConformance()function
Section titled “createWoodstockStorageConformance()”function createWoodstockStorageConformance(withOwner): readonly Readonly<{ name: string; run: () => Promise<void>;}>[];Create the runner-independent cases for one Woodstock storage host.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
withOwner |
WoodstockStorageProvider |
Returns
Section titled “Returns”readonly Readonly<{ name: string; run: () => Promise<void>;
}>[]