@serfab/quereus-plugin-sereus 0.12.0 → 0.13.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/src/index.ts CHANGED
@@ -5,7 +5,10 @@ export {
5
5
  CONTROL_CLUSTER_POLICY,
6
6
  DEFAULT_STRAND_CLUSTER_SIZE,
7
7
  STRAND_CLUSTER_POLICY,
8
- resolveStrandClusterSize
8
+ resolveStrandClusterSize,
9
+ resolveRepairYardstick,
10
+ controlClusterPolicy,
11
+ strandClusterPolicy
9
12
  } from './cluster-size.js';
10
13
  export { wrapStorageWithCache, disposeStorageCache } from './cached-storage.js';
11
14
  export type { StrandConnectionOptions, SereusPluginResult, StrandTransactor } from './types.js';
@@ -13,8 +13,9 @@
13
13
  *
14
14
  * Drift discipline: the table declarations here MUST stay byte-equivalent to the
15
15
  * body of `schemas/strand.qsql` (the on-disk canonical copy). Any edit here must
16
- * be mirrored there and vice versa — the same invariant the planned
17
- * `control-schema-drift-guard` enforces for the control schema.
16
+ * be mirrored there and vice versa. `test/strand-schema-drift.spec.ts` enforces it
17
+ * — but only from THIS package, so an edit made in `schemas/strand.qsql` alone
18
+ * stays green everywhere its author is likely to look; run that spec after either.
18
19
  *
19
20
  * Crypto idiom (matches `schemas/control.qsql` and the sApp RBAC fixture
20
21
  * `packages/integration-tests/fixtures/simple-sapp.qsql`): every signed write
@@ -118,6 +119,10 @@ export const STRAND_SCHEMA = ` table Header (
118
119
  -- manager must survive the transaction, and sealing plus consuming in the SAME
119
120
  -- transaction is rejected too. Blocking this insert blocks the whole join, for
120
121
  -- exactly the reason NotCancelled gives above.
122
+ -- The Manager rows this reads are the ones THIS NODE can see, so the gate binds
123
+ -- only once the seal has reached here — on a node still behind on the seal it
124
+ -- passes, and a stranger holding a pre-seal invitation joins (the Manager table's
125
+ -- seal-propagation NOTE).
121
126
  constraint NotSealed check on insert (
122
127
  exists (select 1 from Manager)
123
128
  )
@@ -414,10 +419,15 @@ export const STRAND_SCHEMA = ` table Header (
414
419
  -- history. Sealing is irreversible: the founding branch of Authorized closes
415
420
  -- for good once any manager stamp has been retired into Revocation.
416
421
  -- NOTE: a seal must PROPAGATE before it binds a given node — a node that has
417
- -- not yet converged on the delete still shows the manager row, so the
418
- -- ex-manager's OWN key could still admit there until the delete arrives. Only
419
- -- that one key; no stranger gains anything. Same convergence class as the
420
- -- MinOneMember / NotRevoked local-visibility notes; not solved here.
422
+ -- not yet converged on the delete still shows the manager row, so until the
423
+ -- delete arrives that node admits as if unsealed. It is NOT only the
424
+ -- ex-manager's own key that gains: every gate here reads the LOCALLY visible
425
+ -- Manager rows, and ConsumedInvite.NotSealed is one of them, so a STRANGER
426
+ -- holding an invitation issued before the seal can redeem it on such a node.
427
+ -- Same convergence class as the MinOneMember / NotRevoked local-visibility
428
+ -- notes; not solved here. Arrival IS covered, on the converged side:
429
+ -- integration-tests' strand-membership-closed-strand-e2e gates a second node on
430
+ -- the seal and then requires it to refuse every admission path.
421
431
  constraint Authorized check on insert, delete (
422
432
  -- Every signed branch below is a domain/action-tagged digest bound to the
423
433
  -- row's StampId — the same single-use idiom as Member.Authorized: an