provident-storeroom 1.11.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.guide.md +269 -26
- package/README.md +43 -13
- package/RELEASE-NOTES.md +203 -1
- package/index.d.ts +233 -13
- package/index.mjs +88 -2097
- package/package.json +9 -8
- package/src/entry/addon-slot.mjs +484 -0
- package/src/entry/artefact-node.mjs +327 -0
- package/src/entry/artefact.mjs +55 -394
- package/src/entry/carrier.mjs +15 -6
- package/src/entry/class-decision.mjs +82 -18
- package/src/entry/class-instrument.mjs +186 -0
- package/src/entry/constraints.mjs +164 -11
- package/src/entry/delivery.mjs +658 -12
- package/src/entry/frame.mjs +125 -13
- package/src/entry/instance.mjs +2312 -0
- package/src/entry/kernel-attempt.mjs +5 -1
- package/src/entry/kernel-foundations.mjs +79 -2
- package/src/entry/kernel-loader.mjs +53 -0
- package/src/entry/kernel-registration.mjs +70 -5
- package/src/entry/kernel-terminal.mjs +91 -8
- package/src/entry/state.mjs +189 -21
package/index.mjs
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
// `provident-storeroom` — **THE CLAIMED REALM:
|
|
1
|
+
// `provident-storeroom` — **THE CLAIMED REALM IS THE ES MODULE ITSELF: one file, one namespace, one declared
|
|
2
|
+
// member set, reached by EITHER of Node's two specifiers for that one module** (`package.md §1.1`, `A70`;
|
|
3
|
+
// `docs/specs/storeroom-js/contract.md §3.1`'s 2026-11-17 re-derivation — *"`require` IS A SUPPORTED ROUTE INTO THE CLAIMED REALM AND
|
|
4
|
+
// IS NOT A SECOND CLAIMED REALM"*; `D-128`, `D-129`).
|
|
2
5
|
//
|
|
3
6
|
// **THE ONE ARMS-BEARING ENTRY** (`package.md §1.3` item 1, `DD-24`) — the `exports` map publishes it and
|
|
4
|
-
// publishes nothing else:
|
|
7
|
+
// publishes nothing else: `types` names the declaration, and `import` and `require` name the SAME
|
|
8
|
+
// `./index.mjs` at their own conditions, so no wildcard, no deep import to the addon and no CJS arm — no
|
|
9
|
+
// `.cjs` artefact, no `main` field and no second build — is published beside it (`§1.2`; `HO-1` as
|
|
10
|
+
// re-derived 2026-11-17 at `§3.2`; `D-128`). **THE ENTRY'S LOAD-TIME MODULE GRAPH IS SYNCHRONOUS** — no
|
|
11
|
+
// module it reaches at load carries a top-level asynchronous module evaluation — because `require(esm)`
|
|
12
|
+
// cannot wait (`§3.1`'s foot, the synchronous-graph law; `D-129` item 5).
|
|
5
13
|
//
|
|
6
14
|
// ---------------------------------------------------------------------------------------------
|
|
7
15
|
// THE ROUTE, AND THE SHAPE THE ARCHITECT'S RULING `A75` FIXED: `JS -> facade -> core -> store`
|
|
@@ -76,27 +84,93 @@
|
|
|
76
84
|
// is the declared observable), and the invocation's ONE argument is the triggering ADDRESS (`PAR-JS-12`):
|
|
77
85
|
// the matched id and the address are two different data and only the address is passed.**
|
|
78
86
|
|
|
79
|
-
import { readFileSync } from 'node:fs';
|
|
87
|
+
import { readFileSync, existsSync, unlinkSync } from 'node:fs';
|
|
80
88
|
import { createRequire } from 'node:module';
|
|
81
89
|
import { dirname as dirOf, join } from 'node:path';
|
|
82
90
|
import { fileURLToPath } from 'node:url';
|
|
83
91
|
import { types } from 'node:util';
|
|
84
92
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
//
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
// **⟶ AND THE NODE ARM'S GLUE IS INSTALLED BY ONE SIDE-EFFECT IMPORT, 2026-11-17** (`D-156` item 1; the loader
|
|
94
|
+
// split, `docs/L3/wasm-realm/design.md` §5): `artefact.mjs` walks for the artefact through `artefact-node.mjs` —
|
|
95
|
+
// the three `node:` imports, the platform table, `packageVersion()` and the three rungs — and hands the walk, the
|
|
96
|
+
// attempt list's own subject renderer and this ENTRY's artefact path to `addon-slot.mjs`, which holds the slot
|
|
97
|
+
// every part now reads. **THE GLUE INSTALLS A LOAD PATH AND NOT A MODULE**: nothing is looked for until a
|
|
98
|
+
// construction asks for it, so this entry still loads and still reads no file at its own evaluation.
|
|
99
|
+
import './src/entry/artefact.mjs';
|
|
100
|
+
// **⟶ AND THE MODULE-CONTEXT SEAM IS THE NODE HALF'S FROM 2026-11-17** (`D-156` item 1; the loader split's
|
|
101
|
+
// extraction, `docs/L3/wasm-realm/design.md` §5). `adoptModuleContext` stores the three facts THIS module derives
|
|
102
|
+
// from its own `import.meta.url` — the `createRequire` base, the artefact path and the manifest's directory — and
|
|
103
|
+
// the three-rung walk that reads them is `artefact-node.mjs`'s, so the seam and its storage are imported from
|
|
104
|
+
// THERE. **THE CALL AT THIS MODULE'S OWN EVALUATION IS UNMOVED BYTE-FOR-BYTE AND SO ARE ITS THREE POSITIONS**
|
|
105
|
+
// (`I-29`; `PUB-DD-20`): the entry still adopts its own context, and a part still derives nothing from its own
|
|
106
|
+
// URL. **NO OTHER NAME OF THE LINE ABOVE MOVES.**
|
|
107
|
+
import { adoptModuleContext } from './src/entry/artefact-node.mjs';
|
|
108
|
+
// **⟶ AND THE CLASS-DECISION INSTRUMENT'S SETTER JOINS THIS BLOCK, 2026-11-17** (`D-156` item 1; the loader
|
|
109
|
+
// split's row: *"`node:util` in five parts — one import line swapped for a local helper — **neutralised**"*).
|
|
110
|
+
// **`installClassInstrument` IS THE ONE SETTER** and it is called once, below, at this module's own evaluation;
|
|
111
|
+
// the five parts that decide `DD-34`'s `Proxy` refusal read the predicate from `class-instrument.mjs` and carry
|
|
112
|
+
// no `node:` specifier for it.
|
|
113
|
+
import { installClassInstrument } from './src/entry/class-instrument.mjs';
|
|
114
|
+
import { installConstructionFileGuard } from './src/entry/state.mjs';
|
|
115
|
+
// **⟶ AND THE FIFTEEN MEMBERS' BODY HAS ONE COPY, 2026-11-17** (`D-156` item 1; `design.md` §5: *"the shared
|
|
116
|
+
// body — the fifteen members, `deliver`, the kernel glue — is ONE copy"*). THIS ENTRY IS NOW THE NODE ARM'S
|
|
117
|
+
// HEAD AND ITS ONE EXPORT IS THE SHARED BODY'S: the construction, the instance and the fifteen members stand in
|
|
118
|
+
// `src/entry/instance.mjs`, which carries no `node:` specifier and reads no host fact, so the second realm's own
|
|
119
|
+
// entry imports the SAME body and differences itself by ONE function — how its bindings arrive. **THE NAMESPACE IS
|
|
120
|
+
// UNMOVED** (`surface.md §2.9` item 1: ONE value-level name, `storeCreate`), the arity is the body's (`1`), and no
|
|
121
|
+
// byte of any construction, member or refusal moved.
|
|
122
|
+
export { storeCreate } from './src/entry/instance.mjs';
|
|
123
|
+
|
|
96
124
|
const require_ = createRequire(import.meta.url);
|
|
97
125
|
const ADDON_PATH = join(dirOf(fileURLToPath(import.meta.url)), 'build', 'Release', 'storeroom_js_binding.node');
|
|
98
126
|
|
|
99
127
|
adoptModuleContext(import.meta.url, require_, ADDON_PATH);
|
|
128
|
+
// ---------------------------------------------------------------------------------------------
|
|
129
|
+
// **⟶ AND THE CLASS-DECISION INSTRUMENT IS INSTALLED HERE, AT THE HEAD OF THE MODULE AND BEFORE ANY PART CAN
|
|
130
|
+
// CLASSIFY A SINGLE VALUE — 2026-11-17** (`D-156` item 1; `docs/L3/wasm-realm/design.md` §5). **THE NODE ARM'S
|
|
131
|
+
// INSTRUMENT IS `types.isProxy` ITSELF**, handed over as an arrow that reads it at call time, and the five parts
|
|
132
|
+
// that decide `DD-34`'s refusal (25 sites) reach it through `class-instrument.mjs`'s one predicate — **so every
|
|
133
|
+
// answer those sites take is the answer they took when each imported `node:util` directly: the instrument's HOME
|
|
134
|
+
// moved and the decision, its order and its answer did not.**
|
|
135
|
+
//
|
|
136
|
+
// **★ AND THIS LINE IS WHAT MAKES `isProxyOf`'S DEFAULT UNREACHABLE, WHICH IS THE WHOLE OF ITS DUTY.** Before an
|
|
137
|
+
// instrument is installed that predicate answers `false` — "not a `Proxy`" — for every value, which is a SILENT
|
|
138
|
+
// LOSS of the `DD-34` refusal and can let a trap run on a path that promises no trap does. **The default is `false`
|
|
139
|
+
// deliberately**: the other arm, refusing everything, refuses every value's prototype link, so no value crosses and
|
|
140
|
+
// no store can be constructed at all. **The entry's installation is therefore the thing that closes the gap, and it
|
|
141
|
+
// happens at the module's own evaluation, before any verb and before any part classifies anything.**
|
|
142
|
+
//
|
|
143
|
+
// **⟶ AND THE SETTER TAKES BOTH PREDICATES FROM 2026-11-17 — `D-167`.** The seam holds two questions now — the DATA
|
|
144
|
+
// one (`isProxyOf`: *does this value enter the Rust store?*) and the CARRIER one (`isProxyOfCarrier`: *is this the
|
|
145
|
+
// package's own `cfg`/listeners/constraints/commit carrier?*) — and **THE NODE ARM'S ANSWER TO BOTH IS
|
|
146
|
+
// `types.isProxy`, WHICH IS WHY THIS LINE CHANGES BY ONE ARGUMENT AND NOTHING ON THIS ARM MOVES BY A BYTE**: that
|
|
147
|
+
// predicate is precise here (it reads the exotic object's own internal slot, invokes no handler and throws for
|
|
148
|
+
// nothing), so every `Proxy` a carrier gate refused before this line changed is still refused, in the same form
|
|
149
|
+
// with the same message. **WHAT THE SECOND ARGUMENT BUYS IS NOTHING ON THIS ARM AND EVERYTHING ON THE OTHER**: it
|
|
150
|
+
// is the arm whose probe cannot answer the carrier question that must be able to answer it differently, and **an
|
|
151
|
+
// entry that installed only the data instrument would leave `isProxyOfCarrier` at its `false` default HERE, which is
|
|
152
|
+
// a silent loss of `DD-34` at every carrier gate** — so the setter requires both and this line passes both.
|
|
153
|
+
// ---------------------------------------------------------------------------------------------
|
|
154
|
+
installClassInstrument((value) => types.isProxy(value), (value) => types.isProxy(value));
|
|
155
|
+
|
|
156
|
+
// ---------------------------------------------------------------------------------------------
|
|
157
|
+
// **⟶ AND THE CONSTRUCTION'S FILE GUARD IS INSTALLED HERE — 2026-11-17** (`SS-9`; `A55`'s *"leaves nothing behind"*).
|
|
158
|
+
// **THE NODE ARM IS THE ONLY ARM WITH A FILESYSTEM, SO IT IS THE ONLY ARM THAT INSTALLS ONE**: `existsSync` is read BEFORE
|
|
159
|
+
// the store's exclusive create and `unlinkSync` removes the store's own zero-length artefact **only where the construction
|
|
160
|
+
// made it and then refused** — a construction over an ABSENT path whose constraint body throws at registration.
|
|
161
|
+
// **THE INJECTED ARM INSTALLS NOTHING**: it refuses `filePath` outright, so it never creates a file to remove.
|
|
162
|
+
// ---------------------------------------------------------------------------------------------
|
|
163
|
+
installConstructionFileGuard((filePath) => {
|
|
164
|
+
const existed = existsSync(filePath);
|
|
165
|
+
return {
|
|
166
|
+
existed,
|
|
167
|
+
undo: () => {
|
|
168
|
+
if (existed === true) return;
|
|
169
|
+
try { unlinkSync(filePath); } catch { /* the refusal path never throws for this */ }
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
|
|
100
174
|
|
|
101
175
|
// ---------------------------------------------------------------------------------------------
|
|
102
176
|
// **⟶ `copySegments` MOVED WITH ITS ONLY READER, 2026-11-01 (`D-99`'s ANSWERED clause; `C-17`, §9.2).**
|
|
@@ -107,2086 +181,3 @@ adoptModuleContext(import.meta.url, require_, ADDON_PATH);
|
|
|
107
181
|
// same local index loop over the caller's own exotic `length` and its own indices, appending by `appendOwn`,
|
|
108
182
|
// answering a FRESH segment list — and no member of this module's namespace was ever this function.
|
|
109
183
|
// ---------------------------------------------------------------------------------------------
|
|
110
|
-
|
|
111
|
-
// ---------------------------------------------------------------------------------------------
|
|
112
|
-
// THE SURFACE — `surface.md §2.9` item 1: the EIGHT verbs, and NOTHING else. `findAddress` is NOT exposed
|
|
113
|
-
// (`A63`), no `exists` verb exists (`docs/specs/storeroom-js/surface.md §2.9` item 3) and no release verb is declared (`A74`).
|
|
114
|
-
// ---------------------------------------------------------------------------------------------
|
|
115
|
-
|
|
116
|
-
/// **ONE MEMBER OF A HANDED VALUE, READ AS AN OWN DATA PROPERTY OR NOT AT ALL** — `[[GetOwnProperty]]`'s answer,
|
|
117
|
-
/// which consults no prototype chain (`D-35`'s read half, the reading `refusal.mjs` and the kernel take). Used by
|
|
118
|
-
/// the sweep's guard and by its refusal conversion, where the values read are a caller's own returned outcome and
|
|
119
|
-
/// a refusal this package threw.
|
|
120
|
-
function ownValue(value, name) {
|
|
121
|
-
if (value === null || typeof value !== 'object') return undefined;
|
|
122
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, name);
|
|
123
|
-
if (descriptor === undefined || !Object.hasOwn(descriptor, 'value')) return undefined;
|
|
124
|
-
return descriptor.value;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/// **THE ACT'S CONVERSION OF A FIRED BODY'S THROWABLE — `PIN-10`, `Q-13`, AND IT IS TAKEN BEFORE THE ANSWER.**
|
|
128
|
-
/// **THE DELIVER PRECEDES THE ANSWER AT THIS INSTANT** (`PIN-2`: SAVE → DELIVER → THE ANSWER), so a body that
|
|
129
|
-
/// threw PRE-EMPTS it: the caller receives rank `21` `ListenerBodyThrew` and never the identity or the
|
|
130
|
-
/// `undefined` it would have had. **NOTHING IS UNDONE** (`Q-13`: *"the pair stands registered, its save stands,
|
|
131
|
-
/// and no withdrawal arm is declared"*) and **no rollback composes** — the composition was this registration's
|
|
132
|
-
/// own and it was spent before the delivery ran.
|
|
133
|
-
///
|
|
134
|
-
/// **THE SLOT IS CONSUMED HERE AND ITS ABSENCE IS THE ORDINARY ARM**: the act reads it once, at its own answer,
|
|
135
|
-
/// and nothing else in the package can see it — a value of the package's own state, exactly as `legDelivery` is.
|
|
136
|
-
function raiseListenerFailure(state) {
|
|
137
|
-
const failure = state.listenerFailure;
|
|
138
|
-
state.listenerFailure = null;
|
|
139
|
-
if (failure === null || typeof failure !== 'object') return undefined;
|
|
140
|
-
const at = ownValue(failure, 'address');
|
|
141
|
-
listenerBodyRefused(Array.isArray(at) ? at : []);
|
|
142
|
-
return undefined;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/// **THE SWEEP'S GUARD — ONE APPLIED-REPAIR BIT, CONSULTED AT THE ASK AND SET AT THE REPAIR — AND ITS SCOPE IS
|
|
146
|
-
/// THE SWEEP'S AND NOTHING ELSE'S** (`PIN-4` (i), (ii); `D-124` item 1; `D-125` item 4). It wraps a carried
|
|
147
|
-
/// pair's own body and answers EXACTLY what that body answered, except in one state:
|
|
148
|
-
///
|
|
149
|
-
/// * **THE SWEEP IS NOT THE ACT IN HAND** (`sweep.live !== true`) — **THE WRAPPER IS INERT**: the body is
|
|
150
|
-
/// invoked, its answer is handed back AS THE BODY MADE IT, and **no bit is read, no member is read and no
|
|
151
|
-
/// object is rebuilt.** **⟶ AND THIS IS THE STATE A PAIR IS LEFT IN WHEN THE CONSTRUCTION ANSWERS — THE
|
|
152
|
-
/// GATE 4 DEFECT THIS CLAUSE CLOSES.** The wrapper the sweep installs is registered with the kernel and
|
|
153
|
-
/// stored as the entry's element (`constraints.mjs`'s `carryConstraint`, `entry.fn = constraint`;
|
|
154
|
-
/// `kernel-attempt.mjs`'s `pair.constraint`), so **it outlives the sweep by construction and cannot be
|
|
155
|
-
/// un-installed by this frame**: re-registering the original body would ASK THE BODY AGAIN (and could land a
|
|
156
|
-
/// second repair), which is a second act and not a restoration. **SO THE SCOPE IS THE DEVICE**: `sweep` is
|
|
157
|
-
/// one object local to the construction, it is cleared the instant its last round ends, and from that byte on
|
|
158
|
-
/// the wrapper is a transparent identity over the caller's body — **the pair's every later refusal keeps its
|
|
159
|
-
/// `repair` and runs it**, which is what *"local to this construction and gone when it answers"* has to mean
|
|
160
|
-
/// where the body it wraps cannot be swapped back.
|
|
161
|
-
///
|
|
162
|
-
/// * **THE BIT IS UNSET** — the outcome crosses as the body made it, with its `repair` member wrapped by the one
|
|
163
|
-
/// wrapper that SETS the bit when the kernel invokes it. **The bit is set at the INVOCATION and not at the
|
|
164
|
-
/// credit**, which is the rule the act needs: a repair that ran and was then refused refuses the act, so no
|
|
165
|
-
/// later instant can read the bit as a repair that stood.
|
|
166
|
-
/// * **THE BIT IS SET AND THIS ASK IS A LATER ROUND'S (`suppress`)** — the pair would repair a SECOND time, and
|
|
167
|
-
/// **the repair is NOT handed over**: the outcome crosses with its message and without its `repair`, so the
|
|
168
|
-
/// kernel sees a violation with no repair registered, refuses the registration, and **no write of the second
|
|
169
|
-
/// repair is ever performed** (`PIN-4` (i): *"A pair may land AT MOST ONE REPAIR in a construction"*). The
|
|
170
|
-
/// `cycled` mark records that the refusal was a CYCLE, and the sweep converts it to rank `20`.
|
|
171
|
-
/// * **THE BIT IS SET AND THIS ASK IS INSIDE THE SAME REGISTRATION CALL** (`suppress` false, which is the
|
|
172
|
-
/// carry's own round) — the outcome crosses whole: **the re-run's cycle arm is the KERNEL's**
|
|
173
|
-
/// (`kernel-registration.mjs`'s `CYCLE_ARM`), so the within-call cycle refuses at rank `20` from the frame
|
|
174
|
-
/// that owns the attempt, and the shipped `KC` reading of every other refusing arm is unmoved.
|
|
175
|
-
///
|
|
176
|
-
/// **AND A PAIR ASKED AGAIN THAT PASSES IS NOT A CYCLE** (`D-125` item 4: *"asking is not repairing"*): an outcome
|
|
177
|
-
/// that is `true` carries no `repair` and crosses untouched, which is what makes an inconsistent result
|
|
178
|
-
/// decidable at all.
|
|
179
|
-
///
|
|
180
|
-
/// **⟶ AND THE TRANSFORM IS TAKEN ONLY WHERE THE KERNEL READS THE OUTCOME AS ITS MESSAGE ARM — THE GATE 4 DEFECT
|
|
181
|
-
/// THIS CLAUSE CLOSES.** The kernel takes an outcome's `repair` ONLY where `message` is an OWN member
|
|
182
|
-
/// (`kernel-registration.mjs`'s `Object.hasOwn(outcome, 'message')` guard; `kernel-attempt.mjs`'s three-arm read),
|
|
183
|
-
/// and **every other object is the corpus's own `VA-11` arm — a value outside the three declared arms, read as the
|
|
184
|
-
/// `{message}` arm and never as one of its own** (`PAR-C-5`). So a body that answers `{ repair }` and no `message`
|
|
185
|
-
/// registers NO repair at any instant the shipped tree asks it. **THE REBUILT OUTCOME INVENTED THAT MEMBER**: it
|
|
186
|
-
/// handed the kernel `{ message: undefined, repair }`, which is an OWN-message outcome carrying a repair, so **one
|
|
187
|
-
/// body's one outcome read one way at a creation and the other way at `addConstraint` — the pair repaired at the
|
|
188
|
-
/// creation and ran nothing at the registration, on the same bytes.** **THE FIX IS THE TEST THE KERNEL MAKES**: the
|
|
189
|
-
/// own `message` is read FIRST, and where it is absent the outcome crosses UNTOUCHED — **no member the body did not
|
|
190
|
-
/// return is added, no marker is set (a repair that is never handed over is never invoked), and the suppression
|
|
191
|
-
/// below is reachable only on an outcome that carries a repair the kernel would actually run.** That is what makes
|
|
192
|
-
/// the guard's own claim — *it answers EXACTLY what that body answered* — true at every instant.
|
|
193
|
-
///
|
|
194
|
-
/// **NO MEMBER IS MINTED AND NO STATE IS MINTED BEYOND THE BIT**: the marker is a local row, the scope object is
|
|
195
|
-
/// the construction's own, and **the outcome crossing the transforming arm carries EXACTLY the body's own `message`
|
|
196
|
-
/// and its wrapped `repair` — the two members the kernel reads, and never a third it would have to ignore.**
|
|
197
|
-
function sweepGuarded(body, marker, sweep, suppress) {
|
|
198
|
-
return function sweepGuardedBody(context) {
|
|
199
|
-
const outcome = body(context);
|
|
200
|
-
// **THE SCOPE IS THE SWEEP'S: ONCE IT ANSWERS, THE CALLER'S BODY HAS THE INSTANT TO ITSELF** (the defect
|
|
201
|
-
// closed at the head of this block).
|
|
202
|
-
if (sweep.live !== true) return outcome;
|
|
203
|
-
if (outcome === null || typeof outcome !== 'object') return outcome;
|
|
204
|
-
// **THE KERNEL'S OWN ARM TEST, TAKEN HERE SO THE GUARD CANNOT WIDEN IT** (`VA-11`; see the clause above).
|
|
205
|
-
if (Object.hasOwn(outcome, 'message') !== true) return outcome;
|
|
206
|
-
const repair = ownValue(outcome, 'repair');
|
|
207
|
-
if (typeof repair !== 'function') return outcome;
|
|
208
|
-
if (suppress === true) {
|
|
209
|
-
marker.cycled = true;
|
|
210
|
-
return { message: ownValue(outcome, 'message') };
|
|
211
|
-
}
|
|
212
|
-
return {
|
|
213
|
-
message: ownValue(outcome, 'message'),
|
|
214
|
-
repair: function guardedRepair(record) {
|
|
215
|
-
marker.applied = true;
|
|
216
|
-
return repair(record);
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/// **WHETHER TWO ADDRESSES ARE THE SAME ADDRESS** — segment for segment, by value, with no join and no spelling.
|
|
223
|
-
/// The creation's delivery groups the adopted elements BY ADDRESS (`PIN-6` (i)), so the grouping's equality is
|
|
224
|
-
/// taken here once rather than re-derived per comparison.
|
|
225
|
-
function sameSegments(first, second) {
|
|
226
|
-
if (!Array.isArray(first) || !Array.isArray(second)) return false;
|
|
227
|
-
if (first.length !== second.length) return false;
|
|
228
|
-
for (let i = 0; i < first.length; i += 1) {
|
|
229
|
-
if (first[i] !== second[i]) return false;
|
|
230
|
-
}
|
|
231
|
-
return true;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/// **AN ADDRESS'S OWN BARE SPELLING — segments joined by `/`, no quoting** — the `<SEGMENT>` slot the store's
|
|
235
|
-
/// generator takes (`§8.2`, and `kernel-registration.mjs`'s `registrationRefusal` spells the same way). The
|
|
236
|
-
/// generator quotes the subject it is handed, so a quoted spelling here would render `''a''`.
|
|
237
|
-
function spellAddressBare(address) {
|
|
238
|
-
let spelled = '';
|
|
239
|
-
for (let i = 0; i < address.length; i += 1) {
|
|
240
|
-
spelled += i === 0 ? String(address[i]) : `/${String(address[i])}`;
|
|
241
|
-
}
|
|
242
|
-
return spelled;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/// **WHETHER AN ADDRESS RESOLVES IN THE REGISTER** — `PIN-7`'s qualifier, read at the store's own `read`.
|
|
246
|
-
///
|
|
247
|
-
/// **`AddressNotFound` IS THE ONE ABSENT ANSWER** (`PIN-7`: *"a listener whose watched address does not resolve
|
|
248
|
-
/// is not fired, and that is not a refusal"*): every OTHER answer counts as present — a value, and the store's own
|
|
249
|
-
/// `ReadTargetIsBranch` for an address a CONTAINER stands at, which is present and is exactly what `PIN-7`
|
|
250
|
-
/// distinguishes from absent. **NOTHING IS MINTED, NO LOG ENTRY IS APPENDED AND NOTHING IS THROWN**; the read is
|
|
251
|
-
/// the construction's own act and opens no commit.
|
|
252
|
-
function registerHolds(state, address) {
|
|
253
|
-
try {
|
|
254
|
-
state.receiver.read(address);
|
|
255
|
-
return true;
|
|
256
|
-
} catch (refused) {
|
|
257
|
-
return ownValue(refused, 'status') !== 'AddressNotFound';
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/// **A LISTENER BODY'S THROW AT A REGISTRATION INSTANT, REFUSED AT RANK `21` `ListenerBodyThrew`** (`PIN-10`;
|
|
262
|
-
/// `D-124` item 2, the minted member). **THE SENTENCE IS THE STORE'S GENERATOR'S** (`§8.2`'s row for the member)
|
|
263
|
-
/// **AND THE CLAUSE IS THIS PACKAGE'S**, appended as every boundary refusal appends one: **the body's own
|
|
264
|
-
/// throwable is the caller's and is never rendered as this package's text.** **NO ROLLBACK COMPOSES AND NOTHING
|
|
265
|
-
/// IS WITHDRAWN** (`PIN-10`: the delivery sits after the saves), and the member this refusal crosses with is the
|
|
266
|
-
/// store's own closed set's — the package carries it and mints nothing (`DD-40`).
|
|
267
|
-
function listenerBodyRefused(address) {
|
|
268
|
-
boundaryReject(
|
|
269
|
-
'ListenerBodyThrew',
|
|
270
|
-
spellAddressBare(address),
|
|
271
|
-
'the listener body threw at the registration instant, and the throwable it raised is its own and refuses the act instead of crossing as itself',
|
|
272
|
-
'listeners',
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/// **THE CREATION'S AND THE BOOT'S DELIVER — THE ADOPTED SET ∩ THE ADDRESSES THAT RESOLVE** (`PIN-6` (i), (iii),
|
|
277
|
-
/// (iv); `PIN-2`; `D-123` item 2; `D-125` item 1).
|
|
278
|
-
///
|
|
279
|
-
/// **ONE `deliver` CALL PER ADDRESS, IN CREATION ORDER, WITH THE RUNNING HANDLE LIST HELD ACROSS THE CALLS** — the
|
|
280
|
-
/// reversal's own mechanism, spelled here as it stands at `constraints.mjs:3009`–`:3037` — so **an identity two
|
|
281
|
-
/// addresses would fire fires ONCE, at the first address that names it** (`PIN-6` (iii); `surface.md §2.4` rule
|
|
282
|
-
/// 3), and `deliver`'s own snapshot, dedupe and one-invocation rules are unmoved.
|
|
283
|
-
///
|
|
284
|
-
/// **THE ONE ARGUMENT IS THE LISTENER'S OWN WATCHED ADDRESS** (`PIN-6` (iv); `Q-3`'s default) — the address the
|
|
285
|
-
/// call is made for — and **an address that does not resolve is SILENT** (`PIN-7`): no invocation, no code, no log
|
|
286
|
-
/// entry and no throw, with the construction returning its instance.
|
|
287
|
-
///
|
|
288
|
-
/// **A FIRED BODY'S THROWABLE REFUSES THE CONSTRUCTION AT RANK `21`** (`PIN-10`; `D-124` item 2): the instance
|
|
289
|
-
/// does not exist, **no rollback composes** (the saves the registrations' own closes made already stand —
|
|
290
|
-
/// `PIN-12`), and the refusal crosses through `listenerBodyRefused` above. **AN EMPTY SET IS A COUNT OF ZERO AND
|
|
291
|
-
/// NOT SILENCE** (`PIN-6` (v)): a construction that adopted nothing, or whose adopted addresses all fail to
|
|
292
|
-
/// resolve, delivers nothing and answers its instance.
|
|
293
|
-
function deliverAtTheCreation(state, adopted) {
|
|
294
|
-
const delivered = [];
|
|
295
|
-
for (let position = 0; position < adopted.length; position += 1) {
|
|
296
|
-
const watched = adopted[position].address;
|
|
297
|
-
let named = false;
|
|
298
|
-
for (let earlier = 0; earlier < position; earlier += 1) {
|
|
299
|
-
if (sameSegments(adopted[earlier].address, watched)) {
|
|
300
|
-
named = true;
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
// ONE CALL PER ADDRESS: the FIRST adopted element that watches it is the call's own position.
|
|
305
|
-
if (named === true) continue;
|
|
306
|
-
if (registerHolds(state, watched) !== true) continue;
|
|
307
|
-
const owed = [];
|
|
308
|
-
for (let each = position; each < adopted.length; each += 1) {
|
|
309
|
-
if (sameSegments(adopted[each].address, watched) !== true) continue;
|
|
310
|
-
const handle = adopted[each].handle;
|
|
311
|
-
let seen = false;
|
|
312
|
-
for (let matched = 0; matched < delivered.length; matched += 1) {
|
|
313
|
-
if (delivered[matched] === handle) {
|
|
314
|
-
seen = true;
|
|
315
|
-
break;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
if (seen === true) continue;
|
|
319
|
-
appendOwn(delivered, handle);
|
|
320
|
-
// **THE ELEMENT `deliver` READS**: the identity it resolves and the watched address it is handed, and no
|
|
321
|
-
// address of the store's own — a bare `{address, handle}` record, which is the store's own set's shape.
|
|
322
|
-
appendOwn(owed, { address: watched, handle });
|
|
323
|
-
}
|
|
324
|
-
if (owed.length === 0) continue;
|
|
325
|
-
try {
|
|
326
|
-
deliver(state, owed, watched);
|
|
327
|
-
} catch (thrown) {
|
|
328
|
-
listenerBodyRefused(watched);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
return undefined;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/// `docs/specs/storeroom-js/surface.md §2.1`: `storeCreate(cfg)` takes ONE plain object carrying the store's FOUR declared keys, passes them
|
|
335
|
-
/// through WITHOUT adding a default, a rename or a fifth key (`DD-36`) — **the as-filed *"THREE declared
|
|
336
|
-
/// keys … a fourth key"* is read THROUGH this re-spelling, at `docs/specs/storeroom-js/surface.md §2.1`'s `cfg` block dated 2026-10-15 and its
|
|
337
|
-
/// dated clause of 2026-10-16, and a CALLER-SUPPLIED key beyond the four is IGNORED, never refused
|
|
338
|
-
/// (`contract.md §7.1`; `§8.1`'s complement)** — and **never returns a partial instance** — it throws the
|
|
339
|
-
/// single failure form instead. **⟶ `docs/specs/storeroom-js/surface.md §2.1`'s dated clause (a), LANDED 2026-10-11
|
|
340
|
-
/// BY THE `Q1` CONTRACT AMENDMENT, RE-DERIVES THE MEMBER FIGURE THIS SENTENCE CARRIED: *"the object it
|
|
341
|
-
/// returns carries EXACTLY the one own member `surface.md §2.4` item 5 (a) declares, and not one member
|
|
342
|
-
/// beside it"* STANDS BYTE-FOR-BYTE ABOVE AND IS READ THROUGH THIS CLAUSE — from this date the member set
|
|
343
|
-
/// is `{ register, on, off }`, THREE OWN MEMBERS AND NOTHING ELSE — **⟶ AND THAT FIGURE IS RE-SPELLED IN PLACE, 2026-10-16 BY THE FILE-TIER-SAVE COMMENT PASS: *"THREE OWN MEMBERS"* IS THE 2026-10-11 FIGURE OF THE CLAUSE ABOVE AND NOT THE OPERATIVE ONE, WHICH IS `{ register, on, off, settle }`, FOUR OWN MEMBERS AND NOTHING ELSE** — the fourth being the `A116` ORDERING SEAM, the ONE member the KERNEL calls and the entry implements (`docs/decisions.md` `A116` (D1): the set *"opens by ONE clause"* to carry it; (D3): the lift is NARROW, so NO FIFTH member; its own home is `surface.md §2.4` item 9, and a CALLER's addressable sub-surface stays the three there declared), the count read at `surface.md §2.7` item 8 AS AMENDED (the as-filed `{register, on, off}` there is *"SUPERSEDED AS FIGURES"* and reads `{register, on, off, settle}`), at `§2.11` clause 7, and by the live battery's `FTS-12.1`, whose members are exactly those four. And `docs/specs/storeroom-js/surface.md §2.4` item 5 (a)'s *"one own
|
|
344
|
-
/// member"* is superseded AS A MEMBER-SET FIGURE at its own `§` by the same amendment (`surface.md §2.11` clause 7: *"the instance's member set stays `{ register, on, off, settle }`"*).** **THE MODULE
|
|
345
|
-
/// NAMESPACE IS UNMOVED at the eight declared verbs: neither new member is a named export, because both
|
|
346
|
-
/// are reached through THIS factory's own product and through nothing else** (`surface.md §2.1`'s dated
|
|
347
|
-
/// clauses (a)–(b); `A79`).
|
|
348
|
-
export function storeCreate(cfg) {
|
|
349
|
-
const addon_ = withAddon();
|
|
350
|
-
// **⟶ THE CONSTRUCTION'S OWN READ OF THE CALLER'S `cfg` STANDS OUTSIDE THE BOUNDARY'S CATCH — CORRECTED
|
|
351
|
-
// 2026-10-17 (`A64`'s one form read with `surface.md §2.5` item 5 (e); the ruling *"catch a throw from a
|
|
352
|
-
// repair and encapsulate the message to distinguish forgeries"*).**
|
|
353
|
-
//
|
|
354
|
-
// **THE DEFECT IT CLOSES, NAMED AT ITS BYTES: the walk below READS THE CALLER'S OWN PROPERTIES — `cfg`'s
|
|
355
|
-
// four declared keys by `Object.hasOwn` and by the member reads `encodeConfig` performs — so a `cfg`
|
|
356
|
-
// carrying an own ACCESSOR is a caller's own body, and a `get` that THROWS is a CALLER'S OWN THROWABLE.
|
|
357
|
-
// While this read stood INSIDE the `try`, that throwable reached `fail`, which constructs THE STORE'S
|
|
358
|
-
// SINGLE FORM out of whatever it is handed: `storeCreate({ journalLength: 64, listeners: [],
|
|
359
|
-
// get constraints() { throw { status: 'AddressMalformed', message: 'FORGED BY THE CALLER' } } })` answered
|
|
360
|
-
// `{"status":"AddressMalformed","message":"FORGED BY THE CALLER"}` — A CALLER-CHOSEN STATUS CARRIED AS
|
|
361
|
-
// THIS STORE'S OWN REFUSAL — a thrown `TypeError` answered `{status: undefined, message: '…'}`, a thrown
|
|
362
|
-
// bare string lost its message entirely, and a thrown `undefined` or `null` made the read itself fault on
|
|
363
|
-
// `refusal.status`. **THE DEFECT WAS NEVER *"a caller can forge a status"* BUT *"A CALLER'S OWN EXCEPTION
|
|
364
|
-
// IS CAUGHT AND RE-SHAPED BY A PATH THAT ASSUMES IT IS THE STORE'S."**
|
|
365
|
-
//
|
|
366
|
-
// **THE FIX IS THE SCOPE AND NOT A NEW FORM: the walk that READS THE CALLER'S OWN VALUES stands outside
|
|
367
|
-
// the catch, so the caller's own body's throwable PROPAGATES AS ITSELF — the same value, wearing no member
|
|
368
|
-
// this unit minted and no status of the store's closed set — while `fail` is reached on this path by THE
|
|
369
|
-
// ADDON'S OWN REFUSAL ALONE, which is the ONE provenance `docs/specs/storeroom-js/surface.md §2.5`'s two-member form belongs to.** **AND THE
|
|
370
|
-
// CLAUSE THIS IMPLEMENTS IS `surface.md §2.5` ITEM 5 (e)'s OWN RULE CARRIED TO THIS SITE** — *"a rejection
|
|
371
|
-
// is NEVER A RAW HOST ERROR — a `TypeError` … a string thrown, or any host object escaping from the
|
|
372
|
-
// boundary's own frame is a FINDING at whatever site produced it, not a rejection"* — read with
|
|
373
|
-
// `kernel-surface.md §2.3` item 1's body-throw clause, which fixes the SAME disposition for the two
|
|
374
|
-
// caller-side functions this unit registers: **a caller's body's throwable is *"NOT a kernel state and NOT
|
|
375
|
-
// a store state"* and reaches the caller UNCHANGED.** **NO CODE, NO MEMBER AND NO MESSAGE MOVES ON ANY ARM
|
|
376
|
-
// THE CALLER'S `cfg` IS LAWFUL: where `encodeConfig` RETURNS, this function's boundary call, its catch and
|
|
377
|
-
// `fail` are the bytes they were.**
|
|
378
|
-
const encoded = encodeConfig(cfg);
|
|
379
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
380
|
-
// **⟶ STEP 2 OF THE CONSTRUCTION'S ACT ORDER — THE BATCH'S MEMBER CHECKS, ADDED 2026-10-24 (`D-26`, `D-27`;
|
|
381
|
-
// `docs/L1/surface-deltas.md` §3.1).** (`B-1` the function check, `B-2` the within-batch uniqueness check,
|
|
382
|
-
// `B-3` the cross-kind check against the construction's adopted listeners, per element and ascending.)
|
|
383
|
-
//
|
|
384
|
-
// **WHERE IT SITS, AND WHY THE POSITION IS THE RULING'S AND NOT A PREFERENCE.** Every check **precedes any
|
|
385
|
-
// filesystem act**, and **the construction's FIRST filesystem act is inside `addon_.storeCreate(encoded)`**
|
|
386
|
-
// — `encodeFilePath` class-tests the value and the path probe is the store's. **So this is the last instant
|
|
387
|
-
// at which a refusal can leave nothing behind**, which §10.4 part 5 requires (*"every construction that
|
|
388
|
-
// fails leaves nothing behind"*), and a check placed in the arming loop below would refuse AFTER the
|
|
389
|
-
// exclusive create had left the store's own zero-length file on disk.
|
|
390
|
-
//
|
|
391
|
-
// **AND IT IS WHY STEPS 5 AND 6 COMMUTE.** Under `D-22`/`D-24` the pair's home entry is created under the
|
|
392
|
-
// caller's own `id`, and `listen`'s purge is total over the entries the handle names — so a batch `id` equal
|
|
393
|
-
// to an adopted listener's `handle` would have made the order of step 5 and step 6 a correctness matter,
|
|
394
|
-
// whichever ran second purging the first. **Step 2 removes the colliding state before either act runs, so
|
|
395
|
-
// that order becomes unobservable and stays as filed** (`D-26`'s open question, answered by `D-27` as *"an
|
|
396
|
-
// information dependency"* rather than as a sequence).
|
|
397
|
-
//
|
|
398
|
-
// **THE VALUE IT ANSWERS IS THE ADMITTED LIST — ONE ENTRY PER ELEMENT THE STORE WOULD ADMIT, CARRYING THE
|
|
399
|
-
// FORWARDED `constraint` MEMBER — AND IT IS WHAT STEP 5 ARMS.** `D-26` item 3: *"the boundary carries the
|
|
400
|
-
// PAIR and the package arms the SUBSTANCE"*; `D-27` item 1: *"Functions are armed"*.
|
|
401
|
-
const batch = admittedConstraintBatch(cfg);
|
|
402
|
-
// **⟶ AND STEP `2`'S SECOND WALK, BESIDE IT AND FOR THE SAME REASON — `PIN-8`, `PIN-9`, `D-123` item `2`,
|
|
403
|
-
// 2026-11-06.** **A `cfg.listeners[]` ENTRY THAT CARRIES NO FUNCTION IS REFUSED HERE, BEFORE ANY FILESYSTEM
|
|
404
|
-
// ACT** — so no file is ever created for it (`contract.md §10.4` part `5`) — in the form this position already
|
|
405
|
-
// answers with (`AddressMalformed` naming `listeners`, `frame.mjs`'s own `boundaryReject`, and NO CODE IS
|
|
406
|
-
// MINTED FOR IT). **THE VALUE IT ANSWERS IS THE ADOPTED LIST — ONE ENTRY PER ELEMENT THE STORE WOULD ADMIT,
|
|
407
|
-
// CARRYING THE FORWARDED `listener` MEMBER — AND IT IS WHAT THE ARMING WALK BELOW ARMS**: the element's third
|
|
408
|
-
// member never crosses (`frame.mjs`'s projection strips it) and **THE PACKAGE ARMS THE SUBSTANCE**, so the
|
|
409
|
-
// adopted handle holds a body from the instant the instance exists.
|
|
410
|
-
const adopted = admittedListenerBatch(cfg);
|
|
411
|
-
let id;
|
|
412
|
-
try {
|
|
413
|
-
id = addon_.storeCreate(encoded);
|
|
414
|
-
} catch (refusal) {
|
|
415
|
-
// **`D-77`'s `null` ARM**: the construction's own refusal is about a `cfg`, an artefact or a store path
|
|
416
|
-
// and never about an act at an address, so the member is present and names nothing.
|
|
417
|
-
fail(refusal);
|
|
418
|
-
}
|
|
419
|
-
// **ONE HANDLE PER TOKEN PER INSTANCE**: the map is read in BOTH directions, so a token the store
|
|
420
|
-
// returns twice (a lawful duplicate, `docs/specs/storeroom-js/surface.md §2.4` rule 3) reaches the caller as the SAME opaque value.
|
|
421
|
-
// **THE PACKAGE'S OWN REGISTRY, ONE PER INSTANCE** (`surface.md §2.4`): the opaque handle -> the
|
|
422
|
-
// caller's FUNCTION. **`unlisten` withdraws the store-side home entry and NEVER the function** (`docs/specs/storeroom-js/surface.md §2.4`
|
|
423
|
-
// rule 4, `DD-15`), so `unlisten` removes no entry, and a re-registration of a handle REPLACES its entry
|
|
424
|
-
// (rule 2, never a fan-out). **⟶ AND `off` — the ONE declared member that DOES remove an entry —
|
|
425
|
-
// removes THE ONE THE HANDLE NAMES** (`docs/specs/storeroom-js/surface.md §2.4` item 7 (b); `DD-53`), while the instance's own state is
|
|
426
|
-
// still released with the instance and by nothing else (`DD-17`; `A74`: `off` is not a release verb).
|
|
427
|
-
// **⟶ AND `withheld` IS GONE WITH THE ADOPTION MACHINERY, 2026-10-18** (`docs/specs/storeroom-js/surface.md §2.4` item 9's
|
|
428
|
-
// adoption-machinery clause, whose item `(i)` disposes of this very name: *"the WITHHOLD as a declared
|
|
429
|
-
// STATE is WITHDRAWN WITH THE MEMBER THAT HELD IT"*). **NO WRITE-IN-FLIGHT SET, NO LEDGER AND NO DELIVERED
|
|
430
|
-
// MARK STANDS ON THIS INSTANCE**: the kernel drives every write and its terminal arm is the delivery's one
|
|
431
|
-
// instant, so the entry has nothing to withhold.
|
|
432
|
-
// **`constraints` IS THE ENTRY'S OWN REGISTRY OF THE PAIRS IT CARRIES** (`surface.md §2.12` item 1's
|
|
433
|
-
// preamble clause (a)–(b)): keyed by `(address, id)`, holding the pair's element and ITS address's own
|
|
434
|
-
// spelling. **⟶ FROM 2026-10-18 IT IS A READ MODEL AND NOTHING MORE** (`docs/specs/storeroom-js/surface.md §2.12` item 1's amended clause
|
|
435
|
-
// (iii)): the write path reads the STORE'S OWN `triggered` set and the KERNEL'S registry, and **NO
|
|
436
|
-
// WRITE-PATH BRANCH OF THIS FILE IS TAKEN ON THIS MAP'S CONTENTS** — its one reader is `a.constraints()`.
|
|
437
|
-
// **IT IS POPULATED BY THE ONE ACT BOTH ROUTES REACH AND BY NOTHING ELSE** (`carryConstraint` below), and
|
|
438
|
-
// **`leg` IS THE SLOT THE NESTED FOUR-POSITION CALL THE KERNEL'S STORE LEG MAKES LEAVES ITS OWN RETURNED
|
|
439
|
-
// RECORD IN**, so that a kernel-driven write answers the record its own write returned rather than a copy
|
|
440
|
-
// of it (`docs/specs/storeroom-js/surface.md §2.12` item 1's stage 2).
|
|
441
|
-
//
|
|
442
|
-
// **⟶ AND THE ADOPTION MACHINERY IS REMOVED WHOLE, 2026-10-18** (`docs/specs/storeroom-js/surface.md §2.4` item 9's adoption-machinery
|
|
443
|
-
// clause, the three architect's rulings of that date): **`withheld`, `adopted`, `answered` and `delivered`
|
|
444
|
-
// are GONE WITH `settle`**, because they existed only to marshal ONE delivery BETWEEN TWO ACTORS — a
|
|
445
|
-
// caller who made a bare write and a kernel which drove the other. **RULINGS `(2)` AND `(3)` LEAVE ONE
|
|
446
|
-
// ACTOR**: the kernel drives every write, so there is nothing to marshal and the machinery has no state to
|
|
447
|
-
// hold. **THIS IS WHERE THE DOWNSTREAM `DEF-D` DEFECT LIVED** — an abandoned adoption consumed by the next
|
|
448
|
-
// unrelated write — and its SUBSTRATE, not its symptom, is what this removal takes.
|
|
449
|
-
// **⟶ `state.tokens` IS DELETED AND `state.registry` TAKES THE ONE MAP'S SHAPE — `U-STOREROOM-HELD-LISTENER-IDENTITY`.**
|
|
450
|
-
// **THE ONE MAP IS `Map<handle, {fn, off}>`, KEYED BY THE HANDLE STRING** (`identity-and-domain.md §4` item
|
|
451
|
-
// 5; `P: docs/pending.md · P-6`, fork (d): *"the map becomes `Map<handle, {fn, off}>`, keyed by the identity
|
|
452
|
-
// the addon also holds"*; `P: docs/pending.md · (AD-1)`: the value record is `{ fn, off }` *"and nothing
|
|
453
|
-
// else. There is no `token` property"*). **`state.home` SURVIVES AS THE MIRROR** — its column is now the
|
|
454
|
-
// CALLER'S OWN HANDLE and not a token (`identity-and-domain.md §1` item 2 (ii)) — **and `state.constraints`
|
|
455
|
-
// stays the read model.**
|
|
456
|
-
// **⟶ AND `establishing` IS DELETED 2026-11-01 (`D-99`'s ANSWERED clause; `C-18`, §9.3), SO THIS MEMBER'S
|
|
457
|
-
// OWN SEVEN-OCCURRENCE CENSUS CLOSES AT ZERO.** The clause that stood here declared a marker — *"the `id` of
|
|
458
|
-
// the pair the kernel is right now registering, and nothing else"* — and named its purpose as *"how `B-6`'s
|
|
459
|
-
// cross-kind test still knows the act is a CONSTRAINT's own registration and not a listener's"*. **BOTH
|
|
460
|
-
// SENTENCES ARE WITHDRAWN, AND THEY STAND AS TEXT READ THROUGH THIS ONE:** the act that needed the exemption
|
|
461
|
-
// **does not pass the test at all** any more, because the kernel's registration reaches the store through its
|
|
462
|
-
// OWN ROUTE (`LISTEN_ROUTE`, `delivery.mjs`'s `listenOn`) and the cross-kind test lives on the CALLER's
|
|
463
|
-
// members and nowhere else. **SO: NO MARKER LANDS, NO BRACKET LANDS AT ANY OF THE FOUR SITES, AND `Q-1`'S
|
|
464
|
-
// RESIDUAL (`docs/L1/cross-kind-handle-only.md` §7) DISAPPEARS WITH THE MARKER RATHER THAN BEING ACCEPTED OR
|
|
465
|
-
// TIGHTENED** — a constraint body that calls `listen('<its own pair id>', …)` during its own registration is
|
|
466
|
-
// now refused at `B-6` exactly as any caller's act is.
|
|
467
|
-
const state = {
|
|
468
|
-
home: [], registry: new Map(), constraints: new Map(), leg: null, receiver: null,
|
|
469
|
-
// **⟶ AND THE RESIDUE'S DELIVERER, ADDED 2026-10-29 — A PRIVATE FACT ABOUT WHICH ACT OWNS A LEG'S
|
|
470
|
-
// DELIVERY.** The terminal arm performs `surface.md §2.7` item 7's delivery for a kernel-driven WRITE
|
|
471
|
-
// (`delivery.mjs`'s `terminalArm`), and it is the delete's OWN member that performs it (`D-49` declared that
|
|
472
|
-
// delivery the window whose check never ran, and this build does not move it). **IT IS A VALUE OF THE
|
|
473
|
-
// PACKAGE'S OWN STATE AND NOT A MEMBER OF ANY RECORD** (`surface.md §2.1` (e) item 1: a record, a commit
|
|
474
|
-
// and a Map are never own members of the product): `'arm'` on every path that does not say otherwise, and
|
|
475
|
-
// `'member'` for the instant a `delete` stands in, restored in the same `finally` as the leg itself.
|
|
476
|
-
legDelivery: 'arm',
|
|
477
|
-
// **⟶ AND THE TWO VALUES THE REGISTRATION INSTANTS' DELIVERY OWES — `D-125` ITEM `1`, 2026-11-06.**
|
|
478
|
-
// **`registrationDelivery` SAYS WHICH SET THE INSTANT IN HAND DELIVERS**: `'adopted'` for the construction
|
|
479
|
-
// and a boot — `PIN-6` (i)'s adopted ∩ existing, delivered by `storeCreate`'s own seat below — and
|
|
480
|
-
// `'triggered'` for `addConstraint` and a re-arm, where `PIN-6` (ii) makes the set *"THE STORE'S OWN
|
|
481
|
-
// `triggered`"* and `delivery.mjs`'s registration-delivery channel delivers it from the registration's own
|
|
482
|
-
// passing close. **A VALUE OF THE PACKAGE'S OWN STATE AND NOT A MEMBER OF ANY RECORD**, exactly as
|
|
483
|
-
// `legDelivery` above is.
|
|
484
|
-
registrationDelivery: 'adopted',
|
|
485
|
-
// **AND THE SLOT A FIRED BODY'S THROWABLE WAITS IN** (`PIN-10`, `Q-13`): the channel catches it rather than
|
|
486
|
-
// raising it through the kernel's frames, and the ACT that called the registration converts it into rank
|
|
487
|
-
// `21` `ListenerBodyThrew` before it answers. `null` on every arm that delivered cleanly.
|
|
488
|
-
listenerFailure: null,
|
|
489
|
-
};
|
|
490
|
-
// **⟶ THE RECEIVER IS THE STORE OBJECT ITSELF, AND THE INTEGER THE PACKAGE USED TO HAND ACROSS IS NOT
|
|
491
|
-
// HANDED AT ALL** (`receiver-and-refusal.md §1`; `js-unwrap.md §4`). The addon resolves its store from the
|
|
492
|
-
// receiver, reading the index the package published as the object's own NON-ENUMERABLE row (`STORE_INDEX`
|
|
493
|
-
// below) — so **`state.id` HAS NO SITE LEFT IN THIS FILE**, and the object IS the carrier.
|
|
494
|
-
//
|
|
495
|
-
// **AND THE ARGUMENT THAT USED TO BE THE INTEGER IS NOT REPLACED BY A DIFFERENT ONE ON A DIFFERENT
|
|
496
|
-
// CHANNEL:** the addon's per-verb entries read the store from position `0` of the call array, and position
|
|
497
|
-
// `0` is this object. **NO ENTRY CARRIES A LEADING INSTANCE POSITION** (`export-set-and-dispatch.md §4`).
|
|
498
|
-
const instance = {
|
|
499
|
-
/// **`surface.md §2.4` item 9 (f)'s clause of 2026-10-18 — THE PRODUCT'S DECLARED MEMBER SET IS FIFTEEN
|
|
500
|
-
/// OWN MEMBERS, `10 + 1 + 1 + 2 + 1 = 15` ✓: THE TEN METHODS, `register`, `constraints`, THE TWO REMOVAL MEMBERS AND `readTiered`.** **`settle` IS
|
|
501
|
-
/// REMOVED WHOLE** (`REMOVED-WHOLE`, item 9's pointer of that date): the member set moved `13 → 12`, and
|
|
502
|
-
/// **THE TWO REMAINING SINGLES ARE NAMED** because *"a lone `+1` would not compute"* — the first `1` is
|
|
503
|
-
/// `register` and the second is `constraints`, the registered-constraint read. Each is reached through
|
|
504
|
-
/// THIS factory's own product alone (`package.md §1.3` item 3): the module namespace carries ONE name,
|
|
505
|
-
/// `storeCreate` (`docs/specs/storeroom-js/surface.md §2.9` item 1's `A127` clause; `11 → 1` ✓, and *"a deprecation window"* is declared
|
|
506
|
-
/// away at that clause on `A128`'s fiat), so NO member below is a named export and the ten
|
|
507
|
-
/// store-reaching names have no second spelling at any layer.
|
|
508
|
-
/// **THE STATE STAYS PRIVATE** (`docs/specs/storeroom-js/surface.md §2.1` (e) item 1): `state` below is this factory's own closure and is
|
|
509
|
-
/// keyed in `INSTANCES` — NO own member is store data, a record, a Map, a Set, a tier, an address, a
|
|
510
|
-
/// handle or a commit, and the fifteen members above are the whole of what a caller sees. **⟶ CORRECTED 2026-11-06: this clause printed `twelve`, `10 + 1 + 1 = 12`, and was stale twice over at that print — the held-listener-identity unit's `12 → 14` move of 2026-10-19 added `removeListener` and `removeConstraint`, and `U-STOREROOM-TIER-READOUT`'s `readTiered` takes the set `14 → 15`; the operative figures are `index.d.ts`'s `StoreInstance` and `surface.md §2.4` item 9 (f), and NO CODE LINE MOVES WITH THIS CORRECTION.**
|
|
511
|
-
/// **`on` AND `off` ARE MERGED AWAY AND ARE NOT MEMBERS** (`A127`): the listener registration route is
|
|
512
|
-
/// `listen` + `register` and its withdrawal is `unlisten`, exactly as the seven store-reaching methods
|
|
513
|
-
/// and `register` below spell them.
|
|
514
|
-
// ⟶ MOVED 2026-10-18 (`RCA-8(g)`, gate-4 finding F-1): the `A127` region header stood here, above the free-function list `P-8` deleted, and its second half — the call-arity sentence that named the receiver's argument count `n`, and the arity-fold sentence that read the `n`-as-written folds against that count minus one — is falsified by that merge: no such `n` binding exists on this object and no function stands below. Bytes: archive/p8-merge/2026-10-18/post-gate4/region-header-live.md (pre-move copy: archive/p8-merge/2026-10-18/blocks/region-header.md). The `A127` rule it stated stands at this factory's own member doc above.
|
|
515
|
-
/** `docs/specs/storeroom-js/surface.md §2.2`: `read` — a leaf's literal, a branch's assembled value, the empty address's whole register. */
|
|
516
|
-
read(address, tier) {
|
|
517
|
-
// A position the call supplied no value for is handed as the runtime's own `undefined` — NEVER as an
|
|
518
|
-
// absent array slot — so the facade can tell an unsupplied position from a supplied `undefined` and the
|
|
519
|
-
// core is never reached with a null pointer (`crossing.md §1.3`'s absent-versus-`undefined` rule).
|
|
520
|
-
const args = arguments.length >= 1 ? [encodeAddress(address, undefined, 'first argument')] : [];
|
|
521
|
-
// `PAR-JS-6`: a SUPPLIED `undefined` at this position is PRESENT and takes the row's own
|
|
522
|
-
// `AddressMalformed`; the NO-ARGUMENT call is the one that folds to the ABSENT row.
|
|
523
|
-
// **⟶ AND THE ARGUMENT LIST IS EXTENDED BY INDEX, NOT BY `Array.prototype.push`** (`contract.md §2.1`'s
|
|
524
|
-
// clause of 2026-10-24 on `F7-1`, item `(1b)`, and the battery's row `(g)`): the as-built `args.push`
|
|
525
|
-
// was a member of a MUTABLE PROTOTYPE read by every verb, and a caller's `push` answering `0` without
|
|
526
|
-
// copying EMPTIED the carrier list before any verb was reached — so an admitted write answered
|
|
527
|
-
// `AddressMalformed: 'tier' requires a tier argument`. **⟶ AND THE APPEND IS AN OWN-PROPERTY DEFINE AND
|
|
528
|
-
// NOT AN INDEX WRITE, 2026-10-25:** `args[args.length] = …` performs `[[Set]]`, which WALKS THE CHAIN, so
|
|
529
|
-
// a caller's getter-only accessor at `Array.prototype[0]` turned this lawful verb's first append into a raw
|
|
530
|
-
// host `TypeError` (`F8-2`'s write vector). `appendOwn` (`src/entry/refusal.mjs`) defines the own property.
|
|
531
|
-
appendOwn(args, encodeTier(tier, arguments.length >= 2, false, 'first argument'));
|
|
532
|
-
// **⟶ AND THE ENTRY IS INVOKED BY `Reflect.apply`, NEVER BY AN ARGUMENT SPREAD** (`contract.md §2.1`'s
|
|
533
|
-
// clause of 2026-10-24 on `F8-1` and `F8-2`, items `(1b)`, `(1c)` and `(1d)`'s boundary; the cells
|
|
534
|
-
// `JC-TC-64`, `JC-TC-65` and `JC-TC-66`): `…args` reads the local list through
|
|
535
|
-
// `Array.prototype[Symbol.iterator]` BEFORE any verb is reached, so a forged iterator handed `undefined`
|
|
536
|
-
// at every position and an admitted `write` was refused `AddressMalformed` (*"'tier' requires a tier
|
|
537
|
-
// argument"*) — the argument list was the caller's answer. **`Reflect.apply` reads the list BY INDEX**
|
|
538
|
-
// (`CreateListFromArrayLike`: the array's own `length` and its own indices), which is item `(1c)(v)`'s own
|
|
539
|
-
// form, and `Reflect` is a GLOBAL BINDING whose `apply` is its own DATA property — not a prototype member,
|
|
540
|
-
// which is exactly where item `(1d)`'s boundary stops a sweep. No position, no arity fold and no
|
|
541
|
-
// absent-versus-`undefined` answer moves: the entry receives the same list it always received.
|
|
542
|
-
return decodeValue(carryRefusal(() => Reflect.apply(entryOf().read, this, args), args));
|
|
543
|
-
},
|
|
544
|
-
/** `docs/specs/storeroom-js/surface.md §2.2` / `docs/specs/storeroom-js/surface.md §2.9` item 2: `readLiteral` narrows the read to a leaf and answers `ReadTargetIsBranch`. */
|
|
545
|
-
readLiteral(address, tier) {
|
|
546
|
-
const args = arguments.length >= 1 ? [encodeAddress(address, undefined, 'first argument')] : [];
|
|
547
|
-
appendOwn(args, encodeTier(tier, arguments.length >= 2, false, 'first argument'));
|
|
548
|
-
// THE ENTRY IS INVOKED BY `Reflect.apply`, NOT BY A SPREAD — see `read`'s clause of 2026-10-24 above.
|
|
549
|
-
return decodeValue(carryRefusal(() => Reflect.apply(entryOf().readLiteral, this, args), args));
|
|
550
|
-
},
|
|
551
|
-
/** **`D-121-ter` item 5: `readTiered` — `read`'s OWN ARITY AND DECLARED WALK AND REFUSAL SET, WITH THE ANSWER COMPILED** (`U-STOREROOM-TIER-READOUT`, 2026-11-06; `contract.md`'s `PIN-2`). A MEMBER and NEVER a module export: the namespace stays ONE name, `storeCreate` (`PIN-2` (iv)). Its three devices are `read`'s own — the address encoded at the first position, the tier appended by `appendOwn` on the caller's own `arguments.length`, and the entry invoked by `Reflect.apply` — and no byte of `read` or `readLiteral` moves. */
|
|
552
|
-
readTiered(address, tier) {
|
|
553
|
-
// The FIRST device is `read`'s, verb for verb: a position the call supplied no value for is handed as
|
|
554
|
-
// the runtime's own `undefined` — NEVER an absent array slot — and a SUPPLIED `undefined` at the tier
|
|
555
|
-
// position is PRESENT and takes the row's own `AddressMalformed` (`crossing.md §1.3`; `PAR-JS-6`).
|
|
556
|
-
const args = arguments.length >= 1 ? [encodeAddress(address, undefined, 'first argument')] : [];
|
|
557
|
-
// The SECOND device is `read`'s too: the append is an own-property define and not an index write, so a
|
|
558
|
-
// caller's getter on `Array.prototype` cannot turn the append into a raw host `TypeError` (`appendOwn`;
|
|
559
|
-
// `F8-2`'s write vector).
|
|
560
|
-
appendOwn(args, encodeTier(tier, arguments.length >= 2, false, 'first argument'));
|
|
561
|
-
// THE THIRD DEVICE: the entry is invoked by `Reflect.apply`, never by an argument spread, so a forged
|
|
562
|
-
// iterator cannot hand the entry a different list (`F8-1`/`F8-2`; see `read`'s clause).
|
|
563
|
-
return decodeValue(carryRefusal(() => Reflect.apply(entryOf().readTiered, this, args), args));
|
|
564
|
-
},
|
|
565
|
-
write(address, tier, value, commit) {
|
|
566
|
-
// **⟶ THE RECEIVER IS CHECKED HERE, BEFORE EITHER ROUTE IS CHOSEN — `write` IS THE ONE MEMBER WITH TWO
|
|
567
|
-
// OF THEM.** Its three-position call reaches the STORE through the KERNEL (`constraintWrite`) rather
|
|
568
|
-
// than through its own entry, so **a receiver check taken only at the entry would leave the kernel route
|
|
569
|
-
// open to a DETACHED call — and a detached `write` that ANSWERS is exactly `receiver-and-refusal.md §7`'s
|
|
570
|
-
// named regression read backwards** (*"`const { read } = layout; read(…)` IS LEGAL TODAY AND THROWS
|
|
571
|
-
// AFTER THIS CHANGE"*), and `P-SAS-4`'s failure list names *"a success"* as its third term. **THE CHECK
|
|
572
|
-
// IS `§3`'s ONE ARM AND ASKS ONLY WHETHER THE CALL SUPPLIED THE STORE OBJECT AS ITS RECEIVER**: the
|
|
573
|
-
// kernel route is the package's own and still needs the same object, so the route is chosen only after
|
|
574
|
-
// the receiver is known to be one. **NO TOKEN IS MINTED AND NO SECOND FORM IS BUILT** — the entry's own
|
|
575
|
-
// refusal is what answers, reached by handing the receiver on.
|
|
576
|
-
if (!isStoreReceiver(this)) return decodeValue(carryRefusal(() => entryOf().write.call(this), []));
|
|
577
|
-
// **⟶ `§4.1`: `write` OPENS ONE — UNLESS THE CALL NAMES A COMMIT AT THIS METHOD'S FOURTH POSITION, WHICH
|
|
578
|
-
// IS THE DISCRIMINATOR `D-46` SETS: A CALL THAT SUPPLIES IT JOINS THE COMMIT IT NAMES, AND A CALL THAT
|
|
579
|
-
// SUPPLIES NONE OPENS A NEW ONE** (`strata/decisions.md` · `D-46`). **THE POSITION IS READ HERE AND
|
|
580
|
-
// NOWHERE ELSE**, because this member is the one place a call's own entry names a commit: the kernel's
|
|
581
|
-
// store leg is a FOUR-position call (`store.write(address, tier, value, record)`, `kernel-commit.mjs`) and
|
|
582
|
-
// therefore JOINS the commit the caller's three-position write opened, while a caller's plain write, a
|
|
583
|
-
// listener body's write and a constraint body's write all supply three positions and OPEN — the listener's
|
|
584
|
-
// being `D-43` item `1`'s *"its own commit"*, reached by declaration rather than by an authorship the
|
|
585
|
-
// package used to infer. **A SUPPLIED POSITION NAMES A COMMIT WHETHER OR NOT IT IS IN THE POSITION'S CLASS
|
|
586
|
-
// DOMAIN**: the class test below refuses an outside value before any store act, and a refused write
|
|
587
|
-
// releases the bracket in the `finally` below like every other arm.
|
|
588
|
-
// **THE DECREMENT IS ON THE FINAL RETURN TO THE CLIENT** (`closeCommit`), taken in a `finally` so the
|
|
589
|
-
// bracket is released on every arm — a count left standing after a return is on `§5`'s failure list.
|
|
590
|
-
const opened = openCommit(instance, arguments.length >= 4 ? commit : undefined);
|
|
591
|
-
try {
|
|
592
|
-
// **⟶ `docs/specs/storeroom-js/surface.md §2.12` ITEM 1, STAGE 1, AMENDED 2026-10-18 — THE ENTRY→KERNEL EDGE IS UNCONDITIONAL: EVERY
|
|
593
|
-
// FOUR-POSITION WRITE ENTERS THE KERNEL'S `K-2`, AND THE `carriesConstraintAt` GATE THIS VERB ONCE TOOK
|
|
594
|
-
// BEFORE THE CALL IS REMOVED.** The architect's ruling, verbatim: *"Always route to the kernel, because the
|
|
595
|
-
// JS code does not decide whether constraints trigger."* — and its sibling, *"The kernel is always
|
|
596
|
-
// supposed to be in the middle. Any occasion where the write path is not governed by the kernel is a
|
|
597
|
-
// hallucination."* **SO THE JS DECIDES NOTHING ABOUT WHETHER A CONSTRAINT TRIGGERS**: the STORE'S OWN
|
|
598
|
-
// `triggered` SET and the KERNEL'S OWN PAIR-KEYED REGISTRY are the trigger authority (`docs/specs/storeroom-js/surface.md §2.12` item 1's
|
|
599
|
-
// amended clause (iii)), and `state.constraints` is a READ MODEL for `a.constraints()` and for nothing on
|
|
600
|
-
// this path. **AN INSTANCE THAT CARRIES NO PAIR AT THIS ADDRESS STILL ENTERS THE KERNEL**: the pass over an
|
|
601
|
-
// address with no registered pair evaluates NOTHING and PASSES, and the write proceeds to the terminal arm's
|
|
602
|
-
// delivery exactly as `docs/specs/storeroom-js/surface.md §2.7` items 6–7 declare (amended clause (ii)).
|
|
603
|
-
//
|
|
604
|
-
// **AND THE FIVE-POSITION CALL IS THE KERNEL'S OWN STORE LEG AND NEVER ENTERS `K-2`** — item 1's stage `4`
|
|
605
|
-
// no-recursion clause, which this edit leaves UNMOVED: *"a five-position call can never start a second pass
|
|
606
|
-
// — and the call that carries an ADOPTED identity is item 3's own, so there is no recursion and need not be
|
|
607
|
-
// one"*. **THAT EXCLUSION IS THE CLAUSE'S AND NOT THIS TEST'S**: the gate removed above was an
|
|
608
|
-
// ADDRESS-CARRYING test, and the position test below is the one stage `4` declares. `K-2` calls this very
|
|
609
|
-
// `write` with FOUR positions (`src/constraint-kernel.mjs`'s `store.write(address, tier, value, record)` is
|
|
610
|
-
// the method's own four, the `instance` receiver not being a position of it), so the kernel's leg reaches
|
|
611
|
-
// `constraintWrite` NOT AT ALL: it reaches the store verb through the `n <= 3` arm below, and the recursion
|
|
612
|
-
// stage `4` forbids is unreachable BY POSITION and not by a registry's contents.
|
|
613
|
-
//
|
|
614
|
-
// **⟶ AND THE FIFTH POSITION'S CLASS TEST IS TAKEN HERE, BEFORE THE ROUTE IS CHOSEN, BECAUSE IT IS THE
|
|
615
|
-
// POSITION'S AND NOT THE ROUTE'S** (`docs/specs/storeroom-js/surface.md §2.4` item 9 (g) item 1; `§2.20`'s answer cell): **a SUPPLIED COMMIT
|
|
616
|
-
// THAT IS NOT A RECORD POSITION IS REFUSED ON BOTH PATHS THE SAME WAY** — the routing amendment removed an
|
|
617
|
-
// ADDRESS-CARRYING gate and touches no class test, and a drive that supplied an invalid commit to a
|
|
618
|
-
// no-pair instance asserted the refusal before this date and asserts it after (`a127`'s two
|
|
619
|
-
// fifth-position cells). **THE REFUSAL LEAVES NO LANDING AND NO ADOPTION TO RELEASE**: nothing is opened
|
|
620
|
-
// and nothing is put in flight, which is the whole of what the machinery's release used to secure.
|
|
621
|
-
if (arguments.length >= 4) {
|
|
622
|
-
const refusal = commitPositionRefusal(commit);
|
|
623
|
-
if (refusal !== null) throw refusal;
|
|
624
|
-
}
|
|
625
|
-
// **⟶ AND THE BOUNDARY'S OWN WALK IS TAKEN BEFORE THE ROUTE IS CHOSEN, WHICH IS THE ONE THING THE ROUTING
|
|
626
|
-
// AMENDMENT MOVES OUT OF THE ORDER IT STOOD IN** (`§2.5` item 5 (a)–(c); `docs/specs/storeroom-js/surface.md §2.2` clause 3). **THE ENTRY'S OWN
|
|
627
|
-
// POSITIONS ARE ENCODED HERE, ONCE, FOR BOTH PATHS**: the four-position call enters the kernel with values
|
|
628
|
-
// THIS BOUNDARY HAS ALREADY ADMITTED, so an outside address still answers the store's `AddressMalformed`
|
|
629
|
-
// with the FAILING TARGET and the ARGUMENT POSITION in it (`§2.5` item 5 (a)–(b); `convenience.test.mjs`'s
|
|
630
|
-
// `AddressArg` rows drive exactly this), **and a route to the kernel can never be a route AROUND the
|
|
631
|
-
// boundary's own class tests.** **NOTHING IS DECIDED TWICE: the encoders are total over the positions and
|
|
632
|
-
// their answers are the store's own, so the kernel receives the same values the bare path always built.**
|
|
633
|
-
// ⟶ `subject` is `contract.md §2.1`'s clause of 2026-10-24, item `(2)`'s slot: `null` means "render the
|
|
634
|
-
// failing target" and any string means "the arm declared its own PART ONE subject" (`DEF-2026-10-24-D`).
|
|
635
|
-
const fault = { found: null, value: undefined, path: [], subject: null, nodes: 0 };
|
|
636
|
-
const args = arguments.length >= 1 ? [encodeAddress(address, undefined, 'first argument')] : [];
|
|
637
|
-
// `PAR-JS-7`: `write`'s tier is REQUIRED — an ABSENT position and a SUPPLIED `undefined` both answer
|
|
638
|
-
// `AddressMalformed`, and neither folds.
|
|
639
|
-
appendOwn(args, encodeTier(tier, arguments.length >= 2, false, 'first argument'));
|
|
640
|
-
// THE WALK'S OWN FAULT RECORD — see `refusedValue`: the walk CLASSIFIES and RECORDS, and the record is
|
|
641
|
-
// read at the one site where the store answered `ValueNotAdmitted` for a value the walk refused.
|
|
642
|
-
// **⟶ AND THIS EXTENSION IS THE SAME INDEX WRITE** (`F7-1`, item `(1b)`): a no-op `push` dropped the
|
|
643
|
-
// VALUE position too, so the admitted drive lost its crossed member and not merely its tier.
|
|
644
|
-
appendOwn(args, encodeValue(value, [], 0, [], fault));
|
|
645
|
-
// **THE VALUE REFUSAL IS ANSWERED BEFORE ANY VERB** (`parameter-semantics.md §3`): the carrier positions
|
|
646
|
-
// above have already answered in their own order, so this keeps `write(undefined, 'mem', null)` on the
|
|
647
|
-
// carrier row and never lets a refused tree reach the store.
|
|
648
|
-
if (fault.found !== null) valueReject(fault);
|
|
649
|
-
if (arguments.length <= 3) {
|
|
650
|
-
return constraintWrite(state, instance, address, tier, value);
|
|
651
|
-
}
|
|
652
|
-
let answer;
|
|
653
|
-
try {
|
|
654
|
-
// **`write`'S OWN ENTRY, CALLED DIRECTLY BY ITS OWN NAME** (`js-unwrap.md §5`) — the `writeCall`
|
|
655
|
-
// wrapper that stood here is deleted (`§1`), **and its `ValueNotAdmitted` re-render moves into this
|
|
656
|
-
// member's own body** (`§3`), which is where `P-SAS-8` drives it. **THE FIVE POSITIONS ARE THE VERB'S
|
|
657
|
-
// OWN AND THE FIRST ARGUMENT IS THE STORE OBJECT THE PACKAGE RETURNED** (`receiver-and-refusal.md
|
|
658
|
-
// §1`): no instance position stands among them (`export-set-and-dispatch.md §4`).
|
|
659
|
-
// **THE ENTRY'S OWN POSITIONS ARE THE ENCODED ARRAY BUILT ABOVE, APPLIED BY INDEX** — the SAME values
|
|
660
|
-
// both routes carry, so the entry receives exactly what the kernel leg receives and **nothing is
|
|
661
|
-
// decided twice** (`§2.5` item 5 (a)-(c)). **A POSITION THE CALL DID NOT SUPPLY IS HANDED AS THE
|
|
662
|
-
// RUNTIME'S OWN `undefined`**, which is this boundary's declared protocol for a short call. **AND THE
|
|
663
|
-
// LIST IS APPLIED AND NOT SPREAD** (`Reflect.apply` — see the `read` member's clause of 2026-10-24):
|
|
664
|
-
// a spread consumes the encoded array through `Array.prototype[Symbol.iterator]` BEFORE the store is
|
|
665
|
-
// ever reached, so a forged iterator dropped the tier and refused an admitted write.
|
|
666
|
-
answer = Reflect.apply(entryOf().write, this, args);
|
|
667
|
-
} catch (refusal) {
|
|
668
|
-
// **⟶ AND THE RELEASE AN ABANDONED ADOPTION ONCE NEEDED IS GONE WITH THE MACHINERY, 2026-10-18.** The
|
|
669
|
-
// catch this replaces released *"the adoption it was taken for"* — an identity `settle` had put in
|
|
670
|
-
// flight and this write then failed to claim. **WITH `settle` REMOVED THERE IS NO ADOPTION TO RELEASE**
|
|
671
|
-
// (`docs/specs/storeroom-js/surface.md §2.4` item 9's adoption-machinery clause; the three architect's rulings of that date), so the store's
|
|
672
|
-
// own refusal crosses back UNCHANGED AND UNCONVERTED and this frame adds nothing to it.
|
|
673
|
-
// **AND THE ONE DECLARED EXCEPTION IS TAKEN HERE** — the `writeCall` arm, moved not dropped.
|
|
674
|
-
// **⟶ AND THE COMMIT'S OWN LOG TRAVELS WITH IT — `D-53`, 2026-10-28.** The record at the method's FOURTH
|
|
675
|
-
// position is the commit's record when the kernel's own store leg made this call, and the kernel defines
|
|
676
|
-
// the commit's list on it under a symbol key; **so a store verb refusing this write tells the caller what
|
|
677
|
-
// the commit's log already carries** instead of the declared `[]`. A caller's own five-position write (or
|
|
678
|
-
// any record this package did not build) carries no such key and answers `undefined`, which is `fail`'s
|
|
679
|
-
// declared `[]` arm — unchanged on every one of those paths.
|
|
680
|
-
// **AND THE WRITE'S OWN ADDRESS IS THE FOURTH MEMBER'S SUBJECT — `D-77`.** A store verb refusing this
|
|
681
|
-
// write is the act at the address the caller spelled, carried in the caller's own domain.
|
|
682
|
-
writeRefusal(refusal, fault, arguments.length >= 4 ? commit : undefined, address);
|
|
683
|
-
throw refusal;
|
|
684
|
-
}
|
|
685
|
-
const watched = [];
|
|
686
|
-
// **⟶ AND THE WATCH SET IS DECODED BY INDEX, NOT BY `.map`** (`contract.md §1`'s clause of 2026-10-24 on
|
|
687
|
-
// `F-RA-3`, item `(3)`; and `§2.5` item 5 (e), a rejection is never a raw host error): a caller-side
|
|
688
|
-
// `delete Array.prototype.map` reached this read through the reply array's own chain and threw a raw
|
|
689
|
-
// `TypeError` out of a write the walk had ADMITTED.
|
|
690
|
-
// **⟶ AND THE APPEND IS AN INDEX WRITE, NOT `Array.prototype.push`** (`contract.md §2.1`'s clause of
|
|
691
|
-
// 2026-10-24 on `F8-1`, items `(1c)(i)` and `(2b)`'s row `57`; arm `(xviii)`, cell `JC-TC-64`): the loop
|
|
692
|
-
// enclosing it was already the lawful form and the append was not, so a no-op `push` silently emptied
|
|
693
|
-
// the record's watch set while the write itself stayed admitted and durable.
|
|
694
|
-
for (let i = 0; i < answer.watched.length; i += 1) {
|
|
695
|
-
appendOwn(watched, decodeSegments(answer.watched[i]));
|
|
696
|
-
}
|
|
697
|
-
const record = {
|
|
698
|
-
op: decodeJournalOp(answer.op),
|
|
699
|
-
watched,
|
|
700
|
-
triggered: crossTriggered(state, answer.triggered),
|
|
701
|
-
};
|
|
702
|
-
// **AND THE RECORD IS LEFT IN THE SLOT THE KERNEL'S STORE LEG READS** (`state.leg`; `docs/specs/storeroom-js/surface.md §2.12` item 1's
|
|
703
|
-
// stage 2): a kernel-driven write takes the record THIS VERY WRITE returned and not a copy of it, and the
|
|
704
|
-
// slot is read before the pass that may write again, so a repair's own write can never be mistaken for it.
|
|
705
|
-
state.leg = record;
|
|
706
|
-
// **⟶ AND THE SAME RECORD'S RETURNED ELEMENTS ARE HANDED TO THE INVOCATION'S OWN LEG LIST — `D-104`,
|
|
707
|
-
// 2026-11-01** (`docs/L1/repair-listener-delivery.md` §3.2, §8's `js-surface` row;
|
|
708
|
-
// `strata/decisions.md` · `D-104` item `3`'s mechanism `(a)`). **THE LEG SLOT IS UNTOUCHED**: its four
|
|
709
|
-
// readers — `delivery.mjs`'s `answer`, the save's gate and the triggering address, and `constraints.mjs`'s
|
|
710
|
-
// `answer` — take no byte, and this line adds no fifth. **AND THE HAND-OVER IS TAKEN AT THIS SEAT ONLY,
|
|
711
|
-
// INSIDE THE `n >= 4` ARM AND NEVER AT THE `n <= 3` ROUTE**: the kernel's store leg is this arm, so a
|
|
712
|
-
// repair's write and a CONSTRAINT body's write are told apart by the KERNEL and not here (§3.1 fact 3) —
|
|
713
|
-
// each appends to the leg list of the invocation it was made inside, and the kernel's repair arm is what
|
|
714
|
-
// reads the latter and not the former. **WITH NO INVOCATION BRACKET STANDING THE APPEND GOES NOWHERE**
|
|
715
|
-
// (`state.mjs`'s `appendRepairLeg`), which is a caller's own write and a direct `K-2` drive's store leg.
|
|
716
|
-
appendRepairLeg(record);
|
|
717
|
-
// **THE INVOCATION WINDOW** (`docs/specs/storeroom-js/surface.md §2.7` item 2, `DD-22`): the record above is COMPLETE before the window
|
|
718
|
-
// opens, the invocation is SYNCHRONOUS, it happens AFTER the addon's call returned, and **its ONE
|
|
719
|
-
// argument is the TRIGGERING ADDRESS** (`PAR-JS-12`).
|
|
720
|
-
//
|
|
721
|
-
// **⟶ AND THE DELIVERY DOES NOT HAPPEN IN THIS FRAME FOR A KERNEL-DRIVEN WRITE, 2026-10-18 — IT HAPPENS AT
|
|
722
|
-
// THE KERNEL'S TERMINAL ARM, WHICH IS `docs/specs/storeroom-js/surface.md §2.7` ITEM `7`'s ONE HOME** (`§2.4` item 9's adoption-machinery
|
|
723
|
-
// clause; `docs/specs/storeroom-js/surface.md §2.7`'s clause of that date, item `3`: *"so the entry stops DECIDING whether to honour a
|
|
724
|
-
// delivery and SIMPLY PERFORMS THE ONE THE KERNEL TRIGGERS"*).
|
|
725
|
-
//
|
|
726
|
-
// **THE RULE IS THE WINDOW'S AND NOT A FLAG'S:** every write this file performs is now KERNEL-DRIVEN
|
|
727
|
-
// (`docs/specs/storeroom-js/surface.md §2.12` item 1's amended stage `1`), and the kernel reaches this verb as ITS OWN STORE LEG — the
|
|
728
|
-
// `n >= 4` arm above, whose `commit` is the kernel's own record. **SO THIS FRAME IS THE LEG AND ITS DELIVERY
|
|
729
|
-
// IS WITHHELD BY THE DECLARED INSTANT AND NOT BY A WITHHOLD SET**: `docs/specs/storeroom-js/surface.md §2.7` item 7 declares that for a record
|
|
730
|
-
// carrying a kernel evaluation set the package's delivery *"does NOT occur inside the store verb's window:
|
|
731
|
-
// it follows the pass"*. **THE LEG THEREFORE INVOKES NOTHING, AND `terminalArm` PERFORMS THE ONE DELIVERY
|
|
732
|
-
// THE KERNEL TRIGGERS** — `record.pending`'s residue plus the checked-off identities — where the pass has
|
|
733
|
-
// completed and the discard and the check-off have already decided what the set holds.
|
|
734
|
-
//
|
|
735
|
-
// **⟶ RE-DERIVED 2026-11-01 — `D-104`: THAT RESIDUE GAINS A THIRD SOURCE, AND THIS SENTENCE ABOVE STANDS
|
|
736
|
-
// BYTE-FOR-BYTE AND IS READ THROUGH THIS CLAUSE** (`docs/L1/repair-listener-delivery.md` §4, §8's
|
|
737
|
-
// `js-surface` row; `strata/decisions.md` · `D-104` item `2`). The sentence above names the residue and the
|
|
738
|
-
// checked-off identities; **from this date a handle the commit's own write never returned may also stand in
|
|
739
|
-
// `record.pending`** — one that a REPAIR's write returned — because the kernel's repair arm MERGES a
|
|
740
|
-
// repair's write's triggered listeners into that member at its own seat, after the credit and before the
|
|
741
|
-
// re-run (`kernel-attempt.mjs`), de-duplicated by `handle` and never a pair's. **`triggered` IS UNMOVED**
|
|
742
|
-
// (it stays the store's own returned set for THIS write, VERBATIM) and **this frame moves no byte**: the one
|
|
743
|
-
// delivery, its one recipient snapshot and its one address are what they were.
|
|
744
|
-
//
|
|
745
|
-
// **AND A WRITE WHOSE `commit` THE KERNEL DID NOT SUPPLY IS STILL DELIVERED HERE, AT ITS OWN POST-VERB
|
|
746
|
-
// INSTANT** (`docs/specs/storeroom-js/surface.md §2.7` item 2): that is the `n <= 3` caller path never reaching this frame at all, so THIS
|
|
747
|
-
// frame is reached only as the kernel's leg and its silence is total. **THE ONE INVOCATION PER DISTINCT
|
|
748
|
-
// IDENTITY RULE `deliver` enforces is thus never asked to dedupe two windows, because only one window
|
|
749
|
-
// exists** (`docs/specs/storeroom-js/surface.md §2.4` rule 3; `deliver` below).
|
|
750
|
-
return record;
|
|
751
|
-
} finally {
|
|
752
|
-
closeCommit(instance, opened);
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
/// `PAR-JS-16`: `{address, tiers, triggered}` — `address` VERBATIM, `tiers` in the store's canonical order,
|
|
756
|
-
/// and the in-domain no-op arm a SUCCESS returning `tiers: []`. **Its declared NAME is `delete`, and it is
|
|
757
|
-
/// published under that name ALONE** (`package.md §1.3` item 3): `deleteOp` is a reserved-word workaround
|
|
758
|
-
/// for the declaration and never a member of the package's namespace.
|
|
759
|
-
///
|
|
760
|
-
/// **⟶ AND IT CARRIES THE DELETE'S OWN `op` FROM 2026-10-27** (`D-43` item 3; `index.d.ts`
|
|
761
|
-
/// `DeleteRecord.op`): the member `write`'s record carries, at the same name, so `rollback(record.op.opId)`
|
|
762
|
-
/// reverses the delete. `null` is the `D-3` arm that removed nothing — it appended no entry, so it names
|
|
763
|
-
/// no op — and it crosses unchanged rather than folding to `undefined` (`crossing.md §1.3`).
|
|
764
|
-
///
|
|
765
|
-
/// **⟶ AND IT CARRIES THE DISCARD'S WITNESS FROM 2026-10-28 — `D-49`, `strata/decisions.md`, THE ARCHITECT,
|
|
766
|
-
/// VERBATIM: *"Make discard observable"*** (`index.d.ts` `DeleteRecord.discarded`; the use case's own
|
|
767
|
-
/// foundation is the prefix rule the delivery already obeys: **a listener at `window.tabs` FIRES for a
|
|
768
|
-
/// delete at `window.tabs.landingPage`, and the check it runs there is exactly the kind of act the
|
|
769
|
-
/// `delete`-delivery window throws away**).
|
|
770
|
-
///
|
|
771
|
-
/// **⟶ AND IT RUNS A PASS FROM 2026-10-29 — `D-55` ITEM 3, `DEF-X`. THE RULING, THE ARCHITECT, VERBATIM:
|
|
772
|
-
/// *"A delete is an editing verb and must pass constraints. This includes all of the relevant commit and
|
|
773
|
-
/// message logic."*** **THE BYTES THIS PARAGRAPH REPLACES READ *"`delete` IS THE ONE ACT WHOSE DELIVERY RUNS
|
|
774
|
-
/// NO PASS"*, AND THEY WERE TRUE OF `1.3.0` AND FALSE OF THIS TREE**: a delete opens its own commit, and
|
|
775
|
-
/// **⟶ AND THE SET IT ASKS IS NOW THREE-PART, `D-66` (2026-10-28): every ANCESTOR of the delete's address (`D-56`), the
|
|
776
|
-
/// address itself, and EVERY DESCENDANT THE DELETE TOUCHED — for a delete, the whole subtree, because removing it
|
|
777
|
-
/// changes what a read there returns (absent where it stood). A pair at an address the act did NOT touch is still
|
|
778
|
-
/// not asked, which is the criterion: TOUCHED, not descendant.** **the delete-shaped attempt
|
|
779
|
-
/// `constraints.mjs`'s `constraintDelete` builds asks every pair standing at the
|
|
780
|
-
/// delete's own address **⟶ AND AT EVERY ANCESTOR OF IT, `D-56` (2026-10-28): THE PAIR'S ADDRESS BEING A PREFIX OF
|
|
781
|
-
/// THE ACT'S IS THE MEMBERSHIP TEST NOW, because the value read at a prefix CONTAINS its subtree and a change at a
|
|
782
|
-
/// descendant changes what that read returns** — against THE STATE THE DELETE LEFT**, appends the attempt's terminal entry to the
|
|
783
|
-
/// commit's one list, and — where a pair refuses — undoes the delete before it refuses (`D-55` item 5's safe
|
|
784
|
-
/// state). **NO PROBE WRITE IS LANDED TO HAVE SOMETHING TO JUDGE**: the thing judged is the delete's own
|
|
785
|
-
/// journal op, whose after-state is absence.
|
|
786
|
-
///
|
|
787
|
-
/// **AND THE DELIVERY MOVED WITH IT — IT NOW SITS AFTER THE PASS.** At `1.3.0` the `deliver` call stood
|
|
788
|
-
/// immediately after the addon's return, so a listener fired by a delete saw a state no constraint had
|
|
789
|
-
/// approved and that a refusal was about to undo. **A LISTENER FIRED BY A DELETE NOW SEES A JUDGED STATE**,
|
|
790
|
-
/// and a refused delete delivers nothing at all. **THE POSITION IS THE WRITE'S OWN** (`surface.md §2.7` item
|
|
791
|
-
/// 6: *"the surface runs the write's TRIGGERED CONSTRAINTS FIRST, and THE OTHER LISTENERS ARE REACHED ONLY
|
|
792
|
-
/// ONCE EVERY CONSTRAINT HAS PASSED"*), and the delivery still stands inside this act's commit window, so a
|
|
793
|
-
/// listener body's own verbs open their own commits (`D-46`).
|
|
794
|
-
///
|
|
795
|
-
/// **WHAT THE WITNESS STILL SPEAKS FOR, SAID NARROWLY.** The request a LISTENER BODY raises inside the
|
|
796
|
-
/// delivery — a `rollback`, stamped with this commit's identity by `reversalWatch` — is raised AFTER the
|
|
797
|
-
/// pass, so nothing in this act judges it: it is read at the end of the delivery and reported **BESIDE** the
|
|
798
|
-
/// record's four members, by the one rule `D-49` sets (`D-43` item 2's second window is a registration, whose
|
|
799
|
-
/// answer is an opaque identity and carries nothing). **A request a PAIR BODY raises INSIDE the pass is no
|
|
800
|
-
/// longer discarded**: it is consumed by the pass's own restart drain and judged at the state the delete
|
|
801
|
-
/// left (`D-42`; `D-54` (b)) — the third host `D-54` measured and named undeclared.
|
|
802
|
-
///
|
|
803
|
-
/// **THE MEMBER IS A NON-ENUMERABLE OWN `data` PROPERTY, AND THE CHOICE IS DECLARED.** It is **visible to the
|
|
804
|
-
/// caller by its name** (`record.discarded`) and declared in `index.d.ts`, while the record's **enumerable
|
|
805
|
-
/// member set stays the four its declaration and its cells assert** — `Object.keys`, every deep-equality over
|
|
806
|
-
/// a receipt and every census of a record's members read exactly what they read before. **A witness added by
|
|
807
|
-
/// moving the record's own declared ENUMERABLE shape would make the cells that assert that set's readings
|
|
808
|
-
/// false to buy nothing a caller needs**; a `Symbol.for` key would be the family's other device (`A117` (D6))
|
|
809
|
-
/// but is not declarable as a member of `DeleteRecord`, and `D-49` asks for the member to be declared.
|
|
810
|
-
///
|
|
811
|
-
/// **THE VALUE IS `[]` WHERE NOTHING WAS DISCARDED AND ONE `{ opId, addresses }` ENTRY WHERE A REQUEST WAS**
|
|
812
|
-
/// — the id the reversal named (the store's own echo) and **the addresses the refused act MOVED**, measured
|
|
813
|
-
/// at the reversal's own instant (`constraints.mjs`'s `movedStanding`), not the whole watched registry:
|
|
814
|
-
/// **a witness names what moved, because what did not move was not the act's** (`DEF-AM`, 2026-10-28).
|
|
815
|
-
/// **THE WITNESS RUNS NO PASS OF ITS OWN, INVOKES NO BODY AND TAKES NO JUDGEMENT**: the request is consumed
|
|
816
|
-
/// (reported) and its effect still stands.
|
|
817
|
-
delete(address, tier) {
|
|
818
|
-
// **⟶ `§4.1`: `delete` OPENS ONE.**
|
|
819
|
-
const opened = openCommit(instance);
|
|
820
|
-
// **THE WINDOW THIS ACT OWNS, TAKEN AT ITS OPENING** — the identity `reversalWatch` stamps a request with,
|
|
821
|
-
// so that what the witness reads is the request THIS delivery raised and never another window's.
|
|
822
|
-
const window = currentWindow(instance);
|
|
823
|
-
try {
|
|
824
|
-
const args = arguments.length >= 1 ? [encodeAddress(address, undefined, 'first argument')] : [];
|
|
825
|
-
// `delete`'s tier is read as a VALUE and not by an arity fold: an ABSENT position is the whole-target
|
|
826
|
-
// removal, and a supplied `undefined` answers row 4's `AddressMalformed` (`crossing.md §1.3`).
|
|
827
|
-
appendOwn(args, encodeTier(tier, arguments.length >= 2, false, 'first argument'));
|
|
828
|
-
// **THE STORE'S OWN LEG, THE DELETE-SHAPED ATTEMPT AND THE PASS, IN ONE CALL** (`constraints.mjs`'s
|
|
829
|
-
// `constraintDelete`): the attempt is opened with this commit's list in hand and the address held, the
|
|
830
|
-
// thunk below is INVOKED AS ITS STORE LEG — the addon's own `delete`, crossed exactly as it always was —
|
|
831
|
-
// and the pass that follows asks every pair standing at THE DELETE'S OWN ADDRESS against the state the
|
|
832
|
-
// delete left. **NO PROBE WRITE PRECEDES THE JUDGEMENT** (`K-2`'s store leg is a `write` and this act's
|
|
833
|
-
// is not). **A REFUSAL LEAVES BY THROW, FROM INSIDE THAT CALL**, with the store already back at the
|
|
834
|
-
// state this commit opened at (`D-55` item 5) — so nothing below is reached and nothing is delivered.
|
|
835
|
-
let answer;
|
|
836
|
-
// **⟶ THE ADOPTION, 2026-10-29 — `K-2`'S OWN SEMANTICS REACHED BY THE DELETE'S OWN ROUTE.** A write's
|
|
837
|
-
// record reaches the entry at `write`'s FOURTH POSITION and that member stands it in `state.leg`, the
|
|
838
|
-
// slot the TERMINAL ARM reads for the triggering address and for the `file`-tier save's own op. **A
|
|
839
|
-
// delete's arity is the declared `delete(address, tier)`, so it has no such position** — the adoption is
|
|
840
|
-
// therefore taken HERE, at the instant the store's own verb returned and BEFORE the pass, which is the
|
|
841
|
-
// same instant and the same slot: the delete's own returned receipt stands where a write's record
|
|
842
|
-
// stands, so the terminal arm saves the DELETE's op and delivers at the DELETE's address.
|
|
843
|
-
// **AND THE ENTRY'S OWN LEG IS PUT BACK, BESIDE `closeCommit` AND IN THE SAME `finally`**: a leg left
|
|
844
|
-
// standing would be read by an ENCLOSING write's terminal arm (`state.leg` is one slot and a nested act
|
|
845
|
-
// is reached from a body — `D-53`), and the delete's record must not become the enclosing commit's.
|
|
846
|
-
const standing = state.leg;
|
|
847
|
-
const standingDelivery = state.legDelivery;
|
|
848
|
-
// THE LEG'S DELIVERY IS THIS MEMBER'S FOR THE DURATION (`D-49`'s window, unmoved): the arm saves the
|
|
849
|
-
// delete's op and delivers nothing, so the residue reaches each listener ONCE — from `deliver` below.
|
|
850
|
-
state.legDelivery = 'member';
|
|
851
|
-
try {
|
|
852
|
-
const receipt = constraintDelete(instance, address, arguments.length >= 2 ? tier : undefined, () => {
|
|
853
|
-
// THE ENTRY IS INVOKED BY `Reflect.apply`, NOT BY A SPREAD — see `read`'s clause of 2026-10-24 above.
|
|
854
|
-
answer = carryRefusal(() => Reflect.apply(entryOf().delete, this, args), args);
|
|
855
|
-
const crossed = {
|
|
856
|
-
address: decodeSegments(answer.address),
|
|
857
|
-
tiers: answer.tiers,
|
|
858
|
-
triggered: crossTriggered(state, answer.triggered),
|
|
859
|
-
op: answer.op === null ? null : decodeJournalOp(answer.op),
|
|
860
|
-
};
|
|
861
|
-
// THE ADOPTION ITSELF — one assignment, at the verb's own return.
|
|
862
|
-
state.leg = crossed;
|
|
863
|
-
return crossed;
|
|
864
|
-
});
|
|
865
|
-
// **⟶ AND THE DELIVERY NOW READS THE RECORD'S `pending` RESIDUE, 2026-10-29 — THE FOURTH MEMBER'S
|
|
866
|
-
// OWN ACT, `K-2`'s SEMANTICS REACHED BY THE DELETE'S OWN INSTANT.** The delivery's position is
|
|
867
|
-
// UNMOVED (`D-55` item `3` put it after the pass, and `D-49` declares this delivery the window whose
|
|
868
|
-
// check never ran — a request raised here is the witness's, not the drain's, and this build changes
|
|
869
|
-
// neither). **WHAT MOVES IS WHAT IT DELIVERS**: before the record existed this call handed the
|
|
870
|
-
// store's WHOLE returned set, and it now hands `record.pending` — that set MINUS the handles this
|
|
871
|
-
// delete's own pass checked off as it passed (`releasePending`), which is the write's own delivered
|
|
872
|
-
// set (`surface.md §2.7` item 7 (a)). **A `D-3` DELETE HAS NO RECORD**, so it falls back to the
|
|
873
|
-
// receipt's own `triggered` — the arm's set, empty by the store's own declaration.
|
|
874
|
-
const owed = receipt.commit === null || receipt.commit === undefined
|
|
875
|
-
? receipt.triggered
|
|
876
|
-
: receipt.commit.pending;
|
|
877
|
-
// **THE RULE IS THE WRITE'S OWN** (`surface.md §2.7` item 6): constraints first, then the other
|
|
878
|
-
// listeners. `A43`: a delete FIRES its own triggered set, on the same window as a write.
|
|
879
|
-
deliver(state, owed, answer.triggeringAddress);
|
|
880
|
-
// **⟶ `D-49`: THE WITNESS, READ AFTER THE DELIVERY AND REPORTED BESIDE THE RECORD** — the delivery is
|
|
881
|
-
// the act's remaining body-invoking instant, so a request standing after it is one this window raised
|
|
882
|
-
// from a LISTENER BODY. **A REQUEST A PAIR BODY RAISES INSIDE THE PASS IS NOT THIS WITNESS'S**: it is
|
|
883
|
-
// consumed and judged by the pass's own restart drain (`D-42`; `D-54` (b)), and by the time this line
|
|
884
|
-
// runs it has either passed or refused the delete outright.
|
|
885
|
-
// **ONLY A DELETE THAT OPENED ITS OWN WINDOW REPORTS**: a call that joined an enclosing commit has no
|
|
886
|
-
// window of its own to witness, and any request under that identity belongs to the act that opened it
|
|
887
|
-
// (`witnessDiscardedReversal` clears a request of the window handed in and of no other). **A JOINED
|
|
888
|
-
// DELETE THEREFORE ANSWERS `[]` AND MEANS IT ABOUT ITS OWN WINDOW — THE RAISES ITS DELIVERY MADE ARE IN
|
|
889
|
-
// THE ENCLOSING WINDOW, AND THE ACT THAT OWNS THAT WINDOW IS THE ONE THAT REPORTS THEM** (`D-42` item
|
|
890
|
-
// `3`; measured by `DW-09.2`).
|
|
891
|
-
//
|
|
892
|
-
// **⟶ AND THE LIST IS EVERY RAISE, AT ANY COUNT — `D-75`, 2026-10-29.** The bytes here read
|
|
893
|
-
// `discarded === null ? [] : [discarded]`, which is the ONE-SLOT shape `D-49` declared and `D-75`
|
|
894
|
-
// measures the cost of: two raises in one delivery answered `[]`. **`witnessDiscardedReversal` now
|
|
895
|
-
// answers a LIST** — one entry per raise the delivery discarded, in raise order, each `{opId,
|
|
896
|
-
// addresses}` — so this member IS that list and the length is the count.
|
|
897
|
-
const discarded = opened === true ? witnessDiscardedReversal(instance, window) : [];
|
|
898
|
-
Object.defineProperty(receipt, 'discarded', {
|
|
899
|
-
value: discarded,
|
|
900
|
-
enumerable: false,
|
|
901
|
-
writable: false,
|
|
902
|
-
configurable: true,
|
|
903
|
-
});
|
|
904
|
-
return receipt;
|
|
905
|
-
} finally {
|
|
906
|
-
state.leg = standing;
|
|
907
|
-
state.legDelivery = standingDelivery;
|
|
908
|
-
}
|
|
909
|
-
} finally {
|
|
910
|
-
closeCommit(instance, opened);
|
|
911
|
-
}
|
|
912
|
-
},
|
|
913
|
-
/// `PAR-JS-9`: `{opId, undoneOps, restoredTo}` — the constraint pattern's reverse step (`docs/specs/storeroom-js/contract.md §2.6`).
|
|
914
|
-
///
|
|
915
|
-
/// **⟶ AND THE REVERSAL IS JUDGED FROM 2026-10-26 — `DEF-W` OF `strata/decisions.md` · `D-38`, THE
|
|
916
|
-
/// ARCHITECT, VERBATIM: *"Assert the constraints on rollback"*** (`docs/specs/storeroom-js/contract.md §2.6`'s
|
|
917
|
-
/// clause of this date is the declaration; `surface.md §2.12`'s clause (D) and `package-use.md §5.4` name
|
|
918
|
-
/// the same member). **THE TWO CALLS BELOW ARE THE WHOLE OF IT AND NEITHER IS A WALK:**
|
|
919
|
-
/// * **`reversalWatch` TAKES THE PRE-REVERSAL STANDING** of every enabled pair's every address BEFORE
|
|
920
|
-
/// the addon's entry is reached, and it answers `[]` where the entry carries no pair — so a store that
|
|
921
|
-
/// registered no constraint reaches no read at all and this member is byte-for-byte what it was;
|
|
922
|
-
/// * **`judgeReversal` ASKS THE STATE THE REVERSAL LEFT** (`D-38`: the TERMINAL state, never a per-step
|
|
923
|
-
/// check — an unwinding composition passes through intermediate states no constraint would approve)
|
|
924
|
-
/// and throws the surface's one plain form, `{status: 'ConstraintPassRefused', message, log}` at the
|
|
925
|
-
/// set's rank `20`, where a pair the reversal TOUCHED refuses that state.
|
|
926
|
-
/// **A LAWFUL REVERSAL IS UNCHANGED — same record, same three members, no throw** — **and `D-40`'s floor
|
|
927
|
-
/// law is not re-walked: this member still performs the store's own calls, and the judgement is a judgement
|
|
928
|
-
/// of the state those calls left and not a sequence of per-op approvals.** **THE SHAPE IS `(a)` AND IT WAS
|
|
929
|
-
/// MEASURED: the refusal comes AFTER the reversal**, because `(b)` — computing the terminal state without
|
|
930
|
-
/// applying it — is not computable from the thirteen names the artefact publishes (there is no journal read
|
|
931
|
-
/// and no candidate-set query among them) and a JS guess at the store's temporally floored, all-or-nothing
|
|
932
|
-
/// rollback scope (`src/store.rs:2374–2430`) is the one thing this pass refused to write. **⟶ AND ITS SECOND
|
|
933
|
-
/// HALF — *"the reversal's effect STANDS"* — IS SUPERSEDED 2026-10-26 (`DEF-W`'s `(a)` discharged;
|
|
934
|
-
/// `contract.md §2.6`'s second annotate-beside of that date): a refusal that reports the violation while
|
|
935
|
-
/// leaving it is not a discharge, so `judgeReversal` RESTORES the pre-reversal standing of every address the
|
|
936
|
-
/// reversal moved before it throws the one plain form, and the log says the reversal was undone.** **THE
|
|
937
|
-
/// RESTORE IS NOT A JUDGED WRITE AND RECURSES INTO NOTHING**: it is the refusal's own compensating act,
|
|
938
|
-
/// taken at the store's entry with no `K-2`, no pass, no listener delivery and no second judgement
|
|
939
|
-
/// (`constraints.mjs`'s `restoreReversal`).
|
|
940
|
-
rollback(opId) {
|
|
941
|
-
const args = arguments.length >= 1 ? [encodeOpId(opId)] : [];
|
|
942
|
-
// THE WATCH COMES FIRST, ON THIS SIDE OF THE STORE CALL: the standing it takes is the one the reversal
|
|
943
|
-
// is about to move, and it is what makes "the address the reversal touched" MEASURED.
|
|
944
|
-
const watched = reversalWatch(state, instance);
|
|
945
|
-
// **AND THE RAISE THIS CALL MADE IS TAKEN HERE, BEFORE THE JUDGEMENT CONSUMES ITS MEASUREMENT — `D-75`.**
|
|
946
|
-
// It is `null` on every arm that raises nothing (an at-rest judgement, the kernel's own compensation, a
|
|
947
|
-
// store carrying no pair), and on a raise it is the record the witness speaks for: it names the id the
|
|
948
|
-
// reversal answered, the addresses the reversal MOVED, and — once the window has decided — whether this
|
|
949
|
-
// raise was DISCARDED or JUDGED.
|
|
950
|
-
const raise = currentRaise(instance);
|
|
951
|
-
// THE ENTRY IS INVOKED BY `Reflect.apply`, NOT BY A SPREAD — see `read`'s clause of 2026-10-24 above.
|
|
952
|
-
const answer = carryRefusal(() => Reflect.apply(entryOf().rollback, this, args), args);
|
|
953
|
-
// AND THE JUDGEMENT AFTER IT, keyed to the store's own echo of the id the reversal named.
|
|
954
|
-
// **⟶ AND IT IS HANDED THIS INSTANCE'S OWN STATE FROM 2026-11-02 — `D-117` ITEM 2's DELIVERY**, whose one
|
|
955
|
-
// recipient set is the caller's registry and whose receiver is this member's own: `deliver` is the
|
|
956
|
-
// `surface.md §2.4` loop, so it takes the state that holds both (`§2.7` (iii) (a)). **NOTHING ELSE IN THIS
|
|
957
|
-
// MEMBER MOVES** — not its record (`:702`–`:706`), not `carryRefusal`, not the witness — **and the
|
|
958
|
-
// position is a private frame's fourth, not a member, an arity or a declared surface.**
|
|
959
|
-
//
|
|
960
|
-
// **⟶ AND FROM 2026-11-02 IT ANSWERS THE JUDGEMENT'S OWN LIST — `D-119`.** `judgeReversal` answers the
|
|
961
|
-
// array its judgement appended to, frozen in place at that frame's end (`constraints.mjs`'s
|
|
962
|
-
// `defineResolutionLog` clause), **and that list is what this record carries at `record.log`, installed at
|
|
963
|
-
// the record's return below**: a reversal's judgement runs your pairs' repairs (`D-113` item 3) and
|
|
964
|
-
// delivers the listeners those repairs fire (`D-117` item 1), so the `repair-run` entry a repair left is
|
|
965
|
-
// the downstream edit this ruling exists to make readable. **EVERY ARM THAT ANSWERS `undefined` EARNS THE
|
|
966
|
-
// FROZEN EMPTY LIST** — the compensating composition, the deferred arm and the at-rest judgement over an
|
|
967
|
-
// empty watch own no list of their own — and `[]` means *this act appended nothing it can report*
|
|
968
|
-
// (`resolution-log.md` §3.3, §4.3).
|
|
969
|
-
const judgedLog = judgeReversal(instance, watched, answer.opId, state);
|
|
970
|
-
const record = {
|
|
971
|
-
opId: answer.opId,
|
|
972
|
-
undoneOps: answer.undoneOps,
|
|
973
|
-
restoredTo: decodeBaseState(answer.restoredTo),
|
|
974
|
-
};
|
|
975
|
-
// **⟶ AND THE RAISE'S OWN ANSWER CARRIES THE WITNESS FROM 2026-10-29 — `D-75`: *"on every path"*.** The bytes
|
|
976
|
-
// this record answered with had **no `discarded` member**, so a body — a constraint body, a listener body —
|
|
977
|
-
// that issued this call could not learn what became of it: **measured, absent on the raise's own answer and
|
|
978
|
-
// absent on the triggering write's, at one raise and at two.** **WHAT IT ANSWERS, IN THE THREE ARMS ITS OWN
|
|
979
|
-
// SENTENCE HAS**: an entry — `{opId, addresses}` — where this act's window has DISCARDED this raise; and
|
|
980
|
-
// `[]` where the raise was CONSUMED and judged by a pass's own drain (`D-42`: nothing was discarded), where
|
|
981
|
-
// no request was raised at all (an at-rest judgement is judged at its own instant), and while the raise still
|
|
982
|
-
// stands and its window has not ended — at that instant nothing has been discarded YET. **IT IS A LIVE VIEW
|
|
983
|
-
// AND NOT A SNAPSHOT**: the pass that judges a body's raise runs after the body returned, so a datum captured
|
|
984
|
-
// here would answer `[]` about a window that then discards it. Read it once the act whose window it stands in
|
|
985
|
-
// has returned and it is the settled answer.
|
|
986
|
-
//
|
|
987
|
-
// **AND THE RECORD'S THREE DECLARED MEMBERS ARE UNMOVED**: `discarded` is a NON-ENUMERABLE own accessor
|
|
988
|
-
// (`index.d.ts`'s `RollbackRecord` clause; `defineDiscardWitness`), so `Object.keys`, every deep-equality
|
|
989
|
-
// over the record and every census of its members read the three they read before.
|
|
990
|
-
//
|
|
991
|
-
// **⟶ AND `record.log` IS THE JUDGEMENT'S LIST, INSTALLED THE SAME WAY AND BESIDE IT — `D-119`.** The same
|
|
992
|
-
// device, the same name the failure form uses, `enumerable: false`, `configurable: true`, and **the read
|
|
993
|
-
// answers one captured reference** — the array the judgement's frame froze — where `discarded` beside it
|
|
994
|
-
// is a live read by necessity (§5.4's own note: the two members share a SHAPE and not a REASON). **THE
|
|
995
|
-
// FROZEN EMPTY LIST IS THE ANSWER ON EVERY ARM THE JUDGEMENT DID NOT JUDGE**, and the member is present on
|
|
996
|
-
// every passing answer, `[]` included.
|
|
997
|
-
return defineResolutionLog(defineDiscardWitness(record, () => witnessRaise(raise)), judgedLog);
|
|
998
|
-
},
|
|
999
|
-
/// **⟶ `listen(handle, addresses) -> undefined` — arity `2`, position `1` a caller-spelled string and
|
|
1000
|
-
/// position `2` a SET of addresses** (`contract.md §2.2`; `listen-verb.md §1` item 1; `PAR-HL-1`,
|
|
1001
|
-
/// `PAR-HL-2`, `PAR-HL-3`).
|
|
1002
|
-
/// **⟶ `listen(handle, addresses) -> undefined` — `U-STOREROOM-HELD-LISTENER-IDENTITY` (`D-GP-SHLI`),
|
|
1003
|
-
/// `contract.md §2.2` (`HL-2`).** **THE ARITY FIGURE MOVES `1 → 2`**: position `1` is `handle`, a non-empty
|
|
1004
|
-
/// `string` in `HL-1`'s domain; position `2` is `addresses`, a SET of addresses. **THE RETURN IS `undefined`**
|
|
1005
|
-
/// — *"the caller supplied the handle, so returning it would be a second spelling of the caller's own
|
|
1006
|
-
/// datum"* (`contract.md §2.2` item 10; `PAR-HL-3`).
|
|
1007
|
-
///
|
|
1008
|
-
/// **THE TWO CLASS TESTS PRECEDE EVERY STORE ACT** (`listen-verb.md §2.2` item 3: *"a refused `listen`
|
|
1009
|
-
/// changes nothing: no entry, no mirror row, no purge"*), and **the order is PURGE THEN INSTALL, inside the
|
|
1010
|
-
/// store's own verb** — so no observable instant holds both (`contract.md §2.2` item 4).
|
|
1011
|
-
///
|
|
1012
|
-
/// **⟶ AMENDED 2026-10-24 (`D-29`, verbatim: *"Listen cannot overwrite constraint, only other listeners"*):
|
|
1013
|
-
/// THE SENTENCE ABOVE IS NARROWED, NOT WITHDRAWN, AND IT IS STILL PRINTED — *"`listen` GAINS NO CONFLICT TEST
|
|
1014
|
-
/// AT ALL"* READS **`listen` GAINS NO CONFLICT TEST AGAINST ANOTHER LISTENER, AND GAINS ONE AGAINST A
|
|
1015
|
-
/// CONSTRAINT** (`docs/specs/storeroom-held-listener-identity/contract.md §2.2` item 7 stands as text read
|
|
1016
|
-
/// THROUGH this clause). **Overwriting a listener with a listener stays LAWFUL** — that is `D-24`'s
|
|
1017
|
-
/// same-kind rule — **and overwriting a constraint with a listener is REJECTED** (`B-6`; §2.2 item 7's
|
|
1018
|
-
/// *"GAINS NO CONFLICT TEST AT ALL"* was written while a reserved `constraint@` namespace made `listen`'s
|
|
1019
|
-
/// reach look anonymous; `D-23` makes the occupancy the caller's own word, so the residual `Q-1` named is
|
|
1020
|
-
/// closed here rather than left legible).
|
|
1021
|
-
///
|
|
1022
|
-
/// **AND `listen` ANSWERS THE HANDLE IT WATCHES UNDER ON SUCCESS** (`D-22`): the return moves `void →
|
|
1023
|
-
/// `Handle`, a success signal that CARRIES the identity, and failure stays the one thrown form.
|
|
1024
|
-
listen(handle, addresses) {
|
|
1025
|
-
// **⟶ `§4.1`: `listen` OPENS ONE.**
|
|
1026
|
-
const opened = openCommit(instance);
|
|
1027
|
-
try {
|
|
1028
|
-
// ── POSITION 1: THE HANDLE'S CLASS TEST ───────────────────────────────────────────────────────────────
|
|
1029
|
-
// **`F-1`: the surface's ONE thrown form with `status` the store's `AddressMalformed`, and NO STATE
|
|
1030
|
-
// CHANGED** (`contract.md §4` `F-1`; `§2.1` items 5–6). The predicate is a `typeof` read and a length read
|
|
1031
|
-
// and nothing more — no object inspection and no trap (`identity-and-domain.md §2` item 1).
|
|
1032
|
-
if (arguments.length < 1 || !inDomainHandle(handle)) {
|
|
1033
|
-
boundaryReject(
|
|
1034
|
-
'AddressMalformed',
|
|
1035
|
-
targetSpelling(handle),
|
|
1036
|
-
`listen's first argument is ${classSpelling(handle)}, and a listener's handle is a non-empty string `
|
|
1037
|
-
+ 'this caller spells',
|
|
1038
|
-
);
|
|
1039
|
-
}
|
|
1040
|
-
// ── POSITION 2: THE SET-POSITION CLASS TEST — A NEW DECLARED FORM ─────────────────────────────────────
|
|
1041
|
-
// **`addresses` IS AN ARRAY WHOSE EVERY MEMBER IS AN ADDRESS IN THE STORE'S OWN DOMAIN; THE EMPTY ARRAY IS
|
|
1042
|
-
// IN THE DOMAIN** (`listen-verb.md §2.2` item 1; `PAR-HL-2`). **THE DISCRIMINATOR IS THE MEMBER'S CLASS,
|
|
1043
|
-
// READ ONCE PER MEMBER — never a length heuristic and never a coercion** (`listen-verb.md §2.2` item 4).
|
|
1044
|
-
if (arguments.length < 2 || !isAdmittedArray(addresses)) {
|
|
1045
|
-
boundaryReject(
|
|
1046
|
-
'AddressMalformed',
|
|
1047
|
-
targetSpelling(addresses),
|
|
1048
|
-
`listen's second argument is ${classSpelling(addresses)}, and this position is a SET of addresses — `
|
|
1049
|
-
+ 'an array of addresses, the empty array included',
|
|
1050
|
-
);
|
|
1051
|
-
}
|
|
1052
|
-
for (let i = 0; i < addresses.length; i += 1) {
|
|
1053
|
-
// **A BARE SEGMENT LIST IS OUTSIDE THE DOMAIN** — *"the position is a set and a segment list is a
|
|
1054
|
-
// different shape"* (`P: docs/pending.md · P-7`'s set ruling, consequence (ii); `listen-verb.md §2.2`
|
|
1055
|
-
// item 2, class (vi)). **THE MEMBER'S CLASS IS WHAT DECIDES IT AND NOT ITS LENGTH.**
|
|
1056
|
-
if (!isAdmittedArray(addresses[i])) {
|
|
1057
|
-
boundaryReject(
|
|
1058
|
-
'AddressMalformed',
|
|
1059
|
-
targetSpelling(addresses[i]),
|
|
1060
|
-
`listen's second argument carries ${classSpelling(addresses[i])} at member ${i}, and a set's member `
|
|
1061
|
-
+ 'is an address — an array of segments',
|
|
1062
|
-
);
|
|
1063
|
-
}
|
|
1064
|
-
if (!inDomainAddress(addresses[i])) {
|
|
1065
|
-
boundaryReject(
|
|
1066
|
-
'AddressMalformed',
|
|
1067
|
-
targetSpelling(addresses[i]),
|
|
1068
|
-
`listen's second argument carries an address outside the store's domain at member ${i}`,
|
|
1069
|
-
);
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
// ── `B-6` — THE CROSS-KIND REJECTION: THE HANDLE, AND NOTHING ELSE (`D-98`) ──────────────────────────
|
|
1073
|
-
// **⟶ RE-DERIVED 2026-11-01 (`D-98`, verbatim: *"A constraint and a listener can share an address … The
|
|
1074
|
-
// restriction is that a listener and a constraint cannot have the same *handle*"*).** **THE ADDRESS-SET
|
|
1075
|
-
// DIMENSION IS DELETED**: its ground — `D-29`'s *"the address dimension is NECESSARY, because the purge is
|
|
1076
|
-
// address-reaching"* — is FALSE at this build and `D-98` item 3 withdraws it: the purge is BY HANDLE
|
|
1077
|
-
// (`src/store.rs:476`–`:494`, `:2594`) and the mirror's is too (this file's own purge, in
|
|
1078
|
-
// `delivery.mjs`'s `listenOn`), so an act under a different handle cannot reach a pair's rows. **What the
|
|
1079
|
-
// dimension admitted was the defect.**
|
|
1080
|
-
// **THE HANDLE DIMENSION IS THE WHOLE TEST**, and it is the SAME read `B-5` takes — one helper, one rule
|
|
1081
|
-
// (§1.1). **NO STATE MOVES**: no store act, no mirror row, no registry write.
|
|
1082
|
-
//
|
|
1083
|
-
// **AND THE ONE ACT THE OLD TEST ALLOWED WENT WITH ITS INSTRUMENT** (`D-99`'s ANSWERED clause, `C-18`):
|
|
1084
|
-
// the kernel's own re-listing is not exempted here — **it does not pass this test at all**, because `K-1`
|
|
1085
|
-
// reaches the store through its own route (`LISTEN_ROUTE`, `delivery.mjs`'s `listenOn`) and this member is
|
|
1086
|
-
// a CALLER's door. **THERE IS NO MARKER, NO BRACKET AND NO `state.establishing` LEFT TO READ**; a
|
|
1087
|
-
// constraint body that calls `listen('<its own pair id>', …)` during its own registration is refused here
|
|
1088
|
-
// exactly as any caller's act is.
|
|
1089
|
-
//
|
|
1090
|
-
// **AND THE MESSAGE'S GENERATED HALF IS THE STORE'S OWN QUALIFIED ARM, NOT THE SEGMENT TEMPLATE**
|
|
1091
|
-
// (`D-98` item 4; `C-7`–`C-11`, §3.3 and §3.6): the `'handle'` arm token is supplied at
|
|
1092
|
-
// `boundaryReject`'s appended FIFTH position and reaches the generator's fourth — so the sentence reads
|
|
1093
|
-
// *"'<id>' is already a handle this instance carries, a listener's handle and a constraint's id are one
|
|
1094
|
-
// string and one string only"* and **names no address and no placeholder container at all** (the
|
|
1095
|
-
// fourth position is `undefined` ON PURPOSE: this arm passes NO container, §3.4).
|
|
1096
|
-
const overwritten = constraintOverwrittenByListen(state, handle);
|
|
1097
|
-
if (overwritten !== null) {
|
|
1098
|
-
boundaryReject(
|
|
1099
|
-
'AddressMalformed',
|
|
1100
|
-
overwritten.id,
|
|
1101
|
-
`listen refuses: the constraint pair '${overwritten.id}' keeps that handle, and a listener and a `
|
|
1102
|
-
+ 'constraint do not share one handle',
|
|
1103
|
-
undefined,
|
|
1104
|
-
'handle',
|
|
1105
|
-
);
|
|
1106
|
-
}
|
|
1107
|
-
// ── THE POST-TEST BODY, EXTRACTED BY NAME — `D-99`'S ANSWERED CLAUSE, 2026-11-01 ──────────────────────
|
|
1108
|
-
// **⟶ THE BYTES ABOVE ARE A CALL NOW** (`C-17`, §9.2): the address encode, the ONE store act, the home
|
|
1109
|
-
// mirror's purge-and-install, the entry's registry reservation and the returned handle all moved
|
|
1110
|
-
// BYTE-FOR-BYTE into `delivery.mjs`'s `listenOn`, which the kernel's own registration calls too. **THE
|
|
1111
|
-
// MEMBER KEEPS WHAT IS THE MEMBER'S**: the commit bracket (`openCommit`/`closeCommit`), the two position
|
|
1112
|
-
// class tests and `B-6` above — **so `listen` is a CALLER's door and the kernel's act is the kernel's own**,
|
|
1113
|
-
// which is the whole of `D-99`'s route reading. **NO ANSWER MOVES**: the same handle, the same store act,
|
|
1114
|
-
// the same mirror rows and the same registry entry, because it is the same function.
|
|
1115
|
-
return listenOn(this, state, handle, addresses);
|
|
1116
|
-
} finally {
|
|
1117
|
-
closeCommit(instance, opened);
|
|
1118
|
-
}
|
|
1119
|
-
},
|
|
1120
|
-
/// `docs/specs/storeroom-js/surface.md §2.3` item 4 / `PAR-JS-8`: **`unlisten` over ANY value outside the domain is a NO-OP SUCCESS** — a
|
|
1121
|
-
/// foreign instance's value, a prior session's value, a fabricated value, a blank string, a non-string and
|
|
1122
|
-
/// an absent handle are EACH a no-op success, no code is produced, and NO OTHER REGISTRATION IS REMOVED.
|
|
1123
|
-
///
|
|
1124
|
-
/// **⟶ AND THE SAME VALUE THAT IS A SILENT SUCCESS HERE IS A THROWN FAILURE AT `removeListener` — TWO
|
|
1125
|
-
/// DISPOSITIONS FOR ONE ARGUMENT IN ONE PRODUCT, and that reversal is RULED, not accidental**
|
|
1126
|
-
/// (`P: docs/pending.md · P-5`'s `(R2)`, verbatim; `contract.md §2.1` item 5's closing clause).
|
|
1127
|
-
///
|
|
1128
|
-
/// **THE WITHDRAWAL'S OWN MODEL, IN THIS CHANGE'S TERMS** (`P: docs/pending.md · P-5`'s A4 ruling, verbatim:
|
|
1129
|
-
/// *"`unlisten` sets `off` only when the identity no longer stands anywhere, exactly as `:2320`'s survivor
|
|
1130
|
-
/// re-scan decides today"*): **the store's entry is withdrawn and the MAP ENTRY IS KEPT with `off` set — a
|
|
1131
|
-
/// reservation, not a deletion** (`identity-and-domain.md §3` item 2 (i); `listen-verb.md §4` state `1`).
|
|
1132
|
-
unlisten(handle) {
|
|
1133
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1134
|
-
// **⟶ THE RECEIVER IS CONSULTED FIRST, BEFORE EITHER DOMAIN DISJUNCT — THIS IS `§3`'s ONE ARM AND IT IS
|
|
1135
|
-
// THE ORDER ITS SEVEN SIBLINGS ALREADY KEEP** (`docs/specs/storeroom-addon-surface/receiver-and-refusal.md
|
|
1136
|
-
// §3`: *"A CALL WHOSE RECEIVER NAMES NO LIVE STORE REFUSES, IN THE ONE DECLARED FORM."*; `§5`: *"The
|
|
1137
|
-
// refusal fires only when the receiver names nothing at all."*).
|
|
1138
|
-
//
|
|
1139
|
-
// **THE DEFECT THIS ORDER CLOSES, NAMED AT ITS OWN MECHANISM:** the domain short-circuit below answers
|
|
1140
|
-
// `undefined` on EITHER disjunct — a non-string/blank handle, or a well-formed string `state.registry`
|
|
1141
|
-
// does not carry — and it did so BEFORE `carryRefusal` could hand the receiver to the entry. **SO A CALL
|
|
1142
|
-
// WHOSE RECEIVER NAMES NO STORE ANSWERED INSTEAD OF REFUSING** whenever its handle was outside this
|
|
1143
|
-
// instance's own map, which is the DETACHED CALL `§7` NAMES AS THIS UNIT'S ONE DECLARED COST (*"`const {
|
|
1144
|
-
// read } = layout; read(…)` IS LEGAL TODAY AND THROWS AFTER THIS CHANGE"*) and is `P-SAS-4`'s failure
|
|
1145
|
-
// list's third term, *"a success"*. **A CALLER WHO HAS LOST ITS OBJECT HAS NO WAY TO KNOW WHICH STORE'S
|
|
1146
|
-
// HANDLE IT IS HOLDING**, so the fabricated-handle row is exactly the value a detached call carries —
|
|
1147
|
-
// which is why the two clauses collided here and at no sibling.
|
|
1148
|
-
//
|
|
1149
|
-
// **AND `§2.3` ITEM 4 IS NOT OVERRIDDEN BY THIS ORDER — IT IS SERVED BY IT** (`docs/specs/storeroom-js/surface.md
|
|
1150
|
-
// §2.3` item 4: *"`unlisten` OVER ANY VALUE OUTSIDE THE DOMAIN IS A NO-OP SUCCESS … no code is produced
|
|
1151
|
-
// and NO OTHER REGISTRATION IS REMOVED"*). **Its subject is the HANDLE ARGUMENT and its effect clause
|
|
1152
|
-
// PRESUPPOSES a live store whose registrations could be removed** — with no receiver there is no store to
|
|
1153
|
-
// be a no-op *against*. **SO THE RECEIVER DECIDES THE STORE AND THE HANDLE'S DOMAIN DECIDES THE REST**,
|
|
1154
|
-
// which is the one reading that keeps both clauses whole; no amendment is owed and NONE IS MADE HERE.
|
|
1155
|
-
//
|
|
1156
|
-
// **THE CHECK IS `§3`'s ONE ARM AND MINTS NO TOKEN AND NO SECOND FORM** — it is the same predicate
|
|
1157
|
-
// `write` takes at its own first line for the same reason, and a receiver that is not the published one
|
|
1158
|
-
// is handed on to the entry, which answers `§3`'s single observable.
|
|
1159
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1160
|
-
if (!isStoreReceiver(this)) return carryRefusal(() => entryOf().unlisten.call(this, handleWire(handle)), [handleWire(handle)]);
|
|
1161
|
-
// **THE DOMAIN TEST IS A DIRECT MAP KEY CHECK** (`P: docs/pending.md · P-6`, fork (g), verbatim: *"the
|
|
1162
|
-
// function lookup is now a direct map key check"*): a non-string, a blank string and a string the map does
|
|
1163
|
-
// not carry are each the no-op success, and NO OTHER REGISTRATION IS REMOVED (`identity-and-domain.md §6`
|
|
1164
|
-
// `O-3`). **IT STANDS BELOW THE RECEIVER CHECK AND NOT ABOVE IT** — a live receiver has established the
|
|
1165
|
-
// store by this line, so the no-op success is answered over the HANDLE, exactly as item 4 declares.
|
|
1166
|
-
if (!inDomainHandle(handle) || !state.registry.has(handle)) return undefined;
|
|
1167
|
-
carryRefusal(() => entryOf().unlisten.call(this, handleWire(handle)), [handleWire(handle)]);
|
|
1168
|
-
// THE STORE'S OWN FIRST-MATCH WITHDRAWAL, MIRRORED ENTRY FOR ENTRY (the home holds one row per store
|
|
1169
|
-
// entry, so the mirror's own answer is the store's).
|
|
1170
|
-
const mirror = state.home.findIndex((row) => row.handle === handle);
|
|
1171
|
-
if (mirror === -1) return undefined;
|
|
1172
|
-
state.home.splice(mirror, 1);
|
|
1173
|
-
// **⟶ AND THE TWO STRUCTURES ARE RECONCILED ON THE MIRROR'S SURVIVORS, WHICH IS THE CLAUSE'S OWN GROUND**
|
|
1174
|
-
// (`P: docs/pending.md · P-5`'s A4 ruling, verbatim: *"`unlisten` sets `off` only when the identity no
|
|
1175
|
-
// longer stands anywhere, exactly as the survivor re-scan decides today. The flag is per-handle AND
|
|
1176
|
-
// per-standing, **which is what the home mirror already computes**"*; `identity-and-domain.md §4` item 4).
|
|
1177
|
-
//
|
|
1178
|
-
// **THE STORE'S OWN WITHDRAWAL DROPS **ONE** ENTRY AND THE MIRROR DROPS **ONE** ROW** — the two agree
|
|
1179
|
-
// entry for entry (`docs/specs/storeroom-native/write-and-read.md §6.5` item 12, cited: *"it drops ONE
|
|
1180
|
-
// home-map entry"*; `identity-and-domain.md §6` `O-3`: *"`unlisten`'s no-op success removes no other
|
|
1181
|
-
// registration"*). **WHERE SURVIVORS REMAIN, THE ENTRY'S STANDING IS THEREFORE THE SURVIVORS** — so
|
|
1182
|
-
// `register`'s re-arm re-installs the addresses the handle STILL stands at and RESURRECTS NONE the caller
|
|
1183
|
-
// withdrew. **WHERE NONE SURVIVES, THE ENTRY IS THE RESERVATION `S-6` DECLARES** — *"the entry EXISTS with
|
|
1184
|
-
// `off` set; `register(h, fn)` SUCCEEDS and re-arms it"* — so its declared set stands whole and the re-arm
|
|
1185
|
-
// re-installs it (`identity-and-domain.md §3` item 2 (i); `contract.md §3` `S-6`; `listen-verb.md §4`'s
|
|
1186
|
-
// transition `1 → 2`).
|
|
1187
|
-
const survivors = state.home.filter((row) => row.handle === handle);
|
|
1188
|
-
// ⟶ REPOINTED 2026-10-18 (`RCA-8(g)`, gate-4 finding F-3): the line anchor `unlisten`'s own doc block carried the pre-merge number the merge left stale — a number that named the survivor re-scan in the pre-`P-8` file and names nothing of the kind after the merge. THE SUPERSEDED NUMBER ITSELF IS NOT RE-EMITTED HERE, and its exact bytes are recorded at archive/p8-merge/2026-10-18/post-gate4/README.md, because a re-emitted stale anchor is a citation a later sweep re-reads as live. It now carries the live line of that site, printed at the last line of this note, and the site is named in prose as well as by number so a future move cannot silently re-break it: THE SURVIVOR RE-SCAN IS THE LINE IMMEDIATELY ABOVE THIS NOTE — `const survivors = state.home.filter((row) => row.handle === handle);`, inside `unlisten`'s own body. Its live line number as this pass leaves the file is `:2320`.
|
|
1189
|
-
const entry = state.registry.get(handle);
|
|
1190
|
-
if (survivors.length > 0) {
|
|
1191
|
-
if (entry !== undefined) entry.addresses = survivors.map((row) => row.address.slice());
|
|
1192
|
-
return undefined;
|
|
1193
|
-
}
|
|
1194
|
-
if (entry !== undefined) entry.off = true;
|
|
1195
|
-
return undefined;
|
|
1196
|
-
},
|
|
1197
|
-
/// `surface.md §2.12` item 2 (a): **`a.addConstraint(pair, constraint) -> constraint identity`** — the
|
|
1198
|
-
/// ADD route, which carries the function and OVERWRITES at a pair the entry already holds.
|
|
1199
|
-
/**
|
|
1200
|
-
* **`docs/specs/storeroom-js/surface.md §2.12` ITEM 2 (a): `addConstraint(pair, constraint) -> constraint identity` — THE ADD ROUTE, WHICH
|
|
1201
|
-
* CARRIES THE FUNCTION.**
|
|
1202
|
-
*
|
|
1203
|
-
* **ITS TARGET STATE AT THE PAIR IS *"the pair's element IS the supplied `constraint`, whether the pair was
|
|
1204
|
-
* HELD or NOT"*, AND THE HELD ARM IS AN OVERWRITE AND NOT A THROW**: *"where the pair was already held, the
|
|
1205
|
-
* supplied constraint OVERWRITES the held one … and the call REFUSES NOTHING and THROWS NOTHING for the mere
|
|
1206
|
-
* fact that the pair was held"* — the SAME identity the pair was already added under is returned, and it is
|
|
1207
|
-
* THE IDENTITY AND NOT THE ENTRY RECORD (`PAR-JS-25`'s opacity, `carryConstraint` above).
|
|
1208
|
-
*/
|
|
1209
|
-
addConstraint(pair, constraint) {
|
|
1210
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1211
|
-
// **⟶ THE RECEIVER IS CONSULTED FIRST — BEFORE ANY READ, BEFORE ANY EDIT, AND BEFORE THE COMMIT
|
|
1212
|
-
// BRACKET.** This member reached every one of its arms off this factory's closure and never asked
|
|
1213
|
-
// whether the CALL had a receiver, so a detached `addConstraint` ANSWERED and edited the real pair
|
|
1214
|
-
// registry (measured 2026-10-26; `docs/guides/package-use.md §12.2`). **THE GUARD IS THE SEVEN
|
|
1215
|
-
// STORE-REACHING VERBS' OWN, ITS FORM IS THEIRS BYTE FOR BYTE, and `constraintDetached` states both
|
|
1216
|
-
// and why no constraint clause names a different arm** (`src/entry/constraints.mjs`; the architect's
|
|
1217
|
-
// ruling: *"Run the fix by rejecting the detached functions."*). **NO STATE MOVES ON A REFUSED CALL:
|
|
1218
|
-
// no `openCommit`, no `constraintSite`, no registry read, no `K-1`, no store act.**
|
|
1219
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1220
|
-
constraintDetached(this);
|
|
1221
|
-
// **⟶ AND THE DELIVERY'S SET AT THIS INSTANT IS THE REPAIR'S OWN `triggered` — `PIN-6` (ii), `D-125`
|
|
1222
|
-
// item `1`.** The registration's passing close hands `delivery.mjs`'s channel the watched sets its repair's
|
|
1223
|
-
// writes fired, and the channel reads this value to know which instant is speaking: **the creation's and the
|
|
1224
|
-
// boot's set is `PIN-6` (i)'s and `storeCreate` delivers it at its own seat**, so the channel is silent
|
|
1225
|
-
// there and speaks here. **IT IS A VALUE OF THE PACKAGE'S STATE AND NOT A MEMBER** (`A117` (D6)), restored
|
|
1226
|
-
// on every arm by the `finally` below, and no code, record or attempt is minted with it.
|
|
1227
|
-
const priorDelivery = state.registrationDelivery;
|
|
1228
|
-
state.registrationDelivery = 'triggered';
|
|
1229
|
-
state.listenerFailure = null;
|
|
1230
|
-
// **⟶ `§4.1`: `addConstraint` OPENS ONE.**
|
|
1231
|
-
const opened = openCommit(instance);
|
|
1232
|
-
try {
|
|
1233
|
-
const site = constraintSite(state, 'addConstraint', arguments.length, pair, constraint);
|
|
1234
|
-
// ── `B-4` — `D-25`'S *"VICE VERSA"*: A PAIR WHOSE `id` EQUALS A LIVE LISTENER'S HANDLE ────────────────
|
|
1235
|
-
// **⟶ THE FOURTH REFUSAL ARM, ADDED 2026-10-24 — A DIRECTION WITH NO TEST AT ALL UNTIL NOW.** The built
|
|
1236
|
-
// surface tested one direction only (`register(handle, listener)` refuses where a constraint stands);
|
|
1237
|
-
// `D-25`'s *"or vice versa"* requires the other. **THE INSTANT IS DECLARED AND LOAD-BEARING: AFTER
|
|
1238
|
-
// `constraintSite`'s two position class tests have passed and BEFORE the held-pair branch — therefore
|
|
1239
|
-
// before `withdrawStanding`'s purge, before `K-1` and before any store call.** **The seam is named
|
|
1240
|
-
// because a purge that ran before a cross-kind refusal would destroy a standing registration and then
|
|
1241
|
-
// refuse — *"a purge with no add"*, the state `(O-4)`'s ground exists to prevent.**
|
|
1242
|
-
//
|
|
1243
|
-
// **ITS MEMBER IS `AddressMalformed`**, on this surface's own reading of that member — *"the instance's
|
|
1244
|
-
// domain is the domain"* (`R-B4`) — read with `D-24`'s instance-scoped handle: **an `id` that names a live
|
|
1245
|
-
// listener is outside this instance's handle domain for a constraint.** It is also the status the
|
|
1246
|
-
// register-side sibling answers for the adjacent fact, **so one namespace question does not print two
|
|
1247
|
-
// codes.** **NO STATE MOVES.**
|
|
1248
|
-
//
|
|
1249
|
-
// **⟶ AND ITS MESSAGE RE-DERIVES 2026-11-01 (`D-98` item 4; `C-9`, `C-11`; §3.4, §3.6), WHILE ITS
|
|
1250
|
-
// CONDITION, ITS STATUS AND ITS INSTANT ARE UNMOVED.** **`listenerStandingAt` ANSWERS `true`/`false` NOW**
|
|
1251
|
-
// (its address loop existed for the message alone and the message names no address — §2's one deletion),
|
|
1252
|
-
// and the refusal's subject is the HANDLE: the generated half is the store's own QUALIFIED
|
|
1253
|
-
// `AddressMalformed` arm under the appended `'handle'` token, and the clause names the listener and the
|
|
1254
|
-
// rule's re-spelt sentence. **NO ADDRESS APPEARS ANYWHERE IN IT** — the pair's own address belongs to the
|
|
1255
|
-
// caller, and a listener's mirror address asserted which of its N rows "kept" the identity (§3.4) — so the
|
|
1256
|
-
// refusal's `address` member stays `null` by construction. **The rule's sentence moves by ONE WORD, and its
|
|
1257
|
-
// spelling is the anchor `bindings/js/README.md:233` already carries: *"a listener and a constraint do not
|
|
1258
|
-
// share one HANDLE"*.**
|
|
1259
|
-
const collided = listenerStandingAt(site.state, site.id);
|
|
1260
|
-
if (collided === true) {
|
|
1261
|
-
boundaryReject(
|
|
1262
|
-
'AddressMalformed',
|
|
1263
|
-
site.id,
|
|
1264
|
-
`addConstraint refuses: the listener '${site.id}' keeps that handle, and a listener and a `
|
|
1265
|
-
+ 'constraint do not share one handle',
|
|
1266
|
-
undefined,
|
|
1267
|
-
'handle',
|
|
1268
|
-
);
|
|
1269
|
-
}
|
|
1270
|
-
const held = site.state.constraints.get(constraintPairKey(site.addresses, site.id));
|
|
1271
|
-
if (held === undefined) {
|
|
1272
|
-
const carried = carryConstraint(site.state, instance, site.addresses, site.id, constraint);
|
|
1273
|
-
// **DELIVER → THE ANSWER** (`PIN-2`): the registration's own passing close has already delivered, so a
|
|
1274
|
-
// fired body's throwable refuses the act here and the identity is never returned (`PIN-10`; `Q-13`).
|
|
1275
|
-
raiseListenerFailure(site.state);
|
|
1276
|
-
return carried.identity;
|
|
1277
|
-
}
|
|
1278
|
-
// ═══════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1279
|
-
// **⟶ THE HELD-PAIR ARM IS `CHECK → PURGE → ADD`, AND IT IS THE ONE ORDER THE RULING GIVES**
|
|
1280
|
-
// (`P: docs/pending.md · (O-3)`, verbatim: *"Writing a constraint to an existing handle purges everything
|
|
1281
|
-
// of the old handle, then adds the new one. Everything, no exceptions, stop inventing ones. Override all
|
|
1282
|
-
// conflicting decisions."*; `(O-4)`, verbatim: *"THAT THE ORDER IS CHECK → PURGE → ADD at every site that
|
|
1283
|
-
// reaches `K-1` from a held pair"*; `contract.md §2.3` items 1–3).
|
|
1284
|
-
//
|
|
1285
|
-
// **STEP 1 — CHECK.** **A PURGE THAT RUNS BEFORE THE NEW ELEMENT IS KNOWN-GOOD DESTROYS THE OLD LISTENER AND
|
|
1286
|
-
// THEN FAILS TO INSTALL, LEAVING THE ADDRESS BARE — *a purge with no add*** (`(O-4)`, its own ground;
|
|
1287
|
-
// `A76`). **THE FOUR PRE-CHECKABLE CLASSES ARE ALREADY PASSED**, because `constraintSite` ran first and
|
|
1288
|
-
// refused every outside pair, every out-of-domain address and every non-function (`contract.md §2.3`
|
|
1289
|
-
// item 4's four classes; `constraint-sites.md §2` item 1). **THE CHECK'S FAILURE LEAVES THE OLD HANDLE WHOLE,
|
|
1290
|
-
// AND THAT IS NOT AN EXCEPTION — it is the ABSENCE of a purge, since nothing was ever purged**
|
|
1291
|
-
// (`(O-4)` item (ii), verbatim).
|
|
1292
|
-
//
|
|
1293
|
-
// **STEP 2 — PURGE.** **EVERYTHING OF THE OLD HANDLE, AT EVERY ADDRESS IT STOOD AT, ACROSS EVERY
|
|
1294
|
-
// STRUCTURE.** **THE KERNEL'S OWN ADDRESS ROWS ARE PURGED WITH THE HANDLE** — which is what falsifies
|
|
1295
|
-
// `surface.md:872`'s second sentence outright (`(O-3)` item (v): *"AND IT REPLACES NOTHING IN THE KERNEL'S
|
|
1296
|
-
// OWN STRUCTURE"* — BOTH SENTENCES GO).
|
|
1297
|
-
// **⟶ AND THE CALL CARRIES `K-6`'S DECLARED TWO POSITIONS AND NO THIRD** (`contract.md §2.9` item 3;
|
|
1298
|
-
// `remove-member.md §3` item 2's two priced alternatives, both refused): **the former fourth position that
|
|
1299
|
-
// suppressed the read-model delete is DROPPED**, because the re-add below writes the same pair identity
|
|
1300
|
-
// back through `K-1` and `carryConstraint` (`P: docs/pending.md · (O-3)` item (iv)'s obligation; `(AA-2)`;
|
|
1301
|
-
// `contract.md §2.6` item 2).
|
|
1302
|
-
// **⟶ AMENDED 2026-10-22 (`DEF-2026-10-20-F` landed; the architect's ruling) — `K-6` IS CALLED WHERE A
|
|
1303
|
-
// REGISTRATION STANDS, AND A DISABLED PAIR STANDS NONE.** **The disable arm is `remove`-only now, so a pair
|
|
1304
|
-
// whose `entry.enabled` is `false` has NO kernel row for `K-6` to find — and `K-6` REFUSES `KC-2` (*"no
|
|
1305
|
-
// constraint pair answers to …"*) rather than answering a no-op** (`contract.md §4` `F-12`). **So this
|
|
1306
|
-
// overwrite arm purges the pair's OLD registration only where the pair was ENABLED and stands one**
|
|
1307
|
-
// (`withdrawStanding` below, which states the rule once for every held-pair purge site). **NOTHING IS LEFT
|
|
1308
|
-
// UNPURGED BY THE GUARD:** where the pair is disabled there is nothing to withdraw, and the ADD below lands
|
|
1309
|
-
// the supplied element under the same identity either way — `K-1`'s own idempotence arm answers a row that
|
|
1310
|
-
// survives a refused registration's wake (`kernel-surface.md §2.1` item 1; `CC-7`). **A DISABLED PAIR IS
|
|
1311
|
-
// STILL A HELD PAIR, so this arm is still the overwrite arm and still answers the pair's own identity.**
|
|
1312
|
-
withdrawStanding(instance, held);
|
|
1313
|
-
// ═══════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1314
|
-
// **⟶ STEP 3 IS AN *EXTENSION PLUS AN OVERWRITE*, 2026-10-24 — AND THE EXTENSION HALF IS THE DEFECT
|
|
1315
|
-
// THIS ARM SHIPPED WITHOUT.** The declaration is `docs/L1/surface-deltas.md` `Q-2`'s repair `(i)`, landed
|
|
1316
|
-
// by `D-29`'s pair-key ruling (*"the pair's identity key becomes the `id` alone … it makes a second
|
|
1317
|
-
// `addConstraint` at a new address an **extension plus an overwrite**"*), over
|
|
1318
|
-
// `docs/specs/storeroom-held-listener-identity/contract.md §2.6` item 4 (*"one pair, N registry rows,
|
|
1319
|
-
// removal clears all N"*). **ONLY THE OVERWRITE SHIPPED**: the bytes below replaced the pair's address set
|
|
1320
|
-
// with the CALL's set (`held.addresses = site.addresses`), so a pair extended from `['a']` to `['b']`
|
|
1321
|
-
// stopped existing at `['a']` — **its function was replaced, as `D-24` declares, and its ADDRESSES WERE
|
|
1322
|
-
// DESTROYED, which no clause declares.** **AND THE TWO SIDES OF THAT ONE BUG ARE NAMED HERE BECAUSE THEY
|
|
1323
|
-
// ARE ONE CHANGE:** the kernel's row and the store's home entry lost `['a']` (the pair no longer evaluated
|
|
1324
|
-
// there), **and `constraints()` answered `address: [["b"]]` because it reads this very entry's
|
|
1325
|
-
// `addresses`** — the read and the behaviour disagreed, and the read is the surface's own enumeration.
|
|
1326
|
-
//
|
|
1327
|
-
// **THE MECHANISM IS THE UNION, AND IT IS FORCED BY THE STORE'S OWN SET POSITION.**
|
|
1328
|
-
// `docs/specs/storeroom-held-listener-identity/contract.md §2.2` item 3 makes `listen(h, S2)` after
|
|
1329
|
-
// `listen(h, S1)` an ASSIGNMENT that *"destroys `S1` wholly and installs `S2`"*, **so the kernel cannot
|
|
1330
|
-
// get an extension by passing only the new set — the set that must reach `store.listen(id, ·)` is
|
|
1331
|
-
// `oldSet ∪ newSet`, and the store's assignment then installs exactly that** (`unionAddressSets` above,
|
|
1332
|
-
// which states the rule once). **THE PURGE, ITS ORDER AND ITS GUARD ARE UNMOVED** — `CHECK → PURGE → ADD`
|
|
1333
|
-
// stands, the purge is still `K-6` at every address the old pair stood at, and the pair's FUNCTION is
|
|
1334
|
-
// still OVERWRITTEN and not merged (`D-24`). **WHAT MOVES IS WHICH MEMBERS THE ADD WALKS: the merged set,
|
|
1335
|
-
// at the old set's order first**, so `K-1`'s own accumulated-set answer at its last call is the union and
|
|
1336
|
-
// the store's assignment installs it whole.
|
|
1337
|
-
const extended = unionAddressSets(held.addresses, site.addresses);
|
|
1338
|
-
// **STEP 3 — ADD.** The supplied element is installed under **THE SAME IDENTITY**, because the identity now
|
|
1339
|
-
// lives in the STORE and is returned with the pair, so the mechanism's change does not move the observable
|
|
1340
|
-
// (`(O-3)` item (iv)'s obligation; `(AA-2)`; `contract.md §2.6` item 2).
|
|
1341
|
-
// **⟶ AND A REFUSAL HERE HAS ALREADY TAKEN THE PAIR'S TWO ROWS WITH THE PURGE** — `constraintSite`'s check
|
|
1342
|
-
// cannot reach the registration-time evaluation, so this is `docs/specs/storeroom-held-listener-identity/contract.md §2.3` item 4's own declared split — **and both
|
|
1343
|
-
// are put back BEFORE the refusal crosses, because the second of that clause's two facts is the kernel's to
|
|
1344
|
-
// keep: the pair still evaluates and `constraints()` is unmoved** (`restoreHeldPair` above;
|
|
1345
|
-
// `constraint-sites.md §4` item 2; `§2.1` item 1). **`restoreHeldPair` READS `held`, WHICH IS UNMOVED ON
|
|
1346
|
-
// EVERY REFUSING ARM**: the extension below is written to the entry only after this loop has passed.
|
|
1347
|
-
let refusedAt = null;
|
|
1348
|
-
try {
|
|
1349
|
-
for (let position = 0; position < extended.length; position += 1) {
|
|
1350
|
-
// **THE ADDRESS THIS REGISTRATION IS BEING MADE AT IS KEPT FOR THE REFUSAL'S FOURTH MEMBER —
|
|
1351
|
-
// `D-77`.** The loop's own index is out of scope in the `catch` below (it is the `for` statement's),
|
|
1352
|
-
// so the datum is taken where it stands rather than re-derived there.
|
|
1353
|
-
refusedAt = extended[position];
|
|
1354
|
-
constraintsKernel().register(instance, extended[position], site.id, constraint);
|
|
1355
|
-
}
|
|
1356
|
-
} catch (refusal) {
|
|
1357
|
-
restoreHeldPair(site.state, instance, held);
|
|
1358
|
-
// **`D-77`: the act refused is the registration at THIS address of the pair's own set.**
|
|
1359
|
-
registrationCrossing(refusal, refusedAt);
|
|
1360
|
-
}
|
|
1361
|
-
// **AND THE READ MODEL CARRIES THE UNION, NOT THE CALL'S SET** — this is defect 2's whole fix and it is
|
|
1362
|
-
// the other side of the same change: `enumerateConstraints` answers one row per carried pair with this
|
|
1363
|
-
// entry's `addresses`, so a pair that evaluates at N addresses must be *reported* at N addresses
|
|
1364
|
-
// (`contract.md §2.6` item 5; `PAR-HL-13`). **NO ROW IS ADDED AND NONE IS REMOVED**: the count is still
|
|
1365
|
-
// one row per `id` (`D-29` item 2), and the member's type is unmoved.
|
|
1366
|
-
held.addresses = extended;
|
|
1367
|
-
held.addressKey = addressSetKey(extended);
|
|
1368
|
-
held.fn = constraint;
|
|
1369
|
-
held.enabled = true;
|
|
1370
|
-
// **⟶ AND STEP 3 IS THE RE-ADD: THE SAME PAIR IDENTITY IS WRITTEN BACK UNDER ITS OWN KEY** (`(O-3)`
|
|
1371
|
-
// item (iv)'s obligation; `(AA-2)`: *"Move the identity into the store"*). **THE PURGE DELETED THE
|
|
1372
|
-
// READ-MODEL ROW AND THE RE-ADD PUTS IT BACK**, so the identity the caller held before the cycle is the
|
|
1373
|
-
// identity after it, by VALUE, and the enumeration is unmoved (`contract.md §2.6` items 2–3;
|
|
1374
|
-
// `constraint-identity.md §5` `IF-1`).
|
|
1375
|
-
site.state.constraints.set(constraintPairKey(held.addresses, held.id), held);
|
|
1376
|
-
// **DELIVER → THE ANSWER** (`PIN-2`): the overwrite arm's re-registration delivered at its own passing
|
|
1377
|
-
// close, so a fired body's throwable refuses the act here (`PIN-10`; `Q-13`).
|
|
1378
|
-
raiseListenerFailure(site.state);
|
|
1379
|
-
return held.identity;
|
|
1380
|
-
} finally {
|
|
1381
|
-
state.registrationDelivery = priorDelivery;
|
|
1382
|
-
closeCommit(instance, opened);
|
|
1383
|
-
}
|
|
1384
|
-
},
|
|
1385
|
-
/// `surface.md §2.12` item 2 (a): **`a.constraintOn(pair, constraint) -> undefined`** — the ENABLE half.
|
|
1386
|
-
/**
|
|
1387
|
-
* **`docs/specs/storeroom-js/surface.md §2.12` ITEM 2 (a): `constraintOn(pair, constraint) -> undefined` / `constraintOff(pair, constraint) ->
|
|
1388
|
-
* undefined` — THE TWO HALVES OF THE ONE TOGGLE, AND NEITHER STANDS IN THE KERNEL.**
|
|
1389
|
-
*
|
|
1390
|
-
* **THEIR THREE ANSWERS, AND THE TWO SHARED CLAUSES:**
|
|
1391
|
-
* * **IDEMPOTENT SUCCESS WHERE THE PAIR ALREADY STANDS IN THE STATE IT ASKS FOR** (item 3's first answered
|
|
1392
|
-
* question): `undefined`, the pair and its element EXACTLY as they stood, and NOTHING THROWN.
|
|
1393
|
-
* * **THE SECOND POSITION IS REQUIRED AND IS A NO-OP ON EVERY SUCCESS** (`item 3`'s `constraintOn` row;
|
|
1394
|
-
* `docs/specs/storeroom-js/surface.md §2.4` item 9 (f)'s method table: *"the third position is REQUIRED and is a no-op on success"*): a
|
|
1395
|
-
* FUNCTION there is never refused on the pair's ground, the entry NEVER SUBSTITUTES ONE, and it is
|
|
1396
|
-
* `entry.fn` — the element the entry carried — that is evaluated at the next write. **CARRIAGE IS
|
|
1397
|
-
* PAIR-KEYED AND THE TOGGLE'S OWN ARGUMENTS DO NOT DECIDE IT.**
|
|
1398
|
-
* * **AN OUTSIDE `pair` OR A SHORT ARITY TAKES `constraintSite`'s ONE `TypeError`**, and a WELL-FORMED PAIR
|
|
1399
|
-
* THE ENTRY DOES NOT CARRY takes `constraintUncarried`'s (`A126`).
|
|
1400
|
-
*/
|
|
1401
|
-
constraintOn(pair, constraint) {
|
|
1402
|
-
// **⟶ THE RECEIVER, FIRST AND BEFORE ANY READ OR EDIT** — the guard `addConstraint` now takes, taken
|
|
1403
|
-
// here for the same reason and in the same form (`constraintDetached`, `src/entry/constraints.mjs`).
|
|
1404
|
-
// **A DETACHED TOGGLE THREW THE CONSTRAINT METHODS' `TypeError` BEFORE THIS LINE EXISTED**, which is
|
|
1405
|
-
// neither the surface's one form nor a store code; it now refuses in the seven's one plain form and
|
|
1406
|
-
// moves nothing — no `openCommit`, no pair read, no `K-1`.
|
|
1407
|
-
constraintDetached(this);
|
|
1408
|
-
// **⟶ AND THE DELIVERY'S SET AT THE RE-ARM IS THE REPAIR'S OWN `triggered` TOO — `PIN-6` (ii), `D-125`
|
|
1409
|
-
// item `1`.** The re-registration's `K-1` reaches the same registration route and the same passing close, so
|
|
1410
|
-
// the channel speaks here for the same reason and reads the same value; **the set is `PIN-6` (ii)'s
|
|
1411
|
-
// *"THE STORE'S OWN `triggered`"***, one invocation per distinct handle, after the save and before this
|
|
1412
|
-
// act's `undefined`.
|
|
1413
|
-
const priorDelivery = state.registrationDelivery;
|
|
1414
|
-
state.registrationDelivery = 'triggered';
|
|
1415
|
-
state.listenerFailure = null;
|
|
1416
|
-
// **⟶ `§4.1`: `constraintOn` OPENS ONE — ENABLING.**
|
|
1417
|
-
const opened = openCommit(instance);
|
|
1418
|
-
try {
|
|
1419
|
-
const verb = 'constraintOn';
|
|
1420
|
-
const site = constraintSite(state, verb, arguments.length, pair, constraint);
|
|
1421
|
-
const entry = site.state.constraints.get(constraintPairKey(site.addresses, site.id));
|
|
1422
|
-
if (entry === undefined) constraintUncarried(verb, pair);
|
|
1423
|
-
if (entry.enabled !== true) {
|
|
1424
|
-
// **⟶ AND THIS ARM ADDS — `entry.fn`, THE ELEMENT THE ENTRY CARRIED, WHICH IS BEING ENABLED.** **THE
|
|
1425
|
-
// RULING'S CLAUSE, AT ITS OWN SITE: *"THE PROPOSAL MUST STATE THAT A TOGGLE AT A PAIR PURGES THE PAIR'S
|
|
1426
|
-
// OLD STORE ENTRIES, because that is what `no exceptions` means at this site"*** (`P: docs/pending.md ·
|
|
1427
|
-
// (O-3)` item (v), verbatim; `contract.md §2.3` item 7; `constraint-sites.md §1` rows 2–3).
|
|
1428
|
-
//
|
|
1429
|
-
// **⟶ AMENDED 2026-10-22 (`DEF-2026-10-20-F` landed; the architect's ruling) — THE QUOTED *"it is the
|
|
1430
|
-
// same rule for `constraintOn`/`constraintOff`, which reach the same `K-1`: their re-registration is a
|
|
1431
|
-
// purge-then-add too, and `constraintParked` is the new element added"* IS NOT TO BE READ AS A RULE ABOUT
|
|
1432
|
-
// BOTH ARMS, AND THIS SITE NO LONGER READS IT AS ONE.** **`(O-3)` item (v)'s SUBJECT is *"a constraint
|
|
1433
|
-
// written to an existing handle"* — the OVERWRITE/WRITE path, where a body genuinely REPLACES a body.**
|
|
1434
|
-
// **THE ENABLE ARM WRITES A BODY AND THUS LEGITIMATELY ADDS ONE — `entry.fn`, because the pair is
|
|
1435
|
-
// ENABLED; THE DISABLE ARM WRITES NOTHING, SO IT PURGES ONLY (`remove`) AND ADDS NOTHING** (ground 4;
|
|
1436
|
-
// `constraintOff`'s own amended note below). **Item (v)'s shared-route observation is a fact about
|
|
1437
|
-
// REACHABILITY — both arms DO reach `K-1` — and not an instruction to add on both.** **AND THE RULED
|
|
1438
|
-
// ASYMMETRY AT `§4.1`: this arm brackets at entry (`:4034`) and is table `1`, while `constraintOff`
|
|
1439
|
-
// brackets nowhere and is table `2`, so an identical nested `listen` here JOINS an extant commit and
|
|
1440
|
-
// there OPENED one from zero — which is why only the disable arm's copy was the defect.** **`constraintParked`
|
|
1441
|
-
// IS NOT ADDED BY EITHER TOGGLE: it remains the element a *disabled* pair's registry record carries for
|
|
1442
|
-
// ENUMERATION purposes, at `restoreHeldPair`'s refusal wake (`:5597`).**
|
|
1443
|
-
//
|
|
1444
|
-
// **⟶ AND THE PURGE THIS ARM USED TO TAKE IS GONE WITH THE DISABLE ARM'S REGISTRATION — A CONSEQUENCE THE
|
|
1445
|
-
// RULING DID NOT NAME AND THAT IS RECORDED HERE RATHER THAN DISCOVERED LATER.** The `remove` that stood
|
|
1446
|
-
// below was `K-6` against the pair's OWN standing row — **the very row the disable arm's `register` used
|
|
1447
|
-
// to leave behind. With the register half removed, a DISABLED pair stands NO kernel row at all** (ground
|
|
1448
|
-
// 3: `remove` is already the complete act), **so `K-6` refuses `KC-2` — *"no constraint pair answers to
|
|
1449
|
-
// …"* — and a re-enable would throw where `surface.md §2.12` item 3's clause 5 declares a toggle. THE
|
|
1450
|
-
// PURGE-THEN-ADD SPANS THE TWO HALVES NOW AND NOT ONE ARM:** `constraintOff` purges (its `remove`), and
|
|
1451
|
-
// `constraintOn` adds (`entry.fn` through `K-1`), **which is literally *"the old handle's entries are
|
|
1452
|
-
// purged before the new one is added"* (`(O-3)` item (i))**. **NOTHING IS UNPURGED BY ITS ABSENCE:** a
|
|
1453
|
-
// pair reaching this arm stands no store-side listener, since the only act that could have left one is
|
|
1454
|
-
// the disable, which no longer performs it. **AND WHERE ONE DOES STAND — the declared residue of a
|
|
1455
|
-
// REFUSED registration, which `restoreHeldPair` below writes back — `K-1`'s own idempotence arm is what
|
|
1456
|
-
// answers it** (`kernel-surface.md §2.1` item 1; `CC-7`: *"a second registration under the SAME pair
|
|
1457
|
-
// keeps the replaced registration's PLACE and replaces only its function"*), **so the pair is re-added
|
|
1458
|
-
// under its own identity either way.**
|
|
1459
|
-
//
|
|
1460
|
-
// **THE CHECK PRECEDES ALL OF IT, AS AT EVERY HELD-PAIR SITE** (`constraintSite` has already run: the
|
|
1461
|
-
// pair's shape, the id, the addresses' domain and the element's class), **and a refusal therefore
|
|
1462
|
-
// changes nothing.** **AND THE IDENTITY STANDS THROUGH THE CYCLE — the toggle is a TOGGLE and not a
|
|
1463
|
-
// removal** (`constraint-identity.md §3` item 3; `contract.md §5.6`'s `S-ID` family; `IF-5`).
|
|
1464
|
-
// **⟶ AND THE REFUSAL WAKE BELOW IS THIS ARM'S AND STAYS: THIS ARM DOES RE-REGISTER A BODY THROUGH
|
|
1465
|
-
// `K-1`, so a registration-time refusal is reachable here and its residue is the declared one**
|
|
1466
|
-
// (`docs/specs/storeroom-held-listener-identity/contract.md §2.3` item 7; `constraint-sites.md §1` rows
|
|
1467
|
-
// 2–3; `§4` item 2; `§2.1` item 1). **⟶ AND IT IS REACHABLE ON THIS ARM AND ON NO ARM OF `constraintOff`**
|
|
1468
|
-
// (`DEF-2026-10-20-F` consequence (i): a `remove`-only arm cannot refuse a re-registration, so the disable
|
|
1469
|
-
// arm's `try`/`catch` went with its loop — `:4113` onwards).
|
|
1470
|
-
let refusedAt = null;
|
|
1471
|
-
try {
|
|
1472
|
-
for (const address of entry.addresses) {
|
|
1473
|
-
// **THE ADDRESS THIS RE-REGISTRATION IS BEING MADE AT, KEPT FOR THE REFUSAL'S FOURTH MEMBER —
|
|
1474
|
-
// `D-77`** (the loop's own binding is out of scope in the `catch`).
|
|
1475
|
-
refusedAt = address;
|
|
1476
|
-
constraintsKernel().register(instance, address, entry.id, entry.fn);
|
|
1477
|
-
}
|
|
1478
|
-
} catch (refusal) {
|
|
1479
|
-
restoreHeldPair(site.state, instance, entry);
|
|
1480
|
-
// **`D-77`: the act refused is the re-registration at THIS address.**
|
|
1481
|
-
registrationCrossing(refusal, refusedAt);
|
|
1482
|
-
}
|
|
1483
|
-
entry.enabled = true;
|
|
1484
|
-
// **⟶ AND THE PAIR'S STATE ROW STANDS UNDER THE SAME PAIR IDENTITY** (`P: docs/pending.md · (O-3)`
|
|
1485
|
-
// item (iv)'s obligation; `(AA-2)`: *"Move the identity into the store"*, preserved *"equal to itself on
|
|
1486
|
-
// a second `addConstraint` at the SAME pair"*). **THE TOGGLE IS NOT A REMOVAL, so the pair is carried
|
|
1487
|
-
// UNDER THE SAME IDENTITY and the enumeration is unmoved** (`constraint-identity.md §3` item 3;
|
|
1488
|
-
// `§5` `IF-5`; `removal-members.md §3` item 3): *"`constraintOff` is a TOGGLE and not a removal: a
|
|
1489
|
-
// disabled pair is STILL CARRIED and STILL ENUMERATED"*.
|
|
1490
|
-
// **⟶ AMENDED 2026-10-22 (same ruling): this row is not written back *after a purge* — this arm purges
|
|
1491
|
-
// nothing now** (see the note above). The pair's record stands as it stood, which is what ``(AA-2)``'s
|
|
1492
|
-
// *"equal to itself"* asks for at a re-enable, and the enumeration it feeds is unmoved either way.
|
|
1493
|
-
site.state.constraints.set(constraintPairKey(entry.addresses, entry.id), entry);
|
|
1494
|
-
}
|
|
1495
|
-
// **DELIVER → THE ANSWER** (`PIN-2`): the re-registration's `K-1` delivered at its own passing close, so a
|
|
1496
|
-
// fired body's throwable refuses the TOGGLE here and this act never answers (`PIN-10`; `Q-13`; `Q-15`'s
|
|
1497
|
-
// *"the toggle refuses; the instance and every other pair stand"*).
|
|
1498
|
-
raiseListenerFailure(site.state);
|
|
1499
|
-
return undefined;
|
|
1500
|
-
} finally {
|
|
1501
|
-
state.registrationDelivery = priorDelivery;
|
|
1502
|
-
closeCommit(instance, opened);
|
|
1503
|
-
}
|
|
1504
|
-
},
|
|
1505
|
-
/// `surface.md §2.12` item 2 (a): **`a.constraintOff(pair, constraint) -> undefined`** — the DISABLE half.
|
|
1506
|
-
constraintOff(pair, constraint) {
|
|
1507
|
-
// **⟶ THE RECEIVER, FIRST AND BEFORE ANY READ OR EDIT** — `constraintOn`'s guard beside it, and the
|
|
1508
|
-
// reason is the same one: this member reached `K-6` off this factory's closure, so a detached call
|
|
1509
|
-
// would purge the pair's store-side entry. **IT REFUSES IN THE SEVEN'S ONE PLAIN FORM AND MOVES
|
|
1510
|
-
// NOTHING** (`constraintDetached`, `src/entry/constraints.mjs`).
|
|
1511
|
-
constraintDetached(this);
|
|
1512
|
-
const verb = 'constraintOff';
|
|
1513
|
-
const site = constraintSite(state, verb, arguments.length, pair, constraint);
|
|
1514
|
-
const entry = site.state.constraints.get(constraintPairKey(site.addresses, site.id));
|
|
1515
|
-
if (entry === undefined) constraintUncarried(verb, pair);
|
|
1516
|
-
if (entry.enabled !== false) {
|
|
1517
|
-
// **THE CHECK PRECEDES IT, AS AT EVERY HELD-PAIR SITE** (`constraintSite` has already run: the pair's
|
|
1518
|
-
// shape, the id, the addresses' domain and the element's class), **and a refusal therefore purges
|
|
1519
|
-
// nothing.** **AND THE IDENTITY STANDS THROUGH THE CYCLE — `constraintOff` is a TOGGLE and not a
|
|
1520
|
-
// removal** (`constraint-identity.md §3` item 3; `contract.md §5.6`'s `S-ID` family; `IF-5`).
|
|
1521
|
-
//
|
|
1522
|
-
// **⟶ AMENDED 2026-10-22 (`DEF-2026-10-20-F` landed; the architect's ruling at the store/kernel code
|
|
1523
|
-
// review) — THE DISABLE ARM PURGES ONLY (`remove`), AND ADDS NOTHING.** This block read *"THE TOGGLE IS A
|
|
1524
|
-
// PURGE-THEN-ADD TOO"*, on the ground that `(O-3)` item (v) applies *"the same rule for
|
|
1525
|
-
// `constraintOn`/`constraintOff`, which reach the same `K-1`"*. **THAT READING IS SUPERSEDED BY THE
|
|
1526
|
-
// RULING, WHICH IS VERBATIM: *"Remove the register half, `constraintOff` removes the constraint."***
|
|
1527
|
-
// **`(O-3)` item (v)'s SUBJECT is *"a constraint written to an existing handle"* — the OVERWRITE/WRITE
|
|
1528
|
-
// path, where a body genuinely REPLACES a body — AND THE DISABLE ARM WRITES NOTHING**, so it has nothing
|
|
1529
|
-
// to add; item (v)'s shared-route observation is a fact about REACHABILITY and not an instruction to add
|
|
1530
|
-
// on both arms (`DEF-2026-10-20-F` ground 4; `docs/defects.md`).
|
|
1531
|
-
//
|
|
1532
|
-
// **SO THE RULED FORM IS ONE ACT: `remove` (`K-6`), WHICH IS ALREADY THE COMPLETE ACT** (ground 3;
|
|
1533
|
-
// `contract.md §2.9` items 2–3). **THE PAIR'S IDENTITY AND ITS ENUMERATION SURVIVE THROUGH
|
|
1534
|
-
// `entry.enabled = false` AND THE STATE ROW BELOW — NOT THROUGH A STORE-SIDE LISTENER.** **THE DELETED
|
|
1535
|
-
// `register` LOOP WAS A DEFECT AND NOT A MANDATED BEHAVIOUR, ON THE RULING'S OWN MEASUREMENT:**
|
|
1536
|
-
// `constraintParked` is a fresh `() => true` (`:5514`), so the arm stood a body that PASSES ALWAYS in
|
|
1537
|
-
// the store's address slot for a disabled pair — **the mask is a passing function rather than an absent
|
|
1538
|
-
// one** — and `K-1` calls `store.listen(home, set)` UNCONDITIONALLY (`constraint-kernel.mjs:561`), **so a
|
|
1539
|
-
// table-`1` BRACKETING act happened inside a table-`2` verb's window**, falsifying
|
|
1540
|
-
// `finalizer-and-teardown.md §4.1` table `2`'s *"disabling cannot fire — nothing runs"* at the mechanism
|
|
1541
|
-
// level (grounds 1–2). **THE ASYMMETRY THAT MADE IT BITE:** `constraintOn` brackets at entry (`:4034`),
|
|
1542
|
-
// so its identical nested `listen` FINDS AN EXTANT COMMIT AND JOINS IT, while `constraintOff` takes none
|
|
1543
|
-
// and the same call OPENED FROM ZERO. **THE WITNESS IS `addon-adoption.test.mjs`'s COUNT WALK OVER ALL
|
|
1544
|
-
// THIRTEEN VERBS** (`test-cases.md` `F-8`), which is GREEN after this note and was RED before it.
|
|
1545
|
-
//
|
|
1546
|
-
// **AND `DEF-2026-10-20-F`'S CONSEQUENCE (i) IS SETTLED HERE — THE `try`/`catch` GOES WITH THE LOOP, it
|
|
1547
|
-
// is not kept as declared silence.** `restoreHeldPair`'s refusal wake is UNREACHABLE on this arm, because
|
|
1548
|
-
// **a `remove`-only arm cannot refuse a re-registration**; a `catch` left standing over an act the arm no
|
|
1549
|
-
// longer performs would claim to guard a body nothing can reach. **The one act that remains opens no
|
|
1550
|
-
// commit and reaches no `K-1`**, so there is no residue for a wake to put back. **`constraintParked`
|
|
1551
|
-
// REMAINS (`:5514`) AS THE ELEMENT A *DISABLED* PAIR'S REGISTRY RECORD CARRIES FOR ENUMERATION PURPOSES
|
|
1552
|
-
// — its one remaining registration site is `restoreHeldPair`'s refusal wake (`:5597`) — AND IT IS NO
|
|
1553
|
-
// LONGER REGISTERED AS A STORE LISTENER BY THIS ARM, NOR BY ANY SUCCESSFUL DISABLE.**
|
|
1554
|
-
constraintsKernel().remove(instance, { address: entry.addresses, id: entry.id });
|
|
1555
|
-
entry.enabled = false;
|
|
1556
|
-
// **⟶ AND THE PAIR'S STATE ROW IS WRITTEN BACK UNDER THE SAME PAIR IDENTITY** (`P: docs/pending.md ·
|
|
1557
|
-
// (O-3)` item (iv)'s obligation; `(AA-2)`: *"Move the identity into the store"*, preserved *"equal to
|
|
1558
|
-
// itself on a second `addConstraint` at the SAME pair"*). **THE TOGGLE IS NOT A REMOVAL, so the row
|
|
1559
|
-
// `K-6`'s `FORGET_PAIR` took is restored UNDER THE SAME IDENTITY and the enumeration is unmoved**
|
|
1560
|
-
// (`constraint-identity.md §3` item 3; `§5` `IF-5`; `removal-members.md §3` item 3): *"`constraintOff` is
|
|
1561
|
-
// a TOGGLE and not a removal: a disabled pair is STILL CARRIED and STILL ENUMERATED"*.
|
|
1562
|
-
// **⟶ AMENDED 2026-10-22 (`DEF-2026-10-20-F` consequence (ii), same ruling): THIS WRITE-BACK IS THE
|
|
1563
|
-
// WHOLE OF WHAT IS RESTORED, AND IT IS A *REGISTRY* RESTORATION AND NOT A RE-ADD OF A BODY.** **What a
|
|
1564
|
-
// disabled pair must retain is its IDENTITY and its ENUMERATION — a registry fact — and this row beside
|
|
1565
|
-
// `entry.enabled = false` above satisfies exactly that** (ground 3). **`enumerateConstraints` does not
|
|
1566
|
-
// consult `enabled` at all**, so the pair keeps appearing in `constraints()` with no store-side listener
|
|
1567
|
-
// anywhere (`:5653`; `surface.md §2.12` item 3 clause 5).
|
|
1568
|
-
site.state.constraints.set(constraintPairKey(entry.addresses, entry.id), entry);
|
|
1569
|
-
}
|
|
1570
|
-
return undefined;
|
|
1571
|
-
},
|
|
1572
|
-
/// **`surface.md §2.4` item 9 (f)'s `constraints` clause of 2026-10-17: `a.constraints() -> Array<{ address,
|
|
1573
|
-
/// id }>` — THE REGISTERED-PAIR READ, the thirteenth own member (`10 + 1 + 1 + 1 = 13` ✓; `PAR-JS-27`;
|
|
1574
|
-
/// `docs/specs/storeroom-js/surface.md §2.12` item 2-bis).** **THE RECEIVER IS THE STORE, THE CALL TAKES NO ARGUMENT (arity `0`) AND IT
|
|
1575
|
-
/// THROWS NOTHING** — there is no outside argument for the class test to refuse, and the call makes no
|
|
1576
|
-
/// store call, mints no code, appends no journal entry and changes no node. **It is NOT a named export of
|
|
1577
|
-
/// the entry** (`package.md §1.3` item 3; `docs/specs/storeroom-js/surface.md §2.9` item 1's `A127` clause, `11 → 1` ✓): it is reached
|
|
1578
|
-
/// through the factory's own product alone.
|
|
1579
|
-
constraints() {
|
|
1580
|
-
return enumerateConstraints(state);
|
|
1581
|
-
},
|
|
1582
|
-
// ⟶ MOVED 2026-10-18 (`RCA-8(g)`, gate-4 finding F-2): the wrapper's duplicate `removeListener` header stood here, above the free function's own doc block that `P-8` moved in below. Bytes: archive/p8-merge/2026-10-18/post-gate4/removeListener-wrapper-header.md. `contract.md §2.7` item 9 is the operative member set.
|
|
1583
|
-
/// **⟶ `removeListener(handle) -> undefined` — THE FIRST OF THE TWO NEW MEMBERS**
|
|
1584
|
-
/// (`contract.md §2.7` items 1–2; `removal-members.md §2`; `P: docs/pending.md · P-5`'s explicit-delete ruling).
|
|
1585
|
-
///
|
|
1586
|
-
/// **IT REMOVES THE ENTRY WHOLE AND WITHDRAWS THE STORE'S HOME ENTRIES THE HANDLE NAMED** — *"IT REMOVES THE
|
|
1587
|
-
/// ENTRY WHOLE AND WITHDRAWS THE STORE'S HOME ENTRIES THE HANDLE NAMED"* — and **it is the ONLY route that
|
|
1588
|
-
/// removes an entry** (`contract.md §2.2` item 5 (c)). **NO `unlisten` IS ISSUED AND NO SEPARATE WITHDRAWAL
|
|
1589
|
-
/// VERB IS REACHED: the removal IS the purge, and the map entry's deletion follows it** (`removal-members.md
|
|
1590
|
-
/// §2` item 3).
|
|
1591
|
-
///
|
|
1592
|
-
/// **SUCCESS IS THE NORMAL RETURN (`undefined`) AND THE FAIL IS THE THROW** (`P: docs/pending.md · P-5`'s
|
|
1593
|
-
/// `(R3)`, verbatim) — **and the throw is the DECLARED REVERSAL of `unlisten`'s no-op-success set**: every arm
|
|
1594
|
-
/// that is not a real removal FAILS, with a verbose message (`(R2)`, verbatim; `contract.md §2.7` item 5).
|
|
1595
|
-
/// **A REFUSAL CHANGES NOTHING**: all four structures stand as they stood (`removal-members.md §5`
|
|
1596
|
-
/// obligation (iii)).
|
|
1597
|
-
///
|
|
1598
|
-
/// **AND IT IS NOT A PUBLIC MEMBER YET** — the product's own member set is where it is declared
|
|
1599
|
-
/// (`contract.md §2.7` item 9); this is its body, and the member is added below with the surface.
|
|
1600
|
-
/// **⟶ CORRECTED 2026-10-18 (`P-8` landed): the sentence above is SUPERSEDED — `removeListener` IS a public member of this object as of this date (`bindings/js/index.mjs`'s member list; `contract.md §2.7` item 9: the set is `14`), so *"added below with the surface"* describes a state that no longer holds.** **The dissolved claim is recorded, not silently dropped, because it was theory-of-record when the free function's body was authored.**
|
|
1601
|
-
removeListener(handle) {
|
|
1602
|
-
// **THE CLASS TEST IS THE SURFACE'S ONE THROWN FORM WITH `status` THE STORE'S `AddressMalformed`**
|
|
1603
|
-
// (`removal-members.md §6` item 1; `R-B4`, verbatim: *"`AddressMalformed` — the instance's domain is the
|
|
1604
|
-
// domain"*, so *"a present argument outside its domain"* is read as *"outside THIS INSTANCE'S domain"*).
|
|
1605
|
-
// **A WELL-FORMED STRING THE MAP DOES NOT CARRY IS THAT SAME ARM — the fabricated row** — and so is an
|
|
1606
|
-
// already-deleted handle (`contract.md §2.1` item 5's fourth column).
|
|
1607
|
-
if (!inDomainHandle(handle)) {
|
|
1608
|
-
boundaryReject(
|
|
1609
|
-
'AddressMalformed',
|
|
1610
|
-
targetSpelling(handle),
|
|
1611
|
-
`removeListener's first argument is ${classSpelling(handle)}, and a listener's handle is a non-empty `
|
|
1612
|
-
+ 'string this caller spells',
|
|
1613
|
-
);
|
|
1614
|
-
}
|
|
1615
|
-
if (!state.registry.has(handle)) {
|
|
1616
|
-
boundaryReject(
|
|
1617
|
-
'AddressMalformed',
|
|
1618
|
-
targetSpelling(handle),
|
|
1619
|
-
`removeListener's first argument is '${handle}', and this instance holds no listener entry for it`,
|
|
1620
|
-
);
|
|
1621
|
-
}
|
|
1622
|
-
// ── THE SUCCESS ARM: THE ENTRY GONE WHOLE AND THE STORE'S ENTRIES WITHDRAWN ────────────────────────────
|
|
1623
|
-
// **THE ORDER IS THE FOUR REMOVALS' (`removal-members.md §4` item 2's `HL-DD-4`), read for a listener:**
|
|
1624
|
-
// (1) validate — above; (2) withdraw the store's home entries the handle named — through the store's own
|
|
1625
|
-
// purge; (3) delete the JS entry; (4) return `undefined`.
|
|
1626
|
-
carryRefusal(() => entryOf().removeListener.call(this, handleWire(handle)), [handleWire(handle)]);
|
|
1627
|
-
state.registry.delete(handle);
|
|
1628
|
-
state.home = state.home.filter((row) => row.handle !== handle);
|
|
1629
|
-
return undefined;
|
|
1630
|
-
},
|
|
1631
|
-
/// **⟶ `removeConstraint(pair) -> undefined` — THE SECOND OF THE TWO NEW MEMBERS**
|
|
1632
|
-
/// (`contract.md §2.7` item 3; `removal-members.md §3`; `P: docs/pending.md · P-5`'s `(R4)`, verbatim:
|
|
1633
|
-
/// *"removeConstraint REMOVES EVERYTHING — THE PAIR, ALL N ADDRESS ROWS, THE KERNEL'S REGISTRATION, AND THE
|
|
1634
|
-
/// STORE-SIDE HOME ENTRY"*).
|
|
1635
|
-
///
|
|
1636
|
-
/// **IT IS A THIRD AND STRONGER OPERATION**: neither `constraintOff` (a TOGGLE that PURGES ONLY and keeps the
|
|
1637
|
-
/// pair CARRIED and ENUMERATED through its state row and `entry.enabled = false`) nor the kernel's
|
|
1638
|
-
/// `withdrawRegistration` (which leaves the store's home entry standing). **AND IT IS THE ONE ACT THAT DELETES
|
|
1639
|
-
/// AN IDENTITY** (`contract.md §2.6` item 3; `P: docs/pending.md · (AA-2)`, closing sentence).
|
|
1640
|
-
/// **⟶ AMENDED 2026-10-22 (`DEF-2026-10-20-F` landed; the architect's ruling): the parenthetical above read
|
|
1641
|
-
/// *"a TOGGLE re-registering a parked stub and keeping the pair carried"*. THAT IS SUPERSEDED — the disable
|
|
1642
|
-
/// arm registers NOTHING** (a `remove`-only arm; `constraintOff`'s own amended note). **The DISTINCTION this
|
|
1643
|
-
/// clause draws is unmoved: `constraintOff` keeps the pair's IDENTITY and its ENUMERATION and `removeConstraint`
|
|
1644
|
-
/// DELETES them, and what the disable arm no longer does is stand a `constraintParked` body in the store's
|
|
1645
|
-
/// address slot — which was never what made the pair carried.**
|
|
1646
|
-
///
|
|
1647
|
-
/// **THE ORDER OF THE FOUR REMOVALS IS THIS CONTRACT'S DECLARED `HL-DD-4`** (`removal-members.md §4` item 2):
|
|
1648
|
-
/// **(1) VALIDATE the pair and the call's class; (2) WITHDRAW the store's home entries the pair's addresses
|
|
1649
|
-
/// hold, through `K-6`'s route; (3) DELETE the kernel's `pairs` row and its N address rows; (4) DELETE the JS
|
|
1650
|
-
/// ENTRY — `state.constraints`'s value, its identity included; (5) RETURN `undefined`.**
|
|
1651
|
-
/// **NO INTERMEDIATE STATE IS OBSERVABLE**: after any thrown arm the four structures stand as they stood, and
|
|
1652
|
-
/// after the success return all four are gone (`removal-members.md §4` item 4).
|
|
1653
|
-
///
|
|
1654
|
-
/// **AND THE TWO REFUSAL FORMS ARE TOLD APART BY `status`'s PRESENCE AND NOTHING ELSE**: a PAIR-SHAPED
|
|
1655
|
-
/// outside value takes the constraint methods' `TypeError` with `status` ABSENT (`removal-members.md §6`
|
|
1656
|
-
/// item 2; `contract.md §2.7` item 6), while a WELL-FORMED pair this instance holds no row for takes the
|
|
1657
|
-
/// remove member's own thrown form with a verbose message (`contract.md §2.7` item 5; `removal-members.md §5`
|
|
1658
|
-
/// row 1).
|
|
1659
|
-
removeConstraint(pair) {
|
|
1660
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1661
|
-
// **⟶ THE RECEIVER IS CONSULTED FIRST — A DETACHED `removeConstraint` DELETED A STANDING PAIR BEFORE
|
|
1662
|
-
// THIS LINE EXISTED** (measured 2026-10-26; `docs/guides/package-use.md §12.2): the pair's row left
|
|
1663
|
-
// `state.constraints`, its store-side entry was purged through `K-6`, and the call answered
|
|
1664
|
-
// `undefined`. **THE GUARD IS THE SEVEN STORE-REACHING VERBS' OWN AND ITS FORM IS THEIRS BYTE FOR BYTE**
|
|
1665
|
-
// (`constraintDetached`, `src/entry/constraints.mjs`) — **and it is taken BEFORE step 1's position
|
|
1666
|
-
// tests, which is what makes the atomicity of a refused call its POSITION and not its care.**
|
|
1667
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1668
|
-
constraintDetached(this);
|
|
1669
|
-
// ── STEP 1: VALIDATE. ────────────────────────────────────────────────────────────────────────────────
|
|
1670
|
-
// **⟶ THIS BLOCK IS `removeConstraint`'S OWN, AND THE SENTENCE BELOW IS A CONTINUATION OF ITS SUBJECT:
|
|
1671
|
-
// ONE POSITION, THE PAIR — ITS `address` READ AT THE TWO DECLARED SPELLINGS AND AT NO THIRD** (`contract.md
|
|
1672
|
-
// §2.7` item 3; `PAR-HL-16`; `constraint-identity.md §6`'s pair table).
|
|
1673
|
-
// **THE PAIR'S SHAPE TEST IS THE CONSTRAINT METHODS' OWN — ONE THROWN `TypeError`, `status` ABSENT, the
|
|
1674
|
-
// call changing nothing** (`surface.md:1063` rule (ii), which governs *"THE THREE CONSTRAINT METHODS' EVERY
|
|
1675
|
-
// OUTSIDE VALUE"*; `contract.md §2.7` item 6; `constraint-sites.md §6` item 2). **IT IS TAKEN HERE RATHER
|
|
1676
|
-
// THAN THROUGH `constraintSite` BECAUSE THIS MEMBER HAS NO `constraint` POSITION** — its arity is ONE
|
|
1677
|
-
// (`removal-members.md §3` item 1; `PAR-HL-16`).
|
|
1678
|
-
if (arguments.length < 1 || !isPlainObjectValue(pair) || !Object.hasOwn(pair, 'address') || pair.address === undefined) {
|
|
1679
|
-
constraintRefuse(`${ARGUMENT_POSITION_FIRST} of \`removeConstraint\``, pair);
|
|
1680
|
-
}
|
|
1681
|
-
// **THE PAIR'S `address` IS READ AT THE TWO SPELLINGS THE CONTRACT DECLARES FOR THE CONSTRAINT'S PAIR AND
|
|
1682
|
-
// AT NO THIRD** (`constraint-identity.md §6`'s pair table, verbatim: *"`address`: THE ADDRESS SET the pair
|
|
1683
|
-
// was created with (`§4` item 3) — and, at the REGISTRATION act, a single address"*; `PAR-HL-8`;
|
|
1684
|
-
// `PAR-HL-16`).
|
|
1685
|
-
//
|
|
1686
|
-
// **⟶ AND THE OUTSIDE SET THIS POSITION REFUSES IS `PAR-HL-8`'S OWN EIGHT ROWS AND NO NINTH**, because
|
|
1687
|
-
// `PAR-HL-16`'s outside cell is *"every shape row of `PAR-HL-8`'s outside list, PLUS a well-formed pair the
|
|
1688
|
-
// entry does not carry"*: a non-object · a `null` · an object carrying no `address` · **an `address` outside
|
|
1689
|
-
// the store's domain** · an object carrying no `id` · a non-string `id` · an empty-string `id` · an ABSENT
|
|
1690
|
-
// pair. **THE DISCRIMINATOR IS THE MEMBER'S CLASS, READ ONCE** — an array whose FIRST member is an array is
|
|
1691
|
-
// the pair's SET; an array whose members are segments is the REGISTRATION ACT'S OWN single address. **THE
|
|
1692
|
-
// SECOND IS NOT `listen`'S REFUSED SET-POSITION CLASS** (`listen-verb.md §2.2` item 2 (vi)) **BUT THE
|
|
1693
|
-
// REGISTRATION FORM THIS PAIR WAS CREATED WITH**: the pair the caller hands to `removeConstraint` is the
|
|
1694
|
-
// pair it handed to `addConstraint`, and `addConstraint` admits that spelling (`PAR-HL-8`'s domain read with
|
|
1695
|
-
// `constraint-identity.md §6`'s registration clause) — so refusing it here would make a pair the caller
|
|
1696
|
-
// added unremovable, which `contract.md §3` `S-12` forbids.
|
|
1697
|
-
//
|
|
1698
|
-
// **AND AN ADDRESS OUTSIDE THE STORE'S DOMAIN IS THIS POSITION'S OUTSIDE VALUE, ANSWERED BY RULE (ii)'s
|
|
1699
|
-
// `TypeError`** (`contract.md §4` `F-7`; `removal-members.md §6` item 2: *"the constraint methods' `TypeError`,
|
|
1700
|
-
// `status` ABSENT"* — never the store's form, and never a raw host value), which is the SAME class of answer
|
|
1701
|
-
// `constraintSite` gives that value at the three constraint methods.
|
|
1702
|
-
const addresses = [];
|
|
1703
|
-
if (!isAdmittedArray(pair.address)) {
|
|
1704
|
-
constraintRefuse(`${ARGUMENT_POSITION_FIRST} of \`removeConstraint\``, pair);
|
|
1705
|
-
}
|
|
1706
|
-
if (pair.address.length > 0 && Array.isArray(pair.address[0])) {
|
|
1707
|
-
for (let i = 0; i < pair.address.length; i += 1) {
|
|
1708
|
-
const each = isAdmittedArray(pair.address[i]) ? constraintAddress(pair.address[i]) : null;
|
|
1709
|
-
if (each === null || typeof each === 'string') {
|
|
1710
|
-
constraintRefuse(`${ARGUMENT_POSITION_FIRST} of \`removeConstraint\``, pair);
|
|
1711
|
-
}
|
|
1712
|
-
appendOwn(addresses, each.s);
|
|
1713
|
-
}
|
|
1714
|
-
} else {
|
|
1715
|
-
const each = constraintAddress(pair.address);
|
|
1716
|
-
if (typeof each === 'string') {
|
|
1717
|
-
constraintRefuse(`${ARGUMENT_POSITION_FIRST} of \`removeConstraint\``, pair);
|
|
1718
|
-
}
|
|
1719
|
-
appendOwn(addresses, each.s);
|
|
1720
|
-
}
|
|
1721
|
-
if (!Object.hasOwn(pair, 'id')
|
|
1722
|
-
|| pair.id === undefined
|
|
1723
|
-
|| typeof pair.id !== 'string'
|
|
1724
|
-
|| pair.id === '') {
|
|
1725
|
-
constraintRefuse(`${ARGUMENT_POSITION_FIRST} of \`removeConstraint\``, pair);
|
|
1726
|
-
}
|
|
1727
|
-
const entry = state.constraints.get(constraintPairKey(addresses, pair.id));
|
|
1728
|
-
if (entry === undefined) {
|
|
1729
|
-
// **A WELL-FORMED PAIR THIS INSTANCE HOLDS NO ROW FOR IS A THROW WITH A VERBOSE MESSAGE — and NOT a class
|
|
1730
|
-
// refusal**, because the value is inside every class domain and it is the ROW that is absent
|
|
1731
|
-
// (`contract.md §4` `F-8`; `removal-members.md §5` row 1: *"names the value and the reason"*).
|
|
1732
|
-
throw withEmptyLog(new TypeError(
|
|
1733
|
-
`the pair at the ${ARGUMENT_POSITION_FIRST} of \`removeConstraint\` is '${pair.id}' at `
|
|
1734
|
-
+ `${JSON.stringify(addresses)}, and this instance holds no constraint pair there`,
|
|
1735
|
-
));
|
|
1736
|
-
}
|
|
1737
|
-
// ── STEP 2–3: THE KERNEL'S ROW, ITS N ADDRESS ROWS, AND THE STORE'S HOME ENTRIES, THROUGH `K-6`. ─────
|
|
1738
|
-
// **THE CHAIN IS `removeConstraint → K-6 → removeListener → the store's purge`, AND IT HAS NO CYCLE**
|
|
1739
|
-
// (`contract.md §2.9` item 6; `remove-member.md §6` item 1). **`K-6`'S STORE-SIDE REFUSAL CROSSES
|
|
1740
|
-
// UNCONVERTED** (`contract.md §4` `F-13`), so this frame converts nothing.
|
|
1741
|
-
// **⟶ AMENDED 2026-10-22 (`DEF-2026-10-20-F` landed; the architect's ruling) — THE WITHDRAWAL IS REACHED
|
|
1742
|
-
// WHERE A REGISTRATION STANDS, AND IT IS THIS ACT'S OWN TWO FACTS THAT MAKE THAT THE WHOLE OF THE DECLARED
|
|
1743
|
-
// ANSWER.** **A DISABLED PAIR IS STILL CARRIED and this member is *"THE ONE ACT THAT DELETES AN
|
|
1744
|
-
// IDENTITY"*** (`contract.md §2.6` item 3; `docs/specs/storeroom-js/surface.md §2.12` item 3 clause 5:
|
|
1745
|
-
// *"the toggle is NOT a removal"*) — **so it MUST still succeed at a pair the disable left standing, and
|
|
1746
|
-
// `K-6` CANNOT BE ITS ROUTE THERE: the disable arm purges only, so no kernel row survives it to be found,
|
|
1747
|
-
// and `K-6` refuses `KC-2` for a pair it holds no row for** (`contract.md §4` `F-12`). **THE PURGE IS
|
|
1748
|
-
// THEREFORE GUARDED BY THE PAIR'S OWN POLARITY** (`withdrawStanding` below: `enabled === true` is exactly
|
|
1749
|
-
// *"a registration stands to be withdrawn"*), **and steps 3–4 — the address rows and the JS entry, its
|
|
1750
|
-
// IDENTITY included — are taken exactly as declared**: with no row there is nothing for step 3 to delete,
|
|
1751
|
-
// and step 4 deletes the entry and its identity either way. **A DISABLED PAIR'S REMOVAL IS THEREFORE A
|
|
1752
|
-
// COMPLETE REMOVAL, and `removeConstraint` keeps its declared answer at every pair it can name.**
|
|
1753
|
-
withdrawStanding(instance, entry);
|
|
1754
|
-
// ── STEP 4: THE JS ENTRY, ITS IDENTITY INCLUDED. ─────────────────────────────────────────────────────
|
|
1755
|
-
state.constraints.delete(constraintPairKey(entry.addresses, entry.id));
|
|
1756
|
-
return undefined;
|
|
1757
|
-
},
|
|
1758
|
-
/// `surface.md §2.4` item 5 (b): `register(handle, listener) -> undefined` — the OPAQUE handle a verb
|
|
1759
|
-
/// returned or the construction adopted, and ANY JS function. **It is NOT a named export of the entry**
|
|
1760
|
-
/// (`package.md §1.3` item 3): it is reached through the factory's own product alone.
|
|
1761
|
-
register(handle, listener) {
|
|
1762
|
-
return registerOn(state, handle, listener);
|
|
1763
|
-
},
|
|
1764
|
-
/// **⟶ `settle` IS REMOVED FROM THIS PRODUCT, 2026-10-18 — THE MEMBER SET IS TWELVE, `10 + 1 + 1 = 12`
|
|
1765
|
-
/// ✓** (`surface.md §2.4` item 9's `REMOVED-WHOLE` pointer and item 9 (f)'s clause of that date). **THE
|
|
1766
|
-
/// ARCHITECT'S RULING, VERBATIM: *"Settle is redundant because the kernel is always in the loop."*** **NO
|
|
1767
|
-
/// DRIVE MAY ASSERT A CALL OF IT FROM THIS DATE, ON ANY INSTANCE, FOR ANY ARGUMENT**: the member is not a
|
|
1768
|
-
/// member of the product, so a call reaches a property no clause of this unit declares. **AND THE DELIVERY
|
|
1769
|
-
/// IT ONCE MARSHALLED IS NOT LOST WITH IT**: it was never `settle`'s — it is `docs/specs/storeroom-js/surface.md §2.7` item `7`'s
|
|
1770
|
-
/// terminal-arm act, taken inside the kernel's own act, and this entry PERFORMS the one the kernel
|
|
1771
|
-
/// triggers. **The one member this factory does NOT expose and the kernel does NOT call from here.**
|
|
1772
|
-
///
|
|
1773
|
-
/// **⟶ AND THE CHANNEL THAT MEMBER WAS IS REPLACED BY A SYMBOL-KEYED PROPERTY, NOT BY A NAMED MEMBER**
|
|
1774
|
-
/// (`TERMINAL_ARM` above): the kernel still reaches this entry at its terminal arm, and **the product's
|
|
1775
|
-
/// declared fourteen own members are UNMOVED** (`⟶ CORRECTED 2026-10-26`: this line printed `twelve`, the
|
|
1776
|
-
/// figure the `12 → 14` move of the held-listener-identity unit superseded on 2026-10-19; the operative
|
|
1777
|
-
/// figure is `index.d.ts`'s `StoreInstance` and `surface.md §2.4` item 9 (f)) because a symbol key is
|
|
1778
|
-
/// invisible to `Object.keys` and to `Object.getOwnPropertyNames` — the precedent `A117` (D6) declares and `docs/specs/storeroom-js/surface.md §2.11` clause 9 prints
|
|
1779
|
-
/// (*"a symbol-keyed own property is invisible to both"*). **IT IS NOT A MEMBER OF THE PRODUCT IN THE
|
|
1780
|
-
/// SENSE `docs/specs/storeroom-js/surface.md §2.4` item 9 (f) COUNTS**, and no cell that counts members can see it.
|
|
1781
|
-
[TERMINAL_ARM](record) {
|
|
1782
|
-
return terminalArm(state, record);
|
|
1783
|
-
},
|
|
1784
|
-
/// **`K-6`'s READ-MODEL CHANNEL** (`FORGET_PAIR` above): the kernel's own removal drops the pair's row
|
|
1785
|
-
/// from `state.constraints` after its own rows and the store's entries are gone, so the success arm leaves
|
|
1786
|
-
/// the enumeration short by one (`contract.md §3` `S-19`; `docs/specs/storeroom-held-listener-identity/contract.md §2.7` item 8). **NO MEMBER IS ADDED** to the
|
|
1787
|
-
/// product's declared fourteen — a symbol key is invisible to both enumerations (`A117` (D6)).
|
|
1788
|
-
[FORGET_PAIR](id) {
|
|
1789
|
-
for (const [key, entry] of state.constraints) {
|
|
1790
|
-
if (entry.id === id) state.constraints.delete(key);
|
|
1791
|
-
}
|
|
1792
|
-
return undefined;
|
|
1793
|
-
},
|
|
1794
|
-
};
|
|
1795
|
-
INSTANCES.set(instance, state);
|
|
1796
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1797
|
-
// THE RECEIVER'S OWN PUBLICATION — `receiver-and-refusal.md §1` AND THE TABLE'S RETIREMENT (`§6`; `OWED-2`)
|
|
1798
|
-
//
|
|
1799
|
-
// **THE STRUCTURE CHOSEN, AND WHY** (`contract.md §7` leaves the table's FORM and its RETIREMENT MECHANISM
|
|
1800
|
-
// `OWED`; the requirement is decided and `P-SAS-5` drives it). **TWO PIECES, EACH NAMED FOR THE JOB IT DOES:**
|
|
1801
|
-
//
|
|
1802
|
-
// 1. **`STORE_INDEX` — A NON-ENUMERABLE OWN PROPERTY CARRYING THE INTEGER `storeCreate` MINTED.** It is
|
|
1803
|
-
// the row the addon's own `instance_of` reads: element `0` of the receiver, read as a number. **A
|
|
1804
|
-
// NON-ENUMERABLE OWN PROPERTY IS THE FORM CHOSEN BECAUSE IT IS INVISIBLE TO `Object.keys` AND TO
|
|
1805
|
-
// `Object.getOwnPropertyNames`** — the same precedent `A117` (D6) declares for the symbol-keyed
|
|
1806
|
-
// channels above — **so the product's declared member set is UNMOVED at fourteen** (`surface.md §2.4`
|
|
1807
|
-
// item 9 (f); `⟶ CORRECTED 2026-10-26`: this line printed `twelve`, superseded by the held-listener-
|
|
1808
|
-
// identity unit's `12 → 14` move of 2026-10-19) and no member-counting cell can see it. **AND A CLONED
|
|
1809
|
-
// STORE OBJECT DOES NOT CARRY THE ROW** (`⟶ CORRECTED 2026-10-26`: this clause opened *"AND IT IS THE
|
|
1810
|
-
// ROW A CLONED STORE OBJECT CARRIES TOO"*, which contradicted its own ground and its own conclusion),
|
|
1811
|
-
// because `Object.assign`/spread copy own ENUMERABLE properties only and this row is published at
|
|
1812
|
-
// `enumerable: false`: **a clone carries NO index and therefore resolves NO store**, which is the SAME
|
|
1813
|
-
// one observable the detached call gets.
|
|
1814
|
-
//
|
|
1815
|
-
// 2. **A `FinalizationRegistry` REGISTERED ON THE STORE OBJECT, WHOSE CALLBACK RETIRES EXACTLY THAT
|
|
1816
|
-
// OBJECT'S OWN ROW.** `§6`: *"the retirement removes EXACTLY ONE ENTRY — the freed instance's own —
|
|
1817
|
-
// and NEVER THE TABLE."* The held value is the index ALONE and never the object (a strong reference
|
|
1818
|
-
// would be the collection this mechanism exists to observe), and the callback removes THE ONE ROW THAT
|
|
1819
|
-
// INDEX NAMES — so **a second store's entry cannot be touched**, which is the failure `P-SAS-5` names.
|
|
1820
|
-
// **IT IS `FinalizationRegistry` RATHER THAN A NODE-API FINALIZER** because the store object is the
|
|
1821
|
-
// package's own and the teardown must not race the sibling unit's declared mechanism (`§5`'s
|
|
1822
|
-
// withdrawal of a `WeakMap` is about the RESOLUTION ROUTE and forbids no table).
|
|
1823
|
-
//
|
|
1824
|
-
// **AND A CALL ON A COLLECTED STORE NEEDS NO SECOND ARM**: once the row is retired the addon's
|
|
1825
|
-
// `INSTANCE_IDS` no longer holds the index, so the call refuses in THE ONE DECLARED FORM — the same
|
|
1826
|
-
// observable a detached call gets (`§3`: *"There is no second arm and no second observable."*)
|
|
1827
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1828
|
-
// **THE CARRIER IS A SYMBOL KEY AND NOTHING ELSE, AND THAT IS FORCED RATHER THAN PREFERRED.** The addon
|
|
1829
|
-
// reads this row through `Symbol.for('provident-storeroom.storeIndex')` (`receiver-and-refusal.md §1`),
|
|
1830
|
-
// and **a symbol key is the only form the clause's carrier may take**: the product's declared member set
|
|
1831
|
-
// is asserted at EXACTLY fourteen own members read through `Object.getOwnPropertyNames`
|
|
1832
|
-
// (`surface.md §2.4` item 9 (f)), and **that read COUNTS a string key AND a numeric index alike** — so
|
|
1833
|
-
// publishing the row at element `0` moved the set `14 → 15`, which is `convenience.test.mjs`'s cell and
|
|
1834
|
-
// is not this unit's to change. **A SYMBOL KEY IS INVISIBLE TO `Object.keys` AND TO
|
|
1835
|
-
// `Object.getOwnPropertyNames` BOTH**, the precedent `A117` (D6) already declares for this package's own
|
|
1836
|
-
// symbol-keyed channels, so the member set is unmoved and the cell is green on a correct landing.
|
|
1837
|
-
//
|
|
1838
|
-
// **AND IT IS `Symbol.for` RATHER THAN AN IDENTITY SYMBOL BECAUSE THE TWO SIDES NEVER SHARE AN OBJECT**:
|
|
1839
|
-
// this file writes the key and the Rust layer reads it, and a registered symbol is the only spelling both
|
|
1840
|
-
// can name without one holding the other's reference. **⟶ CORRECTED 2026-10-25 (`strata` L1 e2e pass,
|
|
1841
|
-
// `role_test_writer`): this sentence read *"a cloned store object STILL CARRIES IT (a symbol-keyed own
|
|
1842
|
-
// property survives `Object.assign` and spread), so a clone resolves the SAME store"* — AND IT IS FALSE OF
|
|
1843
|
-
// BOTH HALVES. The row is published by the `Object.defineProperty` below at `enumerable: false`, and
|
|
1844
|
-
// `Object.assign` and object spread copy OWN ENUMERABLE properties ONLY: SO A CLONE CARRIES NO INDEX AND
|
|
1845
|
-
// NO SLOT, AND A CLONE RESOLVES NO STORE.** **That is the SAME one observable a detached call gets, which
|
|
1846
|
-
// is what item 1 of this block already declares above (`:1233`).** **The reading this sentence cited
|
|
1847
|
-
// (`receiver-and-refusal.md §5` — *"a deliberately re-bound receiver is still a receiver"*) governs a
|
|
1848
|
-
// RE-BOUND receiver that still carries the row, and it never governed a CLONE, which carries nothing to
|
|
1849
|
-
// re-bind: the receiver names the store and rebinding is unsupported breaking behaviour the package owes
|
|
1850
|
-
// no guard for.**
|
|
1851
|
-
Object.defineProperty(instance, STORE_INDEX, { value: id, enumerable: false, writable: false, configurable: false });
|
|
1852
|
-
state.receiver = instance;
|
|
1853
|
-
// **THE ROW IS REGISTERED FOR RETIREMENT IN THE SAME ACT THAT PUBLISHES IT**, so a store cannot be
|
|
1854
|
-
// published without a retirement and the two cannot drift (`§6`: *"retired in the same act that frees the
|
|
1855
|
-
// store"*). **THE CALLBACK IS PER-CONSTRUCTION AND CLOSES OVER THIS INSTANCE'S OWN INDEX ALONE** — it takes
|
|
1856
|
-
// no scan, names no other row, and cannot reach the table as a whole, which is the requirement `§6` states
|
|
1857
|
-
// and the failure `P-SAS-5` catches. **NO REFERENCE TO THE STORE OBJECT IS HELD** (it would be the strong
|
|
1858
|
-
// reference that stops the collection this exists to observe): the closure holds the integer and nothing
|
|
1859
|
-
// else, and the package's own hold on the instance is released with it.
|
|
1860
|
-
STORE_RETIREMENT.register(instance, () => {
|
|
1861
|
-
INSTANCES.delete(instance);
|
|
1862
|
-
});
|
|
1863
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1864
|
-
// **⟶ AND `D-99`'S INTERNAL ROUTE, INSTALLED HERE AND NOT WITH THE OTHER TWO CHANNELS — 2026-11-01
|
|
1865
|
-
// (`C-17` (iv), §9.2).** **THE INSTALL SITE IS `state.receiver = instance`'S NEIGHBOURHOOD AND NOT `:1693`'S,
|
|
1866
|
-
// AND THE REASON IS A BYTE: THE CONSTRUCTION'S BATCH ARMING WALK BELOW REACHES `K-1` BEFORE
|
|
1867
|
-
// `installRegistrationSeam` RUNS**, so a channel installed there would leave the construction's own arming walk
|
|
1868
|
-
// as **the one kernel registration still passing through the caller's wrapper** — i.e. still through `B-6`,
|
|
1869
|
-
// which is the test `D-99`'s ANSWERED clause says the kernel's act does not pass at all.
|
|
1870
|
-
//
|
|
1871
|
-
// **THE LATER SITE'S PRINTED REASON DOES NOT REACH THIS CHANNEL**: `installAttemptSeam` is installed after the
|
|
1872
|
-
// batch *"so a `listen` the construction itself performs is not counted as a commit the caller opened"* — **a
|
|
1873
|
-
// fact about the ATTEMPT COUNT, and this route opens no commit** (`C-17` (v)).
|
|
1874
|
-
//
|
|
1875
|
-
// **IT CHANGES NO ORDER OF ACTS**: the batch still arms `cfg.constraints` first and `cfg.listeners` are still
|
|
1876
|
-
// applied afterwards through `listen` (`C-15`, unmoved), because installing a channel is not an act. **AND THE
|
|
1877
|
-
// CHANNEL ADDS NO MEMBER** — `Symbol.for`-keyed and `enumerable: false`, so the product's declared FOURTEEN own
|
|
1878
|
-
// members are unmoved (`A117` (D6)), exactly as the channels beside it.
|
|
1879
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1880
|
-
installListenRoute(instance, state);
|
|
1881
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1882
|
-
// **⟶ AND THE REGISTRATION'S OWN SAVE CHANNEL, INSTALLED HERE FOR THE SAME MEASURED REASON — `D-106` ARM 1,
|
|
1883
|
-
// 2026-11-02.** **THE REGISTRATION'S CLOSE OWES A SAVE THE TERMINAL ARM NEVER PERFORMS**, and this is the
|
|
1884
|
-
// channel it names the last `file`-tier op its route landed to (`delivery.mjs`'s `installRegistrationSave`,
|
|
1885
|
-
// whose body is the SAME `commitFile` frame the terminal arm calls — one save path, two callers).
|
|
1886
|
-
//
|
|
1887
|
-
// **THE INSTALL SITE IS THIS NEIGHBOURHOOD AND NOT `:1709`/`:1715`'S, AND THE REASON IS THE SAME BYTE THE CLAUSE
|
|
1888
|
-
// ABOVE PRINTS**: the construction's batch arming walk below reaches `K-1` BEFORE either of those two seams
|
|
1889
|
-
// runs, so a save channel installed there would leave a `storeCreate` carrying `cfg.constraints` — and a boot
|
|
1890
|
-
// carrying them — with no route to the save at all. **IT CHANGES NO ORDER OF ACTS AND ADDS NO MEMBER**:
|
|
1891
|
-
// `Symbol.for`-keyed and `enumerable: false`, so the product's declared FOURTEEN own members are unmoved
|
|
1892
|
-
// (`A117` (D6)).
|
|
1893
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1894
|
-
installRegistrationSave(instance, state);
|
|
1895
|
-
// **⟶ AND THE REGISTRATION INSTANT'S DELIVERY CHANNEL, INSTALLED HERE FOR THE SAME MEASURED REASON —
|
|
1896
|
-
// `D-125` item `1`, `PIN-2`, 2026-11-06.** It is the channel the registration's PASSING close reaches with the
|
|
1897
|
-
// watched sets its repair's writes fired (`delivery.mjs`'s `installRegistrationDelivery`, whose loop is
|
|
1898
|
-
// `deliver`'s own); **it is silent while the construction is the act in hand** — the creation and the boot
|
|
1899
|
-
// deliver `PIN-6` (i)'s own set at their own seat below — and it speaks at `addConstraint` and at a re-arm.
|
|
1900
|
-
// **IT CHANGES NO ORDER OF ACTS AND ADDS NO MEMBER**: `Symbol.for`-keyed and `enumerable: false`, so the
|
|
1901
|
-
// product's own members are unmoved (`A117` (D6)), exactly as the three channels beside it.
|
|
1902
|
-
installRegistrationDelivery(instance, state);
|
|
1903
|
-
// **⟶ `docs/specs/storeroom-js/surface.md §2.12` ITEM 1 CLAUSE (b): `storeCreate` REGISTERS EACH OF `cfg.constraints`' ELEMENTS THAT CARRIES
|
|
1904
|
-
// ITS OWN FUNCTION AT `K-1`, AT THE INSTANCE IT IS CONSTRUCTING** — the SAME call the ADD route makes, so
|
|
1905
|
-
// a batch-populated pair is a pair the entry carries on the same footing (`docs/specs/storeroom-js/surface.md §2.12` item 3's preamble clause
|
|
1906
|
-
// (a)). **⟶ AMENDED 2026-10-24 (`D-26` item 4; `D-27` item 1): EVERY BATCH ELEMENT IS CARRIED AND ITS
|
|
1907
|
-
// FUNCTION IS ARMED — the *"well-formed pair carrying no function"* state this loop once skipped with a
|
|
1908
|
-
// silent `continue` HAS NO PRODUCER ON THIS ROUTE, because step 2 refused it before the create.** **THE
|
|
1909
|
-
// SILENT DROP IS DELETED, NOT MOVED**: a caller who supplied a function and got an unarmed pair was told
|
|
1910
|
-
// nothing, which is the shape this project keeps filing (`D-26` item 1 calls it *"a DEFECT and not a
|
|
1911
|
-
// design"*).
|
|
1912
|
-
//
|
|
1913
|
-
// **AND THE LIST ARMED HERE IS `batch` — THE ONE STEP 2 ALREADY WALKED, CHECKED AND ANSWERED**, so no
|
|
1914
|
-
// element is re-read off the caller's array and no second validation decides a second time.
|
|
1915
|
-
//
|
|
1916
|
-
// **⟶ AND THIS SITE TAKES THE THREE-STATE REGISTRATION TOO** (`docs/specs/storeroom-js/surface.md §2.12` item 3's clause of 2026-10-16
|
|
1917
|
-
// at its `A135` (3) mark; `docs/specs/storeroom-native/contract.md §7.3` (b)). **THE BATCH ROUTE AND THE
|
|
1918
|
-
// ADD ROUTE REACH THE SAME `K-1`**, so a batch element the current state violates — with no repair
|
|
1919
|
-
// standing, or with one that does not resolve it — refuses the CONSTRUCTION in this surface's one
|
|
1920
|
-
// failure form, exactly as the ADD route refuses the call. **THE STATE 3 SUCCESS ARM IS THE ONE THAT
|
|
1921
|
-
// MOVES THE STORE**: the repair's edit stands, the registration stands, and the construction returns
|
|
1922
|
-
// its instance with no log crossing (`3-bis` (c)).
|
|
1923
|
-
//
|
|
1924
|
-
// **⟶ AND THE FIRST POSITION IS THE DECODED SEGMENT LIST AND NEVER THE ENCODER'S CARRIER — CORRECTED
|
|
1925
|
-
// 2026-10-18, AND THIS IS THE WHOLE OF THE DEFECT.** `constraintAddress` answers `{k:'L', s:[…]}` — a
|
|
1926
|
-
// CARRIER (`§1.5`'s segment array as `encodeAddress` declares it) — while `carryConstraint` hands its
|
|
1927
|
-
// `addresses` to `K-1`'s `inDomainAddress`, which admits A LIST OF SEGMENTS AND NOTHING ELSE. **SO THE
|
|
1928
|
-
// CARRIER IS READ BACK TO ITS SEGMENTS HERE** (`batch`'s `addresses` is already that list) and no new
|
|
1929
|
-
// position, no new code and no new failure form is minted: the pair is its ONE-member set
|
|
1930
|
-
// (`constraint-identity.md §6`'s pair table — a single address at the REGISTRATION act).
|
|
1931
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1932
|
-
// **⟶ THE SWEEP — `D-123` ITEM `1`, `D-124` ITEM `1`, `D-125` ITEMS `3`–`4`; `PIN-3`, `PIN-4`, `PIN-5`.**
|
|
1933
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
1934
|
-
//
|
|
1935
|
-
// **THE CARRY, THEN THE ROUNDS: EVERY ADMITTED PAIR IS CARRIED ONCE AND THEN ASKED AGAIN, ROUND BY ROUND,
|
|
1936
|
-
// UNTIL A ROUND LANDS NO REPAIR** (`PIN-4` (i)–(iv)). **A round asks every admitted pair AT MOST ONCE**, and it
|
|
1937
|
-
// asks it **through the registration route's own `carryConstraint`** — the same act the carry takes, at the same
|
|
1938
|
-
// address, with the pair's own body — so **no attempt, no budget member and no `AttemptRef` is minted**: a
|
|
1939
|
-
// construction has no attempt to count restarts in (`D-124` item `1`: *"THE SWEEP INHERITS THE MARKER AND NOT
|
|
1940
|
-
// THE BUDGET"*).
|
|
1941
|
-
//
|
|
1942
|
-
// **THE SWEEP'S WHOLE NEW STATE IS ONE APPLIED-REPAIR BIT PER ADMITTED PAIR, AND IT IS THESE `markers` ROWS**
|
|
1943
|
-
// (`PIN-4`: *"the applied-repair bit per admitted pair is the sweep's whole new state"*; `PIN-14` (i)). It is
|
|
1944
|
-
// **NOT a member**: nothing is minted on the instance, on a record, on an op or on the kernel, and the bits are
|
|
1945
|
-
// local to this construction and gone when it answers.
|
|
1946
|
-
//
|
|
1947
|
-
// **⟶ AND `sweep` IS THE ONE OBJECT THAT MAKES *"GONE WHEN IT ANSWERS"* TRUE OF THE GUARD ITSELF — GATE 4's
|
|
1948
|
-
// DEFECT 1, CLOSED.** `sweepGuarded` installs a wrapper as the pair's element AND as the body the kernel's pass
|
|
1949
|
-
// asks (`carryConstraint`'s `entry.fn`, `kernel-attempt.mjs`'s `pair.constraint`), so **the wrapper cannot be
|
|
1950
|
-
// un-installed when the sweep ends**: re-registering the original body would ASK the body again at the state the
|
|
1951
|
-
// sweep left, which can land a second repair and is therefore a second act and not a restoration. **THE SCOPE IS
|
|
1952
|
-
// THEREFORE THE DEVICE**: this object is local to the construction, the wrapper consults it before it reads
|
|
1953
|
-
// anything of the outcome, and it is cleared the instant the sweep's last round ends (below) — so **from that
|
|
1954
|
-
// byte on the wrapper is a transparent identity over the caller's own body, and a pair that repaired inside the
|
|
1955
|
-
// construction keeps its `repair` on every later refusal for the life of the instance.** **NO MEMBER IS MINTED**:
|
|
1956
|
-
// it is a local row, exactly as the bits are.
|
|
1957
|
-
const sweep = { live: true };
|
|
1958
|
-
//
|
|
1959
|
-
// **THE TERMINATOR IS ARITHMETIC AND NOT BUDGETARY** (`D-124` item `1`): every round that continues the sweep
|
|
1960
|
-
// lands at least one repair, no pair repairs twice, so the repairs number at most the admitted pairs and the
|
|
1961
|
-
// first round that lands none ends the sweep. **NO ROUND CAP IS MINTED AND NO COUNT IS COUNTED** — `PIN-4`'s
|
|
1962
|
-
// `THREE` and `D-42`'s restart budget are RETIRED for this act, and no cell of this unit prints a round.
|
|
1963
|
-
//
|
|
1964
|
-
// **AND THE THREE REFUSING ARMS, EACH AT ITS OWN MEMBER:**
|
|
1965
|
-
// * **THE CYCLE** (`D-125` item `4`; `PIN-4` (ii)) — a pair asked again that WOULD REPAIR AGAIN. Inside one
|
|
1966
|
-
// registration call it is the re-run's own arm (`kernel-registration.mjs`'s `CYCLE_ARM`, rank `20`); across
|
|
1967
|
-
// rounds it is `sweepGuarded`'s suppression below, whose rank `19` verdict this frame converts, because
|
|
1968
|
-
// **`a pair's second repair attempt is an inconsistent result and refuses at rank `20`*** — the pair's
|
|
1969
|
-
// repair is NOT performed a second time and no save reaches the bytes.
|
|
1970
|
-
// * **THE POST-ROUND INCONSISTENCY** (`PIN-5`) — a pair that refuses in a round AFTER the first: the rounds
|
|
1971
|
-
// have ended on a register that still violates a carried pair, and *"the construction **throws instead of
|
|
1972
|
-
// returning an instance**"*. It crosses rank `20` `ConstraintPassRefused` and **no member is minted for
|
|
1973
|
-
// it** (its trigger is arm-neutral by its own row, `contract.md:4652`).
|
|
1974
|
-
// * **THE PAIR'S OWN FIRST VERDICT** — a refusal in the CARRY, or in the first round, is the registration
|
|
1975
|
-
// instant's own and keeps rank `19` `ConstraintRefusedAtRegistration` (`PIN-11`: both ranks carry a
|
|
1976
|
-
// constraints subject, and the shipped arm does not move).
|
|
1977
|
-
//
|
|
1978
|
-
// **A SKIPPED PAIR IS STILL SKIPPED** (`D-90`'s rule read THROUGH `D-123` item 1): `pairApplication` is asked
|
|
1979
|
-
// before the body at every one of these asks, so a pair whose parent does not resolve is passed over in the
|
|
1980
|
-
// carry and in every round, is not a refusal, and is still named by `constraints()` (`PIN-14` (ii) freezes
|
|
1981
|
-
// `kernel-registration.mjs`'s skip by name).
|
|
1982
|
-
//
|
|
1983
|
-
// **THE SWEEP IS THE CREATION'S AND THE BOOT'S ALONE** (`D-125` item 3): `addConstraint` and a re-arm keep the
|
|
1984
|
-
// registration instant's own single-pair scope, so no round runs at either of them.
|
|
1985
|
-
const markers = [];
|
|
1986
|
-
for (let i = 0; i < batch.length; i += 1) appendOwn(markers, { applied: false, cycled: false });
|
|
1987
|
-
let roundIndex = 0;
|
|
1988
|
-
let landedInRound = 0;
|
|
1989
|
-
do {
|
|
1990
|
-
landedInRound = 0;
|
|
1991
|
-
for (let i = 0; i < batch.length; i += 1) {
|
|
1992
|
-
const marker = markers[i];
|
|
1993
|
-
const appliedBefore = marker.applied;
|
|
1994
|
-
// **A PAIR THAT ALREADY LANDED ITS ONE REPAIR IS ASKED AGAIN AND ITS SECOND REPAIR IS NOT ATTEMPTED**
|
|
1995
|
-
// (`PIN-4` (i), (ii)): the guard suppresses it, the registration refuses without repairing, and the
|
|
1996
|
-
// conversion below makes that rank `20` — *"a cycle is an inconsistent result"* (`D-125` item 4).
|
|
1997
|
-
// **IN THE CARRY ITSELF THE GUARD NEVER SUPPRESSES** (`roundIndex` `0`), so the re-run's own cycle arm is
|
|
1998
|
-
// the kernel's and the shipped `KC` reading of every other refusing arm is unmoved.
|
|
1999
|
-
const guarded = sweepGuarded(batch[i].constraint, marker, sweep, roundIndex > 0 && appliedBefore === true);
|
|
2000
|
-
try {
|
|
2001
|
-
carryConstraint(state, instance, batch[i].addresses, batch[i].id, guarded);
|
|
2002
|
-
} catch (refusal) {
|
|
2003
|
-
// **A LATER ROUND'S RANK-`19` VERDICT IS THE SWEEP'S POST-ROUND INCONSISTENCY AND CROSSES AT RANK `20`**
|
|
2004
|
-
// (`PIN-5`); every other refusal — the carry's own, a body that threw (rank `18`), a store code — keeps
|
|
2005
|
-
// its own member and its own form.
|
|
2006
|
-
if (roundIndex > 0 && ownValue(refusal, 'status') === 'ConstraintRefusedAtRegistration') {
|
|
2007
|
-
boundaryReject(
|
|
2008
|
-
'ConstraintPassRefused',
|
|
2009
|
-
spellAddressBare(batch[i].addresses[0]),
|
|
2010
|
-
marker.cycled === true
|
|
2011
|
-
? 'the pair had already landed its one repair and would repair a second time, and a pair may land AT MOST ONE REPAIR in a construction'
|
|
2012
|
-
: 'the sweep ended on a register that still violates a carried pair, and the construction may not return an instance whose register still violates one of them',
|
|
2013
|
-
'constraints',
|
|
2014
|
-
);
|
|
2015
|
-
}
|
|
2016
|
-
// **`D-77`: the batch element's own address — the construction's registration act is at it.**
|
|
2017
|
-
registrationCrossing(refusal, batch[i].addresses[0]);
|
|
2018
|
-
}
|
|
2019
|
-
if (marker.applied === true && appliedBefore === false) landedInRound += 1;
|
|
2020
|
-
}
|
|
2021
|
-
roundIndex += 1;
|
|
2022
|
-
} while (landedInRound > 0);
|
|
2023
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
2024
|
-
// **⟶ AND THE SWEEP'S SCOPE ENDS HERE — ITS LAST ROUND HAS ANSWERED AND THE GUARD BECOMES THE CALLER'S
|
|
2025
|
-
// BODY — GATE 4's DEFECT 1, CLOSED AT ITS OWN BYTE.**
|
|
2026
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
2027
|
-
//
|
|
2028
|
-
// **WHY THIS LINE IS THE FIX AND NOT A TIDY-UP.** The wrapper this loop installed stands in the entry
|
|
2029
|
-
// (`entry.fn`) and in the kernel's pair row, so it is the body EVERY later instant asks — the pass over a
|
|
2030
|
-
// caller's `write`, a `delete`, a `rollback`'s judgement and a re-arm. **A wrapper left suppressing would strip
|
|
2031
|
-
// the `repair` from that pair's every later refusal, silently, for the life of the instance, and only a
|
|
2032
|
-
// re-`addConstraint` would restore it** — measured: a construction whose pair repaired, then an ordinary
|
|
2033
|
-
// `write` at its address, refused at rank `20` with the repair never run. **THE MARKER IS CONSTRUCTION-SCOPED
|
|
2034
|
-
// AND THIS IS WHERE THE CONSTRUCTION'S PART OF IT ENDS**: `sweep.live` is cleared the instant the sweep has
|
|
2035
|
-
// nothing left to ask — before the listeners are applied, before the delivery and before the answer — so the
|
|
2036
|
-
// suppression is consulted ONLY while the sweep is the act in hand, and the pair's every later refusal runs its
|
|
2037
|
-
// repair as its own body made it. **NO MEMBER MOVES AND NO ARM MOVES**: the bits, the three refusing arms and
|
|
2038
|
-
// every rank above are the bytes they were.
|
|
2039
|
-
sweep.live = false;
|
|
2040
|
-
// **⟶ AND THE CONSTRUCTION'S OWN ADOPTION ENTERS THE PACKAGE'S HOME MIRROR** (`docs/specs/storeroom-js/surface.md §2.4` item 7 (b)'s dated
|
|
2041
|
-
// narrowing reads TWO lawful duplicate states, and the ONE-ADDRESS one is `DD-39`'s CONSTRUCTION duplicate;
|
|
2042
|
-
// `src/store.rs`'s own `adopt` keeps BOTH entries under one address and pushes the token's index entry for
|
|
2043
|
-
// each). **THE MIRROR IS THE HOME'S OWN SHAPE AND NOT A SECOND DECISION**: an accepted entry's handle is
|
|
2044
|
-
// adopted VERBATIM, in the caller's own spelling order ACROSS addresses and the bucket's own order WITHIN
|
|
2045
|
-
// one — which is the order `DD-42` clause (2)'s *"FIRST match"* is defined by. **A REJECTED ARRAY ADMITS
|
|
2046
|
-
// NOTHING** (`src/args.rs`), so a listeners list the store refused never reaches `storeCreate`'s return and
|
|
2047
|
-
// no mirror entry is written for it.
|
|
2048
|
-
//
|
|
2049
|
-
// **⟶ AND ONE ENTRY IS PUSHED PER ADOPTED ELEMENT, WITH NO `some(key)` TEST HERE — CORRECTED 2026-10-17**
|
|
2050
|
-
// (`docs/specs/storeroom-js/surface.md §2.4` item 7 (a) item 3; rules 1, 3 and 4 with `DD-39`'s *"both entries are KEPT"*): the store's own
|
|
2051
|
-
// population calls `adopt` for EVERY admitted element, and two elements at ONE address stay TWO store
|
|
2052
|
-
// entries (`src/store.rs`'s bucket, whose `first_at` answers the bucket's FIRST). **SO A PER-KEY DEDUPE
|
|
2053
|
-
// HERE WOULD BE A SECOND DECISION THE STORE NEVER TAKES and the mirror would hold fewer entries than the
|
|
2054
|
-
// home** — the `-1` absence route below is what that divergence breaks. **THE PREDICATE IS THE ONE THE
|
|
2055
|
-
// STORE'S OWN ADMISSION AGREES WITH** (`isLawfulListenerElement`): a `cfg.listeners` array that reached
|
|
2056
|
-
// this line was admitted WHOLE by `encodeListeners`, the facade and `src/args.rs`, so a lawful element is
|
|
2057
|
-
// pushed and the two sides' element counts are the same number.
|
|
2058
|
-
//
|
|
2059
|
-
// **⟶ AND THE BOOT ROUTE GOES THROUGH THE SAME VERB — *"Boot goes through listen()"*** (`P: docs/pending.md ·
|
|
2060
|
-
// P-5`, the boot ruling, verbatim; `contract.md §2.2` item 8; `listen-verb.md §6`). **THE CONSTRUCTION'S
|
|
2061
|
-
// `listeners[]` ELEMENTS ARE APPLIED BY CALLING THE SAME `listen(handle, addresses)` THE CALLER WOULD CALL**,
|
|
2062
|
-
// so every adopted handle gets its map entry with `off` set exactly as a runtime `listen` does. **THAT
|
|
2063
|
-
// CLOSES THE REACHABLE STATE `(off=false, fn=—)` this block once produced by pushing into `state.home`
|
|
2064
|
-
// directly** (`P: docs/pending.md · P-5`, the boot ruling's own ground), and it REPLACES `DD-39`'s
|
|
2065
|
-
// verbatim-adoption rule rather than re-reading it (`(ii)`, verbatim).
|
|
2066
|
-
//
|
|
2067
|
-
// **WHAT SURVIVES, EACH NAMED SO IT IS NOT READ AS MOVING WITH `DD-39`:** the construction still admits
|
|
2068
|
-
// `listeners` WHOLE — a refused element refuses the construction, exactly as today (`encodListeners` and
|
|
2069
|
-
// `src/args.rs`, which this route does not reach); `surface.md:2118`'s *"A REJECTED ARRAY ADMITS NOTHING"*
|
|
2070
|
-
// survives; and **the mirror holds N rows `{key, handle}` when ONE handle arrives at N addresses** (`(iv)`,
|
|
2071
|
-
// verbatim) — which is why this loop calls the verb once per ELEMENT, an element carrying ONE address
|
|
2072
|
-
// (`(v)`: *"a `listeners[]` element carries ONE `address` and not a set"*).
|
|
2073
|
-
if (isPlainObjectValue(cfg) && isAdmittedArray(cfg.listeners) && arrayClass(cfg.listeners) !== 'class') {
|
|
2074
|
-
// **⟶ AND THE SET IS ACCUMULATED PER HANDLE BEFORE THE VERB IS CALLED, WHICH IS WHAT MAKES THE BOOT
|
|
2075
|
-
// PRODUCE THE STATE THE RULING REQUIRES: *"the mirror holding N rows `{key, handle}` when one handle
|
|
2076
|
-
// arrives at N addresses"*** (`P: docs/pending.md · P-5`, the boot ruling's item (iv), verbatim;
|
|
2077
|
-
// `contract.md §2.2` item 8; `PAR-HL-24`'s observable).
|
|
2078
|
-
//
|
|
2079
|
-
// **THE REASON IT MUST ACCUMULATE AND NOT SIMPLY LOOP IS `(R1)`'S**: a `listen` is a SET ASSIGNMENT and
|
|
2080
|
-
// the second act PURGES the first (`P: docs/pending.md · (R1)`, verbatim: *"S1 gets purged wholesale"*),
|
|
2081
|
-
// so N successive one-address acts would leave the handle standing at the LAST address alone. **THE BOOT'S
|
|
2082
|
-
// ELEMENTS ARE NOT N SUCCESSIVE ACTS — they are the caller's ONE spelling of a handle at N addresses**, and
|
|
2083
|
-
// the verb they are applied through is the same verb the caller calls, with the whole set.
|
|
2084
|
-
//
|
|
2085
|
-
// **AND THE ORDER IS THE CALLER'S OWN**: the handles are taken in the order `listeners[]` first names them,
|
|
2086
|
-
// and each handle's addresses in the order the array names them — an order NO clause asserts and none is
|
|
2087
|
-
// claimed here (`DD-22`: a drive compares sets, never sequences).
|
|
2088
|
-
// **⟶ AND THE ACCUMULATION IS MADE OF LOCAL ARRAYS READ BY INDEX FROM 2026-10-24** (`contract.md §2.1`'s
|
|
2089
|
-
// clause of this date on `F8-2`, items `(2a)`, `(2b)` and `(2c)`, and item `(2b)`'s row `64`; arm `(xix)`,
|
|
2090
|
-
// cell `JC-TC-65`): the as-built seeding used `new Map()` — lawful to ALLOCATE by item `(1d)(iv)`, and its
|
|
2091
|
-
// `get`/`set` were not — `for (const entry of cfg.listeners)` and `for (const [handle, set] of byHandle)`,
|
|
2092
|
-
// whose pair destructuring is a third iterator, and `set.push(entry.address)`. **A skipping iterator made the
|
|
2093
|
-
// construction's DECLARED SEEDING silently register nothing while `storeCreate` returned an instance whose
|
|
2094
|
-
// mirror was empty, and a no-op `get`/`set`/`push` did the same with a success report.** The order is the one
|
|
2095
|
-
// the comment above declares and no clause asserts: the handles in the order `listeners[]` first names them,
|
|
2096
|
-
// and each handle's addresses in the order the array names them.
|
|
2097
|
-
//
|
|
2098
|
-
// **⟶ AND THE LIST IT WALKS IS `adopted` — STEP `2`'S OWN ANSWER — AND THE BODY IS ARMED BESIDE THE ADDRESSES,
|
|
2099
|
-
// `PIN-8`, 2026-11-06.** The bytes this replaced re-read `cfg.listeners` and re-took `isLawfulListenerElement`
|
|
2100
|
-
// per element; **the walk is now the one step 2 already took**, so no element is read off the caller's array
|
|
2101
|
-
// twice and no second admission decides a second time (the shape `admittedConstraintBatch`'s own arming walk
|
|
2102
|
-
// takes). **`listen` WRITES THE STORE-SIDE ENTRY AND THE RESERVATION, AND `register` ARMS THE FUNCTION INTO
|
|
2103
|
-
// THIS INSTANCE'S REGISTRY** — `docs/specs/storeroom-js/surface.md §2.4` rule 2's replacement rule, so an
|
|
2104
|
-
// element a later one supersedes under the same handle leaves the LAST body standing — **and it is the same
|
|
2105
|
-
// two acts a caller performs at the boot ruling's own command (*"Boot goes through listen()"*), in the same
|
|
2106
|
-
// order.** **NO MEMBER IS MINTED AND THE MIRROR'S ROWS ARE THE SAME ROWS**: `register` sets `off` false and
|
|
2107
|
-
// the function, and adds no row.
|
|
2108
|
-
const handles = [];
|
|
2109
|
-
const addressSets = [];
|
|
2110
|
-
for (let i = 0; i < adopted.length; i += 1) {
|
|
2111
|
-
const entry = adopted[i];
|
|
2112
|
-
let at = -1;
|
|
2113
|
-
for (let h = 0; h < handles.length; h += 1) {
|
|
2114
|
-
if (handles[h] === entry.handle) {
|
|
2115
|
-
at = h;
|
|
2116
|
-
break;
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
if (at === -1) {
|
|
2120
|
-
appendOwn(handles, entry.handle);
|
|
2121
|
-
appendOwn(addressSets, [entry.address]);
|
|
2122
|
-
} else {
|
|
2123
|
-
appendOwn(addressSets[at], entry.address);
|
|
2124
|
-
}
|
|
2125
|
-
}
|
|
2126
|
-
for (let h = 0; h < handles.length; h += 1) {
|
|
2127
|
-
instance.listen(handles[h], addressSets[h]);
|
|
2128
|
-
}
|
|
2129
|
-
// **THE SUBSTANCE, ARMED FROM THE INSTANT THE INSTANCE EXISTS** (`PIN-8`; `D-123` item `2`: *"THE PACKAGE
|
|
2130
|
-
// ARMS THE SUBSTANCE"*). **ONE `register` PER ADOPTED HANDLE, AFTER ITS `listen`** — so the entry it replaces
|
|
2131
|
-
// is the reservation that `listen` just wrote, exactly as a caller's own two acts do. **WHERE ONE HANDLE IS
|
|
2132
|
-
// ADOPTED BY SEVERAL ELEMENTS THE LAST BODY WINS**, which is `register`'s own replacement rule (`§2.4` rule
|
|
2133
|
-
// 2: *"one handle, one function — the previous entry is REPLACED"*), and the walk that finds it is a local
|
|
2134
|
-
// index loop like every other read of this list.
|
|
2135
|
-
for (let h = 0; h < handles.length; h += 1) {
|
|
2136
|
-
let body;
|
|
2137
|
-
for (let i = 0; i < adopted.length; i += 1) {
|
|
2138
|
-
if (adopted[i].handle === handles[h]) body = adopted[i].listener;
|
|
2139
|
-
}
|
|
2140
|
-
if (typeof body === 'function') instance.register(handles[h], body);
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
2144
|
-
// **⟶ AND THE CREATION'S DELIVER — `PIN-2`, `PIN-6` (i), (iii), (iv); `D-123` item `2`, `D-125` item `1`.**
|
|
2145
|
-
// ═════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
2146
|
-
//
|
|
2147
|
-
// **THE SEAT IS AFTER EVERY REGISTRATION'S PASSING CLOSE — and therefore after their saves — AFTER THE
|
|
2148
|
-
// LISTENERS ARE ARMED, AND BEFORE THE ANSWER** (`PIN-2`'s redrawn order: ASK → REPAIRS LAND → RE-RUN → SAVE →
|
|
2149
|
-
// DELIVER → THE ANSWER). **IT IS REACHED ONLY WHERE THE SWEEP RETURNED AN INSTANCE**: a construction that
|
|
2150
|
-
// refused left this frame above, so *"no delivery on a refusing arm"* is structural here and not a test.
|
|
2151
|
-
//
|
|
2152
|
-
// **THE SET IS `PIN-6` (i)'S: THE ADOPTED SET ∩ THE ADDRESSES THAT RESOLVE IN THE REGISTER**, delivered *"by the
|
|
2153
|
-
// mechanism above"* — **one `deliver` call per address, in creation order, with the running handle list held
|
|
2154
|
-
// ACROSS the calls** (`constraints.mjs:3009`–`:3037`), so an identity adopted at two existing addresses fires
|
|
2155
|
-
// ONCE, at the first address that names it (`PIN-6` (iii)). **THE ONE ARGUMENT IS THAT ADDRESS** (`PIN-6` (iv);
|
|
2156
|
-
// `Q-3`'s default: the listener's own watched address at this instant).
|
|
2157
|
-
//
|
|
2158
|
-
// **AN ADDRESS THAT DOES NOT RESOLVE IS SILENT AND IS NOT A REFUSAL** (`PIN-7`; `D-123` item 3): no invocation,
|
|
2159
|
-
// no code, no log entry and no throw. **AND A FIRED BODY'S THROWABLE REFUSES THE CONSTRUCTION AT RANK `21`
|
|
2160
|
-
// `ListenerBodyThrew`** (`PIN-10`; `D-124` item 2) — **the instance does not exist, no rollback composes (the
|
|
2161
|
-
// saves above already stand, `PIN-12`), and the throwable itself is not rendered as a sentence of this
|
|
2162
|
-
// package's.**
|
|
2163
|
-
deliverAtTheCreation(state, adopted);
|
|
2164
|
-
// **⟶ AND THE CONSTRUCTION'S OWN DELIVERY IS THE `'adopted'` SET AND NOT THE REPAIR'S** — the flag the channel
|
|
2165
|
-
// reads is stated here as well as at the state's own declaration, because the two are one fact and this is the
|
|
2166
|
-
// seat that owns it.
|
|
2167
|
-
state.registrationDelivery = 'adopted';
|
|
2168
|
-
// **⟶ THE SEAM IS INSTALLED ON THE OBJECT THIS FACTORY RETURNS, ONCE** (`finalizer-and-teardown.md
|
|
2169
|
-
// `§4.2` item 4). **IT IS INSTALLED AFTER THE BATCH ROUTES ABOVE**, so a `listen` the construction itself
|
|
2170
|
-
// performs is not counted as a commit the caller opened and leaves the count at `0` on the return.
|
|
2171
|
-
installAttemptSeam(instance);
|
|
2172
|
-
// **⟶ AND `D-69`'S REGISTRATION CHANNEL, ONCE, BY THE SAME RULE — 2026-10-29.** The registration entry admits a
|
|
2173
|
-
// body of EITHER kind, and the kernel's `K-1` hands the pair's own constraint function through this channel after
|
|
2174
|
-
// `listen` has written the home entry. **IT IS INSTALLED HERE BECAUSE THE REGISTRY IT FILLS IS THIS FACTORY'S
|
|
2175
|
-
// `state`** (`delivery.mjs`'s `installRegistrationSeam` states the shape and the two places the kinds part
|
|
2176
|
-
// company), **and it is symbol-keyed, so the product's FOURTEEN own members are unmoved** (`A117` (D6)).
|
|
2177
|
-
installRegistrationSeam(instance, state);
|
|
2178
|
-
return instance;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
// ⟶ MOVED 2026-10-18 (`RCA-8(g)`): the region header is moved — re-indented and otherwise unchanged —
|
|
2182
|
-
// to sit above the member list it describes (P-8; archive/p8-merge/2026-10-18/blocks/region-header.md).
|
|
2183
|
-
|
|
2184
|
-
// ⟶ MOVED 2026-10-18 (`RCA-8(g)`): read is deleted; its doc block and body are now the
|
|
2185
|
-
// `read` member's own (P-8; archive/p8-merge/2026-10-18/blocks/read.md).
|
|
2186
|
-
|
|
2187
|
-
// ⟶ MOVED 2026-10-18 (`RCA-8(g)`): readLiteral is deleted; its doc block and body are now the
|
|
2188
|
-
// `readLiteral` member's own (P-8; archive/p8-merge/2026-10-18/blocks/readLiteral.md).
|
|
2189
|
-
|
|
2190
|
-
// **THE MODULE NAMESPACE CARRIES ONE NAME, `storeCreate` ALONE** (`surface.md §2.9` item 1's `A127` clause;
|
|
2191
|
-
// `11 → 1` ✓): `delete`'s reserved-word spelling, the ten store-reaching names and the three constraint
|
|
2192
|
-
// functions are the product's own members above and have no export and no second spelling at any layer.
|