provident-storeroom 1.12.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.guide.md CHANGED
@@ -30,7 +30,7 @@ preflight REFUSES when these two lines do not read what it computed** (`scripts/
30
30
  one check, read-only). **THE TWO LINES ARE THIS GUIDE'S OPERATIVE FIGURES; every dated paragraph below is the
31
31
  reading of its own date and is read through them.**
32
32
 
33
- PUBLISH-GUIDE-VERSION-LINE: THE VERSION THIS GUIDE DESCRIBES IS `1.12.0`.
33
+ PUBLISH-GUIDE-VERSION-LINE: THE VERSION THIS GUIDE DESCRIBES IS `2.0.0`.
34
34
  PUBLISH-GUIDE-CUT-STATE: NOT STATED -- this document describes the behaviour at the version line above, and the cut-state is the release's to state, not a shipped document's (`D-57`).
35
35
 
36
36
  **⟶ AND THE CUT-STATE SENTENCE ABOVE IS WITHDRAWN, 2026-10-28 — THE CUT-STATE IS NOT A DOCUMENT'S TO STATE.** `RCA-8(g)` ANNOTATE-BESIDE, and the architect's ruling verbatim (`strata/decisions.md` · `D-57`): *"Drop the cut-state."* **The two marked lines above stand BYTE-FOR-BYTE as the reading of their own date and are read THROUGH this clause — not one byte of either is deleted — and the sentence this clause withdraws is the SECOND of them, the one that claims to say whether the release this guide travels in is cut.** **THE REASON IS MEASURED, THREE TIMES OVER, AND IT IS STRUCTURAL RATHER THAN A MISTAKE: A SHIPPED DOCUMENT IS SEALED BEFORE THE TAG THAT MAKES ITS CUT-STATE TRUE**, so every release packed before its tag ships a document denying itself, and a guard running in that release's own preflight can only ever confirm *"not cut"* — `1.2.0` shipped *"NOT CUT"*, `1.3.0` shipped *"`v1.3.0` DOES NOT EXIST"*, and the change list's head was stale within minutes of the tag that falsified it. **SO THE CUT-STATE SENTENCE IS DROPPED AS A CLAIM AND THE VERSION LINE STAYS**, because the version line is the ONE figure a tarball can be right about: the manifest knows it and travels beside it. **`scripts/publish.sh --figures` GENERATES AND ASSERTS THE VERSION LINE AND NOTHING ELSE** — the cut-state generation and its assertion are removed in the same act, so a tag set that moves can no longer redden this guide — **and the same one line is asserted in THREE shipped documents: this guide, `README.md` beside it, and the change list** (`DEF-AC`'s remaining demand, *"guard the release notes too"* and *"`README.md` still declares no version at all"*). **THE TAG SET IS NOT DELETED AND NOT DENIED: it is a RECORD OF RELEASES held in the change list, PAST TENSE — a list of what has been cut — and never a claim about the current one.** **AND WHAT THIS CLAUSE DOES NOT SAY, SAID PLAINLY BECAUSE A READER WILL LOOK FOR IT: it does not say whether the version this guide prints is cut.** That is not a document's to state; the record of what has been cut is in `RELEASE-NOTES.md`, and the registry is the registry.
@@ -133,7 +133,9 @@ worth nothing to you if you cannot falsify it:**
133
133
  3. **What is actually loaded:** construct a store and read the empty address. If the loader resolved a
134
134
  differently-versioned platform package, that is where it shows.
135
135
 
136
- **THE SHAPE OF THIS GUIDE, IN ONE LINE: one module name, one instance with fourteen own members, one thrown
136
+ **⟶ AND THE INSTANCE'S OWN MEMBER COUNT IS FIFTEEN, NOT FOURTEEN, 2026-11-17 — AND THE PARAGRAPH BELOW IS READ THROUGH THIS LINE.** `readTiered`
137
+ was added to the surface and the count was left behind in three places (this line, `§3`'s heading and `§3.1`'s); **the tree answers fifteen and the
138
+ guide now says so everywhere it says it.** **THE SHAPE OF THIS GUIDE, IN ONE LINE: one module name, one instance with fifteen own members, one thrown
137
139
  refusal form, three tiers, two population routes for constraints, and a value domain narrower than JSON's.** The
138
140
  rest is the consequences.
139
141
 
@@ -154,6 +156,35 @@ declared floor. **Node CJS as a module format, Electron's
154
156
  `main`/`preload`/`renderer`, the browser, `worker_threads` and any IPC route are each UNCLAIMED** — the package's
155
157
  own readme enumerates them one by one and describes no other realm as supported.
156
158
 
159
+ **⟶ ONE OF THEM IS NOW SUPPORTED AS A BUILD, IN A SECOND PACKAGE — 2026-11-17** (`D-154` item 1; `D-157` item 1).
160
+ **`@auspicion/provident-storeroom-js-wasm` is this same store on a WebAssembly host**, and it differs from the
161
+ package this guide documents in three ways a consumer meets at once:
162
+
163
+ * **THE BINDINGS ARE HANDED IN, NOT LOOKED FOR.** `storeCreate(bindings, cfg)` takes the module as its first
164
+ position — the package instantiates nothing, loads no addon and reaches no filesystem.
165
+ * **THERE IS NO `filePath`.** The key is not in domain on that arm, a construction that carries it is refused at the
166
+ `cfg` gate, and the **`file` tier means *durable with no path***: the store keeps its durability against a
167
+ caller's function (`saveCall`), and a save it cannot confirm is a save it does not claim.
168
+ * **A VALUE MUST BE CLONEABLE.** The crossing is a deep copy in both directions, so a value the store holds cannot be
169
+ mutated behind it — that is what keeps a listener's firing and a constraint's pass honest — and **a `Proxy` you pass
170
+ as a VALUE is refused before any trap of yours runs**: a reactive store's own object is a `Proxy` on most client
171
+ frameworks, so **pass the plain value (`toRaw`, a spread, or a clone) and the store takes it**. **What that refusal
172
+ covers is the DATA — the values that go INTO the store — and not the settings you construct it with.** `cfg` itself,
173
+ a `listeners` entry, a `constraints` entry and the commit record the package builds are the package's own carriers:
174
+ they never enter the Rust store, and on this build a `Proxy` handed in one of those positions is **read rather than
175
+ refused**. **So the reactive wrapper is the thing to unwrap where it matters — at every value you write — and a
176
+ `Proxy` in a settings object is not a refusal you will see; passing plain objects in both places is what keeps the
177
+ behaviour the same as on the Node build.**
178
+
179
+ **NO ARTEFACT OF THAT BUILD IS DESCRIBED HERE AS SHIPPED BY THIS PACKAGE**: it is a sibling package with its own
180
+ `files`, its own declaration and its own version line, and this guide's every claim about `provident-storeroom`
181
+ stands unchanged.
182
+
183
+ **AND THE BUILD HAS A SECTION OF ITS OWN IN THIS GUIDE — §13 — BECAUSE THE THREE DIFFERENCES ABOVE ARE WHAT YOU
184
+ MEET FIRST AND NOT WHAT YOU NEED IN ORDER TO USE IT.** How you hand it the module, what its `cfg` refuses and why,
185
+ how it saves, what its crossing guarantees and what it cannot do are stated there one line each, with the cells that
186
+ measure them (`D-154`, `D-155`, `D-156`, `D-157`, `D-167`; §13).
187
+
157
188
  **The licence of record is `AGPL-3.0`** (`bindings/js/package.json`'s `license` field, measured 2026-10-26), and a
158
189
  copy of the repository's `LICENSE` travels with every published artefact, landed byte-for-byte by the release's
159
190
  own assembly step (`docs/specs/storeroom-publish/contract.md §2.3` item 2; `PUB-DD-11`). **Three spellings of the
@@ -167,6 +198,8 @@ No `dispose()`, no `close()` and no finalizer is a member (`bindings/js/index.d.
167
198
  declaration; `A74`). **The instance's state is released with the instance and by nothing else — construct one store
168
199
  and keep it for the process's life.**
169
200
 
201
+ **⟶ AND THE SECOND HALF OF THAT SENTENCE IS NOW BEHAVIOUR RATHER THAN ADVICE, 2026-11-19 — `D-171` ITEMS 1–3.** **THE MEMBER SET DOES NOT MOVE: there is still no `dispose()`, no `close()` and no finalizer you can call, and the instance is still the handle you act through.** **What moves is what happens when YOU drop the instance — a store you stop holding is RELEASED.** The package holds the store's own index in a `FinalizationRegistry` and hands that index to the addon's `storeRelease` entry when the instance is collected; **that entry drops the store and empties its slot in one act, and the slot it leaves is a tombstone — no other store's index shifts into it, so every store you still hold keeps answering its own register.** **BEFORE THIS LANDING NOTHING RETIRED ANYTHING: a constructed-and-dropped store stayed in the addon's own table for the process's life — measured `~573,112` bytes per construct-and-drop against `~42,000` after the fix, on a store told to keep `128 KiB`** (`D-171` items 1 and 3) — **and the WebAssembly build carries the same entry from 2026-11-19, so neither build leaks a store you have let go.** **WHAT TO DO WITH IT, SAID AS THE ADVICE IT IS: one store per process is still the shape the register wants — one journal, one listener map, one `filePath` — and it is no longer a rule you keep in order not to leak.** **AND THERE IS STILL NO RELEASE VERB: you cannot free a store you are still holding, and nothing is thrown at you when one is freed.** (`D-171`; `bindings/js/src/facade.rs`'s `storeRelease` and `bindings/js/src/wasm.rs`'s; `tests/e2e/store-retirement.test.mjs`'s `SR-01`–`SR-03`; `tests/e2e/wasm-arm.test.mjs`'s `CW-8`/`CW-9`.)
202
+
170
203
  **The five decisions this guide exists to inform** — the checklist the archived guide carried and that is still
171
204
  true of this surface:
172
205
 
@@ -253,7 +286,7 @@ crate from its source yourself; a covered consumer needs no Rust toolchain, an u
253
286
 
254
287
  ---
255
288
 
256
- ## §3 · The surface: one module name and fourteen members
289
+ ## §3 · The surface: one module name and fifteen members
257
290
 
258
291
  ```js
259
292
  import { storeCreate } from 'provident-storeroom';
@@ -263,7 +296,7 @@ import { storeCreate } from 'provident-storeroom';
263
296
  `read`, `write`, `listen` or any other verb (`bindings/js/index.d.ts`'s preamble; `surface.md §2.9` item 1's `A127`
264
297
  clause, the module count `11 → 1` ✓; measured 2026-10-26: the imported namespace's keys are `["storeCreate"]`).
265
298
 
266
- ### §3.1 The instance, and its fourteen own members
299
+ ### §3.1 The instance, and its fifteen own members
267
300
 
268
301
  ```js
269
302
  const store = storeCreate({
@@ -274,14 +307,17 @@ const store = storeCreate({
274
307
  });
275
308
  ```
276
309
 
277
- **`storeCreate` answers an instance carrying exactly FOURTEEN own members** — `10 + 1 + 1 + 2 = 14` ✓ — and they
278
- are these fourteen and no others (`bindings/js/index.d.ts`, `StoreInstance`;
310
+ **⟶ AND THE FIGURE IS FIFTEEN, AND THE TABLE BELOW NOW SHOWS ALL FIFTEEN, 2026-11-17.** `readTiered` (the tier readout, `1.10.0`) **was
311
+ in the instance and had never been in this table**, so the guide said *fourteen* while the surface answered *fifteen* — **and once the section's headings were
312
+ corrected it said *fifteen* above a table of fourteen, which is worse than either.** **`storeCreate` answers an instance carrying exactly FIFTEEN own members** —
313
+ `10 + 1 + 1 + 1 + 2 = 15` ✓ — and they are these fifteen and no others (`bindings/js/index.d.ts`, `StoreInstance`;
279
314
  `docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 9):
280
315
 
281
316
  | member | its declared shape | one line |
282
317
  |---|---|---|
283
318
  | `read` | `(address, tier?) => unknown` | a leaf's literal, a branch's assembled value, or the whole register |
284
319
  | `readLiteral` | `(address, tier?) => unknown` | the same, narrowed to a leaf — **a branch refuses** |
320
+ | `readTiered` | `(address) => { value, tier }[]` | the standing versions at an address **and the tier each is at** — a shadowed address answers more than one (`D-121`) |
285
321
  | `write` | `(address, tier, value, commit?) => WriteRecord` | `commit` is the kernel's own position; leaving it out is the supported form |
286
322
  | `delete` | `(address, tier?) => DeleteRecord` | **a method name, not an identifier binding** — `store.delete(…)` |
287
323
  | `rollback` | `(opId) => RollbackRecord` | walks backward and undoes **that op and everything after it** in scope |
@@ -496,6 +532,17 @@ guide's constraint story that is not yet observable.
496
532
  - **THE FACT: WHEN A REVERSAL IS REFUSED, THE COMPENSATING ACT PUTS THE STORE BACK AT THE MARK THE COMMIT CACHED WHEN IT OPENED — the journal's LAST VALID POSITION as it stood when that commit began (an op id, or the FLOOR where the journal held no entry then) — and never at whatever the journal's head happens to be when the refusal is built.** **Every address the reversal MOVED is read again afterwards and counted as restored only where it stands exactly as it stood before the reversal — the same value at the same tier, or absent where it was absent — and the refusal's one log entry says so address by address**, naming each address that could not be put back with what stands there instead and what it was owed (§8.1 row `20`; `js/contract.md §2.6`'s clause of 2026-10-27). **A reversal taken AT REST makes the two marks describe the same state** — it appends no journal entry — **so this is where the store stands either way at the surface.**
497
533
  - **WHAT `1.2.0` CHANGED, IN ONE SENTENCE, SO YOU KNOW WHICH BEHAVIOUR YOUR VERSION HAS: BEFORE `1.2.0` THE RESTORE NAMED THE JOURNAL'S HEAD; FROM `1.2.0` IT NAMES THE OPENING MARK.** **Why the head was wrong is the measurement the ruling was taken on (`DEF-AE`):** *"a reversal appends no journal entry, so the head describes the state that stood before the action"* is true of a reversal **you** take at rest and **false of one taken inside a write's own commit** — there the ENCLOSING WRITE'S OWN OP stands at the head when a listener body's reversal runs, so the old compensation restored the write's LANDING and **a write that reported a refusal had left its own value standing** (measured: `9` stayed `9` where the refused write should have restored `7`). **In `1.2.0` a write that reports a refusal leaves the store where the ATTEMPT found it, not where the refusal's own op landed.** **A LAWFUL reversal is unchanged** (same `{opId, undoneOps, restoredTo}`, no throw), **and a lawful write still answers its record with its value standing.** **MEASURED ON THIS CHECKOUT, 2026-10-28:** a refused write restores the pre-attempt value at its own tier, and the reversal's own refusal restores the pre-reversal standing tier for tier (`tests/e2e/def-ae-restore-mark.test.mjs` cells `1`–`2`; `tests/e2e/refused-reversal-restore.test.mjs`'s shadow, higher-tier/parent and absent arms). **So the store after a refused reversal holds exactly the state the act FOUND — not a later landing that the refusal's own sentence has already told you was undone.**
498
534
 
535
+ **⟶ ★ AND THE JOURNAL'S CAP IS A BOUND AND NOT A MARK, 2026-11-17 — `D-160`, AND `D-164` FOR ITS SECOND ARM. THIS IS THE ONE BEHAVIOUR CHANGE OF THE LANDING THAT YOU WILL MEET AT YOUR OWN CALL SITES, SO IT IS STATED IN THE ORDER YOU MEET IT.** `RCA-8(g)` ANNOTATE-BESIDE: **every clause of §5.4 above stands BYTE-FOR-BYTE and is read THROUGH this one — the scope, the report, the floor law, `restoredTo` and the four narrowings are unmoved; what moves is what the journal KEEPS, and therefore which op ids still work.**
536
+
537
+ 1. **`journalLength` IS THE WIDTH OF THE COMPENSATION WINDOW AND IT IS NOT A RETENTION PROMISE.** What survives is the base state — the register at the last compression — **plus at most `journalLength` uncompacted ops**, and **an op the compaction reaches is REMOVED: its entry is gone and its op id is gone with it** (`D-160` items 1–2). **So the `opId` a write answered is a token whose lifetime is measured in WRITES and not in the store's life, and a program that keeps op ids for a long time keeps ids the journal no longer holds.**
538
+ 2. **THE ID THAT WAS DROPPED AND THE ID THAT NEVER EXISTED ARE TOLD APART, AND THEY DO NOT ANSWER THE SAME.** An id that named an op the compaction **dropped** names a **recoverable** history and is never answered as unknown; **an id that never named an op — a fabricated `'op-999999'`, a malformed `'op-'`, a token another store minted — answers `JournalOpUnknown`**, because no compaction can have dropped what never stood there (`D-160` item 3; `D-164` item 4: the watermark separates a recoverable history from a client error, and it is one number and not a retained list).
539
+ 3. **WHAT A `rollback` OF A DROPPED OP DOES DEPENDS ON ONE THING — WHETHER YOUR STORE CAN READ A FILE BACK.** **With a `filePath`** whose image the store can read — **and where no image stands, the state the store was created with — the store REBUILDS its base from that file, replays what its journal still reaches, and the call RETURNS a record: no refusal is involved.** `undoneOps` is `[]`, because nothing was undone — **the entry the call named is gone** — and `restoredTo` is the register as it stands after the rebuild (`D-164` items 1–2). **With NO READ PATH — a `saveCall` store, whose channel is write-only by construction, and any `mem` store — the call THROWS `RollbackCompacted`**, and **that token is a SIGNAL and not a verdict on you: recover the value from the copy you kept**, because such a store cannot retrieve its own durable ground truth even in principle (`D-165` items 1–3).
540
+ 4. **AND NOTHING ELSE ABOUT A REFUSAL MOVES BY THIS CLAUSE.** A `rollback` still appends no journal entry, and the mark a refusal's compensation names is still the commit's opening mark or the last state a pass validated (`D-63`'s clause above). **⟶ AND THE THIRD THING THIS ITEM SAID IS WITHDRAWN AT ITS OWN BYTE, 2026-11-17: *"`record.compacted` still reads `false` on every write's record — a declared member with a constant"* IS NO LONGER TRUE, BECAUSE THE MEMBER IS GONE** (`strata/decisions.md` · `D-189` item 2, the architect VERBATIM: *"If .compacted is always false drop it"*). **A declared member with a constant is exactly what the ruling refused**: the store set the flag `false` at both of its producers, so it carried nothing, and the distinction it once shared — *an op this store compacted* against *an op this store never held* — is carried by the `journal_floor` watermark instead (`D-160` item 3), which answers `RollbackCompacted` and `JournalOpUnknown` as two different refusals without a per-op bit. **SO `record.compacted` NO LONGER READS ANYTHING**: the write's record carries **SEVEN** members — `{ opId, kind, address, tier, before, after, seq }` — the key is absent, and reading it gives you `undefined`. **It is REMOVED, not renamed and not deprecated**; the release that carries it is `2.0.0` because a published declaration member left the surface (`D-190`).
541
+
542
+ **THE MOVE, IN ONE SENTENCE, SO YOU CAN TELL WHICH BEHAVIOUR YOUR VERSION HAS: BEFORE THIS LANDING THE CAP WAS A MARK — the oldest entries were FLAGGED and kept for the store's life, and the flag was what told a reversal it had gone past the floor; FROM THIS LANDING THE CAP IS A BOUND — the oldest entries are REMOVED, memory is `O(store + journalLength)` instead of growing with every write ever made, and the two answers are told apart by one number rather than by a retained list.** (`D-160` items 1–2; `D-164`; `D-165`; `tests/e2e/journal-compaction.test.mjs`; `tests/e2e/journal-retention-floor.test.mjs`.)
543
+
544
+ **⟶ AND THE RESTORE BEHIND A REFUSAL READS THE COMPACTED FLOOR, 2026-11-17 — `D-178`, LANDED AS `D-179`, AND IT IS THE HALF THAT DECIDES WHETHER A VALUE SURVIVES A REFUSAL.** A refusal's compensation restores the store to a POSITION — the mark the commit cached, or the last state a pass validated (§5.4 above) — **and the replay behind that restore begins at the COMPACTED FLOOR: the point the journal was last compressed to.** **So a mark whose predecessors the compaction dropped still restores the state they left, and a value written before the window moved is not lost by a refusal that comes after it.** **MEASURED BOTH WAYS, ON A STORE AT `journalLength: 2`:** with the replay starting from the state the store was born with, a restoral to a RETAINED mark whose predecessor had been dropped **lost the value that mark named** — `a` read `AddressNotFound` where the mark's own state held it; with the replay starting at the floor, **the same restoral answers the state the mark names** — `a` back, `c` still absent — **and a restoral naming an op the compaction DROPPED is still `JournalOpUnknown`, because that id is no longer a position anything can be restored to** (`D-179` items 2–3; `tests/e2e/journal-retention-floor.test.mjs`'s `RF-1`–`RF-4`). **YOU DO NOT CALL THIS VERB: the store's restore-to-a-position is not one of the instance's members, and what you observe is the consequence — the state you read after a refusal.** **AND IT IS NOT THE REGENERATION OF ITEM 3 ABOVE: a `rollback` of a dropped op rebuilds from the FILE because it has no mark to name, while this rebuilds from the FLOOR because it has one** (`D-180` item 6; `D-184` item 2 pins both halves in one cell).
545
+
499
546
  ---
500
547
 
501
548
  ## §6 · Watching for changes: the listener surface
@@ -521,6 +568,32 @@ are the listener surface and not a repair's write. **AND A LISTENER BODY THAT TH
521
568
  instants it refuses the act at rank `21` `ListenerBodyThrew` instead** (`§8.1`'s set, one member wider below;
522
569
  `docs/specs/storeroom-js/surface.md §2.7` item 4's carve).
523
570
 
571
+ **⟶ AND A `write` FIRES ONLY WHEN IT CHANGES THE VALUE THERE — THE FIRING LIST GAINS THE VALUE CONDITION, 2026-11-17 — `P-3`, `strata/decisions.md` · `D-193` AND `D-195`.** `RCA-8(g)` ANNOTATE-BESIDE: **the two clauses above — the shipped sentence and its `2026-11-06` correction — stand BYTE-FOR-BYTE and are read THROUGH this clause; no verb, no instant, no rank and no member moves — what moves is WHICH registrations a `write`'s list names.** **THE ARCHITECT, VERBATIM** (`D-193`): *"P-3 checks literal equivalence, not reference equality"*; **and** (`D-195`): *"Take the default on the blocker and proceed"*. **THE ONE SENTENCE: a `write` at an address whose value it does not change fires NOTHING — not the listeners at that address and not the listeners at any ADDRESS ABOVE IT** (an ancestor's value contains its subtree, and that did not move either). **THE FIVE ARMS, EACH WITH WHAT IT NOW MEANS, SO THE LIST ABOVE IS READ WHOLE:**
572
+
573
+ 1. **A `write`** — fires the registrations whose address is a prefix of its own **iff the literal it lands is not the literal an unqualified `read` already answers there** (`D-193` item 1: the comparison is on ONE LITERAL and not on the standing's per-tier list), **PLUS every registration at an address the act TOUCHED below it** — the nodes it created and the subtree of every version it purged — **and that second arm is NOT narrowed**: a second identical structured write still fires a registration below it, because those nodes *"exist after the write and did not before"* (`D-66`). **So a re-write of the same literal at a scalar address answers `triggered: []` and `watched: []`; a re-write of the same object with nodes below it fires those nodes' registrations and nothing above.**
574
+ 2. **A `delete`** — UNMOVED, and it is the second firing act for the same reason it always was: a delete that removed at least one version moved the value at its address, and a `delete` that removed nothing carries `triggered: []` (`D-3`).
575
+ 3. **A `rollback` whose judgement runs your pairs' repairs** — UNMOVED in its own right, and its DELIVERED set is the store's returned sets, so a repair whose write lands the literal already standing delivers nothing (`D-117`; `D-152`'s *"changed"* is READ AS ACT-EXISTENCE and its union narrows with the store's set — that is the accepted consequence of this release, not a defect).
576
+ 4. **The four REGISTRATION instants** — `storeCreate`, a boot over an existing `filePath`, `addConstraint` and a re-arm — UNMOVED, and each instant's delivery is narrowed by exactly the same rule, because it is the same returned set (item 1 above).
577
+ 5. **A READ STILL FIRES NOTHING, and `listen`/`register` themselves still fire nothing** — unmoved.
578
+
579
+ **⟶ AND THREE MORE A CONSUMER WILL MEET AT A CONSTRUCTION, ADDED 2026-11-17 — `P-2`, `strata/decisions.md` · `D-197`, `D-198`, `D-199`.**
580
+
581
+ - **A CONSTRUCTION THAT REFUSES NO LONGER LEAVES THE FILE IT MADE.** With a `filePath` that did not exist, a construction **creates a zero-length file before it
582
+ asks your constraints**; **if the construction then refuses, that file is removed — on EVERY refusing arm**, the post-round inconsistency and a thrown body
583
+ included, where earlier releases left it standing on two of them. **A file that existed before your call is never touched, and its bytes are never modified.**
584
+ **So: `storeCreate` either answers an instance and leaves its file, or refuses and leaves nothing behind.**
585
+ - **A LISTENER WHOSE ADDRESS DOES NOT RESOLVE IS NOT FIRED — AND AN ADDRESS *BELOW A SCALAR* DOES NOT RESOLVE.** A seed standing `{"a": 5}` with a listener
586
+ adopted at `['a','b']`: **the construction fires nothing for it**, because there is no node at that address to hand your body. **That is not a refusal and it is
587
+ not an error — it is the same silence any absent address gets**, and it now holds for the `LeafHasNoDownstream` shape as well as for `AddressNotFound`.
588
+ - **AND THE TWO SETS AT ONE INSTANT ARE TWO SETS, NOT ONE.** A construction's fired set is **your adopted listeners whose watched address exists** (the bullet
589
+ above); **a repair's own write inside that construction fires nothing where it lands the literal already standing** — that is `P-3`'s rule arriving at a
590
+ construction, and the two are deliberately not unified.
591
+
592
+ **AND TWO THINGS THIS GUIDE MUST SAY PLAINLY BECAUSE A CONSUMER WILL MEET THEM.**
593
+
594
+ - **THE TEST IS ON THE VALUE AND ON NOTHING ELSE, AND TWO OF ITS ANSWERS WILL SURPRISE YOU.** **`file 'V'` then `mem 'V'` fires NOTHING**, although `readTiered` now answers `{_tier:'mem'}` where it answered `{_tier:'file'}` and the address stands at two tiers where it stood at one; **and `0` written over a standing `-0` fires NOTHING**, although a constraint's own `sameStanding` would call the pair moved. **Both are the ruling's own price rather than a bug, and both are DECLARED here so that no later change "fixes" them** (`D-193` items 3 and 4: *"a later pass must not 'fix' this as a defect"*).
595
+ - **`triggered: []` NOW CARRIES TWO CLAIMS AND CANNOT TELL THEM APART.** **(A)** *"no registration stood at a prefix of this act's address, and the act touched no registered address"* — the reading it has always carried; **and (B)** *"registrations stood, and the literal the act landed is the literal the address already answered."* **The member is present either way and its emptiness is the same emptiness**, so `[]` alone does not tell you which. **`record.op` is still there on both arms** — a no-change write still mints and still names its op — **and a `file`-tier no-change write still SAVES** (identical bytes, and the file's mtime moves), so do not infer *"nothing happened"* from `[]`: infer *"no listener was told"*.
596
+
524
597
  ```js
525
598
  const handle = store.listen('greeting-watch', [['greeting']]); // YOU spell the handle; the addresses are a SET
526
599
  store.register(handle, (address) => { // handle + your function
@@ -673,7 +746,11 @@ itself** (§7.9's item 4, where the reason is given: the act's address is the st
673
746
  position moved is the caller's question).
674
747
 
675
748
  - **`write` answers `{op, watched, triggered}`** (`index.d.ts`, `WriteRecord`). **`op` is the store's own journal
676
- record and not a number** — `{opId, kind, address, tier, before, after, seq, compacted}` — and **the op's
749
+ record and not a number** — `{opId, kind, address, tier, before, after, seq}` — and **the op's
750
+ `compacted` member that this line printed until 2026-11-17 is REMOVED** (`strata/decisions.md` · `D-189` item 2:
751
+ *"If .compacted is always false drop it"* — a member that can hold one value carries nothing; the discrimination it
752
+ shared is the `journal_floor` watermark's, `D-160` item 3; the record carries SEVEN members and the removal is why
753
+ this release is a `MAJOR`, `D-190`) — and **the op's
677
754
  `opId` is a string** and is the token `rollback` accepts (`index.d.ts`, `JournalOp`). **`watched` carries
678
755
  ADDRESSES where `triggered` carries pairs — two types on purpose, so a call site cannot confuse the two lists**
679
756
  (`index.d.ts`, `WriteRecord`; `write-and-read.md §3.5`).
@@ -784,7 +861,9 @@ THIS IS A CLAIM ABOUT WHAT CROSSES AND IT MUST BE PRINTED RATHER THAN ASSUMED.**
784
861
  whose body writes `['b'] = 'bad'`, and a constraint at `['b']` that refuses `'bad'` with
785
862
  `{message: 'b may not be bad'}`. **WHAT THE DRIVE PRINTED, RAW:**
786
863
 
787
- - **THE CALLER'S `store.write(['a'], 'mem', 1)` ANSWERED NORMALLY** — `{op: {opId: 'op-1', kind: 'write', address:
864
+ - **⟶ THE PRINT BELOW IS THE READING OF ITS OWN DATE AND STANDS BYTE-FOR-BYTE; IT CARRIES A `compacted` KEY THE
865
+ RECORD NO LONGER HAS** (`D-189` item 2 removes the member; the drive was taken 2026-10-30). **THE CALLER'S
866
+ `store.write(['a'], 'mem', 1)` ANSWERED NORMALLY** — `{op: {opId: 'op-1', kind: 'write', address:
788
867
  ['a'], tier: 'mem', before: {present: false}, after: {present: true, value: 1}, seq: 1, compacted: false},
789
868
  watched: [['a']], triggered: [{handle: 'watch-a', address: ['a']}]}` — **no refusal, no status and no `log`
790
869
  member: nothing of the listener's outcome crossed.**
@@ -825,6 +904,13 @@ cross, while a raw throw is not a commit outcome and does cross, because the cal
825
904
  catches it on the way up — and the caller's write is then never answered at all.** **If you want a listener's
826
905
  failure to stay the listener's, catch it in the listener's own body.**
827
906
 
907
+ **⟶ ★ A LISTENER BODY MAY SUSPEND, AND THAT CHANGES WHAT YOUR ACT ANSWERS — 2026-11-17, `D-130` ITEMS 4–5.** **Everything §6.5 and §6.5a state about WHOSE failure crosses is unmoved; what this clause adds is the shape of the ANSWER when a body returns a promise.** **THE DELIVERED SET IS STARTED TOGETHER**: every body the set names is invoked, **none queues behind a sibling that suspended**, and **the answer is withheld until the whole set has SETTLED** — not until the first body returns. **So if any delivered body returned a thenable, your `write` and your `delete` answer a `Promise` that resolves with its record, and if none did they answer the record itself; a `rollback` never waits — its judgement's legs carry no settlement — and its record answers the frozen `{}` at both accessors** (`bindings/js/src/entry/instance.mjs`'s two settle sites; `delivery.mjs`'s `settledAnswer`, which cannot reject). **AND THE ANSWER NEVER BECOMES A REFUSAL: a body's rejection is a DATUM and never a rejection of your act, because by the instant a body can reject your act has already committed** (`D-138` items 1–2). **INTERFERENCE BETWEEN YOUR OWN ASYNC BODIES IS YOUR OWN HAZARD** — two bodies that order each other, depend on each other or write each other's addresses are outside what the package defends, exactly as two instances over one `filePath` are (`D-130` item 5) — **so if you need an order, impose it yourself: the package starts the set, waits for it and does nothing else.**
908
+
909
+ **★ AND A SETTLED DELIVERY PUTS TWO THINGS ON THE RECORD YOU ALREADY HAVE — `bodyFailures` AND `returnedValues`, 2026-11-17 (`D-138`; `D-149`; `D-150`).** **Both are NON-ENUMERABLE, `configurable` own GETTERS on the `write`'s record, the `delete`'s receipt and the `rollback`'s record — so `Object.keys(record)` is exactly what it was and every deep-equality over a receipt is unmoved; `Object.getOwnPropertyNames` is the census that sees them, and a spread or `Object.assign` copy LOSES both, exactly as it loses `discarded` and `log`** (`D-150` item 1).
910
+ - **`record.bodyFailures` is an object keyed by HANDLE, one entry per listener body that REJECTED**, each entry `{status, message, address}`: **`status` is `ListenerBodyRejected` — rank `23` below — `message` is the package's generated sentence over the WATCHED ADDRESS's spelling, and `address` is the address the body was bound at.** **THE BODY'S OWN REASON IS NEVER READ, STORED OR RENDERED** (`D-137` item 5; `D-58`), and **it is present on every arm, answering one shared frozen `{}` where nothing was rejected** — so an empty map never tells you *"no settle ran"* rather than *"nothing rejected"*.
911
+ - **`record.returnedValues` is an object keyed by HANDLE whose entry IS the value the body returned**, settled and never a promise. **A body that returned nothing contributes NO entry** — *"a listener that returns nothing should be assumed to only perform backend code that does not need the channel pass"* (`D-148` item 1(c)) — **and a body that REJECTED contributes none here either: its failure is the entry above and nothing of its reason crosses.** **It carries handles and no addresses: the `{handle, address}` pairs stay `triggered`'s** (`D-149` items 2–4).
912
+ - **AND THE STATUS ITSELF, SO YOU MEET IT AT THE MAP AND NOT AT A THROW: a DELIVERED body that REJECTS is a `ListenerBodyRejected`** — rank `23`, the closed set's newest member, its subject the watched address — **and it is a different arm from a body that THROWS**: **a throw is not caught, not retried and not reported, and it leaves your act UNANSWERED** (§6.5a), while **a rejection is the datum above and your act still answers.**
913
+
828
914
  ### §6.5a ★ THE ASYMMETRY IS THE DESIGN — a refusal is CONTAINED, a throw is NOT, and the reason is whose code failed
829
915
 
830
916
  **★ THE RULING, THE ARCHITECT, VERBATIM** (`strata/decisions.md` · `D-73`): *"Keep the throw so that the client can
@@ -1228,7 +1314,7 @@ store.read(['b']); // 11 — where the repair landed, inside the commit it is
1228
1314
 
1229
1315
  **WHAT THE EXAMPLE SHOWS, IN THE ORDER THE MACHINERY RUNS IT.** **Your constraint returns ONE object literal carrying both members** — `message` the refusal's sentence, `repair` a function — so both instants read the same pair. **The repair runs with ITS OWN RECORD, makes its OWN `write` at `['b']` with that record in the fourth position, and RETURNS `{ ok: true, op: landed.op }`: the store's own record of the write it just made, never a number and never a record you assembled yourself.** **And the credit is visible to you:** `written.op` is that same op — in the drive named below, `{"opId":"op-3","kind":"write","address":["b"],"seq":3,…}` — **so the op the repair returned IS the op its own edit produced, which is what makes the re-run come back through that op's own landing and hand your body the value the repair landed (`11`) while the address your pair judges still stands at `2`.** **The write answers its record because that re-run passes; a repair that returned an op it did not land fails `KC-4` instead.** **Note what is NOT in the block: no type annotation, no new symbol, no import the guide does not already publish (`§3`), and no fourth outcome arm.**
1230
1316
 
1231
- **MEASURED 2026-10-30, on this checkout, through the published entry (`bindings/js/index.mjs`), on the block above's exact bytes:** the write's own record carries `op` `{"opId":"op-3","kind":"write","address":["b"],"tier":"mem","before":{"present":false},"after":{"present":true,"value":11},"seq":3,"compacted":false}`, `store.read(['a'])` answers `2` and `store.read(['b'])` answers `11` — **so the repair was READ, its edit LANDED at the beside address, and its op was CREDITED.** **That drive is a measurement of the landing pass and not a committed test**; the package's own suite drives this arm at `tests/e2e/repair-in-commit.test.mjs`.
1317
+ **MEASURED 2026-10-30, on this checkout, through the published entry (`bindings/js/index.mjs`), on the block above's exact bytes — AND THE `compacted` KEY IN THE PRINT IS THE READING OF ITS DATE, THE MEMBER BEING REMOVED FROM `2026-11-17` BY `D-189` ITEM 2:** the write's own record carries `op` `{"opId":"op-3","kind":"write","address":["b"],"tier":"mem","before":{"present":false},"after":{"present":true,"value":11},"seq":3,"compacted":false}` — **the record today prints `{"opId":"op-3","kind":"write","address":["b"],"tier":"mem","before":{"present":false},"after":{"present":true,"value":11},"seq":3}`, seven members and no eighth** — `store.read(['a'])` answers `2` and `store.read(['b'])` answers `11` — **so the repair was READ, its edit LANDED at the beside address, and its op was CREDITED.** **That drive is a measurement of the landing pass and not a committed test**; the package's own suite drives this arm at `tests/e2e/repair-in-commit.test.mjs`.
1232
1318
 
1233
1319
  **(1) WHAT CROSSED.** **A repair's answer that the credit check does not admit FAILS THE ATTEMPT, and what your caller catches is the refusal crossing as the set's rank-`20` member `ConstraintPassRefused`, with the kernel's token `KC-4` riding the TERMINAL entry's `state`** — `KC-4` is the kernel's repair-failed token (`bindings/js/src/entry/kernel-foundations.mjs:62`), the crossing and the token's seat are declared at `docs/specs/storeroom-js/surface.md:2079`, and the repair-body path that answers it prints at `docs/specs/storeroom-constraints/contract.md:557`. **This clause names `KC-4` and declares no member of any set.**
1234
1320
  **(2) WHAT THE REFUSAL SAYS — THREE MESSAGES REACH THE ARM AND THE COPY BELOW IS THE FALL-THROUGH'S ALONE.** **The message a `KC-4` refusal carries is drawn from ONE OF THREE SOURCES, the choice among them standing at `bindings/js/src/entry/kernel-attempt.mjs:878`-`:883`: where `ok` is `true` and the op the return names is defective, the kernel's own OP-IDENTITY SENTENCE, which stands at `bindings/js/src/entry/kernel-foundations.mjs:1139`-`:1150` and which this clause NAMES AND NEVER QUOTES; where `ok` is `false` and the return's `message` is a non-empty string, THE CALLER'S OWN `message`, which is no kernel sentence at all, so a caller holding a `{ok: false, message}` refusal is holding THEIR OWN WORDS and not the copy below; and, on the remaining arm, the `produced no op` template at `bindings/js/src/entry/kernel-attempt.mjs:883`, COPIED ON 2026-11-01 FROM THAT ONE LINE, template literal and interpolations included, character for character:**
@@ -1625,6 +1711,8 @@ refusal (`js/contract.md §2.6`'s `D-53` clause, item `6`).
1625
1711
  **AND THE RECORD THAT SURVIVES THE HANDOFF HAS FOUR MEMBERS, NAMED HERE BECAUSE THE CLAUSE ABOVE SAYS WHAT IT HOLDS WITHOUT SPELLING ITS SHAPE: `{attempt, ops, outcome, rollback}`** — the attempt's identity, the ops the commit appended, the outcome it reached, and the reversal's record where one ran — **and NO message list.** **A log entry's position is its ARRAY INDEX (`D-65`), so *"an in-flight `seq` list"* above is read as an in-flight ENTRY list**: there is no `seq` member in it and no list to read while the attempt runs. (`D-58`; `D-65`; `bindings/js/src/entry/kernel-terminal.mjs`'s `dropHandoff`, which is where the closed record's four members are written; `D-55` item `6` is the seal they are frozen under.)
1626
1712
 
1627
1713
 
1714
+ **⟶ AND A CLOSED ATTEMPT'S REPORT IS RETAINED BY REACHABILITY AND NOT BY A COUNT, 2026-11-17 — `D-175`, `D-176`, WHICH WITHDRAW `D-162`'s WINDOW.** **A closed attempt's report lives EXACTLY AS LONG AS THE ATTEMPT CAN BE NAMED: while you still hold the attempt's reference — the `attempt` member of the `CommitRecord` a `delete`'s receipt carries (§7.8), an object carrying the attempt's own `id` — the readers answer it, and when no way of naming it is left the report goes with it.** **SO THE PACKAGE KEEPS NO WINDOW AND NO FIXED NUMBER OF ATTEMPTS**: the `1024` this guide would otherwise print has no reader, a fourth-thousand write and a sixteen-thousandth retain the same bytes per write (measured `0.80` B/write at `4,000` writes and `0.09` at `16,000`, pinned), and **the only bound left is how long your own code holds a reference.** **AND THE TWO FORMS OF NAMING AGREE, WHICH IS THE ONE THING WORTH KNOWING BEFORE YOU DEPEND ON EITHER: an attempt's `AttemptRef` record AND its bare `id` string both answer while the attempt lives** — the id is resolved through a weak index, so **the two can never disagree about whether the attempt is still answerable** (`parameter-semantics.md §2.15`, the archived constraints part) — **and an id that names nothing answers `KC-2`, the same refusal an id that never named an attempt already met.** (`D-175`; `D-176` items 1–3; `tests/e2e/kernel-attempt-window.test.mjs`'s `KAW-1`/`KAW-3`.)
1715
+
1628
1716
  **EVERY REFUSAL NAMES ITSELF** — by a `status` from the store's own closed set, and by a **human `message` that
1629
1717
  carries the address, the domain, and what was found instead.** The message is generated from the code and the
1630
1718
  failing trigger's arguments and never hand-authored at a call site
@@ -1633,6 +1721,16 @@ failing trigger's arguments and never hand-authored at a call site
1633
1721
 
1634
1722
  ### §8.1 The set is TWENTY-ONE and open by design
1635
1723
 
1724
+ **⟶ RE-DERIVED AGAIN 2026-11-17 — THE SET IS TWENTY-THREE, ON THE ARCHITECT'S RULING `D-137` ITEM 5, WHOSE MEMBER L1 PINS AT RANK `23` `ListenerBodyRejected`.** **`StoreStatus` carries TWENTY-THREE members, plus the open escape arm `(string & {})`** — `src/error.rs`'s `CODES` is `[&str; 23]` and the declaration of record carries the same twenty-three literals in the same rank order — **and the appended term is the DELIVERED LISTENER BODY's REJECTION: a body that rejects refuses the act that fired it, and the act's own record carries the refusal as a datum at `bodyFailures` (§6.5).** **NO RANK OF `1`…`22` MOVES, `ListenerBodyThrew` at rank `21` is NOT WIDENED by it, and the two are the promise pair's two halves: a THROW leaves your act unanswered and a REJECTION is answered as data.** The algebra reads `11 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 23` ✓. **Every paragraph, table row and title below is the reading of its own date and is read THROUGH this clause** (the guide's figures move with the set's own membership, which is this section's own rule); **the heading's `TWENTY-ONE` and the `TWENTY-TWO` of the clause below are the figures of their own dates and are read through this clause too.**
1725
+
1726
+ **AND THE THREE RANKS THE CLAUSES BELOW APPENDED ARE PRINTED HERE IN ONE PLACE, SO THE SET'S TAIL IS NOT LEFT TO BE GATHERED ACROSS FOUR DATED PARAGRAPHS:**
1727
+
1728
+ | rank | status |
1729
+ |---|---|
1730
+ | 21 | `ListenerBodyThrew` — a REGISTRATION-fired listener body's THROW, at the four registration instants and at those only (2026-11-06) |
1731
+ | 22 | `FileImageRefused` — a `filePath` whose bytes are not this store's image, at the CONSTRUCTION and at no other instant (2026-11-06) |
1732
+ | 23 | `ListenerBodyRejected` — a DELIVERED listener body that REJECTED, carried as the act's own datum (2026-11-17) |
1733
+
1636
1734
  **⟶ RE-DERIVED AGAIN 2026-11-06 — THE SET IS TWENTY-TWO, ON THE ARCHITECT'S RULING `D-126` ITEM `2`, VERBATIM:
1637
1735
  *"Mint/revive a code: a corrupt image refuses the construction"*, whose member L1 pins at `docs/L1/creation-sweep.md`
1638
1736
  `§3` `PIN-11` as rank `22` `FileImageRefused`.** **`StoreStatus` carries TWENTY-TWO members, plus the open escape
@@ -2305,14 +2403,21 @@ tree sharing no mutable member with the store or with another crossing**, which
2305
2403
  | host | where the raise is taken | judged? |
2306
2404
  |---|---|---|
2307
2405
  | `H1` | a constraint body, during a **write's pass** | **JUDGED** — the pairs asked `[9, 7, 5]` |
2308
- | `H2` | a repair body, during a **write's pass** | **JUDGED** — `[9, 7, 5]` |
2406
+ | `H2` | a repair body, during a **write's pass** | **JUDGED** — `[9, 7, 9]`: the terminal ask is the state the pass's own rollback left |
2309
2407
  | `H3` | a listener body, in a **write's delivery** | **JUDGED** — `[9, 5]` |
2310
2408
  | `H4` | a **registration's own evaluation** | **NOT JUDGED** — `[9]`; the DECLARED window (item 2 above) |
2311
2409
  | `H5` | a **`delete`'s listener delivery** | **NOT JUDGED** — `[9]`, and `discarded` reports it; the DECLARED window (item 1 above) |
2312
2410
  | `H6` | a constraint body, during a **`delete`'s own pass** | **JUDGED** — `[9, undefined, 5]` |
2313
2411
  | `H7` | a **reentrant reversal-then-write** (a listener reverses, then writes) | **JUDGED** — `[9, 5]` |
2314
2412
 
2315
- **SO THE MEASURED SET IS FIVE JUDGED AND TWO NOT, AND THE TWO ARE EXACTLY THE TWO WINDOWS DECLARED IN THE LIST ABOVE.** **A raise taken inside a pass is judged by that pass's own terminal check whichever verb opened the pass; a raise taken where NO PASS RUNS AT ALL — a registration's evaluation, a `delete`'s listener delivery — is not, and its effect stands, with the two exits intact.** (`D-42`; `D-54`'s three hosts, its item (a) and (b); `D-55` item 3; `D-64`; `tests/e2e/discard-witness.mjs` section `W16`, cells `DW-16.1`–`DW-16.4`: `DW-16.1` — `H6` judged, the asks, the refusal and the store printed — is **RED under a `/tmp` revert that removes the `delete`'s pass**, and `DW-16.3` — the seven-row table — is RED with it.)
2413
+ **SO THE MEASURED SET IS FIVE JUDGED AND TWO NOT, AND THE TWO ARE EXACTLY THE TWO WINDOWS DECLARED IN THE LIST ABOVE.**
2414
+
2415
+ **⟶ AND WHAT MAKES A ROW "JUDGED" IS NOW STATED RATHER THAN IMPLIED, 2026-11-17 — `D-168`, THE ARCHITECT, VERBATIM: *"Always judge the
2416
+ current state."*** **The judgement's subject is the state your store stands in at the instant it runs** — the kernel reads it off the store
2417
+ at that moment, so the value a pair is handed **is** the store's current read and cannot be a snapshot of an earlier one. **So a row is
2418
+ JUDGED when a judgement ran over the act, and the arrays beside it name the states the pair was handed — not a state it ought to have been
2419
+ handed.** **`H2`'s row shows the difference plainly**: a repair body's reversal is followed by the failing write's own rollback, so the
2420
+ terminal judgement is taken at the rolled-back state — *that* is the current state, and judging it is the law, not a lapse. **A raise taken inside a pass is judged by that pass's own terminal check whichever verb opened the pass; a raise taken where NO PASS RUNS AT ALL — a registration's evaluation, a `delete`'s listener delivery — is not, and its effect stands, with the two exits intact.** (`D-42`; `D-54`'s three hosts, its item (a) and (b); `D-55` item 3; `D-64`; `tests/e2e/discard-witness.mjs` section `W16`, cells `DW-16.1`–`DW-16.4`: `DW-16.1` — `H6` judged, the asks, the refusal and the store printed — is **RED under a `/tmp` revert that removes the `delete`'s pass**, and `DW-16.3` — the seven-row table — is RED with it.)
2316
2421
 
2317
2422
  **⟶ AND THE SENTENCE THAT STOOD HERE IS WITHDRAWN AS FALSE, 2026-10-28 — `D-54`, MEASURED, AND IT IS WITHDRAWN RATHER THAN NARROWED. THE BYTES WERE: *"And every pass that DOES run drains its own restart request — so the fail-state is bounded by the two acts that run none."* THE CONSUMER MEASURED THREE HOSTS WHERE NEITHER HALF HOLDS — a repair body, a delete's pass, and a reentrant reversal-then-write — AND IN EACH ONE A PASS RAN, THE REVERSAL WAS LEFT UNJUDGED, AND ITS EFFECT STOOD (zero judge invocations; the refused `5` still there). What follows replaces them and is true of the code after that fix.**
2318
2423
 
@@ -2465,7 +2570,124 @@ value with no `status` as a store refusal (§8.3).
2465
2570
 
2466
2571
  ---
2467
2572
 
2468
- ## §13 · What this guide does not cover
2573
+ ## §13 · The second realm: the WebAssembly build
2574
+
2575
+ **`@auspicion/provident-storeroom-js-wasm` IS THIS SAME STORE COMPILED TO WEBASSEMBLY, PUBLISHED AS ITS OWN PACKAGE**
2576
+ (`D-154` item 1; `D-157` item 1). **Nothing of it ships inside `provident-storeroom`, and nothing in this section moves a
2577
+ claim §1–§12 makes about `provident-storeroom`:** the store, its verbs, its tiers, its statuses and its receipts are the
2578
+ same code, **and what differs is how the bindings arrive and what the `file` tier means.**
2579
+
2580
+ ### §13.1 What it is, and how you construct one
2581
+
2582
+ **THE BINDINGS ARE HANDED IN AND NEVER LOOKED FOR.** The Node build resolves a `.node` artefact down three rungs
2583
+ (§2.3); **this one instantiates nothing, loads no addon and reaches no filesystem**, so the HOST instantiates the module
2584
+ and hands it in. **THE FACTORY TAKES TWO POSITIONS — `storeCreate(bindings, cfg)` — and the first is the module:**
2585
+
2586
+ ```js
2587
+ // the HOST instantiates: read or fetch the package's own `storeroom_js_binding_bg.wasm`, hand it to the glue's
2588
+ // own `initSync`, and pass the initialised module namespace to the factory as position one.
2589
+ const store = storeCreate(bindings, {
2590
+ journalLength: 256, // REQUIRED, as on the Node build
2591
+ listeners: [], // REQUIRED, even when empty
2592
+ saveCall, // OPTIONAL — how this arm saves (§13.2)
2593
+ initialImage, // OPTIONAL — the image text a store boots from (§13.3)
2594
+ });
2595
+ ```
2596
+
2597
+ **A FIRST POSITION THAT IS NOT THE MODULE IS REFUSED BEFORE ANY BYTE OF YOUR `cfg` IS READ** — `null`, `undefined`, a
2598
+ primitive, a function, and an object carrying no callable `storeCreate` — **in the package's own class form: a
2599
+ `TypeError` whose `status` member is ABSENT**, because **no store exists at that instant — no instance, no verb, no op**
2600
+ (`D-157` item 3; `bindings/js/src/entry/addon-slot.mjs`'s `installAddon`). **The slot is left empty by the refusal**, so
2601
+ every later call answers the same form rather than a half-installed table.
2602
+
2603
+ **`saveCall` AND `initialImage` ARE `cfg` KEYS ON BOTH ARMS** — they joined the four the construction already carried
2604
+ (`D-131`; `D-137`) — **and on this arm they are the whole of durability.** **THE ENTRY'S OWN LOAD-TIME GRAPH STAYS
2605
+ SYNCHRONOUS AND CARRIES NO `node:` SPECIFIER**, which is what lets the host hold the instance before the entry
2606
+ evaluates (`D-155` item 3; §13.5's `CW-4`). **And once the store exists, every member, record and refusal §3–§12 states
2607
+ answers as it does there: this arm is a second HEAD over one body, and the two `cfg` differences are the ones stated
2608
+ here.**
2609
+
2610
+ ### §13.2 `filePath` is REFUSED, and `saveCall` is how this arm saves
2611
+
2612
+ **THERE IS NO `filePath` ON THIS BUILD, AND THE REASON IS THE HOST'S: a browser has no filesystem to put a path in**
2613
+ (`D-154` item 4). **So the key is not in the arm's generated declaration (`filePath?: never`), the filesystem calls and
2614
+ the process-id read are compiled out with the writer and the reader they belong to, and a construction that supplies a
2615
+ path is REFUSED before any filesystem act — `FilePathUnreachable`, the store's own Path arm, its message naming the path
2616
+ you gave** (`tests/e2e/wasm-arm.test.mjs`'s `CW-2`).
2617
+
2618
+ **AND THE `file` TIER IS UNTOUCHED BY THAT REMOVAL: it means *durable with no path*.** **A `storeCreate` carrying a
2619
+ `saveCall` and no `filePath` IS a `file`-tier register** — set by the construction and spelled by nobody (`D-132`
2620
+ item 1) — **so a `file`-tier `write` LANDS on it, the receipt's `op.tier` reads `file`, and the value reads back.**
2621
+ **A construction with NEITHER a `saveCall` NOR a path is an ordinary `mem` register, where the same `file`-tier write is
2622
+ refused `ParentAnchorMonotonicityViolation`** — one verb, two stores, two answers, and the difference is only what you
2623
+ spelled at the construction (`CW-1`; `CW-5`).
2624
+
2625
+ **`saveCall(image)` IS THE SAVE: the package invokes it with THE STORE'S OWN IMAGE TEXT — ONE position, a string, the
2626
+ same text the store composes for its own image — and YOUR RETURN IS THE VERDICT.** **`{success: true}` is the passing
2627
+ arm**; **anything else is the failing arm: the write is rolled back in the journal and you receive `FileCommitFailed`
2628
+ after that rollback, as §9.4 says** (`D-146` item 2). **A failed save's own `message[]` rides in the log as `'save'`
2629
+ entries, one entry per string, so the reason you wrote is not lost** (`D-153` item 1). **AND THE CHANNEL IS WRITE-ONLY
2630
+ BY CONSTRUCTION** — you decide where the copy goes and the store cannot read it back — **which is why a dropped op's
2631
+ reversal answers `RollbackCompacted` on this arm (§5.4's item 3) and why `initialImage` is the only way into such a
2632
+ store** (`D-165` items 1–2). **`filePath` and `saveCall` are mutually exclusive**: a construction carrying both is
2633
+ refused, because two save mechanisms over one register is a state the store cannot answer for.
2634
+
2635
+ ### §13.3 `initialImage` is the seed, and the empty string is not one
2636
+
2637
+ **`initialImage` IS IMAGE TEXT AND NOTHING ELSE** — this store's own, exactly as `saveCall` is handed it — **and a store
2638
+ constructed with one boots from it with every admitted member installed at `file` tier** (`D-137` item 4). **On this arm
2639
+ it is the BOOTSTRAP, which is what makes a write-only save channel survivable: the image you kept seeds the store you
2640
+ rebuild.** **AN EMPTY STRING IS NOT A SEED AND IS REFUSED AS BROKEN CONFIG — `AddressMalformed`, the status a bad `cfg`
2641
+ already answers — and absence alone means *no seed*, so the creation state stands** (`D-147` item 4; `CW-2`).
2642
+
2643
+ ### §13.4 The clone law, and the two answers a `Proxy` gets
2644
+
2645
+ **THE CROSSING IS A DEEP COPY IN BOTH DIRECTIONS, AND HERE THAT IS A LAW AND NOT A HABIT.** A value you write is
2646
+ COPIED, so mutating your object afterwards changes nothing the store holds; a value you read is a FRESH TREE, so
2647
+ mutating what `read` answered changes nothing the store holds. **The ground is the ruling's own: *"allowing the app to
2648
+ change values managed by the store would circumvent listener/constraint detection"*** (`D-156` item 2) — **so a value
2649
+ never crosses by reference on this arm, no crossing holds a live handle into your object, and no application-side
2650
+ mutation can fire a listener or pass a constraint without a `write`** (`tests/e2e/wasm-arm.test.mjs`'s `CW-7`).
2651
+
2652
+ **AND THE `Proxy` QUESTION HAS TWO ANSWERS ON THIS ARM, WHICH IS THE ONE THING TO CARRY AWAY:**
2653
+
2654
+ - **A `Proxy` YOU PASS AS A VALUE IS REFUSED, AND NOT ONE TRAP RUNS.** **The arm's detector IS `structuredClone`** —
2655
+ a `Proxy` cannot survive serialisation, so **the refusal fires before any handler of yours is reached** — **and the
2656
+ answer is the one the Node build gives, `ValueRefusedAtBoundary`** (`D-156` item 1; `CW-7`'s eight trap counters all
2657
+ at `0`). **So a reactive store's own object — a `Proxy` on most client frameworks — is refused at every VALUE
2658
+ position, and passing the plain value (`toRaw`, a spread, a clone) is what the store takes.**
2659
+ - **A `Proxy` AT A CARRIER POSITION IS NOT DETECTED, AND THAT IS DECLARED RATHER THAN ACCIDENTAL.** `cfg` itself, a
2660
+ `listeners` entry, a `constraints` entry and the commit record the package builds **never enter the Rust store**, and
2661
+ the only platform signal that could tell a `Proxy` from its target cannot tell it from a carrier that carries a
2662
+ FUNCTION — **which the API's own keys require by definition** (`D-166` item 1; `D-167` items 1–2). **So a `Proxy`
2663
+ handed as `cfg` on this arm is READ rather than refused: its traps run for the reads a construction must make anyway,
2664
+ and a target missing a declared key is refused for that honest reason** (`D-167` item 5). **On the Node build the two
2665
+ questions share one instrument, and nothing about them moves.**
2666
+
2667
+ ### §13.5 What this build cannot do
2668
+
2669
+ - **IT HAS NO `commitFile`.** **The arm's module exports NINETEEN entries where the Node addon's set is TWENTY, and the
2670
+ one name absent by ruling is `commitFile`**: the writer is unreachable from JS by construction and from Rust by the
2671
+ empty-path early return, **so no declaration is owed for an entry that answers nobody** (`D-155` item 4, its figure
2672
+ re-cut to nineteen when the retirement's entry joined the set). **The retirement's own entry, `storeRelease`, is on
2673
+ BOTH arms** — a store you drop is released on either build (§1).
2674
+ - **IT CANNOT READ ITS OWN SAVES BACK.** The `saveCall` channel is write-only, so **the durable ground truth lives in the
2675
+ copy YOU keep**: **the store never reconstructs state from a file, a reversal needing a dropped op answers
2676
+ `RollbackCompacted`, and `initialImage` is the only seed** (§13.2, §13.3).
2677
+ - **IT CANNOT REFUSE A `Proxy` AT THE SETTINGS YOU CONSTRUCT IT WITH** — the declared loss in §13.4's second bullet, and
2678
+ the only one this arm takes.
2679
+ - **IT DOES NOT SHIP INSIDE `provident-storeroom`.** It is a sixth artefact with its own manifest, its own declaration,
2680
+ its own `version` line and its own licence copy, so **§11's `files` rows, `exports` arm and resolution rungs are the
2681
+ main package's alone** (`D-157` item 1; §11).
2682
+
2683
+ **THE CELLS THAT MEASURE ALL OF IT ARE `tests/e2e/wasm-arm.test.mjs`'s EIGHT — `CW-1`, `CW-2`, `CW-4`, `CW-5`, `CW-6`,
2684
+ `CW-7`, `CW-8`, `CW-9`** (`CW-3` is not one of them): the construction and its save, the `cfg` domain, the synchronous
2685
+ graph with no host specifier, the tier's two arms, the nineteen entries, the clone law with its eight trap counters, the
2686
+ retirement's entry, and the package's own finalizer reaching the arm. **Each of them BUILDS the arm and fails when it
2687
+ cannot**, so a green there is a build's green and not a claim's — **and none of them was driven against a published
2688
+ tarball: the released-bytes layer is open, exactly as §14 says of this guide's own claims.**
2689
+
2690
+ ## §14 · What this guide does not cover
2469
2691
 
2470
2692
  **Stated rather than left to be inferred, because a guide that hides its own edges is the next thing to fail
2471
2693
  quietly.**
package/README.md CHANGED
@@ -9,6 +9,15 @@ UNCLAIMED and each owes its declared answer** (`package.md §2`: Node CJS as a m
9
9
  `preload` and `renderer`, the browser, `worker_threads` and any IPC route). **No other realm is described here as
10
10
  supported.**
11
11
 
12
+ **⟶ AND ONE OF THOSE REALMS IS NOW SUPPORTED AS A BUILD, IN ITS OWN PACKAGE — 2026-11-17** (`D-154` item 1, the
13
+ architect's *"Lift the realm claim restriction and plan for the change"*; `D-157` item 1). **`@auspicion/provident-storeroom-js-wasm`
14
+ carries the same store on a WebAssembly host**, its bindings handed in instead of looked for: no Node-API addon, no
15
+ `filePath` (the key is not in domain there — a browser cannot write one), the `file` tier meaning *durable with no
16
+ path*, saved through a caller's `saveCall` and seeded through an `initialImage`. **IT IS A SECOND PACKAGE AND NOT A
17
+ SECOND ARM OF THIS ONE, AND NOTHING ABOVE MOVES FOR IT**: this package's realm claim, its one `exports` arm, its one
18
+ module name and its `require` condition stand byte-for-byte. **AND THE SENTENCE THIS PARAGRAPH SITS UNDER REMAINS
19
+ TRUE OF THIS PACKAGE**: what ships here reaches Node ESM and nothing else.
20
+
12
21
  **Node CJS stays UNCLAIMED as a module format: the package publishes NO CJS arm — no `.cjs` artefact, no `main`
13
22
  field and no second build — and it DOES publish a `require` condition on its one ESM entry, so a CJS host's
14
23
  `require` is supported at or above the floor.** **What remains your side of the boundary is the runtime feature
@@ -16,12 +25,13 @@ and the floor: below it the loader refuses the module and the package publishes
16
25
 
17
26
  **THE LICENCE OF RECORD IS `AGPL-3.0`** (`DD-43`): it is the repository's own `LICENSE`, and no clause of this
18
27
  package changes it. **AND THE LICENCE COPY TRAVELS WITH EVERY ARTEFACT, THIS PACKAGE'S OWN INCLUDED: each of
19
- the SIX artefacts — this package and the five platform packages — carries a copy of the repository's own
28
+ the SEVEN artefacts — this package, the five native platform packages and the WebAssembly package (`D-157` item 1,
29
+ 2026-11-17) — carries a copy of the repository's own
20
30
  `LICENSE` as the licence TEXT travelling with it, copied BYTE-FOR-BYTE at the release's own assembly step**
21
31
  (`docs/specs/storeroom-publish/contract.md §2.3` item 2; `distribution.md §4.3` item 2; `PUB-DD-11`; `Q3-5`).
22
32
  **The copy is an ARTEFACT-LEVEL fact and not a crate-level file**: no `LICENSE` byte is written under
23
33
  `bindings/js/` (`§2.3` item 4), the manifest's `files` allowlist names no `LICENSE` row, and **a tarball's own
24
- copy is not a fifth declaration site** — four AUTHORED sites stay four, while six artefacts CARRY a notice.
34
+ copy is not a fifth declaration site** — four AUTHORED sites stay four, while seven artefacts CARRY a notice.
25
35
 
26
36
  **★ AND THIS FILE IS THE SHIPPED HALF OF A TWO-PART STORY: the long-form consumer guide — every member, every
27
37
  refusal, every file-tier reading and the measured behaviour behind each — **TRAVELS WITH THIS PACKAGE at
@@ -40,7 +50,7 @@ an edit belongs.
40
50
 
41
51
  **⟶ AND THE ONE FIGURE THIS PAGE CAN BE RIGHT ABOUT IS GENERATED AND ASSERTED, 2026-10-28 — `DEF-AC`'s third part, and `D-57`'s one surviving figure.** `RCA-8(g)` ANNOTATE-BESIDE: **every clause above stands BYTE-FOR-BYTE and is read THROUGH this one; nothing above moves.** **THE DEFECT THIS CLOSES: THIS PAGE DECLARED NO VERSION AT ALL** — a shipped document a consumer reads first, saying nothing about which release it describes — **so `scripts/publish.sh --figures` now GENERATES the line below from `bindings/js/package.json`'s `version` and REFUSES when it disagrees, exactly as it does at the guide's and the change list's own marked lines: three shipped documents, three version lines, one generator, one assertion.** **AND THE CUT-STATE IS NOT STATED HERE, OR ANYWHERE ELSE IN THIS PACKAGE'S DOCUMENTS** (`D-57`, the architect verbatim: *"Drop the cut-state"*): a document is sealed before the tag that would make its cut-state true, so **the cut-state is not a document's to state**; the record of what has been cut is the change list's, and it is past tense. **EVERY OTHER CLAIM OF THIS PAGE STANDS EXACTLY AS IT STOOD.**
42
52
 
43
- PUBLISH-README-VERSION-LINE: THE VERSION THIS README DESCRIBES IS `1.12.0`.
53
+ PUBLISH-README-VERSION-LINE: THE VERSION THIS README DESCRIBES IS `2.0.0`.
44
54
 
45
55
  ## The one entry
46
56
 
@@ -61,14 +71,15 @@ the package's own resolution step and is not an entry point.**
61
71
 
62
72
  ## The surface
63
73
 
64
- **`storeCreate(cfg)` answers an instance carrying exactly FOURTEEN own members** — `10 + 1 + 1 + 2 = 14` ✓ —
65
- **and they are these fourteen and no others** (`bindings/js/index.d.ts`, `StoreInstance`;
74
+ **⟶ AND THE FIGURE IS FIFTEEN, 2026-11-17: `readTiered` (the tier readout) was in the instance and absent from this table.** **`storeCreate(cfg)` answers an
75
+ instance carrying exactly FIFTEEN own members** — `10 + 1 + 1 + 1 + 2 = 15` ✓ — **and they are these fifteen and no others** (`bindings/js/index.d.ts`, `StoreInstance`;
66
76
  `docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 9):
67
77
 
68
78
  | The member | Its answer |
69
79
  | --- | --- |
70
80
  | `read(address, tier?)` | a leaf's literal, a branch's assembled value, or the empty address's whole register |
71
81
  | `readLiteral(address, tier?)` | the same, narrowed to a leaf (`ReadTargetIsBranch` on a branch) |
82
+ | `readTiered(address)` | `{ value, tier }[]` — the standing versions at an address and the tier each is at; **a shadowed address answers more than one** |
72
83
  | `write(address, tier, value, commit?)` | `{op, watched, triggered}` — **four positions, `commit` the fourth and optional** |
73
84
  | `delete(address, tier?)` | `{address, op, tiers, triggered}`, plus a non-enumerable `discarded` witness |
74
85
  | `rollback(opId)` | `{opId, undoneOps, restoredTo}` |
@@ -129,7 +140,14 @@ SPELLING — wrong, not redundant. **AND NO OWN MEMBER IS A DATA MEMBER:** there
129
140
  field and no getter over the register; `store.read(address)` is the route to state. **There is no release
130
141
  verb** — construct one store and keep it for the process's life.
131
142
 
132
- ### The construction's four keys
143
+ **⟶ AND THAT SECOND SENTENCE IS NOW BEHAVIOUR RATHER THAN ADVICE, 2026-11-19 — `D-171` ITEMS 1–3.** **THERE IS STILL NO RELEASE VERB AND NO MEMBER MOVES.** What changed is that **a store you DROP is now released**: the package holds the store's own index in a `FinalizationRegistry` and hands it to the addon's `storeRelease` when the instance is collected, and that entry drops the store and empties its slot in one act — **before this landing a constructed-and-dropped store stayed in the addon's table for the process's life (`~573,112` bytes per construct-and-drop against `~42,000` after it)**, and **the WebAssembly artefact carries the same entry** (`bindings/js/src/facade.rs`; `bindings/js/src/wasm.rs`; `tests/e2e/store-retirement.test.mjs`). **So one store per process is still the shape the register wants, and it is no longer a rule you keep in order not to leak.**
144
+
145
+ ### The construction's six keys
146
+
147
+ **⟶ AND THE COUNT IS SIX FROM 2026-11-17 — THE HEADING SAID FOUR AND THE TREE TAKES SIX.** `saveCall` and `initialImage` joined `filePath` and the two
148
+ required keys (`journalLength`, `listeners`) along with `constraints`; **the heading and every sentence that counts them read six.** **The two newest are the
149
+ ones a path-less store needs** (`saveCall` is how such a store saves and `initialImage` is the only way it can start with state), **and `§13` of the guide is
150
+ where they are described.**
133
151
 
134
152
  **`cfg` carries FOUR declared keys and no fifth: `filePath` · `journalLength` · `listeners` · `constraints`**
135
153
  (`parameter-semantics.md §2.21`; `docs/specs/storeroom-native/contract.md §7.1`). `journalLength` and