resources.storage needs no configuration. Each namespace is a directory
under:
Writes are atomic
Writes are staged under$TINY_DATA_DIR/storage/.staging and renamed into place,
so a reader sees either the previous object or the new one — never a partial
file.
That staging directory sits beside the environment directories rather than
inside a namespace, which keeps a half-written object out of listings and out of
quota accounting.
Platform limits
An operator does not configure these, but should know them:
A manifest’s
maxSize is the per-namespace quota on top of those. It is measured
against the namespace as it will be after the write, so replacing an object
does not charge for the copy it replaces. Exceeding it is a
RESOURCE_LIMIT_EXCEEDED refusal, never a truncated write.
Two body-size limits, not one
Metering
Bytes moved are metered asstorage_bytes, split into reads and writes by the
operation field on each usage record.
Durability
An S3/R2-backedObjectStore is the intended replacement. Because storage sits
behind one interface, swapping it means implementing that interface rather than
changing anything an app sees. It is not implemented in this repository.
Retention is recorded, not enforced
retention on a storage declaration describes how long deleted objects are kept
for recovery. It is recorded on the claim and is not yet enforced by a
reaper — do not plan capacity around it reclaiming space.