provident-storeroom 1.9.0 → 1.9.2

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.
@@ -45,7 +45,10 @@ export function commitAttemptIdOf(commitRecord) {
45
45
  * attempt that IS live.
46
46
  */
47
47
  export function terminal(kernel, attempt, status, message) {
48
- const floor = composeRollback(kernel, attempt);
48
+ // **THE COMPOSITION'S SCOPE IS HANDED IN AND IS THE LANDING'S `attempt.ops`** (2026-11-02): the third
49
+ // position is the op list, so the landing's call passes `attempt.ops` and its behaviour is byte-equivalent
50
+ // while the REGISTRATION's close passes the ops its own route landed (`kernel-registration.mjs`'s frame local).
51
+ const floor = composeRollback(kernel, attempt, attempt.ops);
49
52
  // THE COMPOSITION'S OWN FLOOR, TAKEN OFF THE MEMBER IT WAS DECIDED ON (`composition-and-states.md
50
53
  // §2.6` item 5 (b)): a still-owed op's call meeting either floor code makes the arm `KC-8` WHATEVER
51
54
  // the pass's own arm was, and nothing is restored (item 6 (a), (c)).
@@ -164,19 +167,26 @@ export function close(kernel, attempt, outcome) {
164
167
  * **⟶ ONE CALL OVER THE ATTEMPT'S FIRST OP, AND THE WALK IS GONE — `D-40` (2026-10-26), `strata/decisions.md`
165
168
  * · *"A failing repair triggers a rollback like a constraint rejection."* AND ITS IMPLEMENTATION FINDING'S
166
169
  * FLOOR LAW IS THE REASON THE WALK COULD NOT STAND.** **The store's own scope is TEMPORALLY FLOORED at the
167
- * named op's `seq` and ALL-OR-NOTHING at the compacted mark** (`src/store.rs`'s `rollback`: a candidate set of
168
- * every entry in the addressed subtree at or after the named op's `seq`, then *"the floor is all-or-nothing
169
- * and undoes NOTHING"* where ANY candidate is compacted — `M-5` item 1's amendment (a) (ii); `M-6`). **SO A
170
- * NEWEST-FIRST WALK CAN NEVER REACH THE FLOOR ONCE A REPAIR OP EXISTS:** the first call over the repair's op
171
- * reverses it AND MARKS IT COMPACTED, and the second call — over the write's op, whose candidate set now
172
- * CONTAINS that compacted entry — is answered `RollbackCompacted` and **undoes nothing**. The measured arm:
173
- * seed `5`, refused `9`, repair `1`, and the store left holding `9`, the value the constraint REFUSED.
170
+ * named op's `seq`** (`src/store.rs`'s `rollback`: a candidate set of every entry in the addressed subtree at
171
+ * or after the named op's `seq` — `M-5` item 1's amendment (a) (ii)) **and a candidate set that holds a
172
+ * compacted entry is NOT ANSWERED `RollbackCompacted` ANY MORE: the store REVERTS TO THE LAST VALID STATE BY
173
+ * REGENERATING IT FROM THE DURABLE GROUND TRUTH** — the `file` tier's own image where one stands, and the
174
+ * creation state where none does — **and then replays what its journal still reaches** (`M-6`;
175
+ * `strata/decisions.md` · `D-108`), **so that arm RETURNS a `RollbackResult` and the floor branch below fires
176
+ * on `JournalOpUnknown` ALONE — the single surviving producer on this path** (`D-109`: `RollbackCompacted`
177
+ * keeps ONE subject, a `filePath` whose image cannot be read as an object, and no order this composition can
178
+ * produce reaches it). **SO A NEWEST-FIRST WALK NOW REACHES THE FLOOR — BY REGENERATING IT AND NOT BY
179
+ * REVERSING IT:** the first call over the repair's op reverses it AND MARKS IT COMPACTED, and the second call
180
+ * — over the write's op, whose candidate set now CONTAINS that compacted entry — REBUILDS the whole state
181
+ * from the durable ground truth before it walks. **THE REDUCTION IS `D-40`'S AND THIS PARAGRAPH DOES NOT
182
+ * RE-OPEN IT**: one call over the attempt's first op reaches that same state in one store act and pays no
183
+ * rebuild for it, which is why the walk is gone and the call below is the only one issued.
174
184
  * **THE ONE CALL OVER THE ATTEMPT'S FIRST OP SWEEPS THE WHOLE ATTEMPT IN ONE STORE ACT** — every op of the
175
185
  * attempt stands at or after that op's `seq` — so the attempt's floor is reached, exactly as a plain
176
186
  * constraint rejection reaches it with its own single-op composition. **THIS IS ALSO ITEM 2'S OWN LAST CALL**
177
187
  * (the repaired ops in reverse of their creation, *"and the attempt's first write's op LAST"*): the walk's
178
- * last entry is the call that is now the only one, and the calls before it were the ones the floor law had
179
- * already made unsound. **NO ARM'S OUTCOME IS RE-SHAPED BY THE REDUCTION:** a plain rejection still leaves
188
+ * last entry is the call that is now the only one, and the calls before it are the ones a newest-first walk
189
+ * would have paid a regeneration for. **NO ARM'S OUTCOME IS RE-SHAPED BY THE REDUCTION:** a plain rejection still leaves
180
190
  * the pre-attempt state, a repair answering `{ok: false}` still leaves it, and a PASSING repaired write still
181
191
  * lands its repaired value and composes nothing.
182
192
  *
@@ -218,14 +228,32 @@ export function close(kernel, attempt, outcome) {
218
228
  * `KC-8` row). **THE ARM IS UNMOVED AND IS NO LONGER A CONSEQUENCE OF ANY ORDER — it is the store's answer to
219
229
  * the attempt's own floor call — and where several calls are issued the FIRST floor met is the arm's, the steps
220
230
  * before it standing in the report beside it** (the composition reports what it PERFORMED; `§2.6` item 3).
231
+ *
232
+ * **⟶ AND THE INSTRUMENT HAS TWO CALLERS FROM 2026-11-02, AND IT IS ONE INSTRUMENT** (`D-107` item 1, `D-108` item
233
+ * 2): the landing's failing arm (`terminal` above, handing its own `attempt.ops`) **and the registration's
234
+ * REFUSING arm** (`kernel-registration.mjs`'s `closeRegistrationAttempt`, handing the ops its route landed) — so
235
+ * `composeRollback` is EXPORTED and its op list is a POSITION. **THE PART'S EXPORT LIST GAINS ONE NAME AND THE
236
+ * KERNEL'S BARREL DOES NOT RE-EXPORT IT** (`src/constraint-kernel.mjs` stays four lines and six names). **AND
237
+ * THE FLOOR BRANCH BELOW NOW FIRES ON `JournalOpUnknown` ALONE**: from the same date the store's compaction arm
238
+ * REGENERATES instead of answering `RollbackCompacted` (`D-108`), so the two-element table is unmoved and one of
239
+ * its members is no longer produced. **A regeneration is told from a replay by the call RETURNING and by nothing
240
+ * else**: the step's shape and members are unchanged and carry no flag, and `failed` is `false` on both arms.
221
241
  */
222
- function composeRollback(kernel, attempt) {
242
+ export function composeRollback(kernel, attempt, ops) {
223
243
  // An attempt with no op at all owes no call, and nor does one whose `checkpoint` op IS its first op — item 1's
224
244
  // filter leaves that list empty and the composition records no step for it.
225
- if (attempt.ops.length === 0) return null;
226
- const first = attempt.ops[0];
245
+ // **⟶ AND THE LIST IS THE CALLER'S, FROM 2026-11-02: `ops` IS THE SCOPE THE COMPOSITION COVERS, AND IT IS A
246
+ // POSITION OF THIS FUNCTION SO THE TWO CALLERS CAN NAME DIFFERENT ONES.** The landing's failing arm passes its
247
+ // `attempt.ops` — the list of the ops a write's pass credited — and its behaviour is byte-equivalent to the
248
+ // two-position form that stood here. **THE REGISTRATION'S REFUSING ARM PASSES THE FRAME'S OWN LIST OF THE OPS
249
+ // ITS ROUTE LANDED** (`kernel-registration.mjs`'s `registrationAttempt`), **because `attempt.ops` holds only a
250
+ // repair's CREDITED op and `landedOp` REFUSES to grow it** — so the ordinary refusing case (a repair that
251
+ // route-writes and then declines) leaves `attempt.ops` EMPTY, and a composition over it would undo nothing
252
+ // while the edit stood (`D-107` item 1's defect reproduced by its own fix).
253
+ if (ops.length === 0) return null;
254
+ const first = ops[0];
227
255
  if (attempt.checkpoint !== null && first.opId === attempt.checkpoint) return null;
228
- const plan = floorCallPlan(attempt);
256
+ const plan = floorCallPlan(attempt, ops);
229
257
  let floor = null;
230
258
  for (let index = 0; index < plan.length; index += 1) {
231
259
  const call = plan[index];
@@ -277,14 +305,15 @@ function composeRollback(kernel, attempt) {
277
305
  * **A CANDIDATE IS SKIPPED IN TWO CASES, AND EACH IS THE STORE'S OWN LAW RATHER THAN A PREFERENCE:**
278
306
  * * **COVERED** — an issued address is a prefix of it AND that call's floor stands at or before its own first
279
307
  * owed op: every entry it has was already swept, so a second call could only meet the store's COMPACTED
280
- * MARK and the floor is all-or-nothing (undoing nothing).
308
+ * MARK — and that arm REVERTS TO THE LAST VALID STATE BY REGENERATING IT FROM THE DURABLE GROUND TRUTH
309
+ * (`M-6`; `strata/decisions.md` · `D-108`) rather than undoing nothing.
281
310
  * * **UNREACHABLE** — an issued address is a prefix of it and that call's floor stands AFTER its own first
282
311
  * owed op, while this address still has an owed op at or after that floor. **The two calls cannot both be
283
312
  * issued**: the outer one has already compacted the later entries, so the inner one's scope would contain a
284
- * compacted entry and undo nothing. **THE OUTER ADDRESS IS KEPT AND THE INNER ADDRESS'S EARLIER ENTRIES
285
- * STAND** — the one residual this plan cannot remove, named here rather than left to a measurement (it
286
- * needs an attempt whose repair order writes at a DESCENDANT and then at its ANCESTOR, with a later
287
- * descendant write still owed).
313
+ * compacted entry and its call would REGENERATE THE WHOLE STATE instead of walking it (`D-108`). **THE
314
+ * OUTER ADDRESS IS KEPT AND THE INNER ADDRESS'S EARLIER ENTRIES STAND** — the one residual this plan
315
+ * cannot remove, named here rather than left to a measurement (it needs an attempt whose repair order
316
+ * writes at a DESCENDANT and then at its ANCESTOR, with a later descendant write still owed).
288
317
  * **THE ISSUED CALLS' CANDIDATE SETS ARE THEREFORE PAIRWISE DISJOINT, AND THAT IS THE PROPERTY THE ORDERING
289
318
  * BUYS**: a call issued now is either disjoint from every call already issued (its address is unrelated, or it
290
319
  * is nested but stands wholly BELOW the outer call's floor) or it is skipped — so no call can see an entry an
@@ -298,10 +327,10 @@ function composeRollback(kernel, attempt) {
298
327
  * issues the call (the container is back and the descendant is readable again), and the value beneath it is the
299
328
  * STORE's restore limit and not this composition's ordering.
300
329
  */
301
- function floorCallPlan(attempt) {
330
+ function floorCallPlan(attempt, ops) {
302
331
  const candidates = [];
303
- for (let index = 0; index < attempt.ops.length; index += 1) {
304
- const op = attempt.ops[index];
332
+ for (let index = 0; index < ops.length; index += 1) {
333
+ const op = ops[index];
305
334
  let known = false;
306
335
  for (let seen = 0; seen < candidates.length; seen += 1) {
307
336
  if (sameSegments(candidates[seen].address, op.address)) {
@@ -339,8 +368,8 @@ function floorCallPlan(attempt) {
339
368
  // THE OUTER CALL'S FLOOR STANDS AFTER THIS ADDRESS'S FIRST OWED OP: a call issued now would meet an entry
340
369
  // the outer call compacted. IT IS UNREACHABLE ONLY WHERE SUCH AN ENTRY EXISTS — a candidate whose every
341
370
  // entry stands BELOW the outer floor is disjoint from the outer scope and is issued after it safely.
342
- for (let scan = one.floor; scan < attempt.ops.length; scan += 1) {
343
- if (addressBelow(candidate.address, attempt.ops[scan].address)) {
371
+ for (let scan = one.floor; scan < ops.length; scan += 1) {
372
+ if (addressBelow(candidate.address, ops[scan].address)) {
344
373
  unreachable = true;
345
374
  break;
346
375
  }
@@ -348,7 +377,7 @@ function floorCallPlan(attempt) {
348
377
  if (unreachable) break;
349
378
  }
350
379
  if (covered || unreachable) continue;
351
- const floorOp = attempt.ops[candidate.order];
380
+ const floorOp = ops[candidate.order];
352
381
  appendOwn(issued, { address: candidate.address, floor: candidate.order });
353
382
  appendOwn(plan, { address: candidate.address, opId: floorOp.opId });
354
383
  }
@@ -1199,8 +1199,22 @@ export function carryRefusal(call, args, log, address) {
1199
1199
  /// §1`; `export-set-and-dispatch.md §4`): the terminal arm's frame supplies the store object it holds as the
1200
1200
  /// receiver, and the ONE position supplied is the adopted record's operation identity — **no instance
1201
1201
  /// position stands among them.**
1202
+ ///
1203
+ /// **⟶ AND THE POSITION IS SUPPLIED ONLY WHERE ONE WAS SUPPLIED, 2026-11-02 — THE ENTRY'S ABSENT CARRIER IS THE
1204
+ /// REVERSAL'S SAVE** (`strata/decisions.md` · `D-116` item 2, carried by `D-112` items 1–2; the second reading of
1205
+ /// the one position is stated at `src/facade.rs`'s own doc block). **THE FRAME SPELLS THE CARRIER UNCONDITIONALLY
1206
+ /// TODAY, AND `encodeOpId(undefined)` ANSWERS THE `Undefined` ROW AND NOT THE ABSENT ONE** (`carrier.mjs`'s
1207
+ /// `undefined → 'U'` fold) — so a save that names no op would have been REFUSED rather than reaching the
1208
+ /// state-keyed arm. **THE FORM IS THE ONE THE `rollback` MEMBER ALREADY USES FOR ITS OWN OP-ID POSITION**: the
1209
+ /// absent-versus-`undefined` distinction is the CALLER's `arguments.length` test and is taken nowhere else
1210
+ /// (`crossing.md §1.3`; `PAR-JS-6`). **SO `commitFile(receiver, opId)` keeps today's reading byte for byte**
1211
+ /// (the terminal arm's record-keyed save), **an explicit `undefined` still reaches the `Undefined` row and is
1212
+ /// refused exactly as it always was, and the NO-POSITION CALL reaches the absent row — which is the state-keyed
1213
+ /// save the reversal's judgement makes.** **NO ENTRY, ARITY OR MEMBER MOVES**: the absent carrier is a declared
1214
+ /// value of the one position, and `commitFile`(1) counts one.
1202
1215
  export function commitFile(receiver, opId) {
1203
- return entryOf().commitFile.call(receiver, encodeOpId(opId));
1216
+ const args = arguments.length >= 2 ? [encodeOpId(opId)] : [];
1217
+ return Reflect.apply(entryOf().commitFile, receiver, args);
1204
1218
  }
1205
1219
 
1206
1220
  /// The segments an already-encoded address argument carries — the declared list shape's own member, and