Some checks failed
Test / test (push) Has been cancelled
Two interlocking robustness fixes for the duplicate-fan-out / first-contact
class of failures Prism reported.
1. `Shade.receive(from, env)` now queues its `manager.decrypt` step
per `from` so concurrent dispatches can't race the SessionManager
ratchet or the StorageProvider (sqlite "database is locked", IDB
transaction conflicts). User message handlers run *outside* the
queue so streams + file-RPC's nested `shade.receive` calls don't
self-deadlock.
2. Bridge WS + SSE handlers now run a per-connection bounded msgId
LRU as defense-in-depth against any flushTo re-entry (event-storm,
future refactor). Pending-flush chains are wrapped in `.catch(() =>
{})` so a transient `ws.send` rejection no longer poisons the
connection's flush loop.
Tests: storming `inbox.blob_stored` 10× per PUT yields exactly one WS/
SSE frame; 8 concurrent `bob.receive('alice', envelope)` calls keep
the ratchet intact and never surface "database is locked".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
23 lines
453 B
JSON
23 lines
453 B
JSON
{
|
|
"name": "@shade/recovery",
|
|
"version": "4.8.2",
|
|
"type": "module",
|
|
"main": "src/index.ts",
|
|
"types": "src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"import": "./src/index.ts"
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"@shade/core": "workspace:*",
|
|
"@shade/crypto-web": "workspace:*",
|
|
"@shade/sdk": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@shade/server": "workspace:*",
|
|
"fast-check": "^3.22.0"
|
|
}
|
|
}
|