@kumiai/rpc 0.13.2 → 0.13.4

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 (2) hide show
  1. package/lib/peer.js +6 -4
  2. package/package.json +12 -11
package/lib/peer.js CHANGED
@@ -2532,6 +2532,8 @@ export function createGroupPeer(input) {
2532
2532
  });
2533
2533
  throw error instanceof PeerDisposedError ? error : new PeerDisposedError('Peer is disposed');
2534
2534
  }
2535
+ // The cursor may already be past the frame that asked for this heal: nothing re-asks.
2536
+ retryRecovery();
2535
2537
  emitRecovery({
2536
2538
  ...base,
2537
2539
  phase: 'failed',
@@ -2590,16 +2592,16 @@ export function createGroupPeer(input) {
2590
2592
  /**
2591
2593
  * Run a heal the lane asked for, never from inside the lane. `recover()` takes the commit mutex,
2592
2594
  * so the trigger records and the caller runs this once it releases the mutex. A heal already in
2593
- * flight absorbs any trigger raised while it runs: the frame that raised it is still in the log,
2594
- * and the next pull raises it again if the heal did not settle it.
2595
+ * flight absorbs any trigger raised while it runs. A pull may have stepped past the frame that
2596
+ * raised it, so nothing re-asks: each failure path schedules its own follow-up.
2595
2597
  */ const healIfRequested = async ()=>{
2596
2598
  if (disposed || !healRequested || activeRecovery != null || renewalHeld() || refusalHeld) return;
2597
2599
  healRequested = false;
2598
2600
  try {
2599
2601
  await runRecovery('automatic');
2600
2602
  } catch {
2601
- // No responder, or a reply that would not open. The peer stays degraded, and the frame that
2602
- // asked for the heal is still in the log: the next pull asks again.
2603
+ // Reported through `onRecovery`. The peer stays degraded until the follow-up the failed
2604
+ // attempt scheduled.
2603
2605
  }
2604
2606
  };
2605
2607
  let pendingRestoreTimer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumiai/rpc",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "description": "High-level MLS-aware group RPC for Enkaku: bus broadcast/anycast/gather plus directed RPC over the pub/sub hub",
5
5
  "keywords": [
6
6
  "rpc",
@@ -26,26 +26,27 @@
26
26
  "lib/*"
27
27
  ],
28
28
  "dependencies": {
29
- "@enkaku/client": "^0.23.7",
30
- "@enkaku/protocol": "^0.23.4",
31
- "@enkaku/server": "^0.23.4",
29
+ "@enkaku/client": "^0.23.8",
30
+ "@enkaku/protocol": "^0.23.5",
31
+ "@enkaku/server": "^0.23.6",
32
32
  "@enkaku/transport": "^0.23.3",
33
- "@kokuin/token": "^0.7.1",
33
+ "@kokuin/token": "^0.8.1",
34
34
  "@kumiai/broadcast": "^0.13.0",
35
- "@kumiai/hub-protocol": "^0.13.2",
36
- "@kumiai/hub-tunnel": "^0.13.1",
35
+ "@kumiai/hub-protocol": "^0.13.3",
36
+ "@kumiai/hub-tunnel": "^0.13.4",
37
37
  "@noble/hashes": "^2.4.0",
38
- "@sozai/codec": "^0.4.4",
39
- "@sozai/event": "^0.1.6",
38
+ "@sozai/codec": "^0.5.0",
39
+ "@sozai/event": "^0.1.7",
40
40
  "@sozai/log": "^0.4.0",
41
41
  "@sozai/runtime": "^0.1.1",
42
42
  "@sozai/schema": "^0.1.6"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@kumiai/hub-conformance": "^0.13.1",
46
- "@kumiai/rpc-conformance": "^0.13.0",
46
+ "@kumiai/rpc-conformance": "^0.13.1",
47
47
  "@noble/curves": "^2.4.0",
48
- "vitest": "^5.1.1"
48
+ "@sozai/bytes": "^0.1.0",
49
+ "vitest": "^5.1.2"
49
50
  },
50
51
  "publishConfig": {
51
52
  "access": "public"