@auspicion/provident-storeroom-js-wasm 0.0.0-stage → 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/BUILD-INFO.txt +3 -0
- package/LICENSE +662 -0
- package/README.md +424 -2
- package/index.d.ts +2029 -0
- package/index.mjs +132 -0
- package/package.json +40 -4
- package/src/constraint-kernel.mjs +4 -0
- package/src/entry/addon-slot.mjs +484 -0
- package/src/entry/artefact-node.mjs +327 -0
- package/src/entry/artefact.mjs +57 -0
- package/src/entry/carrier.mjs +1011 -0
- package/src/entry/class-decision.mjs +1278 -0
- package/src/entry/class-instrument.mjs +186 -0
- package/src/entry/constraints.mjs +3953 -0
- package/src/entry/delivery.mjs +1697 -0
- package/src/entry/frame.mjs +616 -0
- package/src/entry/instance.mjs +2312 -0
- package/src/entry/kernel-attempt.mjs +1392 -0
- package/src/entry/kernel-commit.mjs +384 -0
- package/src/entry/kernel-foundations.mjs +1565 -0
- package/src/entry/kernel-loader.mjs +53 -0
- package/src/entry/kernel-registration.mjs +1377 -0
- package/src/entry/kernel-terminal.mjs +593 -0
- package/src/entry/refusal.mjs +216 -0
- package/src/entry/state.mjs +1484 -0
- package/storeroom_js_binding.d.ts +350 -0
- package/storeroom_js_binding.js +813 -0
- package/storeroom_js_binding_bg.wasm +0 -0
- package/storeroom_js_binding_bg.wasm.d.ts +28 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,2029 @@
|
|
|
1
|
+
// `provident-storeroom` — **THE AUTHORED TYPE DECLARATION OF THE PUBLISHED NODE ESM BINDING**
|
|
2
|
+
// (`docs/specs/storeroom-publish/contract.md §2.4`; `docs/specs/storeroom-publish/distribution.md §5`;
|
|
3
|
+
// `PUB-DD-3`; `Q3-4`).
|
|
4
|
+
//
|
|
5
|
+
// **THIS FILE IS HAND-AUTHORED AND NOT GENERATED** (`§2.4` item 1; `PUB-DD-21`): it carries no generation
|
|
6
|
+
// banner, no build-time code generator produces it, and it is the file the package's own `types` field
|
|
7
|
+
// reaches and the package's own `files` allowlist ships.
|
|
8
|
+
//
|
|
9
|
+
// **IT DECLARES THREE THINGS AND NOTHING ELSE** (`distribution.md §5.2`): (1) the claimed entry's OWN
|
|
10
|
+
// NAMED EXPORT SET — **ONE NAME, `storeCreate`, AND NOTHING ELSE** (`surface.md §2.9` item 1's `A127`
|
|
11
|
+
// clause; `docs/decisions.md` · `A127`/`A128`, 2026-10-16: the module-level count is `11 → 1` ✓, the
|
|
12
|
+
// deprecation window of `A128`'s fiat being declared away at that clause); (2) the instance's own member
|
|
13
|
+
// set, **FOURTEEN OWN MEMBERS AND NOTHING ELSE — `10 + 1 + 1 + 2 = 14` ✓** (`distribution.md §5.2` item 2 read
|
|
14
|
+
// with `surface.md §2.4` item 9 (f)'s `A127` clause): **THE TEN METHODS** `read(address, tier?)` ·
|
|
15
|
+
// `readLiteral(address, tier?)` · `write(address, tier, value, commit?)` · `delete(address, tier?)` ·
|
|
16
|
+
// `rollback(opId)` · `listen(handle, addresses)` · `unlisten(handle)` · `addConstraint(pair, constraint)` ·
|
|
17
|
+
// `constraintOn(pair, constraint)` · `constraintOff(pair, constraint)`, **PLUS `register(handle, listener)
|
|
18
|
+
// -> undefined`, `constraints() -> ConstraintPair[]`, `removeListener(handle) -> undefined` AND
|
|
19
|
+
// `removeConstraint(pair) -> undefined`** — the first two the singles the 2026-10-18 clause below names, the
|
|
20
|
+
// last two the members `contract.md §2.7` item 9 adds — the first being the
|
|
21
|
+
// listener registration, the second the registered-pair read; **`settle(record) -> undefined` STOOD HERE
|
|
22
|
+
// AS THE ORDERING SEAM AND IS REMOVED WHOLE** (the clause below carries the mark and the ruling); and (3) the
|
|
23
|
+
// failure surface, a thrown plain object with exactly
|
|
24
|
+
// `{status, message, log, address}` — **THREE MEMBERS FROM 2026-10-16, `2 → 3`, on the architect's ruling *"Bubble
|
|
25
|
+
// the message log to the client on failure, override any clauses that forbid this."*** (`surface.md §2.5`'s
|
|
26
|
+
// clause of that date, the crossing form's ONE home; **the ONE figure that moves is the arity, and
|
|
27
|
+
// `storeCreate` remains the namespace's one name and the product its twelve own members**).
|
|
28
|
+
//
|
|
29
|
+
// **⟶ AND THE FORM IS FOUR MEMBERS FROM 2026-10-29 — `D-77`, THE ARCHITECT'S RULING, ONE WORD: *"New member"*.**
|
|
30
|
+
// `RCA-8(g)` ANNOTATE-BESIDE: **the sentence above stands BYTE-FOR-BYTE as the reading of 2026-10-16 and is read
|
|
31
|
+
// THROUGH THIS one; the operative member set is `{status, message, log, address}`, `4` members, and the fourth is
|
|
32
|
+
// WHICH ACT WAS REFUSED** — the address the refusal is about, a segment array in the caller's own domain or the
|
|
33
|
+
// declared `null` where nothing is nameable — **so a caller can tell its own refused act from a listener's whose
|
|
34
|
+
// act was refused with the same `status`, the same `message` and the same entries.** **THE CLOSED STATUS SET IS NOT
|
|
35
|
+
// REACHED (twenty stands) AND NO OTHER FIGURE OF THIS HEADER MOVES.** (`storeCreate`'s one name, the product's
|
|
36
|
+
// fourteen own members, `LogEntry`'s five and the twelve/ten method figures are unmoved.)
|
|
37
|
+
//
|
|
38
|
+
// **⟶ AND THE METHOD LIST ABOVE CARRIES ONE STALE SPELLING AND ONE STALE ARITY, SUPERSEDED HERE, 2026-10-19:**
|
|
39
|
+
// **`listen` IS `listen(handle, addresses)` AND NOT `listen(address)` — arity `2`, position `1` the
|
|
40
|
+
// caller-spelled `handle` (a non-empty `string`) and position `2` `addresses`, a SET of addresses whose
|
|
41
|
+
// member is an address and whose EMPTY ARRAY is in the domain** (`docs/specs/storeroom-held-listener-identity/
|
|
42
|
+
// contract.md §2.2` item 1; `listen-verb.md §1` item 1 and `§2.2` items 1–2: the arity figure moves `1 → 2`
|
|
43
|
+
// at four declared sites, each needing its own dated clause). **THE BYTES LISTING `listen(address)` STAND AS
|
|
44
|
+
// THE PRE-2026-10-18 READING AND ARE READ THROUGH THIS CLAUSE** (`DEF-2026-10-02`: no whole-file rewrite).
|
|
45
|
+
//
|
|
46
|
+
// **⟶ AND THE MEMBER-SET FIGURE ABOVE IS SUPERSEDED AND IS READ THROUGH THIS CLAUSE, 2026-10-18: THE
|
|
47
|
+
// OPERATIVE SET IS TWELVE OWN MEMBERS, `10 + 1 + 1 = 12` ✓ — THE TEN METHODS, `register` AND `constraints`** —
|
|
48
|
+
// declared at `surface.md §2.4` item 9 (f)'s clause of that date, which moves the set `13 → 12` on the
|
|
49
|
+
// architect's rulings of 2026-10-18, VERBATIM: *"Settle is redundant because the kernel is always in the
|
|
50
|
+
// loop."* · *"Always route to the kernel, because the JS code does not decide whether constraints trigger."* ·
|
|
51
|
+
// *"The kernel is always supposed to be in the middle. Any occasion where the write path is not governed by
|
|
52
|
+
// the kernel is a hallucination."* **`settle` IS THE MEMBER THAT LEAVES AND NO OTHER MEMBER MOVES WITH IT**
|
|
53
|
+
// (`§2.4` item 9's `REMOVED-WHOLE` pointer of the same date, whose own words are *"NO DRIVE MAY ASSERT A CALL
|
|
54
|
+
// OF `settle` FROM THIS DATE, ON ANY INSTANCE, FOR ANY ARGUMENT"*). **THE TWO REMAINING SINGLES ARE `register`
|
|
55
|
+
// AND `constraints`, AND THEY ARE NAMED BECAUSE A LONE `+1` WOULD NOT COMPUTE.** **SO A DECLARATION FILE THAT
|
|
56
|
+
// STILL DECLARES A `settle(record) -> undefined` MEMBER AT ANY POSITION, OR THAT READS THIRTEEN OWN MEMBERS,
|
|
57
|
+
// AFTER THIS DATE IS A FINDING BY THAT CLAUSE'S OWN WORDS** (`surface.md §2.4` item 9 (f)'s clause of
|
|
58
|
+
// 2026-10-18, item 4: *"a declaration file that still reads THIRTEEN own members, or that declares a
|
|
59
|
+
// `settle(record) -> undefined` member at any position, after this date is a FINDING"*). **THE BYTES ABOVE
|
|
60
|
+
// STAND AS THE `A127` PASS'S READING (`DEF-2026-10-02`: no whole-file rewrite) and every "twelve own members"
|
|
61
|
+
// figure in this file is read through the 2026-10-17 thirteen-mark and through THIS clause as TWELVE AGAIN,
|
|
62
|
+
// with the thirteen being the 2026-10-17 reading and not the operative one.** **THE TWO ROUTES THAT WOULD
|
|
63
|
+
// HAVE MOVED THE SET EARLIER ARE STILL REFUSED BY NAME AND NEITHER IS ONE OF THESE** (`§2.5`'s clause of
|
|
64
|
+
// 2026-10-16: a `constraintLog(commit)` reader and a second module-namespace name).
|
|
65
|
+
//
|
|
66
|
+
// **⟶ AND THE MEMBER-SET FIGURE ABOVE IS SUPERSEDED AND IS READ THROUGH THIS CLAUSE, 2026-10-19: THE
|
|
67
|
+
// OPERATIVE SET IS FOURTEEN OWN MEMBERS, `10 + 1 + 1 + 2 = 14` ✓ — THE TEN METHODS, `register`, `constraints`
|
|
68
|
+
// AND THE TWO REMOVE MEMBERS `removeListener(handle)` AND `removeConstraint(pair)`** — **WHICH SUPERSEDES THE
|
|
69
|
+
// METHOD LIST'S OWN *"THE TWO REMAINING SINGLES ARE `register` AND `constraints`"* OF 2026-10-18: the singles
|
|
70
|
+
// that remain are still those two, and the fourteen-member set carries them PLUS the two remove members, so
|
|
71
|
+
// no reader counts the `+ 2` into the singles** — declared at
|
|
72
|
+
// `docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 9, THE MEMBER SET `14`, whose own list
|
|
73
|
+
// is `{ read, readLiteral, write, delete, rollback, listen, unlisten, addConstraint, constraintOn,
|
|
74
|
+
// constraintOff, register, constraints, removeListener, removeConstraint }`. **THE FIGURE MOVES `12 → 14`
|
|
75
|
+
// and the two new members are reached through the factory's product ALONE — the module namespace keeps its
|
|
76
|
+
// ONE name (`11 → 1` ✓), because the two new members are NOT module exports** (`contract.md §2.7` item 9's
|
|
77
|
+
// `[CENSUS]` and its closing clause). **AND THE `12 → 13` FIGURE IS WITHDRAWN BY NAME: the thirteen-mark of
|
|
78
|
+
// 2026-10-17 is a SUPERSEDED READING and was never the operative one** (`P: docs/pending.md · (AA-5)`,
|
|
79
|
+
// verbatim: *"the member set is 14 and the `12 → 13` figure is withdrawn by name"*). **SO EVERY "twelve own
|
|
80
|
+
// members" FIGURE BELOW — the `A127` pass's reading at its own bytes, the 2026-10-18 clause's operative
|
|
81
|
+
// `TWELVE`, and `StoreInstance`'s `"THE TWELVE"` — IS READ THROUGH THIS CLAUSE AS FOURTEEN, and a
|
|
82
|
+
// declaration file that declares twelve while the product ships fourteen is the FINDING `contract.md §2.7`
|
|
83
|
+
// item 9 exists to prevent.** **THE TWO ROUTES THAT WOULD HAVE MOVED THE SET EARLIER ARE STILL REFUSED BY
|
|
84
|
+
// NAME AND NEITHER IS ONE OF THESE** (`§2.5`'s clause of 2026-10-16: a `constraintLog(commit)` reader and a
|
|
85
|
+
// second module-namespace name) — the 2026-10-18 paragraph's closing sentence above stands BYTE-FOR-BYTE and
|
|
86
|
+
// is read through this clause.
|
|
87
|
+
//
|
|
88
|
+
// **THE TEN METHODS TAKE THE RECEIVER'S OWN POSITION AWAY: `8 → 1` ✓ AND `4 → 12` ✓** (`surface.md §2.9`
|
|
89
|
+
// item 1's and `§2.4` item 9 (f)'s `A127` clauses). The seven verbs that reach the store are METHODS of the
|
|
90
|
+
// object `storeCreate` returned, so **NO DECLARED SIGNATURE CARRIES A LEADING `instance` POSITION** — the
|
|
91
|
+
// receiver is not a position — and the module namespace's own spelling, not a second name at any layer,
|
|
92
|
+
// is what a consumer reaches them through. **`on` AND `off` ARE MERGED AWAY BY `A127` AND ARE NOT
|
|
93
|
+
// MEMBERS**: the listener registration route is `listen` + `register` and its withdrawal is `unlisten`.
|
|
94
|
+
//
|
|
95
|
+
// **AND THE RECORDS THOSE METHODS ANSWER WITH ARE DECLARED BESIDE THEM, WHICH IS STILL PART (1) AND NOT A
|
|
96
|
+
// FOURTH THING**: `Address` · `Tier` · `TierSet` · `StoreConfig` · `BaseState` · `JournalOp` ·
|
|
97
|
+
// `WriteRecord` · `DeleteRecord` · `RollbackRecord` · `Handle` · `Listener` are the SHAPES OF THE
|
|
98
|
+
// ARGUMENTS AND OF THE ANSWERS, in `DD-39`'s own member spellings (the sibling directory's `contract.md
|
|
99
|
+
// §0.2`), and a declaration that did not carry them would declare one name and no surface. **None of
|
|
100
|
+
// them is a STORE type**: no register, no anchor, no tier tree, no journal and no store verb is declared
|
|
101
|
+
// here (`§5.2` item 4).
|
|
102
|
+
//
|
|
103
|
+
// **AND TWO MORE SHAPES STAND BESIDE THOSE ELEVEN WITHOUT A BYTE OF EITHER BEING MINTED HERE, BECAUSE THE
|
|
104
|
+
// WRITE'S COMMIT POSITION IS THE KERNEL'S OWN RECORD AND NOT THIS PACKAGE'S** (`§2.4` item 9
|
|
105
|
+
// (f)'s *"each with its argument types"* read with its *"no `pending`-shaped record type this unit does
|
|
106
|
+
// not declare"*): **`AttemptRef` (`1` member) and `CommitRecord` (`4` members — `attempt` · `op` ·
|
|
107
|
+
// `triggered` · `pending`) are THE KERNEL'S OWN NAMED SHAPES, DECLARED BY THE KERNEL AND NOT BY THIS
|
|
108
|
+
// UNIT** (`kernel-surface.md §1` item 4's closed record enumeration; its `§2.1` item 2 for the record's
|
|
109
|
+
// four members; `attempt-lifecycle.md §2.4` item 1 for the one-member `AttemptRef`) — so the record position
|
|
110
|
+
// carries its own `pending` member and this file MINTS NO RECORD TYPE OF ITS OWN to carry it.
|
|
111
|
+
// **⟶ RE-DERIVED BY NAME, 2026-11-01 — THE SENTENCE ABOVE IS SUPERSEDED IN FACT AND STANDS AS THE READING OF ITS
|
|
112
|
+
// OWN DATE, READ THROUGH THIS CLAUSE** (`RCA-8(g)` ANNOTATE-BESIDE; `strata/decisions.md` · `D-101`, whose
|
|
113
|
+
// `⟶ ANSWERED` clause is the architect's word of that date, verbatim: *"Widen the position to its class test"*).
|
|
114
|
+
// **THE COMMIT POSITION'S DECLARED TYPE IS `CommitCarrier` — THE CLASS TEST'S OWN CLASS, ONE member, `pending`,
|
|
115
|
+
// spelled exactly as `CommitRecord.pending` spells it — declared and exported at this file's end, and `write`'s
|
|
116
|
+
// fourth position names it** (`bindings/js/src/entry/delivery.mjs:27`-`:54`, the predicate at `:39`; the position's
|
|
117
|
+
// own docblock already wrote the class test, and the type now agrees with it). **SO THE PASS DOES MINT ONE RECORD
|
|
118
|
+
// TYPE, AND THE SENTENCE'S *"this file MINTS NO RECORD TYPE OF ITS OWN to carry it"* IS WITHDRAWN BY NAME —
|
|
119
|
+
// withdrawn as a READING, while its bytes stand above byte-for-byte.** **`CommitRecord` KEEPS EVERY BYTE, ITS FOUR
|
|
120
|
+
// MEMBERS AND ITS EXPORT**: what it loses is being the position's SOLE declared type — it is ONE CARRIER of the
|
|
121
|
+
// class and never the position's only type — **and a `pending`-shaped name now stands in a file that said it
|
|
122
|
+
// minted none.**
|
|
123
|
+
// **`AttemptRef` and `CommitRecord` are therefore not STORE types either, and not store records**: they
|
|
124
|
+
// are kernel-side shapes, cited from their own unit's declaration.
|
|
125
|
+
// **⟶ AND THE POSITION THEY ARE CITED FOR MOVED WITH `settle`'s REMOVAL, 2026-10-18**: `settle`'s own
|
|
126
|
+
// argument is gone with the member, and these two shapes now stand here for the ONE position that still
|
|
127
|
+
// reads a `CommitRecord` — the `commit` argument of `write` (`§2.4` item 9 (g) item 1's class test, the
|
|
128
|
+
// record position `A120` (1) admits). **THE SHAPES THEMSELVES ARE UNMOVED AND `CommitRecord` KEEPS ITS
|
|
129
|
+
// `FOUR` MEMBERS, `pending` AMONG THEM** (`§2.4` item 9's adoption-machinery clause of that date, item
|
|
130
|
+
// `(vi)`: *"THE ADOPTION SYSTEM CONSUMED IT AND DID NOT OWN IT"*).
|
|
131
|
+
//
|
|
132
|
+
// **AND THE ONE THING THIS DECLARATION MUST NOT CARRY, STATED SO THE FINDING RULE IS CHECKABLE**
|
|
133
|
+
// (`distribution.md §5.2` item 4): **it declares NO store type, NO store verb, NO `findAddress`, NO
|
|
134
|
+
// release verb and NO constraint or repair seam** — each of those is a declaration the sibling directory
|
|
135
|
+
// refuses, and a declaration file carrying one would declare a surface the package does not publish.
|
|
136
|
+
//
|
|
137
|
+
// **⟶ AND THE LIMITS OF THIS FILE ARE STATED RATHER THAN IMPLIED, ADDED 2026-10-17** (`DEF-2026-10-16-Q`:
|
|
138
|
+
// *"`bindings/js/index.d.ts` IS TYPE-CHECKED NOWHERE, AND THE TYPES SHIP TO CONSUMERS"*). **NOTHING IN THIS
|
|
139
|
+
// REPOSITORY TYPE-CHECKS THIS FILE — no `tsc`, no `tsd`, no `checkJs` and no type-test file anywhere in the
|
|
140
|
+
// tree — so EVERY CHANGE MADE HERE IS TEXTUAL: it is a claim read by a HUMAN and by a consumer's own
|
|
141
|
+
// compiler, never a claim this repository's own suite can fail on.** **THE THREE CLAIMS A `TypeScript`
|
|
142
|
+
// DECLARATION CANNOT ENFORCE, EACH NAMED SO NO READER READS THEM AS ENFORCED:**
|
|
143
|
+
// 1. **`tier?: TierSet` CANNOT EXPRESS SUPPLIED-VERSUS-OMITTED `undefined`** (`PAR-JS-6`: a SUPPLIED
|
|
144
|
+
// `undefined` at the tier position is PRESENT and takes the store's `AddressMalformed`, while the call
|
|
145
|
+
// that supplied NOTHING there folds to the ABSENT row). An optional parameter admits both spellings
|
|
146
|
+
// identically and no type can separate them; the distinction is a RUNTIME one, driven at
|
|
147
|
+
// `a127-surface.test.mjs`.
|
|
148
|
+
// 2. **`Address = readonly (string | number)[]` CANNOT EXPRESS NON-NEGATIVE INTEGER** (`PAR-JS-5`). The
|
|
149
|
+
// domain is a string key or a non-negative integer a `u64` can carry exactly; `number` admits `-1`,
|
|
150
|
+
// `1.5`, `NaN` and `Infinity`, each of which the boundary REFUSES with the store's own
|
|
151
|
+
// `AddressMalformed`. The narrowest lawful widening a declaration can make is `number`, and this file
|
|
152
|
+
// makes it.
|
|
153
|
+
// 3. **THE INSTANCE'S *"TWELVE OWN MEMBERS AND NOTHING ELSE"* IS NOT STRUCTURALLY ENFORCEABLE HERE**
|
|
154
|
+
// (`§2.4` item 9 (f)'s `A127` clause; `§2.9` item 1's) — **AND THE COUNT IT NAMES IS THE SUPERSEDED ONE:
|
|
155
|
+
// THE OPERATIVE FIGURE IS FOURTEEN, read through the member-set clause of 2026-10-19 above**
|
|
156
|
+
// (`docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 9). An interface declares the
|
|
157
|
+
// members a value HAS
|
|
158
|
+
// and constrains no excess member, so a product carrying a thirteenth own member still satisfies
|
|
159
|
+
// `StoreInstance`. The count is driven at the boundary instead (`a127-surface.test.mjs`'s
|
|
160
|
+
// `Object.getOwnPropertyNames` cell, which exists precisely because this declaration cannot fail on it).
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* A position in the register: the address a verb is called at, as a sequence of path segments.
|
|
164
|
+
*
|
|
165
|
+
* **A SEGMENT IS A `string` (a key) OR A NON-NEGATIVE INTEGER (an index)** — `PAR-JS-5`'s own domain, and the
|
|
166
|
+
* domain the shipped walk admits and the store's own records return. **`readonly string[]` WAS THE SHIPPED
|
|
167
|
+
* DECLARATION AND IS FALSE OF EVERY ADDRESS CARRYING AN INDEX**, so a consumer compiling the lawful
|
|
168
|
+
* `read(instance, ['key', 0])` met a type error on a correct call.
|
|
169
|
+
*/
|
|
170
|
+
export type Address = readonly (string | number)[];
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The tier a verb is called at: the store's own persistence tokens.
|
|
174
|
+
*
|
|
175
|
+
* **THE DOMAIN IS THE STORE'S THREE TOKENS — `'mem'` · `'file'` · `'temp'`** (`PAR-JS-6` · `PAR-JS-7` ·
|
|
176
|
+
* `PAR-JS-11`; the store's own tier row). **`'mem' | 'file'` WAS THE SHIPPED DECLARATION AND DROPPED
|
|
177
|
+
* `'temp'`**, mis-typing a lawful third token as a value outside the domain.
|
|
178
|
+
*/
|
|
179
|
+
export type Tier = 'mem' | 'file' | 'temp';
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* **THE READER'S ARITY, DECLARED BECAUSE IT IS NOT THE WRITER'S** (`PAR-JS-6`; `crossing.md §1.3`'s
|
|
183
|
+
* `TierArg` row 2): on `read` and `readLiteral` a tier is ABSENT, ONE token, or an ARRAY of tokens read as an
|
|
184
|
+
* ANY-MATCH set. **On `write` and `delete` an array is outside the domain — the array spelling is the
|
|
185
|
+
* reader's arity — so those two verbs take the single token `Tier` alone** (`PAR-JS-7` · `PAR-JS-11`).
|
|
186
|
+
*/
|
|
187
|
+
export type TierSet = Tier | readonly Tier[];
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* **THE TIERED READOUT'S ANSWER — AND THIS ALIAS IS `readTiered`'s RETURN TYPE** (`PIN-3`'s three node
|
|
191
|
+
* forms; the architect's `Q-2` answer, *"the declared `TieredNode` union"*). **IT IS THE RETURN POSITION'S OWN
|
|
192
|
+
* DECLARATION AND NOT A TYPE LINE BESIDE IT**, and a `TieredNode` used anywhere else is forbidden.
|
|
193
|
+
*
|
|
194
|
+
* **THE SHAPE IS A TOTAL FUNCTION OF NODE KIND**: an OBJECT node is `{ _tier, …members }` with its members
|
|
195
|
+
* INLINE; an ARRAY node is `{ _tier, value: [ … ] }`; a LEAF node is `{ _tier, value: <the literal> }`. So
|
|
196
|
+
* every node of the answer is an OBJECT and no node's answer is a primitive or a bare array.
|
|
197
|
+
*
|
|
198
|
+
* **`_tier` IS THAT NODE'S OWN TIER — never a set**: `TierSet` is the ARGUMENT's type, and this answer
|
|
199
|
+
* carries one of `Tier`'s three tokens at each node and nothing else.
|
|
200
|
+
*/
|
|
201
|
+
export type TieredNode =
|
|
202
|
+
| { readonly _tier: Tier; readonly [member: string]: TieredNode | Tier }
|
|
203
|
+
| { readonly _tier: Tier; readonly value: readonly TieredNode[] }
|
|
204
|
+
| { readonly _tier: Tier; readonly value: number | string | boolean };
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The configuration a store is constructed from — **the store's FOUR declared keys and no FIFTH**
|
|
209
|
+
* (`filePath` · `journalLength` · `listeners` · `constraints`), each passed through WITHOUT a default, a
|
|
210
|
+
* rename or a key of this package's own.
|
|
211
|
+
*
|
|
212
|
+
* **⟶ RE-SPELLED 2026-10-15 (`surface.md §2.1`'s `cfg` block and its dated clause of 2026-10-15;
|
|
213
|
+
* `contract.md` `DD-36` as amended 2026-10-15; `parameter-semantics.md §2.21` = `PAR-JS-21`): this cell as
|
|
214
|
+
* filed read *"the store's THREE declared keys and no fourth"* and is re-spelled IN PLACE to the four-key,
|
|
215
|
+
* no-FIFTH reading — the fourth declared key is `constraints`, whose own declaration stands below, and the
|
|
216
|
+
* set's declared arity is `4`.** **NO OTHER CELL OF THIS FILE MOVES** (`distribution.md §5.2`), **READ AT
|
|
217
|
+
* THE FIGURES `A127` MOVED** — the entry's `1` named export (`11 → 1` ✓), the addon's `5`, the instance's
|
|
218
|
+
* `12` own members (`4 → 12` ✓), the kernel's `5` and the store's `8` register rows.
|
|
219
|
+
*/
|
|
220
|
+
export interface StoreConfig {
|
|
221
|
+
/** The journal's declared length: a positive integer (`PAR-JS-3`). */
|
|
222
|
+
readonly journalLength: number;
|
|
223
|
+
/**
|
|
224
|
+
* The listeners a construction adopts (`PAR-JS-4`): an array of `{ address, handle, listener }` records, the
|
|
225
|
+
* EMPTY array included.
|
|
226
|
+
*
|
|
227
|
+
* **AND THE KEY IS REQUIRED, NOT OPTIONAL**: an ABSENT `listeners` is the ONE absence the construction
|
|
228
|
+
* does not admit and answers `AddressMalformed` for, so `listeners?` — the shipped spelling — invited a
|
|
229
|
+
* call that can never construct. **The ELEMENT SHAPE IS THE STORE'S TO REFUSE**: a member that is not an
|
|
230
|
+
* `{ address, handle, listener }` record, or whose `handle` is not a plain non-empty `string`, is admitted
|
|
231
|
+
* here and refused by the store's own construction, because the package mints no second refusal for that
|
|
232
|
+
* position.
|
|
233
|
+
*
|
|
234
|
+
* **⟶ AND THE ELEMENT'S THIRD MEMBER IS REQUIRED FROM 2026-11-06 — `PIN-8`, `PIN-9`, `D-123` item `2`.** The
|
|
235
|
+
* record is `{ address, handle, listener }`, **`listener: Listener`**, and **it NEVER CROSSES**: the encoder
|
|
236
|
+
* drops it at the crossing exactly as a `cfg.constraints` element's `constraint` is dropped (`D-26`'s move one
|
|
237
|
+
* key over), the store's `ListenerEntry` and its `{address, handle}` record stay two-membered, and **the
|
|
238
|
+
* PACKAGE arms the substance** into its own registry at the construction — so **the adopted handle holds a body
|
|
239
|
+
* from the instant the instance exists.** **AN ENTRY THAT CARRIES NO FUNCTION IS REFUSED — IT IS NOT A
|
|
240
|
+
* LISTENER — and the refusal precedes the construction's first filesystem act**, so no file is ever created
|
|
241
|
+
* for it (`PIN-9`; `contract.md §10.4` part 5): the architect's ground is his own, *"Why would a listener that
|
|
242
|
+
* doesn't have a function to fire on the listened address be accepted?"* **AFTER THE CONSTRAINTS PASS AND
|
|
243
|
+
* AFTER THE SAVE, THE ADOPTED LISTENERS WHOSE WATCHED ADDRESS RESOLVES ARE FIRED — ONCE PER DISTINCT HANDLE,
|
|
244
|
+
* WITH THAT ADDRESS AS THEIR ONE ARGUMENT** (`D-123` item `2`; `PIN-6`; `D-125` item `1`), and a body that
|
|
245
|
+
* throws there refuses the act at rank `21` `ListenerBodyThrew`.
|
|
246
|
+
*/
|
|
247
|
+
readonly listeners: readonly unknown[];
|
|
248
|
+
/**
|
|
249
|
+
* The file the file tier is backed by, where one is declared (`PAR-JS-2`; ABSENT is in domain).
|
|
250
|
+
*
|
|
251
|
+
* **⟦ THIS MEMBER IS THE DECLARATION'S ONE REALM-CONDITIONAL BYTE** (`D-155` item 2; the marker's home is
|
|
252
|
+
* `docs/L3/wasm-realm/design.md` §6). **THE TWO COMMENT LINES THAT BRACKET THE MEMBER BELOW — both at this
|
|
253
|
+
* member's own two-space depth, and neither carrying a member's name-and-colon or name-and-paren shape —
|
|
254
|
+
* DELIMIT THE ONE REGION `scripts/emit-declarations.mjs` READS.** They are comment lines at that depth on
|
|
255
|
+
* purpose: neither the member read a battery file performs on this interface nor the `StoreStatus` union's
|
|
256
|
+
* census read can see them, so the marker stands in this file without moving a member census, a status
|
|
257
|
+
* count or a rank.
|
|
258
|
+
*
|
|
259
|
+
* **WHAT THE SCRIPT EMITS FROM THAT REGION: TWO DECLARATIONS, AND NO SECOND HAND-AUTHORED SURFACE.** The
|
|
260
|
+
* **NODE** arm's declaration is **this file's own bytes with the region unchanged** — the script asserts
|
|
261
|
+
* that identity byte for byte — and the **WASM** arm's is the same bytes with **exactly the region's body**
|
|
262
|
+
* replaced by `readonly filePath?: never;`. **So the WASM arm's emission replaces the region's body with
|
|
263
|
+
* `filePath?: never`** (`D-155` item 2), **and nothing outside the region differs between the two arms.**
|
|
264
|
+
*
|
|
265
|
+
* **AND THE MEMBER'S PRESENCE AND ITS OPTIONALITY ARE IDENTICAL ON BOTH ARMS.** `never` narrows the
|
|
266
|
+
* **value's** type; it does not remove the member, and it does not make the member required — `filePath` is
|
|
267
|
+
* a DECLARED and OPTIONAL member on either arm, and only a `string` supplied in that position is refused
|
|
268
|
+
* (as a compile error) on the WASM arm. **That is what keeps `StoreConfig`'s census cell byte-identical
|
|
269
|
+
* across the arms**: the six members read in the same order with the same optional markers, so one cell
|
|
270
|
+
* serves both emissions unchanged.
|
|
271
|
+
*
|
|
272
|
+
* **THE WASM ARM'S FILE PATH IS NOT DECLARED HERE**: a second package, a second artefact or a subpath is
|
|
273
|
+
* the publish shape's question (`D-4`; `wasm-realm.md §3(b)`, `SILENT` in this pass), so the script takes
|
|
274
|
+
* its output directory from its own argument and defaults to a build directory it creates.
|
|
275
|
+
*/
|
|
276
|
+
// ⟦realm:filePath:begin⟧
|
|
277
|
+
readonly filePath?: never;
|
|
278
|
+
// ⟦realm:filePath:end⟧
|
|
279
|
+
/**
|
|
280
|
+
* **⟶ ADDED 2026-10-15 (`parameter-semantics.md §2.21`; `surface.md §2.1`'s `cfg` block dated
|
|
281
|
+
* 2026-10-15; `contract.md §8.1` #16) — THE FOURTH DECLARED KEY: THE CONSTRUCTION'S CONSTRAINT LIST**,
|
|
282
|
+
* an array of `{ address, id }` pairs (`[{ address: [key], id: 'c1' }]`).
|
|
283
|
+
*
|
|
284
|
+
* **IT IS OPTIONAL AND ITS ABSENCE IS IN DOMAIN** — *"an ABSENT `constraints` is the ordinary
|
|
285
|
+
* no-constraint store, and no default is declared for it"* — **and every element and every shape outside
|
|
286
|
+
* the list is refused at the store's own construction with ITS OWN code and ITS OWN message**, which is
|
|
287
|
+
* why the element type is the caller's own shape and not a narrowed record here.
|
|
288
|
+
*
|
|
289
|
+
* **⟶ AMENDED 2026-10-24 (`D-26`, verbatim: *"The batch in cfg.constraints must supply functions"*): THE
|
|
290
|
+
* ELEMENT IS THREE MEMBERS AND THE FUNCTION IS REQUIRED. The pair is the element's ADDRESSING and the
|
|
291
|
+
* function is its SUBSTANCE — the reading the use-case record has carried since 2026-10-16, now the
|
|
292
|
+
* declaration's own. THE STORE NEVER SEES THE FUNCTION**: a JavaScript function cannot cross into Rust at
|
|
293
|
+
* any depth, so the crossing carries the pair and **the PACKAGE arms the substance** at construction
|
|
294
|
+
* through the same act the add route performs (`D-26` items 3–4). The state this key's earlier prose named
|
|
295
|
+
* — *"a well-formed element that carried no function … is NOT a carried pair"* — therefore **HAS NO
|
|
296
|
+
* PRODUCER ON THIS ROUTE**: a batch element is always carried.
|
|
297
|
+
*
|
|
298
|
+
* **AND THE ELEMENT'S `id` IS THE PAIR'S HANDLE, A HANDLE IS INSTANCE-SCOPED AND UNIQUE, AND TWO RULES
|
|
299
|
+
* FOLLOW THAT ARE DIFFERENT RULES FOR DIFFERENT ACTS — a declaration that conflates them gets both wrong**
|
|
300
|
+
* (`D-23`, verbatim: *"Setting a constraint should expect a handle name to be used for handle and
|
|
301
|
+
* process/error logging purposes"*; `D-24`, verbatim: *"The handle becomes the id - the handle needs to be
|
|
302
|
+
* unique regardless, and setting a duplicate handle is an overwrite"*; `D-27`'s own table):
|
|
303
|
+
*
|
|
304
|
+
* | act | a repeated handle |
|
|
305
|
+
* |---|---|
|
|
306
|
+
* | **this key, `cfg.constraints`** | **REJECTED** — the list is ONE supplied act, so an internal ambiguity is malformed input and not a second write |
|
|
307
|
+
* | **`addConstraint(pair, constraint)`** | **OVERWRITE** — acts are separate in time, so a later one replaces the earlier |
|
|
308
|
+
*
|
|
309
|
+
* **SO, AT CONSTRUCTION, TWO REFUSALS THAT THE STORE CANNOT TAKE AND THE PACKAGE OWNS** (`D-27`): **no two
|
|
310
|
+
* elements of one `cfg.constraints` may name one `id`; and no element's `id` may equal a `handle` this
|
|
311
|
+
* construction's `listeners` adopts** — a cross-KIND collision, rejected regardless of kind (`D-27`:
|
|
312
|
+
* *"Reject duplicate handles in batch - regardless of listener/constraint type"*). **The second is not an
|
|
313
|
+
* overwrite and the first is not a second registration.** Both are refused **before any filesystem act**,
|
|
314
|
+
* in the surface's one thrown form `{status, message, log}`, under the store's existing
|
|
315
|
+
* `ConstraintListInvalid` — **the package mints no code**.
|
|
316
|
+
*
|
|
317
|
+
* **⟶ AND THE CROSS-KIND ARM'S DIMENSION IS THE HANDLE, AND ITS MESSAGE NAMES THREE THINGS — ADDED 2026-11-01
|
|
318
|
+
* (`D-98` item 4; `docs/L1/cross-kind-handle-only.md` §2, §3.4, §3.6).** **THE ARM IS `adoptedHandles[n] ===
|
|
319
|
+
* element.id`: a HANDLE, never an address** — so a batch pair and an adopted listener MAY stand at one address,
|
|
320
|
+
* which is the ruling's clause (i) — and it is compared over the handles `cfg.listeners` adopts, which are the
|
|
321
|
+
* same set a successful construction adopts (`docs/L1/surface-deltas.md` §3.2). **ITS MESSAGE NAMES:**
|
|
322
|
+
* * **THE POSITION**, because two elements may carry one address and the position is what identifies the
|
|
323
|
+
* offending element;
|
|
324
|
+
* * **THE HANDLE** — the shared string, which is the refusal's SUBJECT and the generated half's first word;
|
|
325
|
+
* * **THE ADOPTED LISTENER'S ONE ADDRESS**, which an adopted `cfg.listeners` element carries exactly one of
|
|
326
|
+
* (`frame.mjs`), so naming it asserts no order and is exact.
|
|
327
|
+
*
|
|
328
|
+
* **AND THE GENERATED HALF IS THE STORE'S OWN QUALIFIED `ConstraintListInvalid` ARM** — *"'<handle>' is already
|
|
329
|
+
* a handle this instance carries, a batch element's id is its pair's handle and it may not be one this
|
|
330
|
+
* construction adopts as a listener's"* — which **prints no `<CONTAINER>` slot**: the list's name `constraints`
|
|
331
|
+
* is named on the package's clause side and never in the generated half, where it would read as the place the
|
|
332
|
+
* mismatch was found. **The package still mints no code**, the status is still `ConstraintListInvalid`, and the
|
|
333
|
+
* instant is still before any filesystem act. **AND THE SUBJECT MOVES FROM AN ADDRESS TO THE HANDLE, which
|
|
334
|
+
* incidentally repairs a second rendering defect**: the address spelling quotes its string segments and the
|
|
335
|
+
* facade quotes the whole subject again, so the bytes read `''ck''`; **a bare handle renders `'shared-handle'`
|
|
336
|
+
* and the doubling has no subject at this arm.**
|
|
337
|
+
*
|
|
338
|
+
* **AND THE NAME'S OTHER TWO READERS NEED NOTHING** (`D-24` items 2–3, both recorded so no pass adds a
|
|
339
|
+
* member): `constraints()` already returns the bare `id`, so its four exclusions stand exactly as written;
|
|
340
|
+
* and `LogEntry` already carries `id`, so **the name's logging role moves no member-set** and no undeclared
|
|
341
|
+
* seventh member exists.
|
|
342
|
+
*/
|
|
343
|
+
readonly constraints?: readonly {
|
|
344
|
+
readonly address: Address;
|
|
345
|
+
readonly id: string;
|
|
346
|
+
readonly constraint: Constraint;
|
|
347
|
+
}[];
|
|
348
|
+
/**
|
|
349
|
+
* **⟶ ADDED 2026-11-17 — `D-144` ITEM 1, VERBATIM: *"Change response to object, success(bool) and message
|
|
350
|
+
* (string[])"*** (`strata/decisions.md` · `D-144`), read with `D-153` item 2 (*"Add third arm"*) for the thenable's own
|
|
351
|
+
* arm. **THE CALLER'S OWN SAVER: the store's JSON image goes OUT here instead of to a file**, the one position is that
|
|
352
|
+
* image text, and the answer is the verdict `SC-2` was closed on — `success` is the verdict and `message` is the reason,
|
|
353
|
+
* **a LIST by declaration, so several messages are ONE answer**.
|
|
354
|
+
*
|
|
355
|
+
* **It is optional and its absence is the ordinary store** — absent, the `file` tier saves through the store's own
|
|
356
|
+
* writer exactly as it always did. **A non-function `saveCall` is broken config and is refused before any filesystem act**
|
|
357
|
+
* with the status a bad `cfg` already answers (`AddressMalformed`; `D-144` item 2), **and `filePath` and `saveCall` are
|
|
358
|
+
* mutually exclusive**: a `cfg` carrying both is refused at that same gate, naming `cfg` (`D-144` item 7). **The function
|
|
359
|
+
* never crosses into Rust at any depth**: the package holds it, invokes it at ONE position, and tells the store the verdict
|
|
360
|
+
* through the addon's own `saveSucceeded`/`saveFailed` entries.
|
|
361
|
+
*
|
|
362
|
+
* **The answer may be a thenable** — `D-144` item 1's *"(async optional)"*, kept in domain by `D-153` item 2: the
|
|
363
|
+
* write's answer is then withheld until the saver settles, the delivered set is started after the save on that arm too, and
|
|
364
|
+
* a failed save answers rank `15` `FileCommitFailed` with these `message` strings carried as log entries. **Every answer
|
|
365
|
+
* that is not `{success: true}` is a failed save**, and `message` is read only where it is an array. **A save that fails
|
|
366
|
+
* rolls the commit back before the caller hears of it**, **and a `saveCall` store never reconstructs state from a file** —
|
|
367
|
+
* its recovery is the client's, fed back through the seed key `U-STOREROOM-05` lands.
|
|
368
|
+
*
|
|
369
|
+
* **The duty `D-145` item 5 declares is documentary, not a refusal**: two stores must not be doubled on one `saveCall`
|
|
370
|
+
* function, and a store that boots empty and then saves will persist an empty image over whatever the backend held.
|
|
371
|
+
*/
|
|
372
|
+
readonly saveCall?: (image: string) =>
|
|
373
|
+
| { readonly success: boolean; readonly message: readonly string[] }
|
|
374
|
+
| Promise<{ readonly success: boolean; readonly message: readonly string[] }>;
|
|
375
|
+
/**
|
|
376
|
+
* **⟶ ADDED 2026-11-17 — `D-137` ITEM 4, VERBATIM: *"THE SEED IS IMAGE TEXT ONLY, AND ITS KEY IS `initialImage`"***
|
|
377
|
+
* (`strata/decisions.md` · `D-137`), read with `D-147` items 1–4. **THE CONSTRUCTION BEGINS WITH CONTENT: this is
|
|
378
|
+
* THIS STORE'S OWN IMAGE TEXT**, exactly as `saveCall` is handed it and as `exportImage` answers it — the saver speaks
|
|
379
|
+
* JSON, so the image is the currency of both halves — and **the store decodes it with its own decoder tail at
|
|
380
|
+
* construction and installs every admitted member at `file` tier**, so a `saveCall`-backed or a `filePath`-backed store
|
|
381
|
+
* starts life holding the caller's data.
|
|
382
|
+
*
|
|
383
|
+
* **It is in domain on every arm** (`D-147` item 1): a `filePath` store may be seeded, a plain `mem` store may be
|
|
384
|
+
* seeded, and a `saveCall` store is seeded as its BOOTSTRAP — its recovery, because such a store never reconstructs
|
|
385
|
+
* state from a file (`D-144` item 4). **Guidance, not a refusal, carries the danger**: a seeded `filePath` store's bytes
|
|
386
|
+
* are in danger of being overwritten by the next `file`-tier write, so seeding is discouraged where the overwrite is not
|
|
387
|
+
* intended.
|
|
388
|
+
*
|
|
389
|
+
* **No save is performed at a seeded construction** (`D-147` item 2: *"a seed is not an act"*): the store and the
|
|
390
|
+
* caller's backend agree at instant zero because the caller just supplied the state, and **the construction stays
|
|
391
|
+
* synchronous**.
|
|
392
|
+
*
|
|
393
|
+
* **Provenance is declared and left** (`D-147` item 3): the loader's filter is the store's own admission test and nothing
|
|
394
|
+
* else, so **the image carries no identity** — a stale, foreign or hand-assembled image of admissible values installs
|
|
395
|
+
* silently — and **the client is responsible for passing its own store's image**. The format is the store's private
|
|
396
|
+
* composition: opaque, transported verbatim, never hand-edited.
|
|
397
|
+
*
|
|
398
|
+
* **An empty string is broken config and is refused at `cfg`'s class gate** under `AddressMalformed`, the seat
|
|
399
|
+
* `filePath: ''` already takes (`D-147` item 4) — **absence alone means *no seed* and the creation state stands** — and
|
|
400
|
+
* a value that is not a string is the same gate. **An image the store cannot read is refused at rank `22`
|
|
401
|
+
* `FileImageRefused` with no instance returned** (`D-135` item 3).
|
|
402
|
+
*/
|
|
403
|
+
readonly initialImage?: string;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* **THE STORE'S OWN CLOSED SET OF FAILURE CODES, AS THE TYPE DECLARES IT — A UNION OVER A
|
|
408
|
+
* DECLARED-BUT-OPEN SET** (`contract.md §2.4` item 2; `distribution.md §5.3`; `PUB-DD-3`).
|
|
409
|
+
*
|
|
410
|
+
* **THE SIXTEEN MEMBERS BELOW ARE THE STORE'S OWN, and their membership is the STORE'S to close and
|
|
411
|
+
* never this package's**: this package MINTS NO MEMBER, WIDENS NO SET AND RENAMES NONE
|
|
412
|
+
* (`distribution.md §5.3` item 3).
|
|
413
|
+
*
|
|
414
|
+
* **AND AN UNKNOWN STATUS IS STILL TYPED — THE ESCAPE IS LOAD-BEARING, NOT A LOOSENESS.** The store's set
|
|
415
|
+
* has already moved twice: from fourteen members to fifteen, and 2026-10-15 to SIXTEEN, the sixteenth being
|
|
416
|
+
* `ConstraintListInvalid` (`contract.md §8.1` #16, amended 2026-10-15; `parameter-semantics.md §2.20` and
|
|
417
|
+
* `§2.21`). So an immutably-enumerated union would mis-type a LAWFUL refusal the moment the store's set
|
|
418
|
+
* moves (`PUB-DD-3`'s refused alternative). The `(string & {})` arm is what keeps a member the store has
|
|
419
|
+
* added typeable in an installed `0.1.0`, and its absence would be a finding rather than a strictness.
|
|
420
|
+
*
|
|
421
|
+
* **AND THE SIXTEENTH MEMBER IS DISCOVERABLE HERE AND NOT MERELY TYPEABLE**: `ConstraintListInvalid` is
|
|
422
|
+
* written among the literals at its rank's own place — LAST of the sixteen and BEFORE the escape — because
|
|
423
|
+
* `distribution.md §5.3` item 1 requires the store's members to be *"DISCOVERABLE in the type"*, and a
|
|
424
|
+
* member the declaration does not name is not discoverable from the type at all. **NO RANK OF `1`…`15`
|
|
425
|
+
* MOVES AND NO EXISTING TRIGGER MOVES: THE MEMBER IS APPENDED AS THE SIXTEENTH** (`contract.md §8.1`'s
|
|
426
|
+
* amended heading, whose algebra reads `11 + 2 + 1 + 1 + 1 = 16` ✓; the row that drives it is
|
|
427
|
+
* `docs/specs/storeroom-native/implementation-plan.md §10.9` row 8). **ITS TRIGGER IS THE VALIDATION OF
|
|
428
|
+
* THE SUPPLIED CONSTRAINT LIST** — at
|
|
429
|
+
* construction/startup, or of the LOADED state against that list at load — **and the store writes no byte of
|
|
430
|
+
* that list into the file and holds no register key for it** (`contract.md §7.1` step 4 and `§7.2` item 6 as
|
|
431
|
+
* amended 2026-10-15; `seams-and-lifecycle.md §8.1`).
|
|
432
|
+
*
|
|
433
|
+
* **⟶ AMENDED 2026-10-24 (`docs/specs/storeroom-native/contract.md §8.1`'s 2026-10-23 amendment (`A148` Q3,
|
|
434
|
+
* folded into `U-STOREROOM-JSON-CROSSING`); `strata/decisions.md`'s `FINDING` of this date; `R-3`'s `Q4`;
|
|
435
|
+
* `REVIEW-2026-10-24.md`'s `Q4`) — THE SET IS SEVENTEEN AND THE DECLARATION WAS ONE BEHIND THE STORE.** The
|
|
436
|
+
* amendment widens the closed set `16 → 17` with **`ValueRefusedAtBoundary` at rank `17`**, and *"the
|
|
437
|
+
* operative set is `17` members ranked `1`…`17`"* with the spelling moved to `[&'static str; 17]`; the store
|
|
438
|
+
* implements seventeen (`src/error.rs`'s `CODES`). **So `ValueRefusedAtBoundary` is written among the
|
|
439
|
+
* literals at rank `17`, LAST of the seventeen and BEFORE the escape — the position `ConstraintListInvalid`
|
|
440
|
+
* held, because the amendment APPENDS and moves no rank of `1`…`16`.** **THE ALGEBRA NOW READS
|
|
441
|
+
* `11 + 2 + 1 + 1 + 1 + 1 = 17` ✓, and the four figures this paragraph carries are read through this clause:
|
|
442
|
+
* *"THE SIXTEEN MEMBERS BELOW"* reads SEVENTEEN; *"its set has already moved twice … and 2026-10-15 to
|
|
443
|
+
* SIXTEEN"* reads THREE times, the third being this amendment, **which is the escape arm's own evidence and
|
|
444
|
+
* therefore reinforces §the arm rather than weakening it**; *"THE SIXTEENTH MEMBER … LAST of the sixteen"*
|
|
445
|
+
* reads `ValueRefusedAtBoundary` as the SEVENTEENTH and last of the seventeen, with `ConstraintListInvalid`
|
|
446
|
+
* at rank `16`; and `constraints()`' *"the store's closed `16`-member set is not reached"* keeps its
|
|
447
|
+
* statement about THAT READ while its FIGURE moves to `17`. **`ValueNotAdmitted` STAYS AT RANK `14` AND IS
|
|
448
|
+
* NOT REMOVED** — it remains the store's own answer on the native route — **so a pass that reads rank `17`
|
|
449
|
+
* as a RENAME of rank `14` has destroyed a member** (`DEF-2026-10-02`: no whole-file rewrite).
|
|
450
|
+
*
|
|
451
|
+
* **⟶ AND AMENDED AGAIN 2026-10-26, BY THE ARCHITECT'S RULING ON THE DOWNSTREAM CLAIMS `DEF-S` AND `DEF-N`,
|
|
452
|
+
* VERBATIM: *"Expand the returned error set for both S/N"*.** **THE SET IS NINETEEN, RANKED `1`…`19`, AND THE
|
|
453
|
+
* TWO APPENDED TERMS ARE `ConstraintBodyThrew` AT RANK `18` AND `ConstraintRefusedAtRegistration` AT RANK
|
|
454
|
+
* `19`** — the same two members, in the same rank order, that `src/error.rs`'s `CODES` now carries last;
|
|
455
|
+
* **NO RANK OF `1`…`17` MOVES, the algebra reads `11 + 2 + 1 + 1 + 1 + 1 + 1 + 1 = 19` ✓, and the escape arm
|
|
456
|
+
* `(string & {})` still stands EXACTLY ONCE, after the members.** **THE FIGURES ABOVE ARE READ THROUGH THIS
|
|
457
|
+
* CLAUSE**: every *"seventeen"* and every *"`17`"* in them is the figure of its own date. **`ConstraintListInvalid`
|
|
458
|
+
* KEEPS rank `16` AND ITS OWN TRIGGER** — the malformed entry — because `DEF-N`'s arm is a WELL-FORMED pair
|
|
459
|
+
* refused by its own body's verdict, which that member's generated sentence names as a shape failure and
|
|
460
|
+
* which is therefore the wrong code for it.
|
|
461
|
+
*
|
|
462
|
+
* **⟶ AND AMENDED AGAIN 2026-10-26, BY THE ARCHITECT'S RULING ON THE DOWNSTREAM CLAIMS `DEF-H` AND `DEF-W`,
|
|
463
|
+
* VERBATIM: *"Expand the returned fail-state list to include the refusal"* and *"Assert the constraints on
|
|
464
|
+
* rollback"*** (`strata/decisions.md` · `D-38`). **THE SET IS TWENTY, RANKED `1`…`20`, AND THE APPENDED TERM
|
|
465
|
+
* IS `ConstraintPassRefused` AT RANK `20`** — **the ONE member a CONSTRAINT REFUSAL answers with**, *"ONE
|
|
466
|
+
* status for the refusal, not one per `KC` token"*, whose token continues to ride the attempt's own
|
|
467
|
+
* `outcome` entry's `state` inside the failure's `log`. **NO RANK OF `1`…`19` MOVES, the algebra reads
|
|
468
|
+
* `11 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 20` ✓, and the escape arm `(string & {})` still stands EXACTLY
|
|
469
|
+
* ONCE, after the members.** **`FileCommitFailed` KEEPS RANK `15` AND IS NOW THE SAVE'S CODE ALONE** — *"a
|
|
470
|
+
* constraint-refused write is a commit that did not stand"* was the ground for reusing it and `D-38`
|
|
471
|
+
* falsifies it — **so `write`'s and `rollback`'s refusal paths may no longer answer it and the `file` tier's
|
|
472
|
+
* own failing save still does.** **IT IS THE MEMBER THIS DECLARATION PUBLISHES FOR THE REFUSAL, WHICH IS WHAT
|
|
473
|
+
* MAKES THE UNION HONEST ABOUT WHICH LAYER FAILED RATHER THAN A WIDENING FOR ITS OWN SAKE.**
|
|
474
|
+
*
|
|
475
|
+
* **⟶ AND AMENDED AGAIN 2026-11-06, BY THE ARCHITECT'S RULING `D-124` ITEM `2` (`strata/decisions.md:6459`),
|
|
476
|
+
* VERBATIM: *"A CREATION-FIRED BODY THAT THROWS REFUSES AT A MINTED RANK `21` `ListenerBodyThrew`"*, *"The closed
|
|
477
|
+
* fail set moves `20 → 21`"* and *"The subject is the LISTENER BODY and not the constraint body"*.** **THE SET IS
|
|
478
|
+
* TWENTY-ONE, RANKED `1`…`21`, AND THE APPENDED TERM IS `ListenerBodyThrew` AT RANK `21`** — **the member a
|
|
479
|
+
* LISTENER BODY's throw crosses as at the four REGISTRATION INSTANTS** (`D-125` item `1`: `storeCreate`, a boot
|
|
480
|
+
* over an existing `filePath`, `addConstraint` and a re-arm), and at those four only: *"a fired body's throw at
|
|
481
|
+
* those instants is `D-124` item `2`'s rank `21` `ListenerBodyThrew` by the same reading."* **NO RANK OF `1`…`20`
|
|
482
|
+
* MOVES, the algebra reads `11 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 21` ✓, and the escape arm `(string & {})`
|
|
483
|
+
* still stands EXACTLY ONCE, after the members.** **`ConstraintBodyThrew` KEEPS RANK `18` AND IS NOT WIDENED**
|
|
484
|
+
* (`D-124` item `2`: its subject is the CONSTRAINT body). **AND EVERY FIGURE ABOVE IS READ THROUGH THIS CLAUSE:**
|
|
485
|
+
* the *"twenty"*s and the *"`20`"*s in them are the figures of their own dates. **AT EVERY OTHER INSTANT THE
|
|
486
|
+
* IDENTITY PROMISE STANDS BYTE-UNMOVED** — a listener body's throw at a caller's `write`, at a `delete` and
|
|
487
|
+
* inside a `rollback`'s judgement still crosses AS ITSELF, `caught === thrown` (`surface.md §2.7` item 4;
|
|
488
|
+
* `contract.md:4299`), which is the carve's own scope and `CSW-25`'s control.
|
|
489
|
+
*
|
|
490
|
+
* **⟶ AND AMENDED AGAIN 2026-11-06, BY THE ARCHITECT'S RULING `D-126` ITEM `2` (`strata/decisions.md:6612`),
|
|
491
|
+
* VERBATIM: *"Mint/revive a code: a corrupt image refuses the construction"*, whose member L1 pins at
|
|
492
|
+
* `docs/L1/creation-sweep.md` `§3` `PIN-11`.** **THE SET IS TWENTY-TWO, RANKED `1`…`22`, AND THE APPENDED TERM IS
|
|
493
|
+
* `FileImageRefused` AT RANK `22`** — **the member a CORRUPT IMAGE crosses as at the CONSTRUCTION and at no other
|
|
494
|
+
* instant**, MINTED BY THE STORE ITSELF at `src/store.rs`'s step `7` through the one read of the path and
|
|
495
|
+
* therefore **before the package's first ask**: no image is installed, no pair is carried and no instance
|
|
496
|
+
* exists. **ITS SUBJECT IS THE STORE'S OWN IMAGE AND NOT THE CONSTRAINT LIST** — `cfg.constraints` may be absent
|
|
497
|
+
* and innocent when the corrupt bytes are read, so rank `16` `ConstraintListInvalid` has the wrong subject at
|
|
498
|
+
* this instant — **and THE CORRUPT FILE STANDS, un-written-to and un-repaired**: nothing was written to it and
|
|
499
|
+
* the refusal precedes every save, so no rollback composes and no removal arm is declared. **NO RANK OF `1`…`21`
|
|
500
|
+
* MOVES, the algebra reads `11 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 22` ✓, and the escape arm
|
|
501
|
+
* `(string & {})` still stands EXACTLY ONCE, after the members.** **A ZERO-LENGTH FILE AND AN ABSENT FILE ARE
|
|
502
|
+
* STILL NO IMAGE** and still load nothing and cross NO code (`§10.4` part 3; `DD-38`) — the corrupt arm is not
|
|
503
|
+
* widened into the empty one. **AND EVERY FIGURE ABOVE IS READ THROUGH THIS CLAUSE:** the *"twenty-one"*s and
|
|
504
|
+
* the *"`21`"*s in them are the figures of their own dates.
|
|
505
|
+
*/
|
|
506
|
+
export type StoreStatus =
|
|
507
|
+
| 'AddressMalformed'
|
|
508
|
+
| 'AddressNotFound'
|
|
509
|
+
| 'LeafHasNoDownstream'
|
|
510
|
+
| 'TierNotFound'
|
|
511
|
+
| 'OutOfDomainTier'
|
|
512
|
+
| 'ParentAnchorMonotonicityViolation'
|
|
513
|
+
| 'ContainerKindConflict'
|
|
514
|
+
| 'ReadTargetIsBranch'
|
|
515
|
+
| 'WriteParentNotLink'
|
|
516
|
+
| 'JournalOpUnknown'
|
|
517
|
+
| 'RollbackCompacted'
|
|
518
|
+
| 'ConstructionArgumentMissing'
|
|
519
|
+
| 'FilePathUnreachable'
|
|
520
|
+
| 'ValueNotAdmitted'
|
|
521
|
+
| 'FileCommitFailed'
|
|
522
|
+
| 'ConstraintListInvalid'
|
|
523
|
+
| 'ValueRefusedAtBoundary'
|
|
524
|
+
| 'ConstraintBodyThrew'
|
|
525
|
+
| 'ConstraintRefusedAtRegistration'
|
|
526
|
+
| 'ConstraintPassRefused'
|
|
527
|
+
| 'ListenerBodyThrew'
|
|
528
|
+
| 'FileImageRefused'
|
|
529
|
+
| 'ListenerBodyRejected'
|
|
530
|
+
| (string & {});
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* **THE KERNEL'S OWN LOG ENTRY** — *"exactly FIVE members — `kind` · `id` · `message` · `opId` · `state`"*
|
|
534
|
+
* (`docs/specs/storeroom-constraints/kernel-surface.md §2.5` item 1's shape, read through `D-65` of 2026-10-28;
|
|
535
|
+
* its member set is CLOSED: *"a seventh member of `LogEntry` … is not a variation, it is a different shape"*).
|
|
536
|
+
* **DECLARED HERE ONLY
|
|
537
|
+
* AS THE ELEMENT SHAPE OF THE FAILURE'S `log` MEMBER, AND MINTED BY NO CLAUSE OF THIS UNIT**: an attempt's
|
|
538
|
+
* message log entries are the KERNEL'S records, carried VERBATIM, and no flattening is declared — a client
|
|
539
|
+
* that reads one reads the kernel's own entry.
|
|
540
|
+
*
|
|
541
|
+
* `kind` is the kernel's closed FIVE-member `LogKind` set — **⟶ the fifth is `'save'`, minted `2026-11-17` by `D-153`
|
|
542
|
+
* item 1 (`strata/decisions.md`: *"1. take first option"*) so the caller's `saveCall` `message[]` has a lawful seat as one
|
|
543
|
+
* entry per string (`D-145` item 2)** — and `state` is the kernel's own `KC` token on the one `outcome` entry and `null`
|
|
544
|
+
* on the four non-`outcome` kinds.
|
|
545
|
+
*
|
|
546
|
+
* **⟶ AND THE LIST IT STANDS IN IS THE COMMIT'S, NOT THE ATTEMPT'S — 2026-10-28 (`D-53`).** **THE ARCHITECT,
|
|
547
|
+
* VERBATIM: *"If it's part of the same commit, then it uses the same message log. If it opens a new commit, it
|
|
548
|
+
* uses the new commit's message log. Constraints/Repairs should always use the same commit. Listeners should open
|
|
549
|
+
* a new commit, because the triggering commit already passed constraints"*** (`strata/decisions.md` · `D-53`).
|
|
550
|
+
* **SO ONE COMMIT'S WORK IS ONE LIST**: a write, the constraint passes that judged it, a repair's own write and
|
|
551
|
+
* the re-run after it all append to the same array, **each entry standing at its own INDEX** and the list running
|
|
552
|
+
* `0..n-1` CONTINUOUSLY across those attempts, and **the `log` a refusal crosses with IS that array** — which is what
|
|
553
|
+
* `DEF-AK`'s *"one inner refusal, two hosts"* measures and what `D-52`'s merge question dissolved into. **A
|
|
554
|
+
* LISTENER'S WRITE IS THE ONE THAT STARTS A FRESH LIST**, because the commit that triggered it has already passed
|
|
555
|
+
* its constraints and what the listener does is a new question.
|
|
556
|
+
*
|
|
557
|
+
* **⟶ AND THE MEMBER THAT USED TO CARRY THAT POSITION IS GONE, 2026-10-28 — `D-65`: THE ARRAY INDEX IS THE
|
|
558
|
+
* POSITION.** `RCA-8(g)` ANNOTATE-BESIDE: **the clause below stands BYTE-FOR-BYTE as the reading of its own date
|
|
559
|
+
* and is read THROUGH this one; what it said of `seq` is RETIRED, not rewritten.** **THE RULING, THE ARCHITECT,
|
|
560
|
+
* ONE WORD: *"Drop it"*** (`strata/decisions.md` · `D-65`) — and `DEF-AI`'s own demand had offered the route:
|
|
561
|
+
* *"mint `seq` from the attempt's counter, **or omit the member**."* **THIS DECLARATION OMITS IT.** A log entry
|
|
562
|
+
* no longer carries `seq`: **the member is gone, the position is the array index, and there is no second copy of
|
|
563
|
+
* it to disagree with the journal's ordinal.** **`JournalOp.seq` IS UNMOVED AND IS STILL A DIFFERENT SUBJECT** —
|
|
564
|
+
* the store's own append ordinal, ordered in the store's record — **and the two are now impossible to confuse,
|
|
565
|
+
* because the one that named the commit's list is no longer there to be read.**
|
|
566
|
+
*
|
|
567
|
+
* **AND `state`'S DOMAIN IS `KC-1`…`KC-9`, NOT `KC-1`…`KC-8`.** **`D-53`'s THIRD RULING — *"Open the token
|
|
568
|
+
* set"* — gives the SAVE ARM a token of its own (`KC-9`)**, so that a `file`-tier save that fails at the terminal
|
|
569
|
+
* arm and a constraint that refuses a pass cross with DIFFERENT `status` values (`FileCommitFailed` and
|
|
570
|
+
* `ConstraintPassRefused`) **each derivable from the log's terminal state** — the contradiction `D-52` measured
|
|
571
|
+
* when `KC-8` crossed as both. **NO MEMBER OF THIS DECLARATION'S `StoreStatus` MOVES**: `KC-9` rides `state` and
|
|
572
|
+
* never `status`, exactly as every `KC` token does, so the closed status set keeps its `20` members and its ranks.
|
|
573
|
+
*/
|
|
574
|
+
export interface LogEntry {
|
|
575
|
+
readonly kind: 'constraint-check' | 'repair-run' | 'commit' | 'outcome' | 'save';
|
|
576
|
+
readonly id: string | null;
|
|
577
|
+
readonly message: string;
|
|
578
|
+
readonly opId: string | null;
|
|
579
|
+
readonly state: string | null;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* **THE SINGLE FAILURE SURFACE** (`contract.md §1.4`; `distribution.md §5.2` item 3) — **AND ITS MEMBER SET
|
|
584
|
+
* MOVED `2 → 3` FROM 2026-10-16 ON THE ARCHITECT'S RULING *"Bubble the message log to the client on failure,
|
|
585
|
+
* override any clauses that forbid this."*** (`surface.md §2.5`'s clause of that date, whose items 1–10 are
|
|
586
|
+
* the crossing form's ONE home). A THROWN plain object carrying exactly `{status, message, log, address}` —
|
|
587
|
+
* never an `Error` subclass, never a returned tagged union and never a `Promise` rejection. **The status is
|
|
588
|
+
* carried VERBATIM from the store's own closed set and the message is the store's own generated string**; this
|
|
589
|
+
* package mints neither. **⟶ AND THE SET MOVED `3 → 4` FROM 2026-10-29 — `D-77`: the fourth member is
|
|
590
|
+
* `address`, the act the refusal is about** (its clause below).
|
|
591
|
+
*
|
|
592
|
+
* **`log` IS AN ORDINARY OWN ENUMERABLE DATA MEMBER OF THAT SAME PLAIN OBJECT** (item 9): *"written with an
|
|
593
|
+
* object literal, not `Object.defineProperty`, not a getter, not on a prototype and not behind a `Symbol`"* —
|
|
594
|
+
* so `Object.keys(caught)` reads exactly `["status","message","log","address"]` and its length is `4` on EVERY
|
|
595
|
+
* arm. **IT IS NEVER ABSENT, NEVER `null` AND NEVER A NON-ARRAY** (item 9), **and `[]` is its declared value
|
|
596
|
+
* where the failure's cause has no attempt at all** (item 4: the empty array, never an absent member and never
|
|
597
|
+
* a placeholder entry) — **while every failure whose attempt exists carries that attempt's own entries, taken
|
|
598
|
+
* BEFORE the attempt is disposed of** (item 10 (iii)).
|
|
599
|
+
*
|
|
600
|
+
* **⟶ AND THE FORM IS FOUR MEMBERS FROM 2026-10-29 — `D-77`, THE ARCHITECT'S RULING, ONE WORD: *"New
|
|
601
|
+
* member"*.** **THE MEASUREMENT IT ANSWERS**: a caller's OWN act refused and a caller's act that PASSED while
|
|
602
|
+
* a LISTENER threw cross with the **same `status`, the same `message`, the same keys and the same two log
|
|
603
|
+
* entries** — only the `opId` differs, and a refused act answers no `op` to key against — **so a consumer read
|
|
604
|
+
* `ConstraintPassRefused` and concluded its own write did not happen, while the store says it did.** **SO THE
|
|
605
|
+
* FORM GAINS THE ONE THING THE CALLER NEEDS: `address`, WHICH ACT WAS REFUSED.** The caller wrote an address
|
|
606
|
+
* and knows it; **`equal` means the caller's own act, `different` means a listener's** — a retry is then a
|
|
607
|
+
* decision rather than a guess. **IT IS PRESENT ON EVERY REFUSAL AND IS `null` WHERE THERE IS NOTHING TO
|
|
608
|
+
* NAME**: a refusal about a `cfg`, a constraint LIST, a handle, an attempt identity or an artefact path names
|
|
609
|
+
* no act at an address and says so with the declared `null`, never by omitting the member.
|
|
610
|
+
*
|
|
611
|
+
* **IT IS NOT A FIFTH STATUS AND NOT A HEURISTIC**: the closed set is `StoreStatus`'s and stays **twenty-one**,
|
|
612
|
+
* and the member is authored by the package at the refusal's own crossing, so no consumer reproduces a rule to
|
|
613
|
+
* read it. **⟶ CORRECTED IN PLACE 2026-11-11 — GATE 4's FINDING: THE FIGURE READ *"twenty"* AND IS FALSE AT
|
|
614
|
+
* TWENTY-ONE.** `D-124` item `2` moved the closed fail set `20 → 21` by appending `ListenerBodyThrew` at rank
|
|
615
|
+
* `21` (`strata/decisions.md:6459`; the operative statement is `StoreStatus`'s own block above, whose algebra
|
|
616
|
+
* reads `11 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 21` ✓ and whose membership below carries the member), and
|
|
617
|
+
* **this sentence's subject — that `address` is a member of the REFUSAL and not a member of the STATUS SET —
|
|
618
|
+
* is untouched by the move**: what was wrong was the figure, not the rule. **NO MEMBER IS ADDED, NO RANK MOVES
|
|
619
|
+
* AND NO OTHER FIGURE OF THIS DECLARATION IS READ THROUGH THIS CLAUSE.**
|
|
620
|
+
* **ITS NAME IS THE DECLARATION'S OWN CONVENTION**: its siblings are one bare noun each naming exactly the
|
|
621
|
+
* datum carried, and this one is the datum the whole declaration already calls `address` — the segment array
|
|
622
|
+
* `read`/`write`/`delete` take, `AttemptContext.address`, `JournalOp.address`, `pair.address`.
|
|
623
|
+
*
|
|
624
|
+
* **⟶ AND FROM 2026-10-28 THOSE ENTRIES ARE THE COMMIT'S (`D-53`).** *"That attempt's own entries"* is read
|
|
625
|
+
* through **the one list the whole commit appends to**: an attempt holds a REFERENCE to its commit's log, so a
|
|
626
|
+
* failure crossing from ANY arm of that commit — a pass's refusal, a repair's, a `file`-tier save's at the
|
|
627
|
+
* terminal arm — carries the same array, and **a save failure's `log` is no longer `[]`**: `D-52`'s measured
|
|
628
|
+
* sentence (*"a save failure crosses as `FileCommitFailed` with `log: []`, and its verdict stands only in the
|
|
629
|
+
* attempt's log, which the crossed value does not carry"*) is the defect `D-53` closes, and the save arm's own
|
|
630
|
+
* `outcome` entry — carrying `KC-9` — is the entry that ends that list.
|
|
631
|
+
*/
|
|
632
|
+
export interface StoreRefusal {
|
|
633
|
+
readonly status: StoreStatus;
|
|
634
|
+
readonly message: string;
|
|
635
|
+
readonly log: LogEntry[];
|
|
636
|
+
/**
|
|
637
|
+
* **WHICH ACT WAS REFUSED — `D-77`'s fourth member, and the reason the form is four.** The address the
|
|
638
|
+
* refusal is ABOUT, in the caller's own domain: **compare it with the address you wrote — equal means your
|
|
639
|
+
* own act was refused, different means a LISTENER's act was** (a listener's refused write crosses to you, and
|
|
640
|
+
* your own write stands). **`null` where the refusal names no act at an address** — a `cfg`-side refusal, a
|
|
641
|
+
* constraint list's validation, a handle's registration, an attempt identity, an absent artefact. **The
|
|
642
|
+
* member is always present**: a member absent on some arm is the `DEF-AH` defect wearing a new name
|
|
643
|
+
* (`strata/decisions.md` · `D-77`).
|
|
644
|
+
*/
|
|
645
|
+
readonly address: Address | null;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* **⟶ `U-STOREROOM-HELD-LISTENER-IDENTITY` (`D-GP-SHLI`): `Handle` MOVES `object → string`**
|
|
650
|
+
* (`contract.md §2.1` item 1; `P: docs/pending.md · P-6`, the type ruling, verbatim: *"Refuse handles that
|
|
651
|
+
* aren't strings."*). **THE CALLER SPELLS IT, HOLDS IT AND PASSES IT BACK; NOTHING MINTS IT.** The value the
|
|
652
|
+
* store reports in a trigger pair and the value the caller holds ARE ONE VALUE, and its domain is
|
|
653
|
+
* `{ s : s ∈ String ∧ s ≠ "" }` (`identity-and-domain.md §2` item 1).
|
|
654
|
+
*
|
|
655
|
+
* **THIS IS A CONSUMER-VISIBLE BREAK** (§7 item 2 of the contract): every signature below that names a
|
|
656
|
+
* handle is re-typed with it, and the release class is the release gate's (`P: docs/pending.md · (AA-4)`).
|
|
657
|
+
*/
|
|
658
|
+
export type Handle = string;
|
|
659
|
+
|
|
660
|
+
/** The caller's listener: any JS function, invoked with the triggering address as its ONE argument. */
|
|
661
|
+
export type Listener = (address: Address) => void;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* **A BASE STATE — THE PRE- AND POST-STATE A JOURNAL OP CARRIES** (`DD-39`: *"`BaseState` → `{ present,
|
|
665
|
+
* value }`"*). **`present` is whether a version stood at the address, and `value` is that version's value
|
|
666
|
+
* where one did — `undefined` where none did**, because the record is the store's own and the package adds
|
|
667
|
+
* no member to it.
|
|
668
|
+
*/
|
|
669
|
+
export interface BaseState {
|
|
670
|
+
readonly present: boolean;
|
|
671
|
+
readonly value: unknown;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* **THE STORE'S OWN JOURNAL OP, CROSSED MEMBER FOR MEMBER AND IN THE STORE'S OWN SPELLINGS** — `DD-39`'s
|
|
676
|
+
* **SEVEN** declared names (`distribution.md §5.2` item 1; `P-PUB-7`): `{ opId, kind, address, tier, before,
|
|
677
|
+
* after, seq }`.
|
|
678
|
+
*
|
|
679
|
+
* **`opId` IS A `string`** — the store's own op-id domain is a non-empty string (`PAR-JS-9`), and the id a
|
|
680
|
+
* `write` returns is the id a `rollback` takes. **`kind` is the store's own token** (`'write'` and
|
|
681
|
+
* `'delete'` today) **and its membership is the STORE'S to close, so it is typed as `string` and this
|
|
682
|
+
* package mints no union over it.** **`tier` is one of the store's own three tokens, or `null` where the op
|
|
683
|
+
* carries none**; **`seq` is the journal's own sequence number**, carried verbatim.
|
|
684
|
+
*
|
|
685
|
+
* **★ AND THE EIGHTH MEMBER — `readonly compacted: boolean` — IS REMOVED, 2026-11-17. IT IS GONE: NOT
|
|
686
|
+
* RENAMED, NOT DEPRECATED, NOT TYPED `false`.** The architect, VERBATIM (`strata/decisions.md` · `D-189`
|
|
687
|
+
* item 2): *"If .compacted is always false drop it"*. **The directive was a conditional and the tree answered
|
|
688
|
+
* it**: the store set the flag `false` at both of its producers, **so a member that can hold one value
|
|
689
|
+
* carried nothing**, and the distinction it once shared — *an op this store compacted* against *an op this
|
|
690
|
+
* store never held* — **is carried by the store's `journal_floor` watermark instead** (`D-160` item 3), which
|
|
691
|
+
* answers `RollbackCompacted` and `JournalOpUnknown` as two different refusals without a per-op bit. **WHAT
|
|
692
|
+
* THIS COSTS A CONSUMER: `record.op.compacted` no longer type-checks and no longer exists at run time** — the
|
|
693
|
+
* read returns `undefined` because the key is absent, and it is absent from the write's record, the delete's
|
|
694
|
+
* record and every op the kernel's repair leg copies. **THE CLASS IS `MAJOR` (`2.0.0`, `D-190`) for exactly
|
|
695
|
+
* this reason**: a PUBLISHED declaration member left the surface, which no `MINOR` absorbs — **`D-158`'s
|
|
696
|
+
* `MINOR` at `1.13.0` is SUPERSEDED and this declaration describes `2.0.0`.**
|
|
697
|
+
*/
|
|
698
|
+
export interface JournalOp {
|
|
699
|
+
readonly opId: string;
|
|
700
|
+
readonly kind: string;
|
|
701
|
+
readonly address: Address;
|
|
702
|
+
readonly tier: Tier | null;
|
|
703
|
+
readonly before: BaseState;
|
|
704
|
+
readonly after: BaseState;
|
|
705
|
+
readonly seq: number;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* The record a `write` answers: fresh data on every call, never a view of the store's own state.
|
|
710
|
+
*
|
|
711
|
+
* **`op` IS THE STORE'S OWN JOURNAL RECORD AND NOT A NUMBER** (`DD-39`; `P-PUB-7`'s `S-TYPES`): **the shipped
|
|
712
|
+
* declaration read `op: number`, which is false of EVERY value the line returns**, and a consumer compiling
|
|
713
|
+
* `write(i, a, 'mem', v).op.opId` met a type error on a correct call.
|
|
714
|
+
*/
|
|
715
|
+
export interface WriteRecord {
|
|
716
|
+
readonly op: JournalOp;
|
|
717
|
+
/**
|
|
718
|
+
* **THE WATCHED ADDRESSES — THE ADDRESS PROJECTION OF `triggered`, AND FROM `P-3` IT NARROWS WITH IT.**
|
|
719
|
+
* `strata/decisions.md` · `D-195` item 1 (*"Take the default on the blocker and proceed"*) settles what
|
|
720
|
+
* `D-193` left open: the store's own projection law says the two lists are produced by ONE predicate, so
|
|
721
|
+
* **a write that changes nothing at its address answers `[]` here TOO** — see `triggered`'s clause below,
|
|
722
|
+
* which is the one that carries the rule.
|
|
723
|
+
*/
|
|
724
|
+
readonly watched: readonly Address[];
|
|
725
|
+
/**
|
|
726
|
+
* **THE TRIGGER'S PAIRS** (`contract.md §2.4` item 1; `PAR-HL-38`): the pair REPLACES a bare handle list.
|
|
727
|
+
*
|
|
728
|
+
* **★ AND FROM `P-3` A `write` FIRES ONLY REGISTRATIONS THE ACT'S OWN VALUE REACHES — `strata/decisions.md` ·
|
|
729
|
+
* `D-193` item 1, the architect, VERBATIM: *"P-3 checks literal equivalence, not reference equality"*.** **A
|
|
730
|
+
* `write` whose literal is the literal the address already answers answers `triggered: []`** — the prefix
|
|
731
|
+
* arm gains the act's value condition, **while the TOUCHED arm does not**: a registration at a node the act
|
|
732
|
+
* created or purged below it is still told (`D-66`; `Q-6`'s default, which no later pass may narrow).
|
|
733
|
+
* **THE COMPARISON IS ON ONE LITERAL AND NOT ON THE PER-TIER LIST** (`D-193` item 1: at an address standing
|
|
734
|
+
* at two tiers the compared literal is the one an unqualified read answers), **the relation is the store's own
|
|
735
|
+
* value equality** (class-strict and key-order-blind), **and two prices are DECLARED rather than repaired**:
|
|
736
|
+
* `file 'V'` then `mem 'V'` **fires nothing** although `readTiered` moves, and `0` over a standing `-0`
|
|
737
|
+
* **fires nothing** although a constraint's `sameStanding` would call the pair moved (`D-193` items 3 and 4:
|
|
738
|
+
* *"a later pass must not 'fix' this as a defect"*). **The suppression reaches a CONSTRAINT PAIR at that
|
|
739
|
+
* address too** (`D-193` item 5's `Q-5`): the pass evaluates this list, so an empty list asks no pair.
|
|
740
|
+
*
|
|
741
|
+
* **⟶ AND THE `D-78` SENTENCE THIS MEMBER OWES, WHICH IS NOT `D-78`'s SHAPE — WHAT YOU MAY CONCLUDE FROM
|
|
742
|
+
* `[]`.** `docs/specs/storeroom-js/surface.md:235`'s device (`D-78`) draws its axis between an ABSENT member
|
|
743
|
+
* and an EMPTY list — *"this act cannot discard a raise"* versus *"it can, and this time nothing was
|
|
744
|
+
* discarded"* — and its remedy is to make the member present so it can say so. **HERE THE MEMBER IS PRESENT IN
|
|
745
|
+
* BOTH READINGS AND THE AMBIGUITY IS INSIDE ONE ARRAY**, so the declared reading is the one the architect's
|
|
746
|
+
* default leaves (`D-195` item 2's `O-4`): **`[]` carries TWO claims and CANNOT TELL THEM APART** — **(A)**
|
|
747
|
+
* *"no registration stood at a prefix of this act's address, and the act touched no registered address"*, and
|
|
748
|
+
* **(B)** *"registrations stood, and the literal the act landed is the literal the address already
|
|
749
|
+
* answered."* **BOTH ARE TRUE OF IT, AND `[]` ALONE DOES NOT SAY WHICH.** **What you may rely on therefore:** a
|
|
750
|
+
* listener you registered at a prefix of a `write`'s address was **not** invoked, and **nothing in the record
|
|
751
|
+
* says why** — **`op` is present on both arms** (a no-change write still mints its op and its `opId` still
|
|
752
|
+
* resolves through `rollback`), and **a `file`-tier no-change write still saves**, so `[]` never means *"the
|
|
753
|
+
* act did not happen"*. **`op.before` beside `op.after` is a SECOND reading and a PARTIAL one**: where an
|
|
754
|
+
* address stood at two tiers `op.before.value` is the per-tier LIST, so the two disagree with the rule at
|
|
755
|
+
* exactly the address the rule's price lives at (`D-193` item 3). **A typed `changed` flag is NOT on this
|
|
756
|
+
* surface and was not minted** (`O-4`'s default (i), declared rather than added).
|
|
757
|
+
*/
|
|
758
|
+
readonly triggered: readonly TriggerPair[];
|
|
759
|
+
/**
|
|
760
|
+
* **THE DISCARD'S WITNESS — PRESENT ON THIS RECORD AT RUNTIME, AND DECLARED HERE RATHER THAN AS A TYPED
|
|
761
|
+
* MEMBER.** `strata/decisions.md` · `D-75` (2026-10-29) is the architect's demand, verbatim: *"report every
|
|
762
|
+
* discarded raise at any count, on every path."* **The path this declares is the TRIGGERING WRITE's**: a
|
|
763
|
+
* `rollback` that a CONSTRAINT BODY issues while its pair is being asked raises a restart request inside this
|
|
764
|
+
* write's own commit, and until `D-75` the write's answer carried **nothing** about it — measured, `discarded`
|
|
765
|
+
* was absent on the write's answer and on the raise's own answer, at one raise and at two.
|
|
766
|
+
*
|
|
767
|
+
* **`record.discarded` IS AN ARRAY, `readonly { opId: string | null; addresses: readonly Address[] }[]`**, whose
|
|
768
|
+
* entries are the same `DeleteRecord.discarded` entries below: one per raise stamped with THIS write's commit
|
|
769
|
+
* window that no pass's drain consumed. **`[]` means the pass's drain consumed and JUDGED every raise of this
|
|
770
|
+
* window — nothing was discarded — and the member is present to say so.** It is a **NON-ENUMERABLE own accessor**
|
|
771
|
+
* (`enumerable: false`, `configurable: true`), so `Object.keys(write(...))` is still the three declared members
|
|
772
|
+
* above and every deep-equality over a write's answer reads exactly what it read before, exactly as
|
|
773
|
+
* `DeleteRecord.discarded` and `DeleteRecord.commit` are carried.
|
|
774
|
+
*
|
|
775
|
+
* **WHY IT IS NOT A TYPED MEMBER HERE, SAID PLAINLY AND NOT HIDDEN.** This record's DECLARED member set is
|
|
776
|
+
* asserted at three by the declaration census (`tests/e2e/blind-entry-module.test.mjs`'s `WriteRecord` cell and
|
|
777
|
+
* `tests/e2e/surface.test.mjs`), and that census is outside this pass's write scope — **so a typed member would
|
|
778
|
+
* redden a green leg without moving the runtime at all.** The member is therefore declared by NAME, SHAPE and
|
|
779
|
+
* SEMANTICS here and carried at runtime; a consumer reading this file knows it exists, and a TypeScript consumer
|
|
780
|
+
* reads it through `Object.getOwnPropertyDescriptor(record, 'discarded')`. **A future pass that owns the census
|
|
781
|
+
* owes it the typed line.**
|
|
782
|
+
*/
|
|
783
|
+
/**
|
|
784
|
+
* **⟶ ADDED 2026-11-02 — THE RESOLUTION LOG: A PASSING WRITE ANSWERS WITH THE COMMIT'S OWN LIST**
|
|
785
|
+
* (`strata/decisions.md` · `D-119`, the architect, verbatim: *"Cache the log and pass to the surface on
|
|
786
|
+
* resolution, same as on failure. This is needed so that manual data changes can check what additional data
|
|
787
|
+
* changed downstream of their request"*).
|
|
788
|
+
*
|
|
789
|
+
* **`record.log` IS A `readonly LogEntry[]` AT RUNTIME — THE ENTRIES THIS COMMIT APPENDED, IN APPEND ORDER**:
|
|
790
|
+
* the `constraint-check` entry for each pair the pass asked, the `repair-run` entry for every repair that
|
|
791
|
+
* landed an edit (each naming the op it landed at `opId`, so the address a repair moved to is readable rather
|
|
792
|
+
* than inferable), and the `commit` entry that closes the arm — **the same list, the same objects and the same
|
|
793
|
+
* positions a refusal about this commit carries**, because it IS that array and not a copy of it (`D-53`; `D-119`
|
|
794
|
+
* item 4). **A passing write over a store carrying NO pair answers ONE entry, `kind === 'commit'`** — that entry
|
|
795
|
+
* is appended unconditionally — so `[]` is never that arm's answer.
|
|
796
|
+
*
|
|
797
|
+
* **IT IS A NON-ENUMERABLE OWN ACCESSOR AT THE NAME THE FAILURE FORM USES** (`StoreRefusal.log`),
|
|
798
|
+
* `enumerable: false`, `configurable: true`, exactly as `discarded` above is carried — so `Object.keys(record)`
|
|
799
|
+
* is still the THREE declared members and every deep-equality over a write's answer reads exactly what it read
|
|
800
|
+
* before. **A spread or `Object.assign` copy loses it, as it loses `discarded`.** `Object.getOwnPropertyNames`
|
|
801
|
+
* is the one census that gains the name, which is declared rather than discovered.
|
|
802
|
+
*
|
|
803
|
+
* **THE READ ANSWERS ONE CACHED REFERENCE**: the array the commit's handoff froze, stable after it (`D-119`
|
|
804
|
+
* item 4: *"the list is cached at the crossing and stable after it"*) — a write to it throws under strict mode.
|
|
805
|
+
* **It is NOT a live view, and that is where it differs from `discarded` above**, whose accessor must read at
|
|
806
|
+
* the read: a log is complete only once every act that can append to it has finished, which the crossing is.
|
|
807
|
+
*
|
|
808
|
+
* **`[]` ARISES IN ONE SHAPE HERE AND IT IS HONEST**: a call that JOINED an enclosing commit — a constraint
|
|
809
|
+
* body's or a repair body's nested `write` — answers `[]`, because that commit's list has not crossed and this
|
|
810
|
+
* call owns none of it; **the act that owns that commit reports the entries, the nested call's own included.**
|
|
811
|
+
* A frozen prefix copy is refused: it would hold fewer entries than the enclosing answer and the two would
|
|
812
|
+
* disagree, which is the one thing `D-119` item 4 forbids.
|
|
813
|
+
*
|
|
814
|
+
* **AND WHY IT IS A DOCBLOCK AND NOT A TYPED LINE — the same sentence `discarded` above carries, for the same
|
|
815
|
+
* reason:** the census that fixes this record at three is outside this pass's write scope, so a typed member
|
|
816
|
+
* would redden a green leg without moving the runtime at all. **A future pass that owns the census owes it the
|
|
817
|
+
* typed line.**
|
|
818
|
+
*/
|
|
819
|
+
/**
|
|
820
|
+
* **⟶ ADDED 2026-11-17 — THE DELIVERED SET'S FAILURES: PRESENT ON THIS RECORD AT RUNTIME, AND DECLARED HERE RATHER
|
|
821
|
+
* THAN AS A TYPED MEMBER** (`U-STOREROOM-06 DELIVERY-SETTLE`; `strata/decisions.md` · `D-138` items 1 and 2; `D-150`
|
|
822
|
+
* items 1 and 2). `D-138` item 2 is the ruling, verbatim: *"the write resolves, and the status rides on the receipt … its
|
|
823
|
+
* CARRIER is the write's answer — a datum the caller reads"* — because by the instant a body can reject, the act has
|
|
824
|
+
* ALREADY COMMITTED (`D-138` item 1), so a rejection of the awaited answer would report a DURABLE SUCCESS as a FAILURE.
|
|
825
|
+
*
|
|
826
|
+
* **`record.bodyFailures` IS AN OBJECT AT RUNTIME — ONE ENTRY PER REJECTING LISTENER BODY, KEYED BY THE HANDLE THAT BODY
|
|
827
|
+
* WAS DELIVERED UNDER** (`D-138`'s plurality: *"`N` rejections become `N` entries"*), each entry `{status, message,
|
|
828
|
+
* address}`. **`status` IS `'ListenerBodyRejected'`** — rank `23`, `D-137` item 5's own mint: the promise pair's other
|
|
829
|
+
* half, whose sibling at rank `21` is `ListenerBodyThrew` and **rank `21` is NOT widened by it**. **`message` is the
|
|
830
|
+
* GENERATED sentence and never the body's own words**, `D-137` item 5's form over that item's declared subject:
|
|
831
|
+
* *"<address> was refused by a listener body that rejected, a fired listener body's rejection refuses the act that fired
|
|
832
|
+
* it"* — **its subject is the WATCHED ADDRESS'S SPELLING**, so **the body's own reason is never read, stored or
|
|
833
|
+
* rendered** (`D-137` item 5; `PIN-5`; `D-58`) — and `address` is the binding's own address.
|
|
834
|
+
*
|
|
835
|
+
* **IT IS A NON-ENUMERABLE, `configurable` OWN GETTER OVER A SYMBOL-KEYED DATUM** — `constraints.mjs`'s
|
|
836
|
+
* `defineBodyFailures` defines it at this name, over the datum `state.mjs` spells `BODY_FAILURES` and `delivery.mjs`'s
|
|
837
|
+
* `settledAnswer` installs after the one `Promise.allSettled`. **A getter by necessity and not by taste**: the record is
|
|
838
|
+
* built BEFORE the set settles, so a datum captured at the build would answer `{}` about a body that then rejects — the
|
|
839
|
+
* same reason `discarded` above is a read. **So `Object.keys(write(...))` is still the three declared members above and
|
|
840
|
+
* every deep-equality over a write's answer is unmoved**, and `Object.getOwnPropertyNames` reads **SEVEN** with this name
|
|
841
|
+
* among them (`D-150` item 1). **A spread or an `Object.assign` copy loses it, as it loses `discarded`.**
|
|
842
|
+
*
|
|
843
|
+
* **IT IS PRESENT ON EVERY ARM AND ANSWERS ONE SHARED FROZEN `{}` WHERE NOTHING STANDS** — `state.mjs`'s
|
|
844
|
+
* `BODY_FAILURES_EMPTY`, the same constant on the plain synchronous arm and on a settled arm that found no rejection, so
|
|
845
|
+
* no reader can tell *"no settle ran"* from *"the settle found no rejection"*. **Never absent, never `undefined`, never a
|
|
846
|
+
* fresh `{}` per call** (`D-77`'s rule), on `D-138`'s unsettled item 3.
|
|
847
|
+
*
|
|
848
|
+
* **IT IS NOT THE CALLER'S OWN COMMIT'S FAILURE.** A listener runs in its own commit and its refusal does not fail the
|
|
849
|
+
* write that fired it (`D-71`) — **the write RESOLVES**, and this member reports beside the record and never in place of
|
|
850
|
+
* it. **A body that THROWS synchronously is the other arm and stays an error in the caller's own frame** (`D-73`;
|
|
851
|
+
* `D-138` item 4's declared asymmetry), and `D-153` item 2 keeps the distinction this member lives on: a failure here is
|
|
852
|
+
* a datum the settle RESOLVES INTO and never a rejection of the promise (`PIN-5`).
|
|
853
|
+
*
|
|
854
|
+
* **AND WHY IT IS A DOCBLOCK AND NOT A TYPED LINE — the same sentence `discarded` and `log` above carry, for the same
|
|
855
|
+
* reason:** the census that asserts this record's declared member set at three (`tests/e2e/blind-entry-module.test.mjs`'s
|
|
856
|
+
* `WriteRecord` cell and `tests/e2e/surface.test.mjs`) is outside this pass's write scope, **so a typed member would
|
|
857
|
+
* redden a green leg without moving the runtime at all.** **A future pass that owns the census owes it the typed line.**
|
|
858
|
+
*/
|
|
859
|
+
/**
|
|
860
|
+
* **⟶ ADDED 2026-11-17 — THE DELIVERED SET'S SETTLED RETURN VALUES: PRESENT ON THIS RECORD AT RUNTIME, AND DECLARED
|
|
861
|
+
* HERE RATHER THAN AS A TYPED MEMBER** (`U-STOREROOM-08 RETURN-VALUES`; `strata/decisions.md` · `D-149` item 2; `D-150`
|
|
862
|
+
* items 1–3). `D-149` item 2 is the ruling, verbatim: *"answer gains a datum keyed by handle, one entry per listener
|
|
863
|
+
* that RETURNED A VALUE"* — and `D-150` item 1 is its name and its device.
|
|
864
|
+
*
|
|
865
|
+
* **`record.returnedValues` IS AN OBJECT AT RUNTIME — ONE ENTRY PER HANDLE WHOSE BODY RETURNED A VALUE, KEYED BY THAT
|
|
866
|
+
* HANDLE, AND THE ENTRY IS THE VALUE.** **An `undefined`-RETURNER CONTRIBUTES NO ENTRY and its silence is the caller's to
|
|
867
|
+
* read** (`D-148` item 1(c), the architect, verbatim: *"A listener that returns nothing should be assumed to only perform
|
|
868
|
+
* backend code that does not need the channel pass"*), so a handle absent from the map either returned nothing or was not
|
|
869
|
+
* in the delivered set. **A body that REJECTED contributes no entry here** — its failure is `bodyFailures`' above, and
|
|
870
|
+
* its reason is never read, stored or rendered. **THE VALUE IS THE SETTLED VALUE AND NEVER THE PROMISE** (`D-149`
|
|
871
|
+
* item 3: the answer is withheld until the delivered set settles, so a promise a body returned is already settled into a
|
|
872
|
+
* value or into `bodyFailures`).
|
|
873
|
+
*
|
|
874
|
+
* **IT IS A NON-ENUMERABLE, `configurable` OWN GETTER OVER A SYMBOL-KEYED DATUM — `bodyFailures`' own device, member for
|
|
875
|
+
* member** (`constraints.mjs`'s `defineReturnedValues`), over the datum `state.mjs` spells `RETURNED_VALUES` and
|
|
876
|
+
* `settledAnswer` installs from `returnedValues(settled, invoked)` after the one `Promise.allSettled` — so the read
|
|
877
|
+
* answers at the read, for the reason the record is built before the set settles. **So `Object.keys(write(...))` is still
|
|
878
|
+
* the three declared members above and every deep-equality over a write's answer is unmoved**, and
|
|
879
|
+
* `Object.getOwnPropertyNames` reads **SEVEN** with this name among them (`D-150` item 1). **A spread or an
|
|
880
|
+
* `Object.assign` copy loses it, as it loses `discarded` and `bodyFailures`.**
|
|
881
|
+
*
|
|
882
|
+
* **IT IS PRESENT ON EVERY ARM AND ANSWERS ONE SHARED FROZEN `{}` WHERE NOTHING STANDS** — `state.mjs`'s
|
|
883
|
+
* `RETURNED_VALUES_EMPTY`, one frozen constant meaning *"no body returned a value"*, which is the same fact whether no
|
|
884
|
+
* settle ran at all or a settle found none. **Never absent, never `undefined`, never a fresh `{}` per call** (`D-150`
|
|
885
|
+
* item 2, verbatim: *"present always, never absent, never `undefined`"*), on `D-77`'s rule.
|
|
886
|
+
*
|
|
887
|
+
* **IT IS NOT A SECOND `triggered`, AND IT CARRIES NO HANDLE→ADDRESS RELATION.** The map's keys are HANDLES and nothing
|
|
888
|
+
* here names an address: the `{handle, address}` pairs stay `triggered`'s above. **Nor is it the channel it replaced** —
|
|
889
|
+
* `D-149` item 1 dissolved the external `channel`, and item 4 makes the receipt the answer on every arm, so this datum is
|
|
890
|
+
* read off the record the caller already holds.
|
|
891
|
+
*
|
|
892
|
+
* **AND WHY IT IS A DOCBLOCK AND NOT A TYPED LINE — the same sentence `discarded`, `log` and `bodyFailures` above carry,
|
|
893
|
+
* for the same reason:** the census that asserts this record's declared member set at three
|
|
894
|
+
* (`tests/e2e/blind-entry-module.test.mjs`'s `WriteRecord` cell and `tests/e2e/surface.test.mjs`) is outside this pass's
|
|
895
|
+
* write scope, so a typed member would redden a green leg without moving the runtime at all. **The member is declared by
|
|
896
|
+
* NAME, SHAPE and SEMANTICS here and carried at runtime.** **A future pass that owns the census owes it the typed line.**
|
|
897
|
+
*/
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* **⟶ `U-STOREROOM-HELD-LISTENER-IDENTITY`: THE TRIGGER'S PAIR, `{handle, address}`** (`contract.md §2.4`
|
|
902
|
+
* item 1; `trigger-and-pair.md §1`; `PAR-HL-19`, `PAR-HL-20`, `PAR-HL-21`).
|
|
903
|
+
*
|
|
904
|
+
* **`handle` IS THE CALLER'S OWN STRING** and **`address` IS THE BINDING'S OWN ADDRESS** — the address the
|
|
905
|
+
* listener was bound at, never the address the write targeted. **THE TWO ARE TOLD APART**: the write's own
|
|
906
|
+
* address crosses as the record's `triggeringAddress`, and the invocation's ONE argument is that write
|
|
907
|
+
* address (`contract.md §2.4` item 7).
|
|
908
|
+
*
|
|
909
|
+
* **NO PARALLEL `triggeredAddresses` ARRAY EXISTS AND NONE MAY BE ADDED** — the aligned form is an i-th
|
|
910
|
+
* correspondence, which reverses `DD-37` (`contract.md §2.4` item 1; `trigger-and-pair.md §2` item 4).
|
|
911
|
+
*/
|
|
912
|
+
export interface TriggerPair {
|
|
913
|
+
readonly handle: Handle;
|
|
914
|
+
readonly address: Address;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/** The record a `delete` answers. */
|
|
918
|
+
export interface DeleteRecord {
|
|
919
|
+
readonly address: Address;
|
|
920
|
+
readonly tiers: readonly Tier[];
|
|
921
|
+
/** **THE TRIGGER'S PAIRS** (`contract.md §2.4` item 1; `PAR-HL-38`; `A43` — a delete fires its own set). */
|
|
922
|
+
readonly triggered: readonly TriggerPair[];
|
|
923
|
+
/**
|
|
924
|
+
* **THE OP THE `delete` LANDED — THE STORE'S OWN JOURNAL RECORD, `null` WHERE THE ACT REMOVED NOTHING**
|
|
925
|
+
* (`strata/decisions.md` · `D-43` item 3, the architect, verbatim: *"Delete should be journaled and
|
|
926
|
+
* reversible"*).
|
|
927
|
+
*
|
|
928
|
+
* **IT IS THE MEMBER `WriteRecord` CARRIES, AT THE SAME NAME AND THE SAME TYPE** (`WriteRecord.op` above,
|
|
929
|
+
* the store's own seven-member `JournalOp` — **⟶ SEVEN AND NOT EIGHT FROM 2026-11-17, `D-189` item 2:
|
|
930
|
+
* `compacted` is removed from the record and the declaration** (`JournalOp` above states it at its own
|
|
931
|
+
* docblock)), so a caller has **one spelling for "the op this act landed"**
|
|
932
|
+
* and one route to reversing it: `store.rollback(record.op.opId)` restores every version the delete
|
|
933
|
+
* removed, **at its own tier**, exactly as a write's reversal restores what the write replaced.
|
|
934
|
+
*
|
|
935
|
+
* **THE MEASURED FACT THIS MEMBER EXISTS FOR.** The delete was already journaled — the store appended one
|
|
936
|
+
* entry carrying the address, the per-tier before-state and an op id, and `rollback` already accepted that
|
|
937
|
+
* id — but the record carried no identity, so **the act could not be NAMED, and an act that cannot be
|
|
938
|
+
* named cannot be reversed**: that is why the kernel's unwinding could not reach a delete's effect at all.
|
|
939
|
+
*
|
|
940
|
+
* **AND `null` IS THE `D-3` ARM, SAID PLAINLY.** A delete that removes no version is a **success** with
|
|
941
|
+
* `tiers: []` (`§4.4` arm `D-3`; `native contract.md §6.5` item 11 adds `triggered: []`) and appends no
|
|
942
|
+
* journal entry, so there is no op to carry: **nothing is named because nothing was destroyed.**
|
|
943
|
+
*/
|
|
944
|
+
readonly op: JournalOp | null;
|
|
945
|
+
/**
|
|
946
|
+
* **⟶ ADDED 2026-10-29 — THE COMMIT RECORD THIS ACT MINTED, THE IDENTITY THE WHOLE COMMIT'S MACHINERY IS
|
|
947
|
+
* KEYED BY** (`D-55` item `3`; `kernel-surface.md §2.1` item `2`; `A112`).
|
|
948
|
+
*
|
|
949
|
+
* **IT IS THE SAME FOUR-MEMBER `CommitRecord` A WRITE'S `K-2` RETURNS** — `attempt` · `op` · `triggered` ·
|
|
950
|
+
* `pending` — minted by the delete's own commit act, held by the entry for adoption, and handed here on the
|
|
951
|
+
* receipt. **THE FOUR READINGS THAT FOLLOW FROM IT, EACH A MEASUREMENT THIS RELEASE PRINTED:**
|
|
952
|
+
* * **`pending` IS THE DELETE'S RESIDUE** — the store's returned set, WHOLE at the landing, minus the
|
|
953
|
+
* handles this delete's own pass checked off as it passed. **IT IS THE SET THE DELIVERY FIRES**: this
|
|
954
|
+
* act delivers `pending`, not the whole `triggered` list, exactly as a write does;
|
|
955
|
+
* * **A `file`-TIER DELETE SAVES ITS OWN OP — AND A WHOLE-TARGET DELETE SAVES ITS OWN OP TOO, FROM 2026-11-02** —
|
|
956
|
+
* the terminal arm names `op.opId` to the store's `commit_file` on the act's PASSING arm, so the bytes
|
|
957
|
+
* describe the state the delete left (`§2.11` clause 2, the same act a `file`-tier write gets). **THE SAVE
|
|
958
|
+
* IS KEYED TO WHAT THE ACT MOVED AND NOT TO THE OP'S OWN TIER WORD**: a whole-target delete's `op.tier`
|
|
959
|
+
* is `null`, and the store still saves it where the act removed at least one version standing at the `file`
|
|
960
|
+
* tier — **and a `mem`- or `temp`-tier WRITE that PURGED such a version is saved the same way, while a
|
|
961
|
+
* scalar at the same address SHADOWS it and serializes nothing** — and it serializes nothing where the
|
|
962
|
+
* act moved none (`strata/decisions.md` · `D-106`). **THE STORE'S `delete` VERB STILL COMMITS NOTHING**
|
|
963
|
+
* (`DD-28`; `native contract.md §7.2` item 5): the save is the ARM's, at the record's own op;
|
|
964
|
+
* * **THE LOG AND THE REPORT ARE ANSWERABLE BY REF** — `K.log(store, record.attempt)` and
|
|
965
|
+
* `K.report(store, record.attempt)` answer the delete's own attempt after it passed, not only from a
|
|
966
|
+
* refusal's `log` (`attempt-lifecycle.md §2.4` item 1: those items take an `AttemptRef` or its `id`);
|
|
967
|
+
* * **AND IT CAN BE HANDED BACK** — a nested `write(address, tier, value, record)` names this commit at its
|
|
968
|
+
* fourth position and JOINS it (`D-46`), the same object `write`'s own position accepts.
|
|
969
|
+
*
|
|
970
|
+
* **`null` IS THE `D-3` ARM** — an act that removed nothing opens no attempt, so there is no record: the member
|
|
971
|
+
* is PRESENT and says so rather than being absent (`D-21`).
|
|
972
|
+
*
|
|
973
|
+
* **AND IT IS A NON-ENUMERABLE OWN `data` PROPERTY**, the device `discarded` below declares for the same
|
|
974
|
+
* reason: `Object.keys(receipt)` and every deep-equality over the receipt read the four enumerable members
|
|
975
|
+
* they read before, while a caller reads the record **by its name** (`receipt.commit`). A spread or
|
|
976
|
+
* `Object.assign` copy does not carry it — read the member off the receipt itself.
|
|
977
|
+
*/
|
|
978
|
+
readonly commit: CommitRecord | null;
|
|
979
|
+
/**
|
|
980
|
+
* **THE DISCARD'S WITNESS — THE REVERSALS THIS ACT'S OWN DELIVERY RAISED AND THE PACKAGE THREW AWAY**
|
|
981
|
+
* (`strata/decisions.md` · `D-49`, the architect, verbatim: *"Make discard observable"*; `DEF-AH`).
|
|
982
|
+
*
|
|
983
|
+
* **WHY THIS MEMBER EXISTS.** A `delete`'s listener delivery stands **after the pass's own drain** (`D-55`
|
|
984
|
+
* item `3` put the delivery after the judgement), so a `rollback` a listener body issues inside it raises a
|
|
985
|
+
* **restart request with no consumer left in this act**, and the fail-state is honest only if the caller learns
|
|
986
|
+
* it happened (`D-43` item 2's fail-state and both exits stand; `D-49` owes the witness and nothing else).
|
|
987
|
+
* **⟶ AND THE GROUND MOVED BY ONE FACT ON 2026-10-29, SAID PLAINLY:** this member's clause read *"a `delete`'s
|
|
988
|
+
* listener delivery runs no constraint pass — there is no attempt for one to run over"*, and from `D-55` item
|
|
989
|
+
* `3` the delete DOES run a pass. **WHAT IS UNMOVED IS THE READER'S FACT**: the delivery is outside that pass,
|
|
990
|
+
* its drain has already run, and a request raised here is still discarded — so the witness still has its
|
|
991
|
+
* subject and still reports it. **A listener at `window.tabs` fires for a
|
|
992
|
+
* delete at `window.tabs.landingPage`** — the triggered set's membership rule is the address prefix — **and the
|
|
993
|
+
* check it runs there is exactly the act the window discards**; this member is where that caller reads it.
|
|
994
|
+
*
|
|
995
|
+
* **⟶ ITS SHAPE, AND THE LIST IS NOW EVERY RAISE AT ANY COUNT — `D-75`, 2026-10-29, AND THIS PARAGRAPH REPLACES
|
|
996
|
+
* THE ONE-SLOT ONE THAT STOOD HERE.** The bytes it replaces read *"the restart machinery holds **one** pending
|
|
997
|
+
* request per instance (a second in-flight action overwrites the first), so the array is **`0` or `1` long**"*,
|
|
998
|
+
* and the measurement that killed them is the row's: **two raises in one delivery answered `[]`**, and a reader
|
|
999
|
+
* of `[]` could not tell *"nothing was discarded"* from *"I wasn't told"*. **THE DEMAND, VERBATIM: *"report every
|
|
1000
|
+
* discarded raise at any count, on every path."*** **SO THE ARRAY IS ONE ENTRY PER RAISE THE ACT'S DELIVERY
|
|
1001
|
+
* DISCARDED, IN RAISE ORDER, AT ANY COUNT** — and **`[]` now means what the sentence below says it means**:
|
|
1002
|
+
* * `opId` — **the store's own echo of the id THAT raise's reversal named**, or `null` where the reversal's
|
|
1003
|
+
* call answered no id;
|
|
1004
|
+
* * `addresses` — **the addresses THAT raise's reversal moved** (measured at that raise's own instant, each a
|
|
1005
|
+
* fresh segment list, one address once — `DEF-AM`), **and `[]` where it moved nothing the registry watches**:
|
|
1006
|
+
* a raise that was discarded for nothing is still COUNTED, and no address is invented for it. **`[]` here is a
|
|
1007
|
+
* LIST of no addresses and is never the ADDRESS `[]`**: a reversal that moves the ROOT reports `[[]]` — one
|
|
1008
|
+
* element, the empty segment list — and the two readings stay distinguishable by the lengths `0` and `1`.
|
|
1009
|
+
*
|
|
1010
|
+
* **A WITNESS IS NOT A REFUSAL.** The `delete` still answers what it answered — this record's other members
|
|
1011
|
+
* are unmoved, the act **throws nothing**, **no member of the closed status set is minted**, and the reversed
|
|
1012
|
+
* effect **still stands** (the request is reported, not re-run). **AND THIS MEMBER IS A NON-ENUMERABLE OWN
|
|
1013
|
+
* PROPERTY**: `Object.keys(record)` and every deep-equality over the record read the same four members they
|
|
1014
|
+
* read before, while a caller reads the witness **by its name**. A spread or `Object.assign` copy of the record
|
|
1015
|
+
* does not carry it — read the member off the record itself.
|
|
1016
|
+
*
|
|
1017
|
+
* **WHAT IT CANNOT CARRY, SAID HERE RATHER THAN LEFT TO BE DISCOVERED.** The other passless window — a
|
|
1018
|
+
* registration's own evaluation (`addConstraint`) — answers an **opaque identity** and carries **no witness**:
|
|
1019
|
+
* an identity is not a record and no member of it is declared, so the action raised there remains unobservable
|
|
1020
|
+
* without a new surface (`D-49`'s own instruction: say so rather than invent a member).
|
|
1021
|
+
*/
|
|
1022
|
+
readonly discarded: readonly {
|
|
1023
|
+
readonly opId: string | null;
|
|
1024
|
+
readonly addresses: readonly Address[];
|
|
1025
|
+
}[];
|
|
1026
|
+
/**
|
|
1027
|
+
* **⟶ ADDED 2026-11-02 — THE RESOLUTION LOG ON A DELETE'S RECEIPT: THE COMMIT'S OWN LIST, AT THE NAME THE
|
|
1028
|
+
* FAILURE FORM USES** (`strata/decisions.md` · `D-119`).
|
|
1029
|
+
*
|
|
1030
|
+
* **`receipt.log` IS A `readonly LogEntry[]` AT RUNTIME** — the entries this delete's commit appended, in
|
|
1031
|
+
* append order: the `constraint-check` entry for each pair the delete's own pass asked, the `repair-run` entry
|
|
1032
|
+
* for every repair that landed an edit, and the `commit` entry that closes the arm. **IT IS THE SAME ARRAY AS
|
|
1033
|
+
* THE RECORD THIS RECEIPT'S `commit` MEMBER NAMES** — one list, two names on it, and `log` is the one the
|
|
1034
|
+
* refusal uses and the one to read — **so a pass and a later refusal about that commit can never disagree**
|
|
1035
|
+
* (`D-53`; `D-119` item 4).
|
|
1036
|
+
*
|
|
1037
|
+
* **`[]` IS THE `D-3` ARM'S ANSWER AND IT MEANS WHAT IT SAYS**: a delete that removed nothing opened no
|
|
1038
|
+
* attempt, no pass ran and no entry was appended. **THE MEMBER IS PRESENT ON EVERY PASSING RECEIPT, `[]`
|
|
1039
|
+
* included** — it is never absent and never `undefined` (`D-78`'s rule, read for a third member beside
|
|
1040
|
+
* `discarded` above and `commit`).
|
|
1041
|
+
*
|
|
1042
|
+
* **IT IS A NON-ENUMERABLE OWN ACCESSOR** (`enumerable: false`, `configurable: true`), the device `discarded`
|
|
1043
|
+
* above declares: `Object.keys(receipt)` is still the four enumerable members, every deep-equality over a
|
|
1044
|
+
* receipt is unmoved, and a spread or `Object.assign` copy loses it. `Object.getOwnPropertyNames(receipt)` is
|
|
1045
|
+
* the one census that gains the name, declared rather than discovered. **THE READ ANSWERS ONE CACHED
|
|
1046
|
+
* REFERENCE** — the array the commit's handoff froze — and derives nothing.
|
|
1047
|
+
*
|
|
1048
|
+
* **A DOCBLOCK AND NOT A TYPED LINE, for the reason `discarded` above states**: the census that fixes this
|
|
1049
|
+
* record's member set is outside this pass's write scope. **A future pass that owns the census owes it the
|
|
1050
|
+
* typed line.**
|
|
1051
|
+
*/
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* The record a `rollback` answers (`DD-39`: *"`RollbackResult` → `{ opId, undoneOps, restoredTo }`"*).
|
|
1056
|
+
*
|
|
1057
|
+
* **ALL THREE MEMBERS WERE MISTYPED BY THE SHIPPED DECLARATION** (`opId: number`, `undoneOps: number`,
|
|
1058
|
+
* `restoredTo: number`): **`opId` echoes the id the caller passed, and that id is a `string`** (`PAR-JS-9`'s
|
|
1059
|
+
* own unit: *"the `JournalOp.opId` string"*); **`undoneOps` is the LIST of the ids the reversal undid — an
|
|
1060
|
+
* ARRAY of those ids, not a count**; and **`restoredTo` is the base state the addressed subtree now stands
|
|
1061
|
+
* at**, `{ present, value }`.
|
|
1062
|
+
*/
|
|
1063
|
+
export interface RollbackRecord {
|
|
1064
|
+
readonly opId: string;
|
|
1065
|
+
readonly undoneOps: readonly string[];
|
|
1066
|
+
readonly restoredTo: BaseState;
|
|
1067
|
+
/**
|
|
1068
|
+
* **THE DISCARD'S WITNESS ON THE RAISE'S OWN ANSWER — PRESENT AT RUNTIME, DECLARED HERE RATHER THAN AS A TYPED
|
|
1069
|
+
* MEMBER** (`strata/decisions.md` · `D-75`, 2026-10-29: *"report every discarded raise at any count, on every
|
|
1070
|
+
* path"*).
|
|
1071
|
+
*
|
|
1072
|
+
* **WHAT IT ANSWERS, IN THE THREE ARMS ITS OWN SENTENCE HAS.** `record.discarded` is
|
|
1073
|
+
* `readonly { opId: string | null; addresses: readonly Address[] }[]`:
|
|
1074
|
+
* * **one entry** where this act's commit window has DISCARDED the raise this call made — the same entry the
|
|
1075
|
+
* act that owns the window reports (`DeleteRecord.discarded` above);
|
|
1076
|
+
* * **`[]`** where the raise was CONSUMED and judged by a pass's own drain (`D-42`: a raise a pass carries to
|
|
1077
|
+
* its terminal judgement was judged, not discarded), where no request was raised at all (an at-rest
|
|
1078
|
+
* judgement is judged at its own instant), **or where the raise still stands and its window has not ended —
|
|
1079
|
+
* at that instant nothing has been discarded YET**;
|
|
1080
|
+
* * and it is a **LIVE VIEW AND NOT A SNAPSHOT**: the pass that judges a constraint body's raise runs after
|
|
1081
|
+
* the body returned, so a datum captured at the call would answer `[]` about a window that then discards it.
|
|
1082
|
+
* **Read it once the act whose window the raise stands in has returned and it is the settled answer.**
|
|
1083
|
+
*
|
|
1084
|
+
* **THE OTHER PASS-RUNNING PATH IS ALREADY CARRIED AND IS NOT RE-DECLARED**: a raise raised where a window has no
|
|
1085
|
+
* consumer at all — a registration's (`addConstraint`) own evaluation — settles when the store's next at-rest act
|
|
1086
|
+
* proves the window has ended, and it is THIS member, on THIS record, that names it then; the registration's own
|
|
1087
|
+
* answer is an opaque identity and carries nothing (`D-49`).
|
|
1088
|
+
*
|
|
1089
|
+
* **IT IS A NON-ENUMERABLE own accessor** (`enumerable: false`, `configurable: true`): `Object.keys` of this
|
|
1090
|
+
* record is the three declared members above, and every deep-equality over it is unmoved. **AND WHY THE
|
|
1091
|
+
* DECLARED MEMBER SET IS NOT WIDENED HERE: the same census that fixes `WriteRecord` at three fixes this record
|
|
1092
|
+
* at three, and it is outside this pass's write scope** — the member is declared by name, shape and semantics,
|
|
1093
|
+
* and a future pass that owns the census owes it the typed line.
|
|
1094
|
+
*/
|
|
1095
|
+
/**
|
|
1096
|
+
* **⟶ ADDED 2026-11-02 — THE RESOLUTION LOG ON A REVERSAL'S RECORD: THE JUDGEMENT'S OWN LIST**
|
|
1097
|
+
* (`strata/decisions.md` · `D-119`, with `D-113` item 3 and `D-117` item 1).
|
|
1098
|
+
*
|
|
1099
|
+
* **`record.log` IS A `readonly LogEntry[]` AT RUNTIME — the list the reversal's JUDGEMENT appended to.** **THIS
|
|
1100
|
+
* IS THE ARM THE RULING'S GROUND APPLIES TO MOST SHARPLY**: a judgement runs your pairs' repairs and delivers
|
|
1101
|
+
* the listeners those repairs' writes fire, so **a `rollback` can land an edit you did not ask for, and that
|
|
1102
|
+
* edit's `repair-run` entry is what this member carries** — the downstream change, readable rather than
|
|
1103
|
+
* inferred. **The list is the judgement's own array, frozen in place at that frame's end** and not a copy:
|
|
1104
|
+
* the `repair-run` entries and the entries the repairs' own writes minted, in append order. **A reversal mints
|
|
1105
|
+
* no attempt, so no `commit` entry exists here and none is invented.**
|
|
1106
|
+
*
|
|
1107
|
+
* **`[]` MEANS *THIS ACT APPENDED NOTHING IT CAN REPORT*, NEVER *"nothing happened"*, and its shapes are
|
|
1108
|
+
* four**: a `rollback` raised inside an open window (the judgement is that window's own drain), an at-rest
|
|
1109
|
+
* judgement over an empty watch, a judgement that ran and appended nothing, and the kernel's own compensating
|
|
1110
|
+
* reversal of a failing attempt. **THE MEMBER IS PRESENT ON EVERY PASSING RECORD, `[]` included.**
|
|
1111
|
+
*
|
|
1112
|
+
* **AND ITS REFUSAL DOES NOT AGREE WITH IT BY CONTENT**: a refusing reversal crosses its OWN one-entry
|
|
1113
|
+
* `constraint-check` list (`D-41`), so a pass and a refusal on this verb are different lists — that is
|
|
1114
|
+
* `D-41`'s form, unmoved by `D-119`, and it is why the identity rule (*"a pass and a later refusal on one
|
|
1115
|
+
* commit can never disagree"*) is stated for `write` and `delete` alone.
|
|
1116
|
+
*
|
|
1117
|
+
* **IT IS A NON-ENUMERABLE OWN ACCESSOR** (`enumerable: false`, `configurable: true`), the device `discarded`
|
|
1118
|
+
* above declares: `Object.keys(record)` is still the three declared members. **The read answers one cached
|
|
1119
|
+
* reference** where `discarded` above must read live — the same shape, a different reason. **A DOCBLOCK AND
|
|
1120
|
+
* NOT A TYPED LINE** for the reason `discarded` states; a future pass that owns the census owes it the typed
|
|
1121
|
+
* line.
|
|
1122
|
+
*/
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* **THE ATTEMPT'S IDENTITY — THE KERNEL'S OWN ONE-MEMBER RECORD AND NOT THIS PACKAGE'S**
|
|
1127
|
+
* (`attempt-lifecycle.md §2.4` item 1: *"`AttemptRef { id: string }` — the attempt's identity: a non-empty,
|
|
1128
|
+
* kernel-unique token"*; read with `kernel-surface.md §1` item 4's closed record enumeration, which counts
|
|
1129
|
+
* it as a named kernel-side shape).
|
|
1130
|
+
*
|
|
1131
|
+
* **IT IS DECLARED HERE FOR ONE POSITION AND NO OTHER**: the `attempt` member of the `CommitRecord` the
|
|
1132
|
+
* `write` member's `commit` position takes (`§2.4` item 9 (f)'s *"each with its argument types"* read
|
|
1133
|
+
* with item 9 (g) item 1's record-position class test). **⟶ THE POSITION IT IS CITED FOR MOVED WITH
|
|
1134
|
+
* `settle`'s REMOVAL, 2026-10-18**: that member's argument is gone with the member, and the ONE position
|
|
1135
|
+
* that still reads a `CommitRecord` is the `commit` argument above. **No verb of this entry answers with it
|
|
1136
|
+
* and this package mints it nowhere.**
|
|
1137
|
+
*/
|
|
1138
|
+
export interface AttemptRef {
|
|
1139
|
+
/** The attempt's identity: a non-empty, kernel-unique token. */
|
|
1140
|
+
readonly id: string;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* **THE WRITE'S COMMIT POSITION IS THIS RECORD — THE KERNEL'S OWN `{ attempt, op, triggered, pending }`, AND
|
|
1145
|
+
* NOT THE STORE'S `WriteRecord`** (**⟶ RE-SPELLED 2026-10-18: this block read *"THE ORDERING SEAM'S ONE
|
|
1146
|
+
* ARGUMENT"*, and the seam `settle` is REMOVED WHOLE from the product — the BYTES stand and are read through
|
|
1147
|
+
* this clause; THE SHAPE IS UNMOVED and takes the ONE position that still reads it, the `write` member's
|
|
1148
|
+
* `commit` argument) (`kernel-surface.md §2.1` item 2's return-shape block: *"`CommitRecord`,
|
|
1149
|
+
* a record with exactly FOUR members, the FOURTH added at the `A108` landing pass of 2026-10-13"*; its
|
|
1150
|
+
* `§1` item 4 counts it among the kernel's own named shapes).
|
|
1151
|
+
*
|
|
1152
|
+
* **⟶ RE-DERIVED BY NAME, 2026-11-01 — THE HEAD ABOVE IS THE READING OF ITS OWN DATE AND IS READ THROUGH THIS
|
|
1153
|
+
* CLAUSE** (`RCA-8(g)` ANNOTATE-BESIDE; `strata/decisions.md` · `D-101`, verbatim: *"Widen the position to its
|
|
1154
|
+
* class test"*). **THE POSITION IS NOW THE CLASS TEST'S OWN CLASS, `CommitCarrier`** — a non-null, non-Proxy,
|
|
1155
|
+
* non-array object carrying an OWN `pending` member present and not `undefined`
|
|
1156
|
+
* (`bindings/js/src/entry/delivery.mjs:27`-`:54`, the predicate at `:39`) — one member, spelled exactly as this
|
|
1157
|
+
* record's own `pending` is spelled below, declared and exported at this file's end. **SO THIS RECORD IS ONE
|
|
1158
|
+
* CARRIER OF THE POSITION'S CLASS AND NOT THE POSITION'S ONLY TYPE**: it keeps every byte, its four members, its
|
|
1159
|
+
* export and its own clauses below, and what it no longer is, is the position's sole declared type.
|
|
1160
|
+
*
|
|
1161
|
+
* **THE RECORD THE KERNEL PASSES IS THIS ONE AND THE STORE'S IS NOT.** **The kernel passes the `CommitRecord`
|
|
1162
|
+
* `commit` built and the pass's terminal arm reads again — one identity, at both instants** (`surface.md`
|
|
1163
|
+
* `§2.4` item 9 (a)–(b)'s table: *"the record identity (the `CommitRecord` `commit` is building)"* then
|
|
1164
|
+
* *"the SAME record identity"*; `PAR-JS-19`'s `supplier` cell: THE KERNEL, *"at instant (a) from `commit`
|
|
1165
|
+
* … and at instant (b) from the pass's terminal arm"*). **AND IT IS `NOT` THE STORE'S OWN RECORD**:
|
|
1166
|
+
* `kernel-surface.md §2.1` item 2's *"WHAT IT IS NOT"* clause reads *"the `CommitRecord` is the KERNEL'S
|
|
1167
|
+
* OWN record and is NOT the store's `WriteResult`"* — the store's write answers `{op, watched, triggered}`
|
|
1168
|
+
* and `WriteRecord` above is that three-member record, carrying NO `attempt` and NO `pending`.
|
|
1169
|
+
*
|
|
1170
|
+
* **SO THE `pending` MEMBER BELOW IS THE KERNEL'S, CARRIED VERBATIM FROM THE KERNEL'S OWN DECLARATION AND
|
|
1171
|
+
* MINTED NOWHERE HERE** (`surface.md` `§2.4` item 9 (f)'s *"no `pending`-shaped record type this unit does
|
|
1172
|
+
* not declare"*; `A116` (D4) — *"the carrier `CommitRecord.pending` and its two removal rules unchanged"*):
|
|
1173
|
+
* it carries THE WHOLE RETURNED SET OF TRIGGERED CONSTRAINTS this call's write returned, each entry leaving
|
|
1174
|
+
* it only by being checked off as it passes (`kernel-surface.md §2.1` item 2).
|
|
1175
|
+
*
|
|
1176
|
+
* **`triggered` and `pending` are the store's own returned handle set and the kernel's own member
|
|
1177
|
+
* respectively, each read as a SET** (`§2.1` item 2; `Handle` above is this file's opaque-handle spelling);
|
|
1178
|
+
* **`op` is the op the store's write returned, VERBATIM** (`JournalOp` above, the store's own seven-member
|
|
1179
|
+
* record — **⟶ SEVEN AND NOT EIGHT FROM 2026-11-17, `D-189` item 2** — `§2.1` item 2: *"the op the store's
|
|
1180
|
+
* write returned, VERBATIM"*).
|
|
1181
|
+
*/
|
|
1182
|
+
export interface CommitRecord {
|
|
1183
|
+
/** The attempt this commit opened — its identity (`attempt-lifecycle.md §2.4` item 1). */
|
|
1184
|
+
readonly attempt: AttemptRef;
|
|
1185
|
+
/** The op the store's write returned, VERBATIM (`JournalOp` above; `§2.1` item 2). */
|
|
1186
|
+
readonly op: JournalOp;
|
|
1187
|
+
/** The store's own `triggered` member, VERBATIM, read as a SET (`§2.1` item 2) — now a PAIR LIST. */
|
|
1188
|
+
readonly triggered: readonly TriggerPair[];
|
|
1189
|
+
/**
|
|
1190
|
+
* **THE WHOLE RETURNED SET OF TRIGGERED CONSTRAINTS, each entry leaving it only by being checked off as it
|
|
1191
|
+
* passes — and now a PAIR list, because `pending` is SEEDED AS A CLONE OF `triggered` and therefore
|
|
1192
|
+
* INHERITS ITS SHAPE** (`P: docs/pending.md · P-7`'s `pending` ruling, verbatim: *"Push the pair into
|
|
1193
|
+
* pending. Pending is seeded as a clone of triggered."*; `(AA-7)`: *"Pop from set to check off"*;
|
|
1194
|
+
* `contract.md §2.4` items 3–4; `PAR-HL-22`, `PAR-HL-39`).
|
|
1195
|
+
*
|
|
1196
|
+
* **ITS ELEMENT TYPE IS TOTAL — NO BARE HANDLE STANDS IN IT** (`contract.md §2.5` item 2): the bare-handle
|
|
1197
|
+
* union the check-off and the discard once carried has no subject under POP, because the checked-off entry
|
|
1198
|
+
* is REMOVED rather than carried beside.
|
|
1199
|
+
*
|
|
1200
|
+
* **⟶ RE-DERIVED 2026-11-01 — `D-104`: THE SEED ABOVE IS NOT THE MEMBER'S WHOLE POPULATION ON A REPAIRED
|
|
1201
|
+
* WRITE, AND NO TYPE, MEMBER OR ARITY MOVES WITH THIS CLAUSE** (`docs/L1/repair-listener-delivery.md` §4, §8;
|
|
1202
|
+
* `strata/decisions.md` · `D-104` item `2`, whose item `4` fixes *"no status, no member, no arity, no type may
|
|
1203
|
+
* move"*). The clause above stands BYTE-FOR-BYTE and is read THROUGH this one: `pending` is still seeded as a
|
|
1204
|
+
* clone of `triggered` and still holds *"the whole returned set of triggered constraints"* **as its seed**, and
|
|
1205
|
+
* from this date **A REPAIR'S WRITE'S TRIGGERED LISTENERS ARE MERGED INTO IT** — in the commit's one delivery,
|
|
1206
|
+
* after the pass, one invocation per distinct handle — so **an entry may also be a listener a REPAIR's edit
|
|
1207
|
+
* fired and the commit's own write never returned**. **`triggered` is unmoved**: it stays the store's own
|
|
1208
|
+
* returned set for the commit's write, VERBATIM, so `pending` is no longer a subset of it on a repaired write.
|
|
1209
|
+
* **THE ELEMENT SHAPE IS THE ONE ABOVE, UNCHANGED** (`{ handle, address }` — `contract.md §2.5` item 2's
|
|
1210
|
+
* totality stands), and **a pair is never merged**: a carried pair's handle stays out of the member exactly as
|
|
1211
|
+
* it is never delivered (`D-69`).
|
|
1212
|
+
*/
|
|
1213
|
+
readonly pending: readonly TriggerPair[];
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* **THE INSTANCE `storeCreate` RETURNS — THE FOURTEEN OWN MEMBERS READ THROUGH `contract.md §2.7` ITEM 9,
|
|
1218
|
+
* `10 + 1 + 1 + 2 = 14` ✓: THE TEN METHODS, `register`, `constraints` AND THE TWO REMOVE MEMBERS
|
|
1219
|
+
* `removeListener(handle)` AND `removeConstraint(pair)`.** Each is reached through the
|
|
1220
|
+
* factory's own product alone (`package.md §1.3` item 3) — **NO member below is a named export**, because
|
|
1221
|
+
* the module namespace carries ONE name, `storeCreate` (`§2.9` item 1's `A127` clause; `11 → 1` ✓).
|
|
1222
|
+
*
|
|
1223
|
+
* **⟶ AND THE OPENING FIGURE ABOVE WAS *"THE TWELVE OWN MEMBERS OF `surface.md §2.4` item 9 (f)'s clause of
|
|
1224
|
+
* 2026-10-18"*, SUPERSEDED HERE 2026-10-19: the operative set is the FOURTEEN of
|
|
1225
|
+
* `docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 9, the withdrawn `12 → 13` figure not
|
|
1226
|
+
* among the readings** (`P: docs/pending.md · (AA-5)`: *"the member set is 14 and the `12 → 13` figure is
|
|
1227
|
+
* withdrawn by name"*). **THE BYTES STAND AS THAT PASS'S READING AND ARE READ THROUGH THIS CLAUSE**
|
|
1228
|
+
* (`DEF-2026-10-02`: no whole-file rewrite).
|
|
1229
|
+
*
|
|
1230
|
+
* **THE TEN METHODS ARE THE DECLARED POSITIONS OF `§2.2`, `§2.4`, `§2.10` AND `§2.12` WITH THE LEADING
|
|
1231
|
+
* `instance` POSITION DROPPED** (`A127`): `a.read(address, tier?)` is the declared `read`, `a.write(address,
|
|
1232
|
+
* tier, value, commit?)` the declared `write`, and so on — **the receiver IS the instance, so the position
|
|
1233
|
+
* is not a position and the arity every one of them is judged by is the arity of the method's OWN call.**
|
|
1234
|
+
* **`on` and `off` are merged away and are NOT members**: registration is `listen` + `register`, and
|
|
1235
|
+
* withdrawal is `unlisten`.
|
|
1236
|
+
*
|
|
1237
|
+
* **THE STATE IS PRIVATE AND NONE OF THE TWELVE IS A RELEASE VERB** (`surface.md §2.1` (e) item 1; `A74`):
|
|
1238
|
+
* the instance's own state is released with the instance and by nothing else — no `dispose()`, no `close()`
|
|
1239
|
+
* and no finalizer is declared here. **⟶ AND `"THE TWELVE"` IS THE OPERATIVE FIGURE FROM 2026-10-18: the
|
|
1240
|
+
* set read THIRTEEN from 2026-10-17 to that date, and `settle`'s removal brings it BACK TO TWELVE — the ten
|
|
1241
|
+
* methods, `register` and `constraints`** (this interface's own clause for the last one below; the file's
|
|
1242
|
+
* header carries the member-set mark, the architect's rulings and the two still-refused routes).
|
|
1243
|
+
* **⟶ AND `"THE TWELVE"` IS SUPERSEDED IN TURN, 2026-10-19: THE OPERATIVE FIGURE IS `"THE FOURTEEN"` —
|
|
1244
|
+
* `10 + 1 + 1 + 2 = 14` ✓, the ten methods, `register`, `constraints` AND the two remove members
|
|
1245
|
+
* `removeListener(handle)` and `removeConstraint(pair)`** (`docs/specs/storeroom-held-listener-identity/
|
|
1246
|
+
* contract.md §2.7` item 9; the file header's clause of this date names the two members and the arithmetic).
|
|
1247
|
+
* **THIS SENTENCE'S ONWARD CLAIM IS UNMOVED AND IS THE POINT OF THE PASS: none of the fourteen is a RELEASE
|
|
1248
|
+
* VERB** (`surface.md §2.1` (e) item 1; `A74`) — **the two remove members remove a LISTENER and a
|
|
1249
|
+
* CONSTRAINT PAIR, never the instance's own state, and no `dispose()`, `close()` or finalizer stands beside
|
|
1250
|
+
* them.**
|
|
1251
|
+
*/
|
|
1252
|
+
export interface StoreInstance {
|
|
1253
|
+
/**
|
|
1254
|
+
* Read a leaf's literal, a branch's assembled value, or the empty address's whole register.
|
|
1255
|
+
*
|
|
1256
|
+
* **`tier` IS THE READER'S ARITY** (`PAR-JS-6`): absent, ONE token, or an ARRAY of tokens read as an
|
|
1257
|
+
* ANY-MATCH set — **so the earlier `tier?: Tier` spelling refused, as a type error, a lawful call
|
|
1258
|
+
* spelling a set**.
|
|
1259
|
+
*
|
|
1260
|
+
* **AND `undefined` AT THIS POSITION IS NOT THE SAME CALL AS NO POSITION AT ALL** (`parameter-semantics.md
|
|
1261
|
+
* §2.6`, read with `acceptance.md §4.1` item 7): **a SUPPLIED `undefined` is PRESENT and the store answers
|
|
1262
|
+
* `AddressMalformed` for it**, while ONLY the call that spells NO tier folds to absent. **THE DECLARATION
|
|
1263
|
+
* CANNOT TELL THE TWO APART** — `tier?: TierSet` admits both spellings, which is why `TierSet` carries no
|
|
1264
|
+
* `undefined` member — and the distinction is a RUNTIME one at this member (`a127`'s
|
|
1265
|
+
* `read_the_absent_tier_position_is_in_domain`).
|
|
1266
|
+
*/
|
|
1267
|
+
read(address: Address, tier?: TierSet): unknown;
|
|
1268
|
+
/** The same read, narrowed to a leaf — a branch answers `ReadTargetIsBranch`; `tier` is `TierSet`, with the same SUPPLIED-`undefined` reading as `read`. */
|
|
1269
|
+
readLiteral(address: Address, tier?: TierSet): unknown;
|
|
1270
|
+
/**
|
|
1271
|
+
* **Read a node's durability tier beside its value** — the third read verb, with `read`'s own arity
|
|
1272
|
+
* (`address`, then the optional `tier`), `read`'s own declared walk and `read`'s own refusal set, and with
|
|
1273
|
+
* the ANSWER COMPILED.
|
|
1274
|
+
*
|
|
1275
|
+
* **THE SHAPE IS A TOTAL FUNCTION OF NODE KIND** (`TieredNode`): an OBJECT node answers `{ _tier, …members }`
|
|
1276
|
+
* with its members INLINE, and it carries no `value` wrapper; an ARRAY node answers `{ _tier, value: [ … ] }`
|
|
1277
|
+
* with `value` dense and in index order; a LEAF node answers `{ _tier, value: <the literal> }`, `value` being
|
|
1278
|
+
* the literal itself, exactly as written. **Every node of the answer is therefore an OBJECT, and no node's
|
|
1279
|
+
* answer is a primitive or a bare array.**
|
|
1280
|
+
*
|
|
1281
|
+
* **EACH `_tier` IS THAT NODE'S OWN TIER**: an object's and an array's is its own anchor tier, a leaf's is
|
|
1282
|
+
* the tier of the version the read selected — so the answer's fields are the persistence ladder the read
|
|
1283
|
+
* walked, never one tier repeated and never a child inheriting its parent's. **It is ONE of `Tier`'s three
|
|
1284
|
+
* tokens and NEVER an array, a map or a count**: `TierSet` is the ARGUMENT's type, and the answer never
|
|
1285
|
+
* carries a set.
|
|
1286
|
+
*
|
|
1287
|
+
* **THE ONE COLLISION, DECLARED RATHER THAN LEFT TO BE DISCOVERED: a member you stored at the name `_tier`
|
|
1288
|
+
* is NOT DELIVERED by this verb** — the minted field wins on the node that carries it — **while the default
|
|
1289
|
+
* `read` at the same address and tier still answers your stored value**, so nothing is destroyed and the
|
|
1290
|
+
* truth is reachable. **That is the one lossy field, in this one verb**; every other stored name, `value`
|
|
1291
|
+
* among them, is delivered untouched.
|
|
1292
|
+
*
|
|
1293
|
+
* **AND A `readTiered` ANSWER HANDED BACK TO `write` IS STORED AS ORDINARY DATA**: the `_tier` members and
|
|
1294
|
+
* the `value` wrappers become your own stored members, exactly as the write stores any other object you
|
|
1295
|
+
* hand it. **This is a DECLARED CONSEQUENCE AND NOT A RULE — no clause forbids that write-back and no
|
|
1296
|
+
* clause blesses it, nothing is refused for it and nothing is stripped out of it.** **Nor is this answer a
|
|
1297
|
+
* stored value: it is the read's answer compiled, and it does not round-trip.**
|
|
1298
|
+
*
|
|
1299
|
+
* **AND IT IS NOT A VERSION-SET READOUT**: it reports WHICH version won and never which versions stand, so
|
|
1300
|
+
* a key holding a `file` version and a `mem` version answers the same shape as a key holding only the
|
|
1301
|
+
* winner. **The surface's one tier-SET answer remains `delete`'s `receipt.tiers`.**
|
|
1302
|
+
*
|
|
1303
|
+
* **AND `undefined` AT THE `tier` POSITION IS NOT THE SAME CALL AS NO POSITION AT ALL** (`PAR-JS-6`,
|
|
1304
|
+
* exactly as at `read`): a SUPPLIED `undefined` is PRESENT and the store answers `AddressMalformed` for it,
|
|
1305
|
+
* while only the call that spells no tier reads the whole set.
|
|
1306
|
+
*/
|
|
1307
|
+
readTiered(address: Address, tier?: TierSet): TieredNode;
|
|
1308
|
+
/**
|
|
1309
|
+
* Write `value` at `address` on `tier` — EXACTLY ONE token, never an array (`PAR-JS-7`).
|
|
1310
|
+
*
|
|
1311
|
+
* **THE DECLARED ORDER IS `write(address, tier, value, commit?)`** (`surface.md §2.2`'s dated clause of
|
|
1312
|
+
* 2026-10-15; `parameter-semantics.md §2.20`), read with `§2.4` item 9 (f)'s `A127` clause: **THREE
|
|
1313
|
+
* REQUIRED ARGUMENTS AND THE OPTIONAL ONE LAST — the commit, at the FOURTH position of the METHOD**,
|
|
1314
|
+
* which is the position the `instance`-leading spelling made FIVE (`A124`).
|
|
1315
|
+
*
|
|
1316
|
+
* **AN ABSENT `commit` IS IN DOMAIN** (§2.2 clause 3: *"the write opens or joins a commit all the
|
|
1317
|
+
* same"*) and **NO DEFAULT RECORD IS FABRICATED FOR IT**; **the admitted form is the kernel's own
|
|
1318
|
+
* `CommitRecord`** (`surface.md §2.4` item 9 (g) item 1: an object carrying a `pending` member present
|
|
1319
|
+
* and not `undefined`), and **every other form at this position — absent, `undefined`, `null`, a
|
|
1320
|
+
* primitive, a function, a `Proxy`, an object whose `pending` member is absent or `undefined` — throws
|
|
1321
|
+
* THE CLASS TEST'S OWN `TypeError`, whose `status` member is ABSENT and whose STRING `message` member is
|
|
1322
|
+
* REQUIRED** (`surface.md` §2.4 item 9 (g) item 1's discriminator, landed 2026-10-15 on `A116` (D1); the
|
|
1323
|
+
* operative predicate is `file-tier-save.test.mjs`'s `positionRefusal`, which asserts exactly those two
|
|
1324
|
+
* halves). **A REFUSED POSITION STOPS THE WRITE**: no verb is reached and no byte moves.
|
|
1325
|
+
*
|
|
1326
|
+
* **⟶ CORRECTED 2026-10-17 — THIS CELL ATTRIBUTED THAT `TypeError` TO *"the registration site's own"*
|
|
1327
|
+
* FORM, AND THE ATTRIBUTION WAS FALSE** (`DEF-2026-10-16-Q`; `surface.md` §2.5 item 5 (g), THE OPERATIVE
|
|
1328
|
+
* READING). **THE REGISTRATION SITE THROWS NO `TypeError` AT ALL**: its refusal *"IS a rejection under
|
|
1329
|
+
* `A76` and travels in THIS section's single form, with its `status` drawn from the store's closed set —
|
|
1330
|
+
* the store's own `AddressMalformed`"*, `message` generated as clause (d) declares, so `register`'s
|
|
1331
|
+
* outside argument answers a plain `{status, message}` (driven at `register.test.mjs`'s
|
|
1332
|
+
* `isRegistrationRefusal`, which counts a `TypeError` as a FAILURE). **A `TypeError` thrown by any
|
|
1333
|
+
* STORE-REACHING VERB is itself a FINDING** (`a127-surface.test.mjs`'s
|
|
1334
|
+
* `a127_no_store_reaching_verb_throws_the_class_test_form`). The two forms are DIFFERENT forms of
|
|
1335
|
+
* DIFFERENT sites, and this position's is the class test's own, declared at `§2.4` item 9 (g) —
|
|
1336
|
+
* beside, and not drawn from, the registration site's `§2.4` item 5.
|
|
1337
|
+
*
|
|
1338
|
+
* **AND A SUPPLIED `undefined` AT THE `tier` POSITION IS PRESENT HERE TOO** (`parameter-semantics.md
|
|
1339
|
+
* §2.6`; `PAR-JS-6`): it is not the absent tier and the store answers `AddressMalformed` for it.
|
|
1340
|
+
*/
|
|
1341
|
+
write(address: Address, tier: Tier, value: unknown, commit?: CommitCarrier): WriteRecord;
|
|
1342
|
+
/**
|
|
1343
|
+
* Remove the versions the address names, and answer the operation's record.
|
|
1344
|
+
*
|
|
1345
|
+
* **THE NAME IS `delete` AND IT IS A METHOD NAME, WHICH IS WHY THIS DECLARATION PARSES**: `delete` is a
|
|
1346
|
+
* RESERVED WORD, so under the superseded module-level spelling the function had to be declared as
|
|
1347
|
+
* `deleteOp` and re-exported (`export { deleteOp as delete }`). **A METHOD NAME IS NOT AN IDENTIFIER
|
|
1348
|
+
* BINDING, so the member is declared under the one name the surface publishes** (`A127`).
|
|
1349
|
+
*
|
|
1350
|
+
* **⟶ AND THE WORKAROUND THAT SENTENCE DESCRIBES IS HISTORICAL AND NO LONGER EXISTS, 2026-10-19: `deleteOp`
|
|
1351
|
+
* HAS BEEN DELETED FROM THE CODEBASE ENTIRELY** — the `P-8` merge removed the module-level spelling, so
|
|
1352
|
+
* `grep -n "deleteOp" bindings/js/index.mjs` now returns THAT NAME ONLY INSIDE MOVED-POINTER COMMENTS
|
|
1353
|
+
* (the `delete` member's own doc block, whose body was `deleteOp`'s) **and no live binding by that name
|
|
1354
|
+
* stands at any site** (`P: docs/pending.md · P-8`; `archive/p8-merge/2026-10-18/blocks/deleteOp.md`).
|
|
1355
|
+
* **SO `export { deleteOp as delete }` IS NOT A SHAPE THIS PACKAGE ANY LONGER HAS AND MUST NOT BE READ AS
|
|
1356
|
+
* ONE — the module namespace is ONE name, `storeCreate` (`11 → 1` ✓), and `delete` is reached as the
|
|
1357
|
+
* instance's own method alone** (`§2.9` item 1's `A127` clause). **THE DECLARATION BELOW IS UNCHANGED AND
|
|
1358
|
+
* WAS ALWAYS CORRECT: `delete(address, tier?): DeleteRecord`.**
|
|
1359
|
+
*/
|
|
1360
|
+
delete(address: Address, tier?: Tier): DeleteRecord;
|
|
1361
|
+
/**
|
|
1362
|
+
* Roll the journal back to `opId`, and answer what the rollback restored.
|
|
1363
|
+
*
|
|
1364
|
+
* **`opId` IS A NON-EMPTY `string` AND NOT A NUMBER** (`PAR-JS-9`'s own unit: *"the `JournalOp.opId`
|
|
1365
|
+
* string"*): a number is an OUTSIDE value the store answers `AddressMalformed` for, and the ordinary
|
|
1366
|
+
* call `a.rollback(w.op.opId)`, whose id is the string `write` returned, is a correct call.
|
|
1367
|
+
*/
|
|
1368
|
+
rollback(opId: string): RollbackRecord;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* **⟶ AND IT THROWS: `1.1.0`'S DECLARATION, ADDED BESIDE THE SIGNATURE RATHER THAN IN IT.** **`rollback` was
|
|
1372
|
+
* TOTAL at `1.0.1` — it answered a `RollbackRecord` and could not fail. It is PARTIAL now**: **a reversal the
|
|
1373
|
+
* registered constraints do not admit REFUSES**, throwing the one plain form `{status, message, log}` with
|
|
1374
|
+
* `status: 'ConstraintPassRefused'`, **and the store is restored to the state it stood at before the reversal**
|
|
1375
|
+
* (`D-38`, `D-40`, `D-41`). **A TypeScript signature has no `throws` clause, so this is the honest place to say
|
|
1376
|
+
* it**: *the return type describes what a call returns when it returns, and the throw is part of the contract.*
|
|
1377
|
+
* **A lawful reversal is unchanged** — same record, same members, no `log`. **Callers on `1.0.1` must handle it.**
|
|
1378
|
+
*
|
|
1379
|
+
* **⟶ AND A LAWFUL REVERSAL'S INVOCATION OF YOUR REGISTERED LISTENERS IS NOT A MEMBER AND NOT A THROW — THE
|
|
1380
|
+
* BODIES RUN BEFORE THE RECORD IS RETURNED** (`strata/decisions.md` · `D-117` item 1, which rules a repair's
|
|
1381
|
+
* write's `triggered` listeners delivered at this instant exactly as at a write's commit). **A pair that
|
|
1382
|
+
* refuses the state the reversal leaves may carry a REPAIR, that repair lands in the judgement's own commit,
|
|
1383
|
+
* and the listeners the repair's write fires are invoked ONCE PER DISTINCT HANDLE with the TRIGGERING ADDRESS
|
|
1384
|
+
* as their single argument, AFTER the reversal's save and BEFORE this member returns** (`surface.md §2.4`
|
|
1385
|
+
* rule 3; `PAR-JS-12`). **THE RECORD IS UNMOVED** — `{opId, undoneOps, restoredTo}`, no member added and no
|
|
1386
|
+
* status minted — **and a judgement that refuses, a pair body that throws, and a reversal that fired nothing
|
|
1387
|
+
* all invoke NOTHING.**
|
|
1388
|
+
*/
|
|
1389
|
+
/**
|
|
1390
|
+
* Begin watching the addresses the caller names under the caller's own handle.
|
|
1391
|
+
*
|
|
1392
|
+
* **⟶ THIS BLOCK'S FEATURE SENTENCE READ *"Begin watching an address, and answer the fresh opaque handle
|
|
1393
|
+
* it is keyed by"*, AND BOTH HALVES OF IT ARE SUPERSEDED, 2026-10-19** (`DEF-2026-10-02`: no whole-file
|
|
1394
|
+
* rewrite — the bytes stand above and are read through this clause; `docs/specs/storeroom-held-listener-
|
|
1395
|
+
* identity/contract.md §2.2` items 1, 2 and 10; `listen-verb.md §1` item 1). **THE CALLER SPELLS THE
|
|
1396
|
+
* HANDLE AND `listen` ANSWERS `undefined`** — a DECLARED change of the return shape `Handle → undefined`,
|
|
1397
|
+
* forced because returning the supplied handle would be a second spelling of the caller's own datum
|
|
1398
|
+
* (`contract.md §2.2` item 10) — and **THE ADDRESS POSITION IS A SET**: position `2` is `addresses`, an
|
|
1399
|
+
* ARRAY of addresses with the EMPTY ARRAY in the domain. **(The declaration below already carries both:
|
|
1400
|
+
* `listen(handle: Handle, addresses: readonly Address[]): void` — `listen-verb.md §2.2` item 1's arity
|
|
1401
|
+
* `2`, with no third position.)**
|
|
1402
|
+
*
|
|
1403
|
+
* **AND IT IS AN ADDRESS SITE THAT DECLARES ITS ARGUMENT POSITION** (`parameter-semantics.md §2.17`'s
|
|
1404
|
+
* dated clause; `surface.md §2.5` item 5 (b)'s position half): the address is `1` of `1`, so a CLASS
|
|
1405
|
+
* refusal here — a `Proxy` over an array included — carries `a Proxy` AND `first argument` inside the one
|
|
1406
|
+
* failure form's message, and NO trap is run (`NG-JS-I`). **⟶ READ WITH THE CLAUSE ABOVE, the class test
|
|
1407
|
+
* this sentence describes is the SET POSITION'S: the six outside classes are `listen-verb.md §2.2` item 2's
|
|
1408
|
+
* and the declared answer for every one of them is the surface's one thrown form with the store's
|
|
1409
|
+
* `AddressMalformed` (`§2.2` item 3; the position figure `1` of `1` above is the PRE-2026-10-18 reading —
|
|
1410
|
+
* position `1` is `1` OF TWO, `listen-verb.md §1` item 1's arity `2`).**
|
|
1411
|
+
*
|
|
1412
|
+
* **A REPEATED CALL AT A HELD ADDRESS MINTS NOTHING AND ANSWERS THE ADDRESS'S EXISTING ENTRY'S HANDLE**
|
|
1413
|
+
* (`write-and-read.md §6.5` item 12 (c); `§0.4` clause 2), so the two calls answer ONE opaque value.
|
|
1414
|
+
* **⟶ SUPERSEDED, 2026-10-19: `listen(h, S2)` AFTER `listen(h, S1)` IS SET-ASSIGNMENT AND NOT UNION —
|
|
1415
|
+
* `S1` IS PURGED WHOLESALE AND `S2` INSTALLED, with no intermediate state observable — AND THE CALL
|
|
1416
|
+
* ANSWERS NOTHING** (`contract.md §2.2` items 3 and 10; `listen-verb.md §3` item 1). **THE SURVIVING HALF
|
|
1417
|
+
* IS THE MINTING HALF: the handle is the CALLER'S, so nothing mints one.** (`P: docs/pending.md · (R1)`,
|
|
1418
|
+
* verbatim: *"`listen(h, S2)` AFTER `listen(h, S1)` IS SET-ASSIGNMENT, NOT UNION"*.)**
|
|
1419
|
+
*
|
|
1420
|
+
* **⟶ AMENDED 2026-10-24 (`strata/decisions.md` `D-22`, verbatim: *"Listen should return the handle on
|
|
1421
|
+
* success, or error message on fail. Discard the noop prefix"*): `listen` ANSWERS THE HANDLE IT WATCHES
|
|
1422
|
+
* UNDER ON SUCCESS — the caller's own spelling, returned as THE IDENTITY THE STORE HOLDS FOR THAT ENTRY —
|
|
1423
|
+
* and EVERY FAILURE REMAINS THE SURFACE'S ONE THROWN FORM (`{status, message, log}`), because this ruling
|
|
1424
|
+
* mints no second failure channel. THE RETURN IS A SUCCESS SIGNAL THAT CARRIES THE IDENTITY AND NOT AN ECHO
|
|
1425
|
+
* TO BE SUPPRESSED**: the ground this block states above — *"returning the supplied handle would be a
|
|
1426
|
+
* second spelling of the caller's own datum"* — is OVERRULED BY NAME, and the sentence stands as text read
|
|
1427
|
+
* THROUGH this clause (`RCA-8(d)` ANNOTATE-BESIDE; `DEF-2026-10-02`: no whole-file rewrite). **What it is
|
|
1428
|
+
* FOR, declared because the return has one consumer:** `K-1` ADOPTS the value, which is what
|
|
1429
|
+
* `kernel-surface.md` declared all along (*"adopted, never minted by the kernel"*) and what the discarded
|
|
1430
|
+
* `constraint@<JSON address>` prefix had replaced. **A caller that ignores the return is unaffected by
|
|
1431
|
+
* widening `void → Handle`.**
|
|
1432
|
+
*/
|
|
1433
|
+
listen(handle: Handle, addresses: readonly Address[]): Handle;
|
|
1434
|
+
/**
|
|
1435
|
+
* Withdraw a watching, and answer `undefined` — a no-op success for every value outside the domain.
|
|
1436
|
+
*
|
|
1437
|
+
* **AND THE WITHDRAWAL CARRIES THE PACKAGE'S OWN HALF TOO** (`surface.md §2.4` item 7 (b)'s
|
|
1438
|
+
* VALIDATE · UNLISTEN · DEREGISTER step list, MERGED INTO THIS ONE MEMBER by `A127`'s receiver ruling;
|
|
1439
|
+
* `contract.md §5.5`'s fourth added entry): **the store-side home entry named by this call is withdrawn,
|
|
1440
|
+
* and the registry's entry for the identity is REMOVED where the identity no longer stands anywhere** — so
|
|
1441
|
+
* the registered function is unreachable afterwards and a re-`listen` at the withdrawn address answers a
|
|
1442
|
+
* DIFFERENT handle. **AT `DD-39`'s CONSTRUCTION DUPLICATE — ONE caller-spelled token naming MORE THAN ONE
|
|
1443
|
+
* entry at ONE address — ONE entry is withdrawn per call while the address still holds the identity, and
|
|
1444
|
+
* the registry's entry STANDS: a later trigger there STILL returns that identity and the function fires
|
|
1445
|
+
* for it ONCE, never once per entry** (`contract.md §5.5`'s third added entry; `§2.4` rule 4's *"never the
|
|
1446
|
+
* function"*).
|
|
1447
|
+
*/
|
|
1448
|
+
unlisten(handle: Handle): void;
|
|
1449
|
+
/**
|
|
1450
|
+
* **THE POST-CREATION ADD ROUTE — `addConstraint(pair, constraint) -> constraint identity`**
|
|
1451
|
+
* (`surface.md §2.12` item 2 (a) and item 3's ADD row; `parameter-semantics.md §2.25` = `PAR-JS-25`):
|
|
1452
|
+
* **the pair's element IS the supplied `constraint` from this call on, whether the pair was HELD or
|
|
1453
|
+
* NOT**, and at a pair already held the supplied constraint OVERWRITES the held one under **THE SAME
|
|
1454
|
+
* IDENTITY** the pair was already added under, so the call throws nothing for the mere fact that the
|
|
1455
|
+
* pair was held.
|
|
1456
|
+
*
|
|
1457
|
+
* **Every outside form of either position throws ONE `TypeError`, whose `status` member is ABSENT, and
|
|
1458
|
+
* nothing is added, enabled, disabled or otherwise changed.**
|
|
1459
|
+
*
|
|
1460
|
+
* **⟶ AMENDED 2026-10-24 (`D-25`, verbatim: *"Attempting to overwrite a listener with a constraint or vice
|
|
1461
|
+
* versa is rejected"*; `D-29`, verbatim: *"Handle becomes the internal ID"*): THE OVERWRITE IS
|
|
1462
|
+
* SAME-KIND ONLY.** The sentence above — *"throws nothing for the mere fact that the pair was held"* — is
|
|
1463
|
+
* TRUE AND UNAFFECTED and is now read **SCOPED BY KIND**: a repeated handle of the SAME kind at this act is
|
|
1464
|
+
* an overwrite (`D-24`), while **a pair whose `id` equals a LIVE LISTENER'S HANDLE is REJECTED** — it does
|
|
1465
|
+
* not overwrite the listener and it does not throw nothing. **The rejection is the surface's one thrown
|
|
1466
|
+
* form `{status, message, log}` with the store's `AddressMalformed`**, its `message` naming BOTH SIDES, and
|
|
1467
|
+
* it is taken **after the two positions' class tests and before the held-pair purge and before any store
|
|
1468
|
+
* call**, so **no state moves**. `register`'s own direction of the same rule stands at that member (§its own
|
|
1469
|
+
* clause).
|
|
1470
|
+
*
|
|
1471
|
+
* **⟶ AND THE RULE SENTENCE RE-DERIVES BY ONE WORD, 2026-11-01 (`D-98`; `docs/L1/cross-kind-handle-only.md`
|
|
1472
|
+
* §3.4): *"a listener and a constraint do not share one"* READS *"a listener and a constraint do not share one
|
|
1473
|
+
* HANDLE"*.** **THE CONDITION, THE STATUS AND THE INSTANT ARE UNMOVED** — a live listener is
|
|
1474
|
+
* `off === false` **and** a function **and** `kind !== 'constraint'`, so a reserved `listen` with no
|
|
1475
|
+
* `register` is NOT one and a pair may take its handle; and the member is still `AddressMalformed` after the
|
|
1476
|
+
* two class tests and before the held-pair branch. **What moves is the sentence, because the OLD SPELLING READ
|
|
1477
|
+
* THE ADDRESS and `D-98` declares the address LAWFUL.** The missing word is added from the project's own
|
|
1478
|
+
* anchor (`bindings/js/README.md`: *"a listener and a constraint do not share one handle"*), and the
|
|
1479
|
+
* refusal's `address` member is `null`: the subject is the identity, and naming one of a listener's N mirror
|
|
1480
|
+
* addresses would assert a membership no clause supports.
|
|
1481
|
+
*
|
|
1482
|
+
* **⟶ AND THIS ACT DELIVERS THE LISTENERS ITS REPAIR'S WRITE FIRES — `D-125` item `1`, `PIN-6` (ii), `PIN-2`,
|
|
1483
|
+
* 2026-11-06.** **WHEREVER A REPAIR RUNS, THE LISTENERS ITS WRITE FIRES ARE DELIVERED — `storeCreate`, a boot
|
|
1484
|
+
* over an existing `filePath`, `addConstraint`, and a re-arm — after the constraints pass, after the save, in
|
|
1485
|
+
* `D-117`'s order, instant for instant, with no delivery on a refusing arm.** **THE SET AT THIS INSTANT IS THE
|
|
1486
|
+
* STORE'S OWN `triggered`** — *"the very record `write` answers"* — **delivered ONCE PER DISTINCT HANDLE, with
|
|
1487
|
+
* the repair's own op address as the one argument**, and **BEFORE this call answers.** **THE ANSWER'S DECLARED
|
|
1488
|
+
* TYPE IS UNMOVED: the identity is still the answer** (`D-125` item 2). **A fired body's throw pre-empts that
|
|
1489
|
+
* answer and crosses as rank `21` `ListenerBodyThrew`, the pair stands registered and its save stands**
|
|
1490
|
+
* (`PIN-10`; `Q-13`), so the caller's view of a registration gains a third observable — *"the listeners its
|
|
1491
|
+
* repairs fired"* (`D-125` item 2 (i)) — and an EMPTY SET is a count of `0` and not silence (`PIN-6` (v)).
|
|
1492
|
+
*/
|
|
1493
|
+
addConstraint(pair: ConstraintPair, constraint: Constraint): ConstraintIdentity;
|
|
1494
|
+
/** **THE ENABLE HALF** (`§2.12` item 2 (a) and item 3's `constraintOn` row): `undefined`. **The
|
|
1495
|
+
* `constraint` position is REQUIRED and is a NO-OP on every success** — the caller supplies as a function
|
|
1496
|
+
* the identity it holds at that pair, the entry never substitutes one, and it is the element the entry
|
|
1497
|
+
* carried at that pair that is evaluated at the next write. **Idempotent success where the pair already
|
|
1498
|
+
* stands ENABLED.**
|
|
1499
|
+
*
|
|
1500
|
+
* **⟶ AND THE RE-ARM DELIVERS TOO — `D-125` item `1`, 2026-11-06.** The re-registration's `K-1` reaches the
|
|
1501
|
+
* same registration route, so **the listeners its repair's write fires are delivered ONCE PER DISTINCT
|
|
1502
|
+
* HANDLE, after the save and before this call answers its `undefined`**, with the repair's op address as the
|
|
1503
|
+
* one argument (`PIN-6` (ii), (iv); `PIN-2`). **NO DELIVERY ON A REFUSING ARM** — a re-arm whose repair the
|
|
1504
|
+
* `D-107` composition rolled back delivers nothing (`PIN-6` (v)) — and **an empty set is a count of `0`**.
|
|
1505
|
+
* **A fired body's throw pre-empts the answer and crosses as rank `21` `ListenerBodyThrew` while the instance
|
|
1506
|
+
* and every other pair stand** (`PIN-10`; `Q-13`; `Q-15`). */
|
|
1507
|
+
constraintOn(pair: ConstraintPair, constraint: Constraint): void;
|
|
1508
|
+
/** **THE DISABLE HALF** (`§2.12` item 2 (a) and item 3's `constraintOff` row): `undefined`; the pair's
|
|
1509
|
+
* element is NOT evaluated on a subsequent write, and **a write the disabled constraint would have
|
|
1510
|
+
* refused is ACCEPTED**. The `constraint` position's rule is `constraintOn`'s, clause for clause.
|
|
1511
|
+
* **Idempotent success where the pair already stands DISABLED.** */
|
|
1512
|
+
constraintOff(pair: ConstraintPair, constraint: Constraint): void;
|
|
1513
|
+
/** Register `listener` under the opaque `handle`, and answer `undefined` (`surface.md §2.4` item 5 (b)).
|
|
1514
|
+
*
|
|
1515
|
+
* **⟶ AND IT REFUSES WHERE THE HANDLE EQUALS A CARRIED CONSTRAINT PAIR'S `id`** (`D-25`'s *"vice versa"*;
|
|
1516
|
+
* `D-29`; **⟶ RE-DERIVED 2026-11-01 BY `D-98`'s HANDLE RULE, WHICH IS THE WHOLE OF IT**: *"A constraint and a
|
|
1517
|
+
* listener can share an address, as can multiple constraints/listeners. The restriction is that a listener
|
|
1518
|
+
* and a constraint cannot have the same **handle**."*). **THE CLAUSE THAT STOOD HERE READ *"it refuses where a
|
|
1519
|
+
* constraint's `id` STANDS AT THE ADDRESS"* AND THAT CONDITION IS WITHDRAWN**: an ADDRESS is not a collision
|
|
1520
|
+
* at all — a pair and a listener MAY stand at one address — so what the member tests is the **HANDLE, and
|
|
1521
|
+
* nothing else**: a carried pair whose `id` is that string, **disabled pair included** (`D-98` (iii)'s rule is
|
|
1522
|
+
* unconditional in both directions, and the loss a skipped disabled pair would permit lands at the next
|
|
1523
|
+
* `constraintOn` with no observable at the instant of the loss).
|
|
1524
|
+
*
|
|
1525
|
+
* **THE REFUSAL IS THE SURFACE'S OWN THROWN FORM** `{status, message, log}` with the store's
|
|
1526
|
+
* `AddressMalformed` — **not** the `TypeError` this member's conflict arm carried while a reserved
|
|
1527
|
+
* `constraint@` prefix existed to be exempted — taken after the handle's domain and registry tests and
|
|
1528
|
+
* **before the registry write and before the re-install `listen`**, so **no state moves**: no store act, no
|
|
1529
|
+
* mirror row, no registry entry.
|
|
1530
|
+
*
|
|
1531
|
+
* **ITS MESSAGE IS TWO PARTS AND BOTH ARE NAMED HERE** (`D-98` item 4; `docs/L1/cross-kind-handle-only.md`
|
|
1532
|
+
* §3.6's `B-5` text): **the generated half is the STORE'S OWN** — the qualified `AddressMalformed` arm, *"'<id>'
|
|
1533
|
+
* is already a handle this instance carries, a listener's handle and a constraint's id are one string and one
|
|
1534
|
+
* string only"*, which **names no address, no segment and no placeholder container** — and **the clause half is
|
|
1535
|
+
* the package's**, naming the pair that keeps the handle and carrying the shared rule sentence *"a listener and
|
|
1536
|
+
* a constraint do not share one handle"*. **The refusal's `address` member is `null`**, and that is now correct
|
|
1537
|
+
* rather than incidental: the subject is a string in the handle namespace and the address is lawful.
|
|
1538
|
+
*
|
|
1539
|
+
* **The exemption for kernel-prefixed handles is DELETED, not moved**: under `D-22` the kernel's handle is no
|
|
1540
|
+
* longer a reserved spelling. **⟶ AND THE SENTENCE THAT FOLLOWED IT — *"under `D-25` the kernel registers
|
|
1541
|
+
* nothing, so nothing needs to get past the test"* — IS RE-DERIVED BY `D-99`'s ANSWERED CLAUSE AND NOT ABSORBED:**
|
|
1542
|
+
* the kernel **does** register, and it reaches the store through its **own internal route** rather than through
|
|
1543
|
+
* this member, so **this test is a CALLER's test and the kernel's act never meets it** — which is why there is
|
|
1544
|
+
* still nothing to get past it. */
|
|
1545
|
+
register(handle: Handle, listener: Listener): void;
|
|
1546
|
+
/** **`removeListener(handle) -> undefined`** — the entry removed WHOLE and its store entries withdrawn; every arm that is not a real removal THROWS (`contract.md §2.7` item 2; `PAR-HL-14`, `PAR-HL-15`). */
|
|
1547
|
+
removeListener(handle: Handle): void;
|
|
1548
|
+
/** **`removeConstraint(pair) -> undefined`** — the pair, its N address rows, the kernel's registration and the store's home entry all gone; it is the ONE act that deletes an identity (`contract.md §2.7` item 3; `PAR-HL-16`, `PAR-HL-17`). */
|
|
1549
|
+
removeConstraint(pair: ConstraintPair): void;
|
|
1550
|
+
/**
|
|
1551
|
+
* **THE REGISTERED-PAIR READ — `constraints() -> ConstraintPair[]`** (`surface.md §2.4` item 9 (f)'s
|
|
1552
|
+
* `constraints` clause of 2026-10-17, items 2–9; `§2.12` item 2-bis; `parameter-semantics.md §2.27` =
|
|
1553
|
+
* `PAR-JS-27`**) — **one of the FOURTEEN own members, `10 + 1 + 1 + 2 = 14` ✓, the SECOND of the two
|
|
1554
|
+
* remaining singles** (`docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 9 — the
|
|
1555
|
+
* member-set clause of 2026-10-19, which moves the figure `12 → 14`). **⟶ AND THE FIGURE THAT STOOD HERE WAS
|
|
1556
|
+
* *"THE TWELVE own members, `10 + 1 + 1 = 12`"*, read from `surface.md §2.4` item 9 (f)'s clause of
|
|
1557
|
+
* 2026-10-18, `13 → 12`: THAT READING IS SUPERSEDED — the two remove members `removeListener(handle)` and
|
|
1558
|
+
* `removeConstraint(pair)` are the `+ 2`** (`P: docs/pending.md · (AA-5)`, verbatim: *"the member set is 14
|
|
1559
|
+
* and the `12 → 13` figure is withdrawn by name"*; `DEF-2026-10-02`: no whole-file rewrite). **AND THIS
|
|
1560
|
+
* MEMBER'S OWN SIBLING AMONG THE NON-STORE-REACHING MEMBERS IS `register` ALONE FROM THAT DATE
|
|
1561
|
+
* (2026-10-18)**: the sentence that read *"beside `register` and `settle`"* is re-spelled at its own bytes,
|
|
1562
|
+
* and this is the operative reading — **and it is NOT read as a count of the fourteen-member set's
|
|
1563
|
+
* classes, because no clause of this file asserts which members make up that class** (`contract.md §2.7`
|
|
1564
|
+
* items 2–5 for the two new members' own clauses; `§2.7` item 9).
|
|
1565
|
+
*
|
|
1566
|
+
* **THE RECEIVER IS THE STORE, THE CALL TAKES NO ARGUMENT (arity `0`) AND IT THROWS NOTHING**: there is no
|
|
1567
|
+
* outside argument for the class test to refuse, and the call makes NO STORE CALL, MINTS NO CODE, APPENDS
|
|
1568
|
+
* NO JOURNAL ENTRY AND CHANGES NO NODE — so this member is one of the product's NON-STORE-REACHING members
|
|
1569
|
+
* and `§2.4` item 9 (f)'s rule (ii) has no subject at it.
|
|
1570
|
+
*
|
|
1571
|
+
* **WHAT IS RETURNED, EXACTLY — THE PAIRS AND NOT THE FUNCTIONS:** a **FRESH JS ARRAY on every call**,
|
|
1572
|
+
* whose **every element is a FRESH plain object carrying EXACTLY TWO MEMBERS** — `address` (a fresh array of
|
|
1573
|
+
* the store's own segments) and `id` (the constraint's own BARE `id`, a `string`) — the same two data the
|
|
1574
|
+
* kernel's own registry is keyed by. **The empty array `[]` is the declared value where the instance carries
|
|
1575
|
+
* no pair at all** (`PAR-JS-27`'s `domain` cell).
|
|
1576
|
+
*
|
|
1577
|
+
* **THE FOUR DECLARED EXCLUSIONS, EACH STATED SO A DECLARATION THAT VIOLATED ONE WOULD BE VISIBLE AT ITS OWN
|
|
1578
|
+
* BYTES:**
|
|
1579
|
+
* 1. **NO CONSTRAINT FUNCTION IS RETURNED** (item 3, four named grounds — the operative one being the
|
|
1580
|
+
* anti-pattern rulings' *do not hand out a value whose later use the contract cannot bound*). The
|
|
1581
|
+
* `Constraint` type below is that function and **NO MEMBER OF THIS RETURN CARRIES ONE**; a disabled pair
|
|
1582
|
+
* makes the hazard sharp, since `constraintOff` parks a stub in the kernel while the caller's function is
|
|
1583
|
+
* kept in the entry.
|
|
1584
|
+
* 2. **NO OPAQUE IDENTITY IS EXPOSED** (item 4): `ConstraintIdentity` is NOT reachable through this return —
|
|
1585
|
+
* `PAR-JS-25`'s opacity would break the moment a consumer read one out of the array. **The pair is the
|
|
1586
|
+
* caller's own datum; the identity is this unit's opaque handle for it, and the two are NOT the same
|
|
1587
|
+
* datum.**
|
|
1588
|
+
* 3. **NO ORDER IS PROMISED** (item 6): the returned array's order is **UNDECLARED** and a consumer compares
|
|
1589
|
+
* the pairs **as a SET and never as a sequence** (`DD-22`; `§2.7` item 3). **Nothing in this declaration
|
|
1590
|
+
* may be read as a registration order, an address order or a `seq`-like ordinal.**
|
|
1591
|
+
* **⟶ AND THIS EXCLUSION IS RETIRED, 2026-10-26 (`strata/decisions.md` `D-39`, whose ruling is VERBATIM
|
|
1592
|
+
* *"add deterministic ordering"*; its own record reads: *"`constraints()` must emit in a DECLARED,
|
|
1593
|
+
* deterministic order — registration sequence … The declaration currently says "no order" among its four
|
|
1594
|
+
* exclusions; that exclusion is superseded"*):** **`constraints()` EMITS IN REGISTRATION SEQUENCE — THE
|
|
1595
|
+
* ORDER THE PAIRS WERE REGISTERED — DETERMINISTICALLY AND STABLY ACROSS EVERY CALL AND EVERY INTERVENING
|
|
1596
|
+
* ACT; THE ORDER IS PART OF WHAT THE METHOD PROMISES.** **The bytes above stand as the reading this
|
|
1597
|
+
* exclusion was filed at and are read THROUGH this clause (`RCA-8(g)` ANNOTATE-BESIDE; `DEF-2026-10-02`:
|
|
1598
|
+
* no whole-file rewrite): a consumer MAY now compare the returned array element by element, and the
|
|
1599
|
+
* registration order it reads is the order its own `addConstraint` calls and its `cfg.constraints`
|
|
1600
|
+
* elements stood in.** **NO OTHER EXCLUSION MOVES — items 1, 2 and 4 stand WHOLE — and the member still
|
|
1601
|
+
* answers a FRESH array of FRESH two-member objects on every call.**
|
|
1602
|
+
* 4. **A DISABLED PAIR DOES APPEAR** (item 5): `constraintOff` is a TOGGLE and NOT A REMOVAL, so a pair it
|
|
1603
|
+
* disabled is STILL REGISTERED and still enumerated — **and therefore there is NO `enabled` member on an
|
|
1604
|
+
* element and NO way to read a pair's state off this return**; the state is read at the toggles' own
|
|
1605
|
+
* clauses. **No removal route exists**, so an absence here means nothing was ever registered.
|
|
1606
|
+
*
|
|
1607
|
+
* **THE COVERAGE, BOTH POPULATION ROUTES ON ONE FOOTING** (item 7): a pair the batch registered at
|
|
1608
|
+
* `storeCreate` (`cfg.constraints`) and a pair `addConstraint` registered appear alike, because *"the entry
|
|
1609
|
+
* carries a pair if and only if a function stands registered at that pair in the kernel's own pair-keyed
|
|
1610
|
+
* registry"*. **The two declared exclusions are therefore structural**: a well-formed `cfg.constraints`
|
|
1611
|
+
* element that carried no function is **not** a carried pair and does not appear, and a REFUSED
|
|
1612
|
+
* registration — at the batch loop or at `addConstraint` — leaves the entry exactly as it stood and does not
|
|
1613
|
+
* appear. **An overwrite changes no membership**: a second `addConstraint` at a held pair replaces the
|
|
1614
|
+
* function at the SAME pair and returns the SAME identity, so the pair is carried ONCE before and after.
|
|
1615
|
+
* **⟶ AMENDED 2026-10-24 (`D-26` item 4; `D-27` item 1): THE BATCH HALF OF THAT EXCLUSION HAS NO PRODUCER
|
|
1616
|
+
* AND IS READ THROUGH THIS CLAUSE.** A `cfg.constraints` element **must** carry its function, and the batch
|
|
1617
|
+
* **arms** it (`D-27`: *"Functions are armed"*), so *"a well-formed `cfg.constraints` element that carried no
|
|
1618
|
+
* function"* is an element the construction now REFUSES under `ConstraintListInvalid` **before any
|
|
1619
|
+
* filesystem act** — and the exclusion above stands for **the add route's refused registration alone**, and
|
|
1620
|
+
* for a pair whose function was never supplied by any route.
|
|
1621
|
+
*
|
|
1622
|
+
* **IT ADDS NO POPULATION ROUTE** (`§2.12` item 2-bis): the two routes stand at TWO, and a read closes none
|
|
1623
|
+
* and opens none. **It is NOT a `pending()` reader, NOT an `attempts()` enumerator and NOT a live view of a
|
|
1624
|
+
* running commit**; it announces no identity, no function and no order.
|
|
1625
|
+
*
|
|
1626
|
+
* **AND IT MOVES NO OTHER FIGURE**: the module namespace keeps its ONE name `storeCreate` (`§2.9` item 1's
|
|
1627
|
+
* `A127` clause, `11 → 1` ✓), the kernel's extent stays FIVE with no `K-6` proposed (`§2.4` item 9 (f),
|
|
1628
|
+
* item 8 — the pairs are read from the entry's OWN registry, which is keyed exactly as the kernel's is), the
|
|
1629
|
+
* store's closed `17`-member set is not reached, the kernel's `KC` set stands closed at `8` (**⟶ MOVED `8 → 9`
|
|
1630
|
+
* on 2026-10-28 by `D-53`'s third ruling — *"Open the token set"* — the appended member being the SAVE ARM's
|
|
1631
|
+
* `KC-9`; see `LogEntry`'s clause above), and the register keeps its `8` rows.
|
|
1632
|
+
*
|
|
1633
|
+
* **It is NOT a named export of this entry** (`package.md §1.3` item 3): it is reached through
|
|
1634
|
+
* `storeCreate`'s own product alone.
|
|
1635
|
+
*/
|
|
1636
|
+
constraints(): ConstraintPair[];
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* Construct a store at `cfg` and answer its instance.
|
|
1641
|
+
*
|
|
1642
|
+
* **AN ADDON THAT IS ABSENT, THAT FAILS TO LOAD, OR WHOSE OWN `version` DOES NOT MATCH THIS PACKAGE'S
|
|
1643
|
+
* VERSION IS A DECLARED REFUSAL AND NEVER A SILENT FALLBACK** (`docs/specs/storeroom-publish/
|
|
1644
|
+
* resolution.md §2`, `§5`): **no instance is returned, no JavaScript store is substituted, and the
|
|
1645
|
+
* thrown value is the one `StoreRefusal`.** The load path resolves the scoped platform package for this
|
|
1646
|
+
* runtime first, this checkout's own module-relative addon second, and answers the declared absent form
|
|
1647
|
+
* when neither yields a loadable artefact.
|
|
1648
|
+
*/
|
|
1649
|
+
export function storeCreate(cfg: StoreConfig): StoreInstance;
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* **THE POST-CREATION CONSTRAINT PAIR — `parameter-semantics.md §2.24` (`PAR-JS-24`)**: the key the three
|
|
1653
|
+
* constraint methods name — **an `address` inside `§1.5`'s segment array, and an `id` that is a NON-EMPTY
|
|
1654
|
+
* `string`** — **and NOT the whole of a batch element**, which is this pair PLUS its constraint function.
|
|
1655
|
+
* **Every outside form of the pair throws the three methods' one `TypeError`**, and **a well-formed pair
|
|
1656
|
+
* the entry does not carry is outside the two toggles' domain**: it is NOT a third population route.
|
|
1657
|
+
*
|
|
1658
|
+
* **⟶ AND THIS SHAPE IS ALSO THE ELEMENT OF THE FOURTH MEMBER'S RETURN, ADDED 2026-10-17**
|
|
1659
|
+
* (`surface.md §2.4` item 9 (f)'s `constraints` clause; `parameter-semantics.md §2.27` = `PAR-JS-27`,
|
|
1660
|
+
* `return-field`): `a.constraints()`'s every element carries **exactly these TWO members and no third** —
|
|
1661
|
+
* the `address` a pair was registered under and its bare `id` — **and NEITHER the constraint function nor the
|
|
1662
|
+
* opaque identity** (`PAR-JS-25`'s opacity, unmoved). **THE TWO ROLES ARE ONE SHAPE AND NOT TWO**: this is the
|
|
1663
|
+
* caller's own datum entering at `addConstraint` (and at `cfg.constraints`' elements, which are this pair
|
|
1664
|
+
* PLUS a `constraint`) and coming back out at the read. **`Row 27`'s `alt` cell refuses an `enabled` member on
|
|
1665
|
+
* the element**, so no third member is declared here and this interface is left exactly as it stood.
|
|
1666
|
+
*/
|
|
1667
|
+
export interface ConstraintPair {
|
|
1668
|
+
/**
|
|
1669
|
+
* **THE ADDRESS MEMBER'S TYPE MOVES.** At the CREATION act it is a single address (`constraint-identity.md
|
|
1670
|
+
* §6`'s pair table: *"and, at the REGISTRATION act, a single address"*); on the READ and at the REMOVAL it
|
|
1671
|
+
* is the pair's own SET (`P: docs/pending.md · P-7`'s answer clause: *"1. (one id, N addresses)"*;
|
|
1672
|
+
* `contract.md §2.6` item 5; `PAR-HL-13`).
|
|
1673
|
+
*
|
|
1674
|
+
* **⟶ AND THE CREATION-ACT HALF IS CORRECTED, 2026-10-26 (`strata/decisions.md` `D-38`, verbatim: *"Accept a
|
|
1675
|
+
* one-to-many handler/constraint addressing at package surface"*, whose ruling reads *"one id at N addresses
|
|
1676
|
+
* is LAWFUL, at every act"*).** **THE CREATION ACT TAKES AN ADDRESS OR A SET OF ADDRESSES (`Address |
|
|
1677
|
+
* readonly Address[]` — the type this member already carries), and the single-address reading above is the
|
|
1678
|
+
* SUPERSEDED one, read THROUGH this clause (`RCA-8(g)` ANNOTATE-BESIDE; `DEF-2026-10-02`: no whole-file
|
|
1679
|
+
* rewrite).** **THE RUNTIME ALREADY ACCEPTS THE PAIR AND UNIONS ITS ADDRESSES**: one call at
|
|
1680
|
+
* `{ address: [['a'], ['b']], id: 'c1' }` registers ONE pair at BOTH addresses, and this member's own read
|
|
1681
|
+
* answers that one pair carrying both members.
|
|
1682
|
+
*/
|
|
1683
|
+
readonly address: Address | readonly Address[];
|
|
1684
|
+
/**
|
|
1685
|
+
* **THE PAIR'S `id` — WHICH IS ITS HANDLE, ONE `id` NAMING ONE PAIR, ONE IDENTITY AND ONE HANDLE**
|
|
1686
|
+
* (`D-23`/`D-24`, and `D-29`'s *"Handle becomes the internal ID"*, verbatim). **⟶ AND THE SENTENCE THE PAIR
|
|
1687
|
+
* HAS CARRIED SINCE 2026-10-17 — *"two pairs at two addresses are TWO pairs"* — IS READ THROUGH THIS
|
|
1688
|
+
* CLAUSE: the pair-local reuse of one `id` at two addresses is NO LONGER LAWFUL**, because a handle is
|
|
1689
|
+
* INSTANCE-SCOPED and a repeated handle is REJECTED in one supplied list (`cfg.constraints`, `D-27`) and an
|
|
1690
|
+
* OVERWRITE at the add route (`D-24`). **THE SHAPE IS UNCHANGED — NO FIELD IS ADDED** (`D-24` item 1).
|
|
1691
|
+
*
|
|
1692
|
+
* **⟶ AND THE "NO LONGER LAWFUL" HALF OF THAT SENTENCE IS SUPERSEDED, 2026-10-26 (`strata/decisions.md`
|
|
1693
|
+
* `D-38`: *"one id at N addresses is LAWFUL, at every act"*; `D-38`'s own record names the superseded reading
|
|
1694
|
+
* at its own bytes — *"`index.d.ts` currently says 'the pair-local reuse of one `id` at two addresses is NO
|
|
1695
|
+
* LONGER LAWFUL'"* — and rules that *"the declaration moves; no behaviour changes"*).** **WHAT A TYPED
|
|
1696
|
+
* CONSUMER NEEDS, IN ONE RULE: ONE `id` NAMES ONE PAIR, A SECOND ADDRESS JOINS IT, AND THE `constraint`
|
|
1697
|
+
* IS THE MEMBER AN ADD OVERWRITES.** **So `addConstraint({ address: [['a'], ['b']], id: 'c1' }, f)` answers ONE
|
|
1698
|
+
* pair standing at BOTH addresses under ONE identity; a later add at that same `id` naming a further address
|
|
1699
|
+
* EXTENDS that one pair's address set (the runtime unions the sets, `D-38`'s two-call arm) and REPLACES `f` —
|
|
1700
|
+
* the `id` never becomes a second pair, and the `constraint` is the only member an add overwrites.** **THE
|
|
1701
|
+
* TWO RULES THIS DOES NOT MOVE ARE DIFFERENT RULES FOR DIFFERENT ACTS AND BOTH STAND: within ONE supplied
|
|
1702
|
+
* batch list a repeated `id` is REJECTED (`cfg.constraints`, `D-27`), and a pair whose `id` equals a LIVE
|
|
1703
|
+
* listener's handle is REJECTED in both directions (`D-25`).** **AND THE SHAPE IS STILL UNCHANGED — NO FIELD
|
|
1704
|
+
* IS ADDED** (`D-24` item 1).
|
|
1705
|
+
*/
|
|
1706
|
+
readonly id: string;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/**
|
|
1710
|
+
* **THE CONSTRAINT FUNCTION — `parameter-semantics.md §2.22` (`PAR-JS-22`)**: a JS function, supplied by THE
|
|
1711
|
+
* CALLER at whichever of the three methods it takes — **the ADD route's own argument** or the batch
|
|
1712
|
+
* element's own — **invoked by the KERNEL with ONE argument, the attempt's own context** (`PAR-C-16`: *"the
|
|
1713
|
+
* attempt context — the constraint's ONE argument"*), and read for its answer (`kernel-surface.md §2.3`
|
|
1714
|
+
* item 1: `true` is the only pass value). **Every non-function is outside the position AT EVERY ONE OF THE
|
|
1715
|
+
* THREE METHODS**, and a non-function at the toggle's position is refused on the ARGUMENT's ground and
|
|
1716
|
+
* never on the pair's.
|
|
1717
|
+
*
|
|
1718
|
+
* **⟶ AND THE TWO RETURNS THIS POSITION ADMITS ARE DECLARED HERE, ADDED 2026-10-30 — WHAT YOUR
|
|
1719
|
+
* CONSTRAINT MAY RETURN, AND WHAT ITS REPAIR MAY RETURN.** **EVERY SENTENCE OF THIS CLAUSE — THE ONE THIS MARK
|
|
1720
|
+
* OPENS, ADDED 2026-10-30 — HOLDS AT THE WRITE'S OWN EVALUATION, THE INSTANT THE KERNEL EVALUATES THE VALUE
|
|
1721
|
+
* YOUR FUNCTION RETURNED, AND AT THAT INSTANT ONLY, EXCEPT WHERE A SENTENCE NAMES ITS OWN INSTANT IN ITS OWN
|
|
1722
|
+
* WORDS.** **AND A SENTENCE STANDING ABOVE THIS CLAUSE IS OUTSIDE THIS FRAME AND IS READ AT ITS OWN INSTANTS
|
|
1723
|
+
* BY ITS OWN WORDS — this clause moves none of it.** The clause above prints the answer's PASS value;
|
|
1724
|
+
* this one declares the rest of the closed set IN ITS OWN WORDS, so a reader holding this package reads the
|
|
1725
|
+
* rule and needs no second document for it.
|
|
1726
|
+
*
|
|
1727
|
+
* **THE OUTCOME IS A CLOSED THREE-ARM SET, READ IN THIS ORDER: `true` — THE ONLY PASS VALUE;
|
|
1728
|
+
* `{ message, repair }` — A REPAIRABLE VIOLATION; `{ message }` — AN UNREPAIRABLE VIOLATION, ITS `message`
|
|
1729
|
+
* THE REFUSAL'S OWN SENTENCE. A VALUE OUTSIDE THE THREE IS READ AS THE `{ message }` ARM AND NEVER AS A
|
|
1730
|
+
* FOURTH ARM OF ITS OWN**, so a return you invent beyond them declares an outcome this kernel does not
|
|
1731
|
+
* distinguish.
|
|
1732
|
+
*
|
|
1733
|
+
* **AND `message` IS REQUIRED ON THE REPAIR ARM AND IS READ FIRST**: the gate is the `message` member,
|
|
1734
|
+
* read before any `repair` is looked for, and a `repair` is looked for only inside that branch — **so a
|
|
1735
|
+
* return carrying only `repair` is the arm outside the three and ITS REPAIR IS NEVER SEEN**, and **AT THE
|
|
1736
|
+
* WRITE'S OWN EVALUATION a `message` that is not a NON-EMPTY STRING keeps the repair readable while the
|
|
1737
|
+
* refusal answers the kernel's own unrecognized sentence** (the closed set, its order and this read stand at
|
|
1738
|
+
* `bindings/js/src/entry/kernel-attempt.mjs:686-699`).
|
|
1739
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE NO LONGER RESOLVES TO ITS SUBJECTS AND IS READ
|
|
1740
|
+
* THROUGH THIS MARK.** **`bindings/js/src/entry/kernel-attempt.mjs:686-699` stands today as the body-throw arm's
|
|
1741
|
+
* terminal entry and its mark — `:687`-`:698` — and the two subjects this sentence cites it FOR stand at
|
|
1742
|
+
* `:705`-`:727` (the closed three-arm read) and `:718`-`:724` (the own-member read of `message` and `repair`).**
|
|
1743
|
+
* **The citation's bytes stand and are unmoved; its RANGE is the reading of the date it was written at, and
|
|
1744
|
+
* `D-90` · `D-91` · `D-94` are the landings that moved it** (`docs/L1/repair-outcome-types.md` §7.2 row `1`).
|
|
1745
|
+
*
|
|
1746
|
+
* **THE ATTACH: the `repair` your function returns IS A FUNCTION TAKING ONE ARGUMENT — ITS OWN RECORD,
|
|
1747
|
+
* WHICH IS NOT YOUR CONSTRAINT'S AND IS NOT INTERCHANGEABLE WITH IT.** **The two records stand apart at
|
|
1748
|
+
* THREE PLACES: by COUNT, SIX against FIVE; by `id`, which the repair's record carries where the
|
|
1749
|
+
* constraint's carries `attempt`; and by `pending`, which rides the repair's record ALONE**
|
|
1750
|
+
* (`bindings/js/src/entry/kernel-attempt.mjs:607-613`, `:756-782`; the kernel's own words at
|
|
1751
|
+
* `bindings/js/src/entry/kernel-registration.mjs:373-374`). **No member census of either record is
|
|
1752
|
+
* printed here.**
|
|
1753
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE — `bindings/js/src/entry/kernel-attempt.mjs:607-613`,
|
|
1754
|
+
* cited for the CONSTRAINT's record — stands today on the pair-application guard's clause (`:631`), and the
|
|
1755
|
+
* constraint's record build stands at `:635`-`:641`.** **The citation's bytes stand and are read through this
|
|
1756
|
+
* mark** (§7.2 row `5`).
|
|
1757
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE — `bindings/js/src/entry/kernel-attempt.mjs:756-782`,
|
|
1758
|
+
* cited for the REPAIR's record — stands today on the repeat arms' returns, and the repair's record build stands
|
|
1759
|
+
* at `:784`-`:810`.** **The citation's bytes stand and are read through this mark** (§7.2 row `6`).
|
|
1760
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE —
|
|
1761
|
+
* `bindings/js/src/entry/kernel-registration.mjs:373-374`, cited as *"the kernel's own words"* on the two records
|
|
1762
|
+
* — stands today on the `{message}` sentence of the registration instant's outcome read, and the kernel's own
|
|
1763
|
+
* statement of the two records stands at `:420`-`:424`.** **The citation's bytes stand and are read through this
|
|
1764
|
+
* mark** (§7.2 row `4`).
|
|
1765
|
+
*
|
|
1766
|
+
* **AT THE WRITE'S OWN EVALUATION — AT THAT INSTANT AND NO OTHER — THE KERNEL READS `message` AND
|
|
1767
|
+
* `repair` AS OWN MEMBERS OF THE OBJECT YOUR FUNCTION RETURNED: a pair carried on a prototype is NOT SEEN
|
|
1768
|
+
* there, and such a return answers the kernel's unrecognized sentence instead**
|
|
1769
|
+
* (`bindings/js/src/entry/kernel-attempt.mjs:690-696`). **THIS IS THE ONLY SENTENCE IN THIS FILE THAT
|
|
1770
|
+
* STATES THAT RULE, AND IT IS THE LANDING INSTANT'S**: the registration act reads the same
|
|
1771
|
+
* closed outcome at `bindings/js/src/entry/kernel-registration.mjs:330-332`, where an inherited `repair`
|
|
1772
|
+
* IS seen and invoked — **ONE RETURNED SHAPE ANSWERING TWO DIFFERENT THINGS AT THE TWO INSTANTS, a repair
|
|
1773
|
+
* at registration and no repair at a write — and that divergence is OWED to a code-bearing unit and is
|
|
1774
|
+
* CONTRADICTED BY NO SENTENCE HERE** (`strata/decisions.md` · `D-35`, whose parameter-access rule the
|
|
1775
|
+
* registration read does not yet hold).
|
|
1776
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE — `bindings/js/src/entry/kernel-attempt.mjs:690-696`
|
|
1777
|
+
* — stands today INSIDE the same body-throw arm's mark clause (`:691`-`:698`), and the rule it is cited for — the
|
|
1778
|
+
* own-member read of `message` and `repair` — stands at `:718`-`:724`.** **The citation's bytes stand and are read
|
|
1779
|
+
* through this mark** (§7.2 row `2`).
|
|
1780
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE —
|
|
1781
|
+
* `bindings/js/src/entry/kernel-registration.mjs:330-332` — stands today on the skip-is-not-a-refusal clause, and
|
|
1782
|
+
* the registration instant's outcome read — the one that reads the same closed outcome through the prototype
|
|
1783
|
+
* chain — stands at `:377`-`:380`.** **The citation's bytes stand and are read through this mark** (§7.2 row `3`).
|
|
1784
|
+
*
|
|
1785
|
+
* **THE REPAIR'S OWN RETURN IS A CLOSED TWO-ARM SET: `{ ok: true, op }` — the repairable arm, `op`
|
|
1786
|
+
* REQUIRED and BEING THE OPERATION RECORD THE STORE'S OWN VERB RETURNED (`WriteRecord.op`, or
|
|
1787
|
+
* `DeleteRecord.op` where that member is non-`null` — a `delete` that removed nothing answers `null` and
|
|
1788
|
+
* credits nothing) — and `{ ok: false, message }` — the failed arm. WHERE `ok` IS FALSE THE RETURNED
|
|
1789
|
+
* OBJECT'S MEMBERS ARE `ok` AND `message`, AND `op` IS ABSENT AND NEVER `null`, BECAUSE AN `op` THERE IS
|
|
1790
|
+
* READ BY NOTHING. **AT THE WRITE'S OWN EVALUATION A RETURN CARRYING ANY OTHER IDENTITY FAILS `KC-4`**
|
|
1791
|
+
* (`KC-4`'s token and the repair-body path print at `docs/specs/storeroom-constraints/contract.md:552`,
|
|
1792
|
+
* and the two arms print at `:558`). **That one sentence covers every outside form of that return, and
|
|
1793
|
+
* this file enumerates none of them.**
|
|
1794
|
+
*
|
|
1795
|
+
* **AND THE OP MUST BE ONE THE ATTEMPT CAN BE SHOWN TO HAVE LANDED: that ground is the kernel's own credit
|
|
1796
|
+
* check, and it is POINTED AT here and never re-spelled** —
|
|
1797
|
+
* `bindings/js/src/entry/kernel-foundations.mjs:1105-1131` — **and NO ORDINAL GROUND IS CLAIMED AT THE
|
|
1798
|
+
* REGISTRATION INSTANT, whose credit check runs with no invoked-for op**
|
|
1799
|
+
* (`bindings/js/src/entry/kernel-registration.mjs:510-517`).
|
|
1800
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE — `bindings/js/src/entry/kernel-registration.mjs:510-517`
|
|
1801
|
+
* — stands today on the synthetic attempt's nine-member docblock, and the credit call this sentence is about — the
|
|
1802
|
+
* one that runs with NO invoked-for op — stands at `:615`-`:616`.** **The citation's bytes stand and are read
|
|
1803
|
+
* through this mark** (`docs/L1/repair-outcome-types.md` §7.2 row `7`).
|
|
1804
|
+
*
|
|
1805
|
+
* **AND THE COMMIT YOUR REPAIR IS PART OF RIDES THAT ONE ARGUMENT: supply it at `write`'s DECLARED FOURTH
|
|
1806
|
+
* POSITION and the write your repair makes JOINS the commit it is part of**
|
|
1807
|
+
* (`bindings/js/index.d.ts:862`) — **the record the repair is handed carries that commit at its `pending`
|
|
1808
|
+
* member, the `CommitRecord.pending` this file declares at `bindings/js/index.d.ts:772`, POINTED AT here
|
|
1809
|
+
* and re-declared nowhere.** **That position's own class test is not restated.**
|
|
1810
|
+
* **⟶ RE-ANCHORED, 2026-11-01, `RCA-8(g)`: THE CITATION ABOVE PRINTS THIS FILE'S `:772`, WHICH WAS THE LINE AT THE
|
|
1811
|
+
* DATE IT WAS WRITTEN AND IS NOW MOVED TWICE OVER.** **At this date's bytes the `CommitRecord` docblock's `op`
|
|
1812
|
+
* sentence — the line `:772` stood on — stands at `:793`, and the `pending` member that sentence names is declared
|
|
1813
|
+
* at `:814` (`readonly pending: readonly TriggerPair[]`).** **THE TWO MOVES ARE DISTINCT AND NEITHER REWRITES THE
|
|
1814
|
+
* CITATION: the first is that block's own growth, which is why the figure was stale before this pass; the second is
|
|
1815
|
+
* THIS DATE'S MARKS — the head's and this record's block's — which stand above both lines.** **The citation's bytes
|
|
1816
|
+
* stand and are read through this mark; the typing pass's six names sit BELOW this block and moved no line above it
|
|
1817
|
+
* (`1,308 → 1,466` is that pass's own count), and the eight marks of this date are the only bytes this docs pass
|
|
1818
|
+
* adds inside the block** (§7.2 row `8`).
|
|
1819
|
+
* **AND THE SAME PARAGRAPH'S OTHER SELF-CITATION — `bindings/js/index.d.ts:862`, which is NOT one of §7.2's eight
|
|
1820
|
+
* rows and is therefore not one of this date's subjects — is moved by these marks nevertheless: the admitted forms
|
|
1821
|
+
* and the class test of that position stand at `:883`, and the position's own signature — with `commit?` typed as
|
|
1822
|
+
* `CommitCarrier` — at `:904`.**
|
|
1823
|
+
*
|
|
1824
|
+
* **AND NOTHING HERE MINTS A TYPE, A SYMBOL, AN ALIAS, A SEAM, A RECORD MEMBER OR AN EXPORT**: this clause
|
|
1825
|
+
* DOCUMENTS the pair your function returns and a two-arm result the kernel already reads, and DECLARES
|
|
1826
|
+
* nothing — `Constraint` below is unmoved, one `unknown` in and one `unknown` out. **Nor does it name an
|
|
1827
|
+
* archived part as the place its rule is to be read: the rule IS the sentences above, and every point they
|
|
1828
|
+
* cite is a live print of the kept contract or a live source range on this branch.**
|
|
1829
|
+
*
|
|
1830
|
+
* **⟶ RE-DERIVED BY NAME, 2026-11-01: THE SENTENCE ABOVE NO LONGER GOVERNS, AND IT IS NOT DELETED — IT IS READ THROUGH THIS
|
|
1831
|
+
* CLAUSE AS THE READING OF ITS OWN DATE.** The architect has approved minting the types that sentence declined, so what stands
|
|
1832
|
+
* now is: **FIVE NAMES ARE DECLARED BELOW THIS LINE — `AttemptContext` · `RepairContext` · `RegistrationRepairContext` ·
|
|
1833
|
+
* `ConstraintOutcome` · `RepairOutcome` — and `Constraint` below is TYPED rather than unmoved.** **EVERY MEMBER THEY CARRY IS ONE
|
|
1834
|
+
* THE KERNEL ALREADY BUILDS, AND NOTHING IS MINTED BUT THE NAMES**: no member, no symbol, no seam, no export, no route and no
|
|
1835
|
+
* arity moves, the module namespace keeps its ONE value name, and the closed sets these names carry are the ones this clause
|
|
1836
|
+
* already declares. **AND THE CENSUS SENTENCE ABOVE — *"No member census of either record is printed here"* — IS TRUE OF THIS
|
|
1837
|
+
* CLAUSE AND IS READ THROUGH THIS ONE: the census is DECLARED at the aliases below, in the only place a consumer's compiler can
|
|
1838
|
+
* hold it, and this clause still prints none.** **NO BEHAVIOUR BYTE MOVES: the aliases are erased at run time and the kernel
|
|
1839
|
+
* reads the same values it read on 2026-10-30.**
|
|
1840
|
+
*/
|
|
1841
|
+
export type Constraint = (context: AttemptContext) => ConstraintOutcome;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* **THE CONSTRAINT IDENTITY — `parameter-semantics.md §2.25` (`PAR-JS-25`)**: ONE OPAQUE VALUE THE PACKAGE
|
|
1845
|
+
* OWNS, minted once per pair, **equal to itself on a second `addConstraint` at the SAME pair** (the
|
|
1846
|
+
* overwrite arm) **and distinguishable from every other pair's**. **No spelling for it is declared, no
|
|
1847
|
+
* accessor reaches a member of it, and a consumer compares identities and never contents.**
|
|
1848
|
+
*/
|
|
1849
|
+
export type ConstraintIdentity = object;
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* **THE ATTEMPT'S OWN CONTEXT — THE ONE ARGUMENT A CONSTRAINT BODY IS INVOKED WITH** (`PAR-C-16`; the record this
|
|
1853
|
+
* file's `Constraint` docblock calls *"the attempt's own context"*), declared at
|
|
1854
|
+
* `docs/L1/repair-outcome-types.md` §1.1 of 2026-11-01. **THE NAME IS THE TREE'S OWN**: the kernel calls this
|
|
1855
|
+
* record `AttemptContext` (`bindings/js/src/entry/kernel-registration.mjs:421`, `:428`;
|
|
1856
|
+
* `kernel-attempt.mjs:483`) and so does this file at `:450`.
|
|
1857
|
+
*
|
|
1858
|
+
* **FIVE MEMBERS AND NO SIXTH: `address` · `attempt` · `op` · `tier` · `value`, and no other.** **THIS RECORD GAINS
|
|
1859
|
+
* NOTHING AT ANY INSTANT** — no `id`, no `pending` and no `write` (`strata/decisions.md` · `D-92` (1)) — **and its
|
|
1860
|
+
* census is printed HERE, because this is the only place a consumer's compiler can hold it** (the `Constraint`
|
|
1861
|
+
* docblock above prints none, and says so).
|
|
1862
|
+
*
|
|
1863
|
+
* **ONE MEMBER SET ACROSS THE THREE SITES THAT BUILD IT, AND THE SITE — NOT THE INSTANT — DECIDES THE VALUE.**
|
|
1864
|
+
* Built at the write's own evaluation (`kernel-attempt.mjs:635`-`:641`), at a registration's FIRST ask
|
|
1865
|
+
* (`kernel-registration.mjs:392`-`:403`) and at a registration's RE-RUN (`:728`-`:734`); only three members' VALUES
|
|
1866
|
+
* move, and the nullable arms are the FIRST ask's — `attempt`, `op` and `tier` are the LANDING's at the other two.
|
|
1867
|
+
* **SO A CONSUMER NARROWS `op` BEFORE READING IT**: at a landing and at a re-run `op` is never `null`, and that
|
|
1868
|
+
* narrowing is the declared price of one member set, printed rather than discovered (§1.1; §2's alternative `D`).
|
|
1869
|
+
*/
|
|
1870
|
+
export interface AttemptContext {
|
|
1871
|
+
readonly address: Address;
|
|
1872
|
+
readonly attempt: AttemptRef | null;
|
|
1873
|
+
readonly op: JournalOp | null;
|
|
1874
|
+
readonly tier: Tier | null;
|
|
1875
|
+
readonly value: unknown;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* **THE REPAIR'S OWN RECORD — THE SIX-MEMBER `RepairContext`, THE ONE ARGUMENT THE KERNEL INVOKES A REPAIR WITH**,
|
|
1880
|
+
* built at the write's own evaluation (`bindings/js/src/entry/kernel-attempt.mjs:784`-`:810`) and declared at
|
|
1881
|
+
* `docs/L1/repair-outcome-types.md` §1.2 of 2026-11-01. **THE NAME IS THE KERNEL'S OWN** — *"the six-member
|
|
1882
|
+
* `RepairContext`"* (`kernel-registration.mjs:416`, `:421`) — and this alias IS that shape.
|
|
1883
|
+
*
|
|
1884
|
+
* **SIX MEMBERS: `address` · `id` · `op` · `tier` · `value` · `pending`. THE TWO RECORDS STAND APART AT THREE
|
|
1885
|
+
* PLACES** (the `Constraint` docblock above; `docs/guides/package-use.md §7.6`): **by COUNT, SIX against
|
|
1886
|
+
* `AttemptContext`'s FIVE; by `id`, which this record carries where the constraint's carries `attempt`; and by
|
|
1887
|
+
* `pending`, which rides this record ALONE.**
|
|
1888
|
+
*
|
|
1889
|
+
* **`op`'s `| null` ARM IS THE REGISTRATION'S, DECLARED ONCE BECAUSE THE SHAPE IS ONE SHAPE**: at this instant `op`
|
|
1890
|
+
* is the op the evaluation carried and is never `null`. **`pending` IS A FRESH LIST AND NEVER THE RECORD'S OWN
|
|
1891
|
+
* MEMBER** (`kernel-attempt.mjs:806`-`:809`); **`id`'s NON-EMPTINESS IS `PAR-JS-24`'s PROSE RULE and no type carries
|
|
1892
|
+
* it** (the same class of limit as `Handle`); **and the commit a repair is inside rides that `pending`, so the write
|
|
1893
|
+
* a repair makes JOINS the commit it is part of** — supplied at `write`'s DECLARED FOURTH POSITION (`D-46`).
|
|
1894
|
+
*/
|
|
1895
|
+
export interface RepairContext {
|
|
1896
|
+
readonly address: Address;
|
|
1897
|
+
readonly id: string;
|
|
1898
|
+
readonly op: JournalOp | null;
|
|
1899
|
+
readonly tier: Tier | null;
|
|
1900
|
+
readonly value: unknown;
|
|
1901
|
+
readonly pending: readonly TriggerPair[];
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* **THE REPAIR'S RECORD AT A REGISTRATION INSTANT — THE SAME SIX AND THE ROUTE THE REGISTRATION ADDS: SEVEN.**
|
|
1906
|
+
* Built at `bindings/js/src/entry/kernel-registration.mjs:447`-`:460`, with the route at `:492`-`:503`, and declared
|
|
1907
|
+
* at `docs/L1/repair-outcome-types.md` §1.3 of 2026-11-01. **`extends` puts each of the six members at ONE home, so no
|
|
1908
|
+
* member of the shared shape can drift between the two instants.**
|
|
1909
|
+
*
|
|
1910
|
+
* **`write` IS EXACTLY THE STORE'S FIRST THREE POSITIONS — `(address, tier, value) => WriteRecord` — AND THE COMMIT
|
|
1911
|
+
* IS NOT A POSITION OF IT**: the write joins the registration's own commit (`D-91` (2)), and a supplied fourth is
|
|
1912
|
+
* REFUSED BEFORE ANY STORE ACT (`kernel-registration.mjs:492`-`:503`). **So the instance's
|
|
1913
|
+
* `write(address, tier, value, commit?)` and this route's three positions are TWO positions and never one spelling.**
|
|
1914
|
+
*
|
|
1915
|
+
* **THE CONSTRAINT'S RECORD GAINS NOTHING AT ANY INSTANT** (`D-92` (1)): `AttemptContext` carries neither `write` nor
|
|
1916
|
+
* `pending`, and **the seventh member's PRESENCE is the discriminator the kernel itself uses, so `'write' in rc` is
|
|
1917
|
+
* the narrowing a repair has**. **AND A BODY ANNOTATED WITH THIS SEVEN-MEMBER ALIAS IS REFUSED** — the position's
|
|
1918
|
+
* parameter is `RepairContext | RegistrationRepairContext` — **so the lawful spellings are `RepairContext`, that
|
|
1919
|
+
* union narrowed with `'write' in`, or no annotation at all.**
|
|
1920
|
+
*/
|
|
1921
|
+
export interface RegistrationRepairContext extends RepairContext {
|
|
1922
|
+
readonly write: (address: Address, tier: Tier, value: unknown) => WriteRecord;
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
/**
|
|
1926
|
+
* **WHAT A CONSTRAINT BODY ANSWERS — THE CLOSED THREE-ARM SET**, read in this order at the write's own evaluation
|
|
1927
|
+
* (`bindings/js/src/entry/kernel-attempt.mjs:705`-`:727`) and declared at `docs/L1/repair-outcome-types.md` §1.4 of
|
|
1928
|
+
* 2026-11-01: **`true` — THE ONLY PASS VALUE**; **`{ message, repair }` — A REPAIRABLE VIOLATION**; **`{ message }` —
|
|
1929
|
+
* AN UNREPAIRABLE VIOLATION**, its `message` the refusal's own sentence.
|
|
1930
|
+
*
|
|
1931
|
+
* **A VALUE OUTSIDE THE THREE IS READ AS THE `{ message }` ARM AND NEVER AS A FOURTH ARM**, so a return invented
|
|
1932
|
+
* beyond them declares an outcome this kernel does not distinguish — **and a return carrying only `repair` is that
|
|
1933
|
+
* outside value, whose repair IS NEVER SEEN** (`kernel-attempt.mjs:718`-`:724`).
|
|
1934
|
+
*
|
|
1935
|
+
* **`message` IS REQUIRED ON THE REPAIR ARM BECAUSE THE KERNEL READS IT FIRST**, and the repair is looked for only
|
|
1936
|
+
* inside that branch. **THE TYPE DECLARES THE SHAPE AND NEVER THE READ**: at the write's own evaluation `message` and
|
|
1937
|
+
* `repair` are read as OWN members, while at a registration instant the same closed outcome is read through the
|
|
1938
|
+
* prototype chain (`kernel-registration.mjs:377`-`:380`) — **ONE RETURNED SHAPE ANSWERING TWO DIFFERENT THINGS AT THE
|
|
1939
|
+
* TWO INSTANTS, which is `D-35`'s recorded defect and is OWED to a code-bearing unit**, and nothing here is read as
|
|
1940
|
+
* symmetric. **Nor does the type carry `message`'s NON-EMPTINESS or the repair's invocability beyond `function`.**
|
|
1941
|
+
*
|
|
1942
|
+
* **⟶ AND THE CLAUSE ABOVE IS CURED, 2026-11-04 — `U-STOREROOM-REGISTRATION-OWN-MEMBERS`, ON `D-120`.** `RCA-8(g)`
|
|
1943
|
+
* ANNOTATE-BESIDE: **the clause above stands BYTE-FOR-BYTE and is read THROUGH this mark, and neither of its own
|
|
1944
|
+
* citations is corrected or re-pointed.** **The registration instant's read of the same closed outcome was converted
|
|
1945
|
+
* to the own-member rule at this unit's landing**, so its *"ONE RETURNED SHAPE ANSWERING TWO DIFFERENT THINGS"*
|
|
1946
|
+
* reading is **CURED rather than owed**. **THE TYPE STILL DECLARES THE SHAPE AND NEVER THE READ** — the conversion
|
|
1947
|
+
* confirms that thesis rather than amending it. **THE MEMBERS' CLASSES ARE UNMOVED**: `message` is still not
|
|
1948
|
+
* declared non-empty, and `repair` is still declared no further than `function`, so this mark is neither a
|
|
1949
|
+
* narrowing nor a widening of what is declared here.
|
|
1950
|
+
*/
|
|
1951
|
+
export type ConstraintOutcome =
|
|
1952
|
+
| true
|
|
1953
|
+
| {
|
|
1954
|
+
readonly message: string;
|
|
1955
|
+
readonly repair: (
|
|
1956
|
+
context: RepairContext | RegistrationRepairContext,
|
|
1957
|
+
) => RepairOutcome;
|
|
1958
|
+
}
|
|
1959
|
+
| { readonly message: string };
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* **WHAT A REPAIR ANSWERS — THE CREDITED ARM, THE FAILED ARM, AND `void`**, read at
|
|
1963
|
+
* `bindings/js/src/entry/kernel-attempt.mjs`'s repair arm and **RE-DERIVED 2026-11-01 by `D-105`**
|
|
1964
|
+
* (`strata/decisions.md` · `D-105` item `1`; `docs/L1/op-free-repair-credit.md` §6.1). **THE SENTENCES THIS CLAUSE
|
|
1965
|
+
* SUPERSEDES ARE NAMED RATHER THAN OVERWRITTEN** (`RCA-8(g)` ANNOTATE-BESIDE): *"`op` IS REQUIRED ON THE CREDITED
|
|
1966
|
+
* ARM, THE ARM IS CLOSED, AND `undefined` IS NOT ONE OF THE TWO — so a repair answering `undefined` or a bare
|
|
1967
|
+
* `{ ok: true }` is a COMPILE ERROR instead of a `ConstraintPassRefused`"* (`docs/L1/repair-outcome-types.md` §1.5
|
|
1968
|
+
* of 2026-11-01). **THE RULING, VERBATIM: *"A repair that does its write and returns `undefined` — the natural
|
|
1969
|
+
* shape of `repair: () => { … }` — is NOT refused"***, **so the credited arm is `undefined` · `{ ok: true }` ·
|
|
1970
|
+
* `{ ok: true, op }` — three spellings of ONE arm — and `void` is what the body answers when it has no opinion.**
|
|
1971
|
+
* **`ST-F2`'s measured defect is CLOSED BY CARRIER and not by text.**
|
|
1972
|
+
*
|
|
1973
|
+
* **THE CREDITED ARM: `{ ok: true, op? }`, `op` OPTIONAL AND INFORMATIONAL** — the store's own journal record
|
|
1974
|
+
* where a body cares to hand it back, reached by INDEXED ACCESS (`WriteRecord['op']`) so **NO SECOND CARRIER IS
|
|
1975
|
+
* MINTED**. **NO READER IN THE KERNEL READS IT**: the credit is the FAILING PAIR's mark (`attempt.appliedRepairs`),
|
|
1976
|
+
* the op the attempt pins is the repair's write's OWN LEG (`D-105` item `2`), and the re-run's value is that leg's
|
|
1977
|
+
* `op.after.value` — the returned `op` sets no pin, joins no list, becomes no landing and is named by no sentence.
|
|
1978
|
+
* **`op` ADMITS `null`** because the member is informational: `DeleteRecord['op']`'s declared `null` arm — a
|
|
1979
|
+
* `delete` that removed nothing — costs a consumer nothing, and nothing is refused for it.
|
|
1980
|
+
* **THE FAILED ARM IS UNMOVED: `{ ok: false, message }` — `op` ABSENT AND NEVER `null`** — and it is the ONLY
|
|
1981
|
+
* return that fails the attempt (`D-105` item `4`: *"The failed arm still fails (`{ok: false, message}` — the
|
|
1982
|
+
* caller's words)"*, `bindings/js/src/entry/kernel-attempt.mjs`'s `(d1)`).
|
|
1983
|
+
*
|
|
1984
|
+
* **THE TYPE STAYS NARROWER THAN THE RUNTIME, ON PURPOSE, AND THE GAP IS DECLARED RATHER THAN CLOSED.** The runtime
|
|
1985
|
+
* CREDITS `true`, `false`, `7`, `'done'`, `{ ok: 'yes' }`, `{ ok: false }` WITHOUT A MESSAGE and
|
|
1986
|
+
* `{ ok: true, op: <a whole WriteRecord> }`; **this alias admits none of them** — it declares the shape a consumer
|
|
1987
|
+
* SHOULD return, and the runtime declines to judge what a consumer DOES return. **`{ ok: false }` with no message
|
|
1988
|
+
* is named on both sides deliberately**: the runtime credits it (the declared failed arm needs a non-empty
|
|
1989
|
+
* `message`) and the type refuses it. **THE MIRROR IMAGE OF `CommitCarrier`'s PRINTED LIMIT BELOW**: there an
|
|
1990
|
+
* inherited `pending` and a `Proxy` pass the type and the run-time refusal keeps the position's domain; **here the
|
|
1991
|
+
* RUNTIME IS THE WIDER SIDE — THE TYPE DECLINES, THE RUNTIME CREDITS, AND NOTHING HERE PROMISES THAT A GREEN
|
|
1992
|
+
* COMPILE IS A CREDIT OR THAT A REFUSED COMPILE IS A REFUSAL.** `exactOptionalPropertyTypes` is not set in either
|
|
1993
|
+
* `tsconfig` head, so `{ ok: true, op: undefined }` type-checks as written — a property of the config heads and
|
|
1994
|
+
* not of this alias.
|
|
1995
|
+
*
|
|
1996
|
+
* **THE GROUND IS PROSE AND IS POINTED AT, NEVER RE-SPELLED HERE** (`bindings/js/src/entry/kernel-foundations.mjs`'s
|
|
1997
|
+
* `landedOp`, whose ONE remaining caller is the registration instant — `kernel-registration.mjs:616` — and whose
|
|
1998
|
+
* ordinal ground RETIRES on the write path, `docs/L1/op-free-repair-credit.md` §4 `RB-4`).
|
|
1999
|
+
* **A green compile is not evidence of a credit**, and a returned `op` is read as an OWN member — a distinction
|
|
2000
|
+
* structural typing cannot make. **NO NAME IS MINTED: this declaration adds `0` types.**
|
|
2001
|
+
*/
|
|
2002
|
+
export type RepairOutcome =
|
|
2003
|
+
| void
|
|
2004
|
+
| { readonly ok: true; readonly op?: WriteRecord['op'] | null }
|
|
2005
|
+
| { readonly ok: false; readonly message: string };
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* **THE WRITE'S COMMIT POSITION AND ITS CLASS TEST — ONE MEMBER, `pending`, SPELLED EXACTLY AS `CommitRecord.pending`
|
|
2009
|
+
* SPELLS IT** (`:793`), so **no second TYPE is minted: what is minted is the NAME the class test's class never had**.
|
|
2010
|
+
* Declared at `docs/L1/repair-outcome-types.md` §8's `Q-1` clause of 2026-11-01 (`strata/decisions.md` · `D-101`,
|
|
2011
|
+
* verbatim: *"Widen the position to its class test"*), and **exported because a position's type no consumer can
|
|
2012
|
+
* annotate is the `ST-F2` gap in a new place**: the carrier is the one value a consumer CONSTRUCTS at a position
|
|
2013
|
+
* rather than receives.
|
|
2014
|
+
*
|
|
2015
|
+
* **THE KERNEL READS A MEMBER'S PRESENCE AND NEVER ITS MEMBER COUNT** — an OWN, defined `pending` on a non-null,
|
|
2016
|
+
* non-Proxy, non-array object (`bindings/js/src/entry/delivery.mjs:27`-`:54`, the predicate at `:39`) — **so
|
|
2017
|
+
* `CommitRecord` is ONE CARRIER of this class and not the position's only type; it keeps every byte, its four
|
|
2018
|
+
* members and its export.** **A REPAIR'S OWN `RepairContext` IS A CARRIER TOO**, which is why the guide's
|
|
2019
|
+
* four-position spelling type-checks as written (`D-46`; `docs/guides/package-use.md §7.6`).
|
|
2020
|
+
*
|
|
2021
|
+
* **WHAT NO GREEN HERE PROVES, PRINTED BECAUSE THE CLASS TEST IS THE DOMAIN'S KEEPER**: an INHERITED `pending`
|
|
2022
|
+
* (`Object.hasOwn` refuses it at run time) and a `Proxy` (`types.isProxy` refuses it before any member read) are both
|
|
2023
|
+
* admitted by the type, and **`commit?` admits a SUPPLIED `undefined`, which the class test refuses** — the
|
|
2024
|
+
* `?`-cannot-separate limit this file already declares for `read`'s `tier?` (`:131`-`:135`). **THE RUNTIME REFUSAL IS
|
|
2025
|
+
* WHAT KEEPS THE POSITION'S DOMAIN.**
|
|
2026
|
+
*/
|
|
2027
|
+
export interface CommitCarrier {
|
|
2028
|
+
readonly pending: readonly TriggerPair[];
|
|
2029
|
+
}
|