The dev upload spine is the first executable local path through the v1 registry lifecycle. It proves the platform control flow without using Filecoin Calibration credentials or moving FOC bytes.
Run it with:
pnpm test:spineThe test starts a disposable local Anvil node, deploys the committed
FocPlatformRegistry artifact, discovers four unlocked Anvil accounts, and
executes:
- platform root allowlists a relayer and coordinator,
- relayer calls
requestUploadfor a platform user, - coordinator calls
startUpload, - coordinator finalizes a deterministic mocked
UploadReceipt, - the runner reads object, usage, copy receipts, and receipt payer from the registry,
- the runner projects the same logs through
src/registry/read-model.mjs.
This command is local/dev-only.
- No file bytes are uploaded.
- No Synapse SDK call is made.
- No Filecoin Calibration transaction is submitted.
- The receipt, provider IDs, dataset IDs, piece IDs, transaction hashes, and retrieval URL hashes are deterministic fixture values.
- The coordinator is a local Anvil account with the registry coordinator role.
The production semantics exercised by this path are the registry artifact, access control, idempotency key, request lifecycle, receipt validation, copy receipt persistence, usage accounting, contract reads, and event projection.
runDevUploadSpine({ rpcUrl }) in src/dev/upload-spine.mjs returns a
demo-facing status payload with:
request: account, idempotency, content, metadata, size, copy count, CDN, and max cost fields;receipt: deterministic receipt hash, payer, piece hash, cost, and copy fields;reads: authoritativegetStorageObject,getAccountUsage,getCopyReceipts, andreceiptPayerresults;projection: the same object, usage, copy, and payer state reconstructed from decoded logs;demoStatus: the compact status shape intended for downstream Token Host Builder API/UI binding;mocked: explicit flags describing which pieces are not real FOC execution.
Downstream Token Host Builder work should bind against the contract/read-model shape from this runner, while preserving the mocked boundary until the production coordinator and Calibration evidence land.
docs/platform-api.md defines the route-equivalent API wrapper that consumes
this status shape for generated UI/client binding.