@microdelta/history 0.1.0 → 0.3.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.
Files changed (44) hide show
  1. package/README.md +15 -3
  2. package/dist/api/history.alpha.d.ts +2 -2
  3. package/dist/api/history.root.raw.alpha.d.ts +380 -21
  4. package/dist/api/history.root.raw.beta.d.ts +40 -2
  5. package/dist/api/history.root.raw.public.d.ts +40 -2
  6. package/dist/api/history.root.raw.untrimmed.d.ts +380 -21
  7. package/dist/api/history.shared.alpha.d.ts +376 -19
  8. package/dist/api/history.shared.beta.d.ts +36 -0
  9. package/dist/api/history.shared.public.d.ts +36 -0
  10. package/dist/api/history.shared.untrimmed.d.ts +376 -19
  11. package/dist/api/history.untrimmed.d.ts +2 -2
  12. package/dist/src/durable/contracts.d.ts +292 -17
  13. package/dist/src/durable/contracts.d.ts.map +1 -1
  14. package/dist/src/durable/errors.d.ts +44 -3
  15. package/dist/src/durable/errors.d.ts.map +1 -1
  16. package/dist/src/durable/errors.js +43 -7
  17. package/dist/src/durable/errors.js.map +1 -1
  18. package/dist/src/durable/index.d.ts.map +1 -1
  19. package/dist/src/durable/index.js +299 -111
  20. package/dist/src/durable/index.js.map +1 -1
  21. package/dist/src/durable/journal.d.ts +53 -0
  22. package/dist/src/durable/journal.d.ts.map +1 -0
  23. package/dist/src/durable/journal.js +174 -0
  24. package/dist/src/durable/journal.js.map +1 -0
  25. package/dist/src/durable/records.d.ts +40 -0
  26. package/dist/src/durable/records.d.ts.map +1 -0
  27. package/dist/src/durable/records.js +74 -0
  28. package/dist/src/durable/records.js.map +1 -0
  29. package/dist/src/durable/schema.d.ts +14 -3
  30. package/dist/src/durable/schema.d.ts.map +1 -1
  31. package/dist/src/durable/schema.js +99 -21
  32. package/dist/src/durable/schema.js.map +1 -1
  33. package/dist/src/durable/selected-index.d.ts.map +1 -1
  34. package/dist/src/durable/selected-index.js +19 -5
  35. package/dist/src/durable/selected-index.js.map +1 -1
  36. package/dist/src/durable/sqlite-boundary.d.ts +11 -0
  37. package/dist/src/durable/sqlite-boundary.d.ts.map +1 -0
  38. package/dist/src/durable/sqlite-boundary.js +79 -0
  39. package/dist/src/durable/sqlite-boundary.js.map +1 -0
  40. package/dist/src/index.d.ts +7 -5
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/index.js +5 -3
  43. package/dist/src/index.js.map +1 -1
  44. package/package.json +3 -3
@@ -1,11 +1,20 @@
1
1
  /**
2
2
  * Contracts of History's durable authority: the one consistency owner for
3
3
  * immutable completed results, attempt history, the single logical writer,
4
- * atomic publication, current pointers and separate acceptance records
5
- * (PUB-001, ARC-007). These are project-private alpha shapes. They carry
6
- * Resolution's provenance and evidence as versioned opaque records and never
7
- * interpret Definition, Tracking or Resolution meaning; deciding whether a
8
- * result is currently acceptable remains Resolution's responsibility.
4
+ * atomic publication, current pointers, separate acceptance records, recorded
5
+ * promotions and Run Supervision's operation journal (PUB-001, ARC-007,
6
+ * RUN-011/012/017). These are project-private alpha shapes. They carry
7
+ * Resolution's provenance and evidence, promotion evidence and Supervision's
8
+ * journal records as versioned opaque records and never interpret Definition,
9
+ * Tracking, Resolution or Supervision meaning; deciding whether a result is
10
+ * currently acceptable remains Resolution's responsibility, and deciding what
11
+ * an operation or deferral means remains Supervision's.
12
+ *
13
+ * Every durable record belongs to exactly one environment namespace of one
14
+ * analysis: attempts, completed results, current heads, acceptance records,
15
+ * promotion records and journal records. Nothing recorded in one environment
16
+ * satisfies a lookup in another, except a completed result that an explicit
17
+ * promotion record names for that other environment (RUN-017).
9
18
  * @packageDocumentation
10
19
  */
11
20
  import type { IClockCapability, ISha256Capability, ISqliteCapability } from '@microdelta/machine';
@@ -14,7 +23,10 @@ import type { ICompletedNavigationReader, ICompletedResultReader, ICompletedResu
14
23
  * The analysis and environment that scope every subject, attempt and result
15
24
  * within one logical store. The same subject text in another analysis or
16
25
  * environment is a different scoped subject (RES-001/002). Both are complete
17
- * opaque non-empty strings compared by exact equality.
26
+ * opaque non-empty strings compared by exact equality. An environment is a
27
+ * namespace within one store (RUN-017): a trial and a production run of the
28
+ * same analysis use different environments of the same file, selected per
29
+ * call rather than process-wide.
18
30
  * @alpha
19
31
  */
20
32
  export interface IHistoryScope {
@@ -77,10 +89,31 @@ export interface IWriterLease {
77
89
  /** The first effective time at which the lease is no longer valid. */
78
90
  readonly expiresAt: number;
79
91
  }
92
+ /**
93
+ * Storage contention on a lease operation: another connection, possibly in
94
+ * another process, held SQLite's write lock past the host's bounded busy wait,
95
+ * so History could not decide and changed nothing, not even the clock
96
+ * high-water. It is a fact about storage, never about ownership (PUB-005): it
97
+ * neither grants nor refuses, and whether to try again is the caller's policy.
98
+ * @alpha
99
+ */
100
+ export interface IWriterContention {
101
+ /** History could not take SQLite's write lock in time. */
102
+ readonly kind: 'contended';
103
+ /**
104
+ * The writer recorded at that moment, read without the write lock: its
105
+ * holder, fence and expiry as stored, whether or not the lease has expired.
106
+ * Undefined when no holder is recorded, or when that read was itself busy;
107
+ * History never guesses a holder.
108
+ */
109
+ readonly writer: IWriterLease | undefined;
110
+ /** The host's diagnostic of the contention; it carries no stored values. */
111
+ readonly detail: string;
112
+ }
80
113
  /**
81
114
  * The outcome of asking for the single logical writer. `held` reports an
82
115
  * observed unexpired holder, not a failed compare-and-swap (PUB-005), and
83
- * grants nothing.
116
+ * grants nothing; `contended` reports that storage was too busy to decide.
84
117
  * @alpha
85
118
  */
86
119
  export type IWriterAcquisition = {
@@ -95,7 +128,20 @@ export type IWriterAcquisition = {
95
128
  readonly holder: string;
96
129
  /** When that holder's lease expires, in History's clock domain. */
97
130
  readonly expiresAt: number;
98
- };
131
+ } | IWriterContention;
132
+ /**
133
+ * The outcome of renewing a lease the caller holds: `renewed` with the later
134
+ * expiry, or `contended` when storage was too busy to decide, in which case
135
+ * the lease is exactly as it was and is neither renewed nor refused. A stale
136
+ * or expired lease is not an outcome but a refusal (`StaleWriterError`).
137
+ * @alpha
138
+ */
139
+ export type IWriterRenewal = {
140
+ /** The lease was extended. */
141
+ readonly kind: 'renewed';
142
+ /** The same holder and fence with the new expiry. */
143
+ readonly lease: IWriterLease;
144
+ } | IWriterContention;
99
145
  /** A request for the writer lease. @alpha */
100
146
  export interface IWriterAcquisitionRequest {
101
147
  /** The opaque non-empty identity of the prospective holder. */
@@ -226,8 +272,22 @@ export interface IAcceptanceRequest {
226
272
  readonly reference: ICompletedResultReference;
227
273
  /** Resolution's versioned acceptance evidence. */
228
274
  readonly evidence: IVersionedRecord;
229
- /** Exact completed results the current verification followed. */
275
+ /**
276
+ * Exact completed results the current verification followed. Each must be
277
+ * admissible in the accepting environment: published there, or named by a
278
+ * promotion into it.
279
+ */
230
280
  readonly dependencies: readonly ICompletedResultReference[];
281
+ /**
282
+ * The environment, within the result's analysis, whose current verification
283
+ * accepted the result. It is always explicit and never inferred from the
284
+ * reference: the caller names its own run environment. It may be the
285
+ * environment that published the result, or another environment into which
286
+ * a recorded promotion admits the result. The acceptance then belongs to
287
+ * that environment's namespace alone and never satisfies a lookup in any
288
+ * other environment.
289
+ */
290
+ readonly environment: string;
231
291
  }
232
292
  /** One immutable current-acceptance record, separate from the result it names. @alpha */
233
293
  export interface IAcceptanceRecord {
@@ -235,6 +295,8 @@ export interface IAcceptanceRecord {
235
295
  readonly acceptanceId: number;
236
296
  /** The accepted exact result. */
237
297
  readonly reference: ICompletedResultReference;
298
+ /** The environment namespace whose verification recorded this acceptance. */
299
+ readonly environment: string;
238
300
  /** The writer fence under which the acceptance was recorded. */
239
301
  readonly fence: number;
240
302
  /** Resolution's acceptance evidence, decoded and frozen. */
@@ -253,6 +315,174 @@ export type IResultVerification = {
253
315
  readonly kind: 'inconsistent';
254
316
  readonly detail: string;
255
317
  };
318
+ /**
319
+ * Asks History to admit exact completed results of other environments into
320
+ * one target environment of the same analysis (RUN-017). A trial result
321
+ * satisfies a production lookup only through such a recorded promotion. The
322
+ * target names where the results are admitted; each reference keeps naming
323
+ * its own publishing environment. The evidence is the promoter's versioned
324
+ * record of who promoted what and why; History stores it opaquely.
325
+ * @alpha
326
+ */
327
+ export interface IPromotionRequest {
328
+ /** The analysis and environment the results are admitted into. */
329
+ readonly target: IHistoryScope;
330
+ /**
331
+ * Distinct exact completed results of the target's analysis, none published
332
+ * in the target environment, in the promoter's order.
333
+ */
334
+ readonly references: readonly ICompletedResultReference[];
335
+ /** The promoter's versioned evidence for this promotion. */
336
+ readonly evidence: IVersionedRecord;
337
+ }
338
+ /**
339
+ * One immutable promotion record. It admits the named results as candidates,
340
+ * dependencies and acceptance targets in its target environment and changes
341
+ * nothing else: each result keeps its exact reference, envelope, provenance
342
+ * and acceptances, and no current head moves in any environment. The target
343
+ * environment's later verifications record their own acceptances.
344
+ * @alpha
345
+ */
346
+ export interface IPromotionRecord {
347
+ /** Store-wide never-reused promotion identity, increasing in record order. */
348
+ readonly promotionId: number;
349
+ /** The analysis and environment the results were admitted into. */
350
+ readonly target: IHistoryScope;
351
+ /** The writer fence under which the promotion was recorded. */
352
+ readonly fence: number;
353
+ /** The promoter's evidence, decoded and frozen. */
354
+ readonly evidence: IVersionedRecord;
355
+ /** The admitted exact results, each in its own publishing scope, in recorded order. */
356
+ readonly references: readonly ICompletedResultReference[];
357
+ }
358
+ /**
359
+ * Selects promotion records into one target environment, optionally only
360
+ * those naming one exact result.
361
+ * @alpha
362
+ */
363
+ export interface IPromotionQuery {
364
+ /** The analysis and environment whose admitting promotions to read. */
365
+ readonly target: IHistoryScope;
366
+ /** When present, only promotions that name this exact result. */
367
+ readonly reference?: ICompletedResultReference;
368
+ }
369
+ /**
370
+ * One owner-defined journal record format and the exact format versions a
371
+ * journal port can read and write. A format is only a record's version tag:
372
+ * it never identifies a record or its collection. History compares the tag
373
+ * and versions for exact equality and never interprets the content.
374
+ * @alpha
375
+ */
376
+ export interface IJournalFormat {
377
+ /** The owner-defined non-empty format identity. */
378
+ readonly format: string;
379
+ /** The positive safe-integer versions of that format this port understands. */
380
+ readonly versions: readonly number[];
381
+ }
382
+ /**
383
+ * The formats a journal port is bound to. A stored record of an undeclared
384
+ * format or version is refused rather than returned or overwritten, so a
385
+ * caller never acts on, or clobbers, a record it does not understand.
386
+ * @alpha
387
+ */
388
+ export interface IJournalDeclaration {
389
+ /** At least one declared format, each format named once. */
390
+ readonly formats: readonly IJournalFormat[];
391
+ }
392
+ /**
393
+ * Locates one journal record: its environment namespace, owner-named
394
+ * collection and owner-defined key. The record's identity is exactly this
395
+ * address; its format tag may change between revisions only by
396
+ * compare-and-set.
397
+ * @alpha
398
+ */
399
+ export interface IJournalAddress extends IHistoryScope {
400
+ /** The owner-named non-empty collection, such as Supervision's operations. */
401
+ readonly collection: string;
402
+ /** The owner-defined non-empty key, unique within the namespace and collection. */
403
+ readonly key: string;
404
+ }
405
+ /**
406
+ * Selects every record of one collection in one environment namespace.
407
+ * @alpha
408
+ */
409
+ export interface IJournalQuery extends IHistoryScope {
410
+ /** The owner-named collection to list. */
411
+ readonly collection: string;
412
+ }
413
+ /**
414
+ * One compare-and-set write of a journal commit. The expected revision is the
415
+ * revision the caller last read at this address; `0` asserts that the key has
416
+ * never been written in the collection, under any format. The record's
417
+ * format and version are its version tag and must be declared by the port.
418
+ * @alpha
419
+ */
420
+ export interface IJournalWrite {
421
+ /** The owner-named non-empty collection. */
422
+ readonly collection: string;
423
+ /** The owner-defined non-empty key. */
424
+ readonly key: string;
425
+ /** The current revision the write replaces, or `0` for a new key. */
426
+ readonly expectedRevision: number;
427
+ /** The new owner-defined record. */
428
+ readonly record: IVersionedRecord;
429
+ }
430
+ /**
431
+ * One atomic journal commit in one environment namespace: every write lands
432
+ * in the same transaction, or none does.
433
+ * @alpha
434
+ */
435
+ export interface IJournalCommit extends IHistoryScope {
436
+ /** At least one write, each collection and key pair at most once. */
437
+ readonly writes: readonly IJournalWrite[];
438
+ }
439
+ /**
440
+ * One immutable revision of a journal record. Revisions of an address start
441
+ * at 1 and increase by one per committed write; earlier revisions are retained
442
+ * and never rewritten.
443
+ * @alpha
444
+ */
445
+ export interface IJournalRecord extends IHistoryScope {
446
+ /** The owner-named collection. */
447
+ readonly collection: string;
448
+ /** The owner-defined key. */
449
+ readonly key: string;
450
+ /** This revision's number within its address, starting at 1. */
451
+ readonly revision: number;
452
+ /** Store-wide never-reused journal write identity, increasing in commit order. */
453
+ readonly sequence: number;
454
+ /** The writer fence under which this revision was committed. */
455
+ readonly fence: number;
456
+ /** The owner-defined record, decoded and frozen, with this revision's version tag. */
457
+ readonly record: IVersionedRecord;
458
+ }
459
+ /**
460
+ * Run Supervision's operation journal, stored by History (RUN-011/012). It
461
+ * keeps owner-defined operation and deferral records, such as an intent
462
+ * committed before a send or a "not before" deferral, atomically and under
463
+ * writer fencing, without interpreting them: History owns only namespacing,
464
+ * collections, revisions, fencing and the declared-version check. A commit
465
+ * needs the current writer lease and checks holder, fence and unexpired lease
466
+ * in the same transaction as its compare-and-set checks and writes; reads
467
+ * need no lease and never see an uncommitted write.
468
+ * @alpha
469
+ */
470
+ export interface IOperationJournal {
471
+ /** The frozen formats and versions this port was opened with. */
472
+ readonly formats: readonly IJournalFormat[];
473
+ /**
474
+ * Commit every write in one transaction. The whole commit is refused,
475
+ * unchanged, for a stale lease, an undeclared format or version, a current
476
+ * revision whose stored format or version this port does not understand
477
+ * (checked first, since such a caller cannot have read it), or an expected
478
+ * revision that is not the address's current revision.
479
+ */
480
+ commit(lease: IWriterLease, request: IJournalCommit): readonly IJournalRecord[];
481
+ /** The current revision at one address, or undefined if the key was never written there. */
482
+ read(address: IJournalAddress): IJournalRecord | undefined;
483
+ /** The current revision of every key in one collection, in order of first write. */
484
+ list(query: IJournalQuery): readonly IJournalRecord[];
485
+ }
256
486
  /**
257
487
  * Host capabilities and identity for opening a durable History store. Node
258
488
  * access stays behind the injected SQLite and clock capabilities. The logical
@@ -287,6 +517,17 @@ export interface IDurableHistoryOptions {
287
517
  * larger fence. A host reading that is not a nonnegative safe integer fails
288
518
  * the operation without any change. This is a local single-file policy, not a
289
519
  * distributed-time or liveness guarantee.
520
+ *
521
+ * Storage contention: every mutation, including acquisition, is one IMMEDIATE
522
+ * SQLite transaction. When another connection, possibly in another process,
523
+ * holds SQLite's write lock past the host's bounded busy wait, nothing
524
+ * changes. Acquisition and renewal, the lease operations a waiter repeats,
525
+ * report it as their `contended` outcome ({@link IWriterContention}), so
526
+ * contention is never mistaken for ownership or staleness (PUB-005). Any other
527
+ * History-owned SQLite operation, including opening and reads, fails with
528
+ * `HistoryBusyError` whose cause is the exact Machine `SqliteBusyError`.
529
+ * Callback-thrown failures retain their identity and do not become contention
530
+ * outcomes. Whether to try again is always the caller's policy, never History's.
290
531
  * @alpha
291
532
  */
292
533
  export interface IDurableHistory {
@@ -294,11 +535,20 @@ export interface IDurableHistory {
294
535
  readonly logicalStore: string;
295
536
  /** Exact selected reads over completed results, answered from their generated index. */
296
537
  readonly reader: ICompletedResultReader & ICompletedNavigationReader;
297
- /** Acquire the single logical writer, or report the observed unexpired holder. */
538
+ /**
539
+ * Acquire the single logical writer, or report the observed unexpired
540
+ * holder, or report storage contention with the recorded writer. Any other
541
+ * failure, such as damaged storage or an unusable clock, is thrown.
542
+ */
298
543
  acquireWriter(request: IWriterAcquisitionRequest): IWriterAcquisition;
299
- /** Extend a still-valid lease; a stale or expired lease is rejected. */
300
- renewWriter(lease: IWriterLease, leaseMilliseconds: number): IWriterLease;
301
- /** End a still-valid lease without resetting the fence. */
544
+ /**
545
+ * Extend a still-valid lease, or report storage contention, which leaves the
546
+ * lease as it was. A stale or expired lease is rejected with
547
+ * `StaleWriterError`. Only the expiry changes: the durable fence is left as
548
+ * it is, never rewritten from the presented lease.
549
+ */
550
+ renewWriter(lease: IWriterLease, leaseMilliseconds: number): IWriterRenewal;
551
+ /** End a still-valid lease; the durable fence is left as it is, so the next grant still advances it. */
302
552
  releaseWriter(lease: IWriterLease): void;
303
553
  /** Inspect the recorded holder, if any, without granting authority. */
304
554
  currentWriter(): IWriterLease | undefined;
@@ -321,9 +571,17 @@ export interface IDurableHistory {
321
571
  abandonAttempt(lease: IWriterLease, request: IAbandonRequest): IAttemptRecord;
322
572
  /** Report what durably happened to one identified execution, read-only. */
323
573
  recoverAttempt(request: IAttemptRequest): IRecoveryOutcome;
324
- /** Completed results for one scoped subject and version, latest publication first. */
574
+ /**
575
+ * Completed results admissible for one scoped subject and version, latest
576
+ * publication first: those published in the subject's environment and those
577
+ * a recorded promotion admits into it. A promoted result keeps its own exact
578
+ * reference and envelope scope; nothing from any other environment appears.
579
+ */
325
580
  findCandidates(subject: IVersionedSubject): readonly ICompletedEnvelope[];
326
- /** The scoped subject's latest publication, if any; never rewound by acceptance. */
581
+ /**
582
+ * The scoped subject's latest publication in its own environment, if any;
583
+ * never rewound by acceptance and never moved by a promotion.
584
+ */
327
585
  readCurrent(subject: IScopedSubject): ICompletedResultReference | undefined;
328
586
  /** Read one exact result's metadata without loading its payload. */
329
587
  readEnvelope(reference: ICompletedResultReference): ICompletedEnvelope;
@@ -331,8 +589,25 @@ export interface IDurableHistory {
331
589
  verifyResult(reference: ICompletedResultReference): IResultVerification;
332
590
  /** Record a current acceptance of an existing result without touching it or the current pointer. */
333
591
  recordAcceptance(lease: IWriterLease, request: IAcceptanceRequest): IAcceptanceRecord;
334
- /** Acceptance records naming one exact result, in record order. */
335
- readAcceptances(reference: ICompletedResultReference): readonly IAcceptanceRecord[];
592
+ /**
593
+ * Acceptance records naming one exact result that were recorded in the
594
+ * named environment, in record order. The environment is always explicit:
595
+ * the publishing environment, or one a promotion admits the result into.
596
+ */
597
+ readAcceptances(reference: ICompletedResultReference, environment: string): readonly IAcceptanceRecord[];
598
+ /**
599
+ * In one commit, record a promotion that admits exact results of other
600
+ * environments into the target environment. Nothing already recorded changes.
601
+ */
602
+ promoteResults(lease: IWriterLease, request: IPromotionRequest): IPromotionRecord;
603
+ /** Promotion records into one environment, in record order. */
604
+ readPromotions(query: IPromotionQuery): readonly IPromotionRecord[];
605
+ /**
606
+ * Open Run Supervision's operation journal over this store, bound to the
607
+ * declared record formats and versions. The port shares this authority's
608
+ * connection, writer lease and lifetime.
609
+ */
610
+ openJournal(declaration: IJournalDeclaration): IOperationJournal;
336
611
  /** Release the SQLite file; later calls fail. */
337
612
  close(): void;
338
613
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/durable/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAElG,OAAO,KAAK,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE7H;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CA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E,kFAAkF;IAClF,YAAY,CAAC,SAAS,EAAE,yBAAyB,GAAG,mBAAmB,CAAC;IAExE,oGAAoG;IACpG,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;IACtF;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,iBAAiB,EAAE,CAAC;IAEzG;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;IAClF,+DAA+D;IAC/D,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,gBAAgB,EAAE,CAAC;IAEpE;;;;OAIG;IACH,WAAW,CAAC,WAAW,EAAE,mBAAmB,GAAG,iBAAiB,CAAC;IAEjE,iDAAiD;IACjD,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -1,12 +1,29 @@
1
1
  /**
2
2
  * Distinct failure classes of the durable History authority. Diagnostics must
3
- * distinguish stale ownership, conflicting execution identity, invalid
4
- * lifecycle transitions, unsupported storage and integrity failures rather
5
- * than report a generic miss (execution.md, required validation fixtures).
3
+ * distinguish exhausted SQLite contention, stale ownership, conflicting
4
+ * execution identity, invalid lifecycle transitions, unsupported storage,
5
+ * journal compare-and-set conflicts, undeclared journal record versions and
6
+ * integrity failures rather than report a generic miss (execution.md,
7
+ * required validation fixtures).
6
8
  * None of these classes extends `TypeError`, so a reader never mistakes a
7
9
  * storage failure for Value's rejection of a selection's shape.
8
10
  * @packageDocumentation
9
11
  */
12
+ import type { SqliteBusyError } from '@microdelta/machine';
13
+ /**
14
+ * A History-owned SQLite operation exhausted Machine's bounded busy wait.
15
+ * The exact host failure is retained as `cause`, so callers can distinguish
16
+ * contention from corruption or a stale writer without losing host detail.
17
+ * History wraps only failures raised at its SQLite capability boundary, never
18
+ * an application callback that happened to throw a Machine busy error.
19
+ * @alpha
20
+ */
21
+ export declare class HistoryBusyError extends Error {
22
+ /** The exact Machine failure that History received. */
23
+ readonly cause: SqliteBusyError;
24
+ /** Create History's boundary failure while retaining the original host error. */
25
+ constructor(message: string, cause: SqliteBusyError);
26
+ }
10
27
  /**
11
28
  * The store's contents contradict History's invariants or the caller's exact
12
29
  * reference: a malformed, missing or wrong-scope reference, a dangling
@@ -66,4 +83,28 @@ export declare class HistoryClockError extends Error {
66
83
  /** Create a clock refusal with a diagnostic message. */
67
84
  constructor(message: string);
68
85
  }
86
+ /**
87
+ * A journal commit's compare-and-set expectation does not hold: the presented
88
+ * expected revision is not the key's current revision (a new-key expectation
89
+ * met an existing key, or an update met a later or absent revision). The
90
+ * whole commit was rolled back unchanged; the caller must re-read before
91
+ * deciding again.
92
+ * @alpha
93
+ */
94
+ export declare class JournalConflictError extends Error {
95
+ /** Create a compare-and-set rejection with a diagnostic message. */
96
+ constructor(message: string);
97
+ }
98
+ /**
99
+ * A journal record's format or format version is not one the journal port
100
+ * declared. On a write the record is refused; on a read or list the stored
101
+ * record is refused rather than returned; a commit over a current revision of
102
+ * an undeclared version is refused rather than overwriting it. History never
103
+ * interprets or converts the content of another format version.
104
+ * @alpha
105
+ */
106
+ export declare class JournalVersionError extends Error {
107
+ /** Create an undeclared-version refusal with a diagnostic message. */
108
+ constructor(message: string);
109
+ }
69
110
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/durable/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,6DAA6D;gBAC1C,OAAO,EAAE,MAAM;CAInC;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,2DAA2D;gBACxC,OAAO,EAAE,MAAM;CAInC;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,oEAAoE;gBACjD,O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OG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,oEAAoE;gBACjD,OAAO,EAAE,MAAM;CAInC;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,sEAAsE;gBACnD,OAAO,EAAE,MAAM;CAInC"}
@@ -1,12 +1,18 @@
1
1
  /**
2
- * Distinct failure classes of the durable History authority. Diagnostics must
3
- * distinguish stale ownership, conflicting execution identity, invalid
4
- * lifecycle transitions, unsupported storage and integrity failures rather
5
- * than report a generic miss (execution.md, required validation fixtures).
6
- * None of these classes extends `TypeError`, so a reader never mistakes a
7
- * storage failure for Value's rejection of a selection's shape.
8
- * @packageDocumentation
2
+ * A History-owned SQLite operation exhausted Machine's bounded busy wait.
3
+ * The exact host failure is retained as `cause`, so callers can distinguish
4
+ * contention from corruption or a stale writer without losing host detail.
5
+ * History wraps only failures raised at its SQLite capability boundary, never
6
+ * an application callback that happened to throw a Machine busy error.
7
+ * @alpha
9
8
  */
9
+ export class HistoryBusyError extends Error {
10
+ /** Create History's boundary failure while retaining the original host error. */
11
+ constructor(message, cause) {
12
+ super(message, { cause });
13
+ this.name = 'HistoryBusyError';
14
+ }
15
+ }
10
16
  /**
11
17
  * The store's contents contradict History's invariants or the caller's exact
12
18
  * reference: a malformed, missing or wrong-scope reference, a dangling
@@ -84,4 +90,34 @@ export class HistoryClockError extends Error {
84
90
  this.name = 'HistoryClockError';
85
91
  }
86
92
  }
93
+ /**
94
+ * A journal commit's compare-and-set expectation does not hold: the presented
95
+ * expected revision is not the key's current revision (a new-key expectation
96
+ * met an existing key, or an update met a later or absent revision). The
97
+ * whole commit was rolled back unchanged; the caller must re-read before
98
+ * deciding again.
99
+ * @alpha
100
+ */
101
+ export class JournalConflictError extends Error {
102
+ /** Create a compare-and-set rejection with a diagnostic message. */
103
+ constructor(message) {
104
+ super(message);
105
+ this.name = 'JournalConflictError';
106
+ }
107
+ }
108
+ /**
109
+ * A journal record's format or format version is not one the journal port
110
+ * declared. On a write the record is refused; on a read or list the stored
111
+ * record is refused rather than returned; a commit over a current revision of
112
+ * an undeclared version is refused rather than overwriting it. History never
113
+ * interprets or converts the content of another format version.
114
+ * @alpha
115
+ */
116
+ export class JournalVersionError extends Error {
117
+ /** Create an undeclared-version refusal with a diagnostic message. */
118
+ constructor(message) {
119
+ super(message);
120
+ this.name = 'JournalVersionError';
121
+ }
122
+ }
87
123
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/durable/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,6DAA6D;IAC7D,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C,2DAA2D;IAC3D,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,oEAAoE;IACpE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,uEAAuE;IACvE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,wEAAwE;IACxE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAA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AAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,wEAAwE;IACxE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,wDAAwD;IACxD,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,oEAAoE;IACpE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,sEAAsE;IACtE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/durable/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAQV,eAAe,EACf,sBAAsB,EAWvB,MAAM,gBAAgB,CAAC;AAwIxB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAmgBnF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/durable/index.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAQV,eAAe,EACf,sBAAsB,EAiBvB,MAAM,gBAAgB,CAAC;AA2DxB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAwwBnF"}