[whatwg/storage] Define the "default bucket" and state which operations act on it by default (Issue #200)

hsingh-moz created an issue (whatwg/storage#200)

### What is the issue with the Storage Standard?

The standard never defines a "default bucket". The bucket is only reachable as `bucket map["default"]` inside algorithm steps: "create a storage shelf", "obtain a storage bottle map", `persisted()`, `persist()`, the "persistent-storage" revocation algorithm, and "legacy-clone a traversable storage shed".

The only description of it is a note in [Storage shelves](https://storage.spec.whatwg.org/#storage-shelves):

> For now "default" is the only key that exists in a bucket map. See [issue #2](https://github.com/whatwg/storage/issues/2). It is given a value when a storage shelf is obtained for the first time.

Since a note is non-normative, nothing normative says that this bucket always exists, or that it is the only one, yet five of those algorithms index it without checking. Nothing in the prose says that `persist()`, `persisted()` and every storage endpoint operate on this bucket; the introduction just says "that bucket". `estimate()`, by contrast, operates on the shelf.

Suggestion:

* Define "default bucket" normatively as the shelf's `bucket map["default"]`, created with the shelf and existing for as long as the shelf does.
* Use that term in the algorithms above.
* State in the API section which operations act on the default bucket and which act on the whole shelf.

Related: #2, #101

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/storage/issues/200
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/storage/issues/200@github.com>

Received on Friday, 27 November 2026 17:23:54 UTC