@fuzdev/fuz_app 0.129.0 → 0.130.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/dist/actions/CLAUDE.md +23 -6
- package/dist/actions/connection_closer.d.ts +3 -1
- package/dist/actions/connection_closer.d.ts.map +1 -1
- package/dist/actions/register_action_ws.d.ts +46 -0
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +105 -14
- package/dist/actions/transports.d.ts +2 -1
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +2 -1
- package/dist/actions/transports_ws_backend.d.ts +37 -4
- package/dist/actions/transports_ws_backend.d.ts.map +1 -1
- package/dist/actions/transports_ws_backend.js +68 -4
- package/dist/auth/audit_log_routes.d.ts +7 -3
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +48 -26
- package/dist/http/CLAUDE.md +1 -1
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +7 -5
- package/dist/realtime/sse.d.ts +14 -1
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +77 -1
- package/dist/realtime/sse_auth_guard.js +1 -1
- package/dist/realtime/subscriber_registry.d.ts +44 -8
- package/dist/realtime/subscriber_registry.d.ts.map +1 -1
- package/dist/realtime/subscriber_registry.js +64 -10
- package/dist/server/app_server.d.ts +4 -1
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/testing/CLAUDE.md +16 -0
- package/dist/testing/cross_backend/peer_ping_ws.js +4 -4
- package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts +20 -0
- package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts.map +1 -0
- package/dist/testing/cross_backend/ws_inbound_dispatch.js +177 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server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EAAE,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9D;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,GACjC,SAAS,IAAI,CAAC,gBAAgB,EAAE,uBAAuB,GAAG,eAAe,CAAC,KACxE,oBAkBF,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC,6EAA6E;IAC7E,cAAc,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;IAC1D,2CAA2C;IAC3C,iBAAiB,EAAE,eAAe,CAAC;IACnC,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC,uBAAuB,EAAE,WAAW,GAAG,IAAI,CAAC,CAAC;CACnE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,GACtC,OAAO,sBAAsB,KAC3B,KAAK,CAAC,oBAAoB,CAiD5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,iBAAiB,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,SAAS,CAQpF,CAAC"}
|
package/dist/testing/CLAUDE.md
CHANGED
|
@@ -1202,6 +1202,22 @@ action (manifest-excluded), so parity is behavioral here, not via the manifest
|
|
|
1202
1202
|
gate. Cross-process only; fuz_app's own wiring is
|
|
1203
1203
|
`src/test/cross_backend/peer_ping_ws.cross.test.ts`.
|
|
1204
1204
|
|
|
1205
|
+
### `cross_backend/ws_inbound_dispatch.ts` — `describe_ws_inbound_dispatch_cross_tests`
|
|
1206
|
+
|
|
1207
|
+
Real-upgrade parity for the two refusals a WebSocket request meets ahead of
|
|
1208
|
+
dispatch: a request whose id names a request still running on the socket →
|
|
1209
|
+
`invalid_request` with `data.reason: 'duplicate_request_id'`, not dispatched
|
|
1210
|
+
(the running request answers under its id as usual, and the id frees once it
|
|
1211
|
+
has); and past the per-socket in-flight ceiling (128 on both spines) a new
|
|
1212
|
+
request → `queue_overflow` with its id, not dispatched, the socket left open,
|
|
1213
|
+
the duplicate check first. Requests are held in flight with `peer/ping` — the
|
|
1214
|
+
client's responder withholds the server's ping echo until the test releases
|
|
1215
|
+
it — so the suite gates on `capabilities.peer_request`.
|
|
1216
|
+
`describe_ws_inbound_dispatch_cross_tests({setup_test, capabilities, base_url,
|
|
1217
|
+
ws_path})`. The wire literals are independent copies of the producers'
|
|
1218
|
+
constants, so a value changed on one spine fails here. Cross-process only;
|
|
1219
|
+
fuz_app's own wiring is `src/test/cross_backend/ws_inbound_dispatch.cross.test.ts`.
|
|
1220
|
+
|
|
1205
1221
|
### `cross_backend/ws_connection_cap.ts` — `describe_ws_connection_cap_cross_tests`
|
|
1206
1222
|
|
|
1207
1223
|
Real-upgrade parity for the **per-account WebSocket connection cap** — the
|
|
@@ -26,10 +26,10 @@ import '../assert_dev_env.js';
|
|
|
26
26
|
* non-sensitive — see the design doc); the WS upgrade itself still
|
|
27
27
|
* authenticates, so the suite drives it over the keeper's session.
|
|
28
28
|
*
|
|
29
|
-
* Gated on `capabilities.peer_request
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* Gated on `capabilities.peer_request`, which a backend declares once it
|
|
30
|
+
* mounts `peer/ping` on a WS endpoint and the HTTP RPC endpoint — the TS
|
|
31
|
+
* spine binaries (`BackendWebsocketTransport.request_connection`) and the
|
|
32
|
+
* Rust spine both do. Cross-process only: `create_ws_transport` needs a real bound
|
|
33
33
|
* socket, so wire it from a `*.cross.test.ts`.
|
|
34
34
|
*
|
|
35
35
|
* @module
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import '../assert_dev_env.js';
|
|
2
|
+
import { type BackendCapabilities } from './capabilities.js';
|
|
3
|
+
import type { SetupTest } from './setup.js';
|
|
4
|
+
/** Configuration for `describe_ws_inbound_dispatch_cross_tests`. */
|
|
5
|
+
export interface WsInboundDispatchCrossTestOptions {
|
|
6
|
+
/** Per-test fixture producer (`default_cross_process_setup(handle)`). */
|
|
7
|
+
readonly setup_test: SetupTest;
|
|
8
|
+
/** Backend capability flags; every case gates on `capabilities.peer_request`. */
|
|
9
|
+
readonly capabilities: BackendCapabilities;
|
|
10
|
+
/** Base URL the backend is reachable at (e.g. `http://localhost:1177`). */
|
|
11
|
+
readonly base_url: string;
|
|
12
|
+
/** WebSocket endpoint path on the backend (e.g. `/api/ws`). */
|
|
13
|
+
readonly ws_path: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Register the duplicate-id and in-flight-ceiling cases. Gated on
|
|
17
|
+
* `capabilities.peer_request` (the cases hold requests with `peer/ping`).
|
|
18
|
+
*/
|
|
19
|
+
export declare const describe_ws_inbound_dispatch_cross_tests: (options: WsInboundDispatchCrossTestOptions) => void;
|
|
20
|
+
//# sourceMappingURL=ws_inbound_dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws_inbound_dispatch.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/ws_inbound_dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA2C9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAiB5C,oEAAoE;AACpE,MAAM,WAAW,iCAAiC;IACjD,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAiED;;;GAGG;AACH,eAAO,MAAM,wCAAwC,GACpD,SAAS,iCAAiC,KACxC,IA8GF,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import '../assert_dev_env.js';
|
|
2
|
+
/**
|
|
3
|
+
* Cross-process suite for the two refusals a WebSocket request can meet ahead
|
|
4
|
+
* of dispatch — the same on both spines, pinned over a real upgrade:
|
|
5
|
+
*
|
|
6
|
+
* - a request whose id names a request still running on the socket is
|
|
7
|
+
* answered `invalid_request` with `data.reason: 'duplicate_request_id'` and
|
|
8
|
+
* not dispatched; the running request keeps the id and answers as usual, and
|
|
9
|
+
* once it has answered the id is free again
|
|
10
|
+
* - past the per-socket in-flight ceiling (128 on both spines) a new request is
|
|
11
|
+
* answered `queue_overflow` with its id and not dispatched; the socket stays
|
|
12
|
+
* open, the running requests still answer, and the duplicate check comes
|
|
13
|
+
* first
|
|
14
|
+
*
|
|
15
|
+
* A request has to stay in flight for either to be observable, so the suite
|
|
16
|
+
* holds requests with `peer/ping`: the server's handler pings the client back
|
|
17
|
+
* and waits for the echo, and the client's responder withholds it until the
|
|
18
|
+
* test releases it. Gated on `capabilities.peer_request` for that reason.
|
|
19
|
+
*
|
|
20
|
+
* The wire literals are deliberate independent copies of the producers'
|
|
21
|
+
* constants (`ERROR_DUPLICATE_REQUEST_ID`,
|
|
22
|
+
* `MAX_INBOUND_DISPATCHES_PER_CONNECTION`, `WS_INBOUND_DISPATCH_OVERFLOW_MESSAGE`
|
|
23
|
+
* on TS; their Rust twins in `fuz_realtime`) — parity by test, so a value
|
|
24
|
+
* renamed on one side fails here instead of moving both at once.
|
|
25
|
+
*
|
|
26
|
+
* Cross-process only: `create_ws_transport` needs a real bound socket, so wire
|
|
27
|
+
* it from a `*.cross.test.ts` file.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
import { assert, describe } from 'vitest';
|
|
32
|
+
import { create_jsonrpc_request } from '../../http/jsonrpc_helpers.js';
|
|
33
|
+
import { create_ws_transport } from '../transports/ws_transport.js';
|
|
34
|
+
import { is_response_for } from '../transports/ws_client.js';
|
|
35
|
+
import { test_if } from './capabilities.js';
|
|
36
|
+
/** `data.reason` of the duplicate-id refusal. */
|
|
37
|
+
const REASON_DUPLICATE_REQUEST_ID = 'duplicate_request_id';
|
|
38
|
+
/** The per-socket in-flight ceiling on both spines. */
|
|
39
|
+
const MAX_INBOUND_DISPATCHES = 128;
|
|
40
|
+
/** The `queue_overflow` message past the ceiling. */
|
|
41
|
+
const OVERFLOW_MESSAGE = 'too many concurrent requests on this connection';
|
|
42
|
+
const INVALID_REQUEST = -32600;
|
|
43
|
+
const QUEUE_OVERFLOW = -32009;
|
|
44
|
+
const PEER_PING_METHOD = 'peer/ping';
|
|
45
|
+
const HEARTBEAT_METHOD = 'heartbeat';
|
|
46
|
+
/** How long the test waits on a frame — above the server's peer-request deadline. */
|
|
47
|
+
const FRAME_TIMEOUT_MS = 12_000;
|
|
48
|
+
/**
|
|
49
|
+
* A client responder that withholds every server-initiated `peer/ping` echo
|
|
50
|
+
* until `release` — so each client `peer/ping` stays in flight on the server —
|
|
51
|
+
* and answers at once after it.
|
|
52
|
+
*/
|
|
53
|
+
const create_holding_responder = () => {
|
|
54
|
+
let release;
|
|
55
|
+
const released = new Promise((resolve) => {
|
|
56
|
+
release = resolve;
|
|
57
|
+
});
|
|
58
|
+
let ping_count = 0;
|
|
59
|
+
const ping_waiters = [];
|
|
60
|
+
const responder = async (request) => {
|
|
61
|
+
ping_count++;
|
|
62
|
+
for (let i = ping_waiters.length - 1; i >= 0; i--) {
|
|
63
|
+
const waiter = ping_waiters[i];
|
|
64
|
+
if (ping_count >= waiter.count) {
|
|
65
|
+
waiter.resolve();
|
|
66
|
+
ping_waiters.splice(i, 1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
await released;
|
|
70
|
+
const nonce = request.params?.nonce ?? 0;
|
|
71
|
+
return { result: { nonce, protocol_version: 1 } };
|
|
72
|
+
};
|
|
73
|
+
const pinged = (count) => ping_count >= count
|
|
74
|
+
? Promise.resolve()
|
|
75
|
+
: new Promise((resolve) => ping_waiters.push({ count, resolve }));
|
|
76
|
+
return { responder, release, pinged };
|
|
77
|
+
};
|
|
78
|
+
/** A response for `id` that carries a `peer/ping` result (`nonce` present). */
|
|
79
|
+
const is_ping_result_for = (id) => (msg) => is_response_for(id)(msg) &&
|
|
80
|
+
typeof msg.result === 'object' &&
|
|
81
|
+
msg.result !== null &&
|
|
82
|
+
'nonce' in msg.result;
|
|
83
|
+
/** A response for `id` that carries a `heartbeat` result (an object without `nonce`). */
|
|
84
|
+
const is_heartbeat_result_for = (id) => (msg) => is_response_for(id)(msg) &&
|
|
85
|
+
typeof msg.result === 'object' &&
|
|
86
|
+
msg.result !== null &&
|
|
87
|
+
!('nonce' in msg.result);
|
|
88
|
+
/** An error response for `id`. */
|
|
89
|
+
const is_error_for = (id) => (msg) => is_response_for(id)(msg) && 'error' in msg;
|
|
90
|
+
/**
|
|
91
|
+
* Register the duplicate-id and in-flight-ceiling cases. Gated on
|
|
92
|
+
* `capabilities.peer_request` (the cases hold requests with `peer/ping`).
|
|
93
|
+
*/
|
|
94
|
+
export const describe_ws_inbound_dispatch_cross_tests = (options) => {
|
|
95
|
+
const { setup_test, capabilities, base_url, ws_path } = options;
|
|
96
|
+
const open_ws = (cookie, on_request) => {
|
|
97
|
+
assert.ok(cookie, 'expected a session cookie for the WS upgrade');
|
|
98
|
+
return create_ws_transport({
|
|
99
|
+
base_url,
|
|
100
|
+
ws_path,
|
|
101
|
+
cookies: [cookie],
|
|
102
|
+
origin: base_url,
|
|
103
|
+
on_request,
|
|
104
|
+
default_timeout_ms: FRAME_TIMEOUT_MS
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const send_ping = (ws, id, nonce) => ws.send(create_jsonrpc_request(PEER_PING_METHOD, { nonce }, id));
|
|
108
|
+
const send_heartbeat = (ws, id) => ws.send(create_jsonrpc_request(HEARTBEAT_METHOD, undefined, id));
|
|
109
|
+
const assert_duplicate_refusal = (frame, id) => {
|
|
110
|
+
assert.ok('error' in frame, `expected the duplicate to be refused: ${JSON.stringify(frame)}`);
|
|
111
|
+
assert.strictEqual(frame.id, id);
|
|
112
|
+
assert.strictEqual(frame.error.code, INVALID_REQUEST);
|
|
113
|
+
assert.strictEqual(frame.error.message, 'invalid request');
|
|
114
|
+
assert.deepStrictEqual(frame.error.data, { reason: REASON_DUPLICATE_REQUEST_ID });
|
|
115
|
+
};
|
|
116
|
+
describe('ws inbound dispatch refusals (cross-process)', () => {
|
|
117
|
+
test_if(capabilities.peer_request, 'a request reusing a live id is refused with that id; the first keeps it, then the id frees', async () => {
|
|
118
|
+
const fixture = await setup_test();
|
|
119
|
+
const { responder, release, pinged } = create_holding_responder();
|
|
120
|
+
const ws = await open_ws(fixture.create_session_headers().cookie, responder);
|
|
121
|
+
try {
|
|
122
|
+
const id = 'held';
|
|
123
|
+
await send_ping(ws, id, 41);
|
|
124
|
+
// the server pinged back: the first request is dispatched and waiting
|
|
125
|
+
await pinged(1);
|
|
126
|
+
await send_heartbeat(ws, id);
|
|
127
|
+
assert_duplicate_refusal(await ws.wait_for(is_error_for(id)), id);
|
|
128
|
+
// the string '7' and the number 7 are different ids on both spines
|
|
129
|
+
await send_ping(ws, 7, 7);
|
|
130
|
+
await pinged(2);
|
|
131
|
+
await send_heartbeat(ws, '7');
|
|
132
|
+
await ws.wait_for(is_heartbeat_result_for('7'));
|
|
133
|
+
release();
|
|
134
|
+
const first = await ws.wait_for(is_ping_result_for(id));
|
|
135
|
+
assert.strictEqual(first.result.nonce, 41, 'the first request answers under its id');
|
|
136
|
+
await ws.wait_for(is_ping_result_for(7));
|
|
137
|
+
// answered, the id is free again
|
|
138
|
+
await send_heartbeat(ws, id);
|
|
139
|
+
await ws.wait_for(is_heartbeat_result_for(id));
|
|
140
|
+
const refusals = ws.messages.filter(is_error_for(id));
|
|
141
|
+
assert.strictEqual(refusals.length, 1, 'only the duplicate was refused');
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
await ws.close();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
test_if(capabilities.peer_request, 'past the in-flight ceiling a request is shed with queue_overflow and the socket keeps serving', async () => {
|
|
148
|
+
const fixture = await setup_test();
|
|
149
|
+
const { responder, release } = create_holding_responder();
|
|
150
|
+
const ws = await open_ws(fixture.create_session_headers().cookie, responder);
|
|
151
|
+
try {
|
|
152
|
+
for (let n = 0; n < MAX_INBOUND_DISPATCHES; n++) {
|
|
153
|
+
await send_ping(ws, n, n);
|
|
154
|
+
}
|
|
155
|
+
// a duplicate at the ceiling is refused as a duplicate — that check is first
|
|
156
|
+
await send_heartbeat(ws, 0);
|
|
157
|
+
await send_heartbeat(ws, 'over');
|
|
158
|
+
assert_duplicate_refusal(await ws.wait_for(is_error_for(0)), 0);
|
|
159
|
+
const over = await ws.wait_for(is_response_for('over'));
|
|
160
|
+
assert.ok('error' in over, `expected the request to be shed: ${JSON.stringify(over)}`);
|
|
161
|
+
assert.strictEqual(over.error.code, QUEUE_OVERFLOW);
|
|
162
|
+
assert.strictEqual(over.error.message, OVERFLOW_MESSAGE);
|
|
163
|
+
assert.strictEqual(ws.close_code, null, 'shedding never closes the socket');
|
|
164
|
+
release();
|
|
165
|
+
for (let n = 0; n < MAX_INBOUND_DISPATCHES; n++) {
|
|
166
|
+
const frame = await ws.wait_for(is_ping_result_for(n));
|
|
167
|
+
assert.strictEqual(frame.result.nonce, n);
|
|
168
|
+
}
|
|
169
|
+
await send_heartbeat(ws, 'after');
|
|
170
|
+
await ws.wait_for(is_heartbeat_result_for('after'));
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
await ws.close();
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
};
|