@fuzdev/fuz_app 0.117.1 → 0.119.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 +301 -73
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +16 -1
- package/dist/actions/connection_closer.d.ts +136 -51
- package/dist/actions/connection_closer.d.ts.map +1 -1
- package/dist/actions/connection_closer.js +133 -34
- package/dist/actions/register_action_ws.d.ts +176 -24
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +581 -241
- package/dist/actions/register_ws_endpoint.d.ts +1 -0
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +1 -0
- package/dist/actions/socket.svelte.d.ts +43 -9
- package/dist/actions/socket.svelte.d.ts.map +1 -1
- package/dist/actions/socket.svelte.js +59 -8
- package/dist/actions/transports.d.ts +55 -1
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +55 -1
- package/dist/actions/transports_ws_auth_guard.d.ts +53 -67
- package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
- package/dist/actions/transports_ws_auth_guard.js +87 -111
- package/dist/actions/transports_ws_backend.d.ts +212 -30
- package/dist/actions/transports_ws_backend.d.ts.map +1 -1
- package/dist/actions/transports_ws_backend.js +327 -70
- package/dist/actions/ws_endpoint_spec.d.ts +26 -13
- package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
- package/dist/auth/CLAUDE.md +125 -31
- package/dist/auth/account_actions.d.ts +12 -18
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +47 -33
- package/dist/auth/account_routes.d.ts +5 -11
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +40 -36
- package/dist/auth/account_schema.d.ts +27 -0
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +22 -0
- package/dist/auth/admin_actions.d.ts +8 -17
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +33 -21
- package/dist/auth/api_token_queries.d.ts +23 -2
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +39 -3
- package/dist/auth/audit_emitter.d.ts +72 -44
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +60 -16
- package/dist/auth/audit_log_route_schema.js +7 -7
- package/dist/auth/audit_log_routes.d.ts +31 -6
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +85 -11
- package/dist/auth/audit_log_schema.d.ts +48 -0
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +58 -0
- package/dist/auth/bootstrap_account.d.ts +3 -2
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +3 -3
- package/dist/auth/cleanup.d.ts +219 -30
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +260 -45
- package/dist/auth/deps.d.ts +29 -1
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +27 -0
- package/dist/auth/resolved_auth.d.ts +105 -0
- package/dist/auth/resolved_auth.d.ts.map +1 -0
- package/dist/auth/resolved_auth.js +124 -0
- package/dist/auth/role_grant_offer_ddl.d.ts +4 -2
- package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_ddl.js +10 -3
- package/dist/auth/role_grant_offer_queries.d.ts +16 -7
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +33 -15
- package/dist/auth/role_grant_offer_schema.d.ts +9 -0
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/session_middleware.d.ts +8 -1
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +9 -3
- package/dist/auth/session_queries.d.ts +31 -6
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +31 -6
- package/dist/auth/standard_rpc_actions.d.ts +9 -9
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +3 -3
- package/dist/db/CLAUDE.md +7 -1
- package/dist/db/migrate.d.ts +8 -13
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +9 -38
- package/dist/db/status.d.ts +58 -7
- package/dist/db/status.d.ts.map +1 -1
- package/dist/db/status.js +205 -97
- package/dist/http/CLAUDE.md +7 -3
- package/dist/http/db_routes.d.ts +6 -2
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +2 -2
- package/dist/periodic.d.ts +80 -0
- package/dist/periodic.d.ts.map +1 -0
- package/dist/periodic.js +122 -0
- package/dist/realtime/sse_auth_guard.d.ts +79 -49
- package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
- package/dist/realtime/sse_auth_guard.js +103 -73
- package/dist/realtime/subscriber_registry.d.ts +119 -8
- package/dist/realtime/subscriber_registry.d.ts.map +1 -1
- package/dist/realtime/subscriber_registry.js +184 -25
- package/dist/runtime/deno.d.ts.map +1 -1
- package/dist/runtime/deno.js +9 -6
- package/dist/runtime/deps.d.ts +3 -2
- package/dist/runtime/deps.d.ts.map +1 -1
- package/dist/runtime/secure_file.d.ts +23 -9
- package/dist/runtime/secure_file.d.ts.map +1 -1
- package/dist/runtime/secure_file.js +29 -10
- package/dist/server/app_backend.d.ts +13 -2
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +5 -2
- package/dist/server/app_server.d.ts +55 -15
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +41 -13
- package/dist/testing/CLAUDE.md +140 -48
- package/dist/testing/app_server.d.ts +2 -2
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +11 -2
- package/dist/testing/audit_drift_guard.d.ts +3 -52
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +2 -46
- package/dist/testing/connection_closer_helpers.d.ts +9 -22
- package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
- package/dist/testing/connection_closer_helpers.js +11 -17
- package/dist/testing/cross_backend/capabilities.d.ts +67 -13
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- package/dist/testing/cross_backend/capabilities.js +27 -12
- package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_backend_configs.js +21 -0
- package/dist/testing/cross_backend/expected_schema.json +1 -0
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +13 -4
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +4 -1
- package/dist/testing/cross_backend/session_cap.d.ts +13 -0
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +55 -19
- package/dist/testing/cross_backend/sse_round_trip.d.ts +10 -2
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +93 -26
- package/dist/testing/cross_backend/testing_server_bun.js +4 -4
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/ts_spine_backend_config.js +10 -2
- package/dist/testing/cross_backend/ws_connection_cap.d.ts +35 -0
- package/dist/testing/cross_backend/ws_connection_cap.d.ts.map +1 -0
- package/dist/testing/cross_backend/ws_connection_cap.js +131 -0
- package/dist/testing/cross_backend/ws_round_trip.d.ts +2 -1
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +156 -19
- package/dist/testing/sse_round_trip.d.ts +6 -4
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/stubs.d.ts +1 -1
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +6 -4
- package/dist/testing/transports/sse_transport.d.ts +1 -1
- package/dist/testing/transports/ws_client.d.ts +7 -0
- package/dist/testing/transports/ws_client.d.ts.map +1 -1
- package/dist/testing/transports/ws_raw_client.d.ts +51 -0
- package/dist/testing/transports/ws_raw_client.d.ts.map +1 -0
- package/dist/testing/transports/ws_raw_client.js +156 -0
- package/dist/testing/transports/ws_transport.d.ts +28 -0
- package/dist/testing/transports/ws_transport.d.ts.map +1 -1
- package/dist/testing/transports/ws_transport.js +45 -1
- package/dist/testing/ws_round_trip.d.ts +8 -3
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +19 -4
- package/dist/ui/AdminAccounts.svelte +4 -3
- package/dist/ui/AdminAccounts.svelte.d.ts.map +1 -1
- package/dist/ui/AdminOverview.svelte +3 -1
- package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
- package/dist/ui/CLAUDE.md +22 -6
- package/dist/ui/admin_accounts_state.svelte.d.ts +15 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +16 -0
- package/dist/ui/auth_state.svelte.d.ts +25 -1
- package/dist/ui/auth_state.svelte.d.ts.map +1 -1
- package/dist/ui/auth_state.svelte.js +28 -1
- package/package.json +2 -2
|
@@ -196,7 +196,7 @@ export interface TestAppServerOptions {
|
|
|
196
196
|
* needs:
|
|
197
197
|
* - to capture audit events (compose `on_audit_event` inside the body)
|
|
198
198
|
* - to register consumer event-type schemas (pass `audit_log_config`)
|
|
199
|
-
* - to instrument `emit`
|
|
199
|
+
* - to instrument `emit` (`emit_decorator`)
|
|
200
200
|
* - to wrap or replace the emitter for some other reason
|
|
201
201
|
*
|
|
202
202
|
* Matches the production shape — `create_app_backend` requires an
|
|
@@ -302,7 +302,7 @@ export interface TestApp {
|
|
|
302
302
|
create_daemon_token_headers: (extra?: Record<string, string>) => Record<string, string>;
|
|
303
303
|
/** Create an additional account with credentials. */
|
|
304
304
|
create_account: (options?: CreateTestAppAccountArgs) => Promise<TestAccount>;
|
|
305
|
-
/** Cleanup resources (
|
|
305
|
+
/** Cleanup resources (`AppServer.close`: stops an opted-in auth cleanup schedule, then the backend's `close`). */
|
|
306
306
|
cleanup: () => Promise<void>;
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/app_server.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAGjC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAInD,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAU5D,OAAO,EAA+B,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/app_server.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAGjC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAInD,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,KA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Ac,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9B,0EAA0E;IAC1E,sBAAsB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnF,4EAA4E;IAC5E,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,6BAA6B,GACzC,SAAS,gCAAgC,KACvC,OAAO,CAAC,mBAAmB,CA2E7B,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { query_create_api_token } from '../auth/api_token_queries.js';
|
|
|
12
12
|
import { create_session_cookie_value } from '../auth/session_cookie.js';
|
|
13
13
|
import { run_migrations } from '../db/migrate.js';
|
|
14
14
|
import { auth_migration_ns } from '../auth/migrations.js';
|
|
15
|
+
import { create_realtime_closer } from '../actions/connection_closer.js';
|
|
15
16
|
import { default_audit_factory } from '../server/app_backend.js';
|
|
16
17
|
import { create_app_server } from '../server/app_server.js';
|
|
17
18
|
import { generate_daemon_token, DAEMON_TOKEN_HEADER } from '../auth/daemon_token.js';
|
|
@@ -200,6 +201,7 @@ const _build_test_backend = async (options) => {
|
|
|
200
201
|
db: existing_db,
|
|
201
202
|
log: test_log,
|
|
202
203
|
audit,
|
|
204
|
+
connection_closer: create_realtime_closer(),
|
|
203
205
|
...fs_stubs
|
|
204
206
|
}
|
|
205
207
|
};
|
|
@@ -228,6 +230,7 @@ const _build_test_backend = async (options) => {
|
|
|
228
230
|
db,
|
|
229
231
|
log: test_log,
|
|
230
232
|
audit,
|
|
233
|
+
connection_closer: create_realtime_closer(),
|
|
231
234
|
...fs_stubs
|
|
232
235
|
}
|
|
233
236
|
};
|
|
@@ -292,6 +295,9 @@ export const create_test_app = async (options) => {
|
|
|
292
295
|
daemon_token_state,
|
|
293
296
|
rpc_endpoints: options.rpc_endpoints,
|
|
294
297
|
bootstrap: options.bootstrap,
|
|
298
|
+
// `auth_cleanup` stays at its default, off: a background pass would
|
|
299
|
+
// delete rows and write audit rows mid-test. A suite that opts in
|
|
300
|
+
// through `app_options` has the schedule stopped by `cleanup`.
|
|
295
301
|
...options.app_options,
|
|
296
302
|
create_route_specs: options.create_route_specs
|
|
297
303
|
});
|
|
@@ -352,7 +358,9 @@ export const create_test_app = async (options) => {
|
|
|
352
358
|
create_bearer_headers,
|
|
353
359
|
create_daemon_token_headers,
|
|
354
360
|
create_account,
|
|
355
|
-
|
|
361
|
+
// the server's `close`, not the backend's: it also stops an auth cleanup
|
|
362
|
+
// schedule a suite opted into
|
|
363
|
+
cleanup: () => result.close()
|
|
356
364
|
};
|
|
357
365
|
};
|
|
358
366
|
/**
|
|
@@ -438,6 +446,7 @@ export const create_test_app_for_bootstrap = async (options) => {
|
|
|
438
446
|
surface: result.surface_spec.surface,
|
|
439
447
|
route_specs: result.surface_spec.route_specs,
|
|
440
448
|
create_request_headers,
|
|
441
|
-
cleanup
|
|
449
|
+
// `AppServer.close`, so an opted-in auth cleanup schedule stops too
|
|
450
|
+
cleanup: () => result.close()
|
|
442
451
|
};
|
|
443
452
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { AuditEmitter } from '../auth/audit_emitter.js';
|
|
3
3
|
import type { AuditLogInput } from '../auth/audit_log_schema.js';
|
|
4
|
-
import type { AuditFactory } from '../server/app_backend.js';
|
|
5
4
|
/**
|
|
6
5
|
* Register per-test `beforeEach` + `afterEach` hooks that catch any audit
|
|
7
6
|
* emission with a metadata shape that fails its `audit_metadata_schemas`
|
|
@@ -22,16 +21,6 @@ import type { AuditFactory } from '../server/app_backend.js';
|
|
|
22
21
|
* the time the after-each check observes counter state.
|
|
23
22
|
*/
|
|
24
23
|
export declare const install_audit_drift_guard: () => void;
|
|
25
|
-
/**
|
|
26
|
-
* Marker pushed into a shared sequence array by an emit-recording
|
|
27
|
-
* `audit_factory`. Pair with `RecordedClose` from
|
|
28
|
-
* `testing/connection_closer_helpers.ts` to test close-vs-emit ordering at
|
|
29
|
-
* handler call sites — see `create_emit_ordering_audit_factory` below.
|
|
30
|
-
*/
|
|
31
|
-
export interface AuditEmitMarker {
|
|
32
|
-
kind: 'emit';
|
|
33
|
-
at: number;
|
|
34
|
-
}
|
|
35
24
|
/**
|
|
36
25
|
* Pair returned by {@link create_recording_audit_emitter} — the
|
|
37
26
|
* `AuditEmitter` to inject as `deps.audit`, plus the shared `calls`
|
|
@@ -60,9 +49,8 @@ export interface RecordingAuditEmitter {
|
|
|
60
49
|
* `listener_count` reports (registered listeners never fire — this emitter
|
|
61
50
|
* captures `emit` shapes, not fan-out).
|
|
62
51
|
*
|
|
63
|
-
* `emit` AND `emit_pool` both append to `calls
|
|
64
|
-
*
|
|
65
|
-
* read assertions off the same array.
|
|
52
|
+
* `emit` AND `emit_pool` both append to `calls`, so a test reads either
|
|
53
|
+
* entry point's writes off the same array.
|
|
66
54
|
*
|
|
67
55
|
* Pass `calls_ref` to write into a caller-owned array (callers that
|
|
68
56
|
* declared `const events: Array<AuditLogInput> = []` and want to keep
|
|
@@ -78,41 +66,4 @@ export interface RecordingAuditEmitter {
|
|
|
78
66
|
* so the freeze isn't load-bearing here.
|
|
79
67
|
*/
|
|
80
68
|
export declare const create_recording_audit_emitter: (calls_ref?: Array<AuditLogInput>) => RecordingAuditEmitter;
|
|
81
|
-
/**
|
|
82
|
-
* Build an `audit_factory` that produces a real `create_audit_emitter`
|
|
83
|
-
* with its `emit` decorated to push a `{kind: 'emit', at: seq.value++}`
|
|
84
|
-
* marker into a shared sequence + events array. Used by the close-vs-emit
|
|
85
|
-
* ordering test to compose against a shared sequence counter (typically
|
|
86
|
-
* `create_recording_closer(seq_ref)` capturing eager-close calls).
|
|
87
|
-
*
|
|
88
|
-
* Pass the returned factory through `create_test_app({audit_factory: …})`
|
|
89
|
-
* — the test backend invokes it with its constructed `{db, log}` and
|
|
90
|
-
* lands the decorated emitter on `backend.deps.audit`. Production
|
|
91
|
-
* handlers dereference `deps.audit.emit` at call time, so the decorator
|
|
92
|
-
* sees every subsequent handler invocation. The underlying `emit` still
|
|
93
|
-
* runs — the decorator records the call, it does not suppress side
|
|
94
|
-
* effects.
|
|
95
|
-
*
|
|
96
|
-
* **Scope — both `emit` and `emit_role_grant_target`.** The decorator
|
|
97
|
-
* is captured by `emit_role_grant_target`'s closure inside
|
|
98
|
-
* `create_audit_emitter` (and re-exposed as the outer `emit` slot), so
|
|
99
|
-
* role-grant-shape emissions land in `events_ref` alongside bare `emit`
|
|
100
|
-
* calls. `emit_pool` and `notify` are not decorated — they take
|
|
101
|
-
* `AuditLogInput` / `AuditLogEvent` directly without going through
|
|
102
|
-
* `emit`, so handler-side `emit_pool` writes (today only
|
|
103
|
-
* `auth/cleanup.ts`) skip capture. Close-firing handlers all reach for
|
|
104
|
-
* `emit` or `emit_role_grant_target`, so the ordering test sees them
|
|
105
|
-
* regardless of which entry point a future refactor picks.
|
|
106
|
-
*
|
|
107
|
-
* Optionally accept `extra_options` to thread `on_audit_event` /
|
|
108
|
-
* `audit_log_config` into the inner emitter — useful when a test wants
|
|
109
|
-
* both ordering capture and a real SSE/WS guard wired into the same
|
|
110
|
-
* emitter chain.
|
|
111
|
-
*/
|
|
112
|
-
export declare const create_emit_ordering_audit_factory: <E extends {
|
|
113
|
-
kind: string;
|
|
114
|
-
at: number;
|
|
115
|
-
}>(seq_ref: {
|
|
116
|
-
value: number;
|
|
117
|
-
}, events_ref: Array<AuditEmitMarker | E>, extra_options?: Omit<CreateAuditEmitterOptions, "db" | "log" | "emit_decorator">) => AuditFactory;
|
|
118
69
|
//# sourceMappingURL=audit_drift_guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit_drift_guard.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/audit_drift_guard.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAU7B,OAAO,
|
|
1
|
+
{"version":3,"file":"audit_drift_guard.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/audit_drift_guard.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAU7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,yBAAyB,QAAO,IAiB5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,8BAA8B,GAC1C,YAAY,KAAK,CAAC,aAAa,CAAC,KAC9B,qBA8BF,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
2
|
import { assert, beforeEach, afterEach } from 'vitest';
|
|
3
3
|
import { get_audit_metadata_validation_failures, get_audit_unknown_event_type_failures, reset_audit_metadata_validation_failures, reset_audit_unknown_event_type_failures } from '../auth/audit_log_queries.js';
|
|
4
|
-
import { create_audit_emitter } from '../auth/audit_emitter.js';
|
|
5
4
|
/**
|
|
6
5
|
* Register per-test `beforeEach` + `afterEach` hooks that catch any audit
|
|
7
6
|
* emission with a metadata shape that fails its `audit_metadata_schemas`
|
|
@@ -48,9 +47,8 @@ export const install_audit_drift_guard = () => {
|
|
|
48
47
|
* `listener_count` reports (registered listeners never fire — this emitter
|
|
49
48
|
* captures `emit` shapes, not fan-out).
|
|
50
49
|
*
|
|
51
|
-
* `emit` AND `emit_pool` both append to `calls
|
|
52
|
-
*
|
|
53
|
-
* read assertions off the same array.
|
|
50
|
+
* `emit` AND `emit_pool` both append to `calls`, so a test reads either
|
|
51
|
+
* entry point's writes off the same array.
|
|
54
52
|
*
|
|
55
53
|
* Pass `calls_ref` to write into a caller-owned array (callers that
|
|
56
54
|
* declared `const events: Array<AuditLogInput> = []` and want to keep
|
|
@@ -96,45 +94,3 @@ export const create_recording_audit_emitter = (calls_ref) => {
|
|
|
96
94
|
};
|
|
97
95
|
return { emitter, calls };
|
|
98
96
|
};
|
|
99
|
-
/**
|
|
100
|
-
* Build an `audit_factory` that produces a real `create_audit_emitter`
|
|
101
|
-
* with its `emit` decorated to push a `{kind: 'emit', at: seq.value++}`
|
|
102
|
-
* marker into a shared sequence + events array. Used by the close-vs-emit
|
|
103
|
-
* ordering test to compose against a shared sequence counter (typically
|
|
104
|
-
* `create_recording_closer(seq_ref)` capturing eager-close calls).
|
|
105
|
-
*
|
|
106
|
-
* Pass the returned factory through `create_test_app({audit_factory: …})`
|
|
107
|
-
* — the test backend invokes it with its constructed `{db, log}` and
|
|
108
|
-
* lands the decorated emitter on `backend.deps.audit`. Production
|
|
109
|
-
* handlers dereference `deps.audit.emit` at call time, so the decorator
|
|
110
|
-
* sees every subsequent handler invocation. The underlying `emit` still
|
|
111
|
-
* runs — the decorator records the call, it does not suppress side
|
|
112
|
-
* effects.
|
|
113
|
-
*
|
|
114
|
-
* **Scope — both `emit` and `emit_role_grant_target`.** The decorator
|
|
115
|
-
* is captured by `emit_role_grant_target`'s closure inside
|
|
116
|
-
* `create_audit_emitter` (and re-exposed as the outer `emit` slot), so
|
|
117
|
-
* role-grant-shape emissions land in `events_ref` alongside bare `emit`
|
|
118
|
-
* calls. `emit_pool` and `notify` are not decorated — they take
|
|
119
|
-
* `AuditLogInput` / `AuditLogEvent` directly without going through
|
|
120
|
-
* `emit`, so handler-side `emit_pool` writes (today only
|
|
121
|
-
* `auth/cleanup.ts`) skip capture. Close-firing handlers all reach for
|
|
122
|
-
* `emit` or `emit_role_grant_target`, so the ordering test sees them
|
|
123
|
-
* regardless of which entry point a future refactor picks.
|
|
124
|
-
*
|
|
125
|
-
* Optionally accept `extra_options` to thread `on_audit_event` /
|
|
126
|
-
* `audit_log_config` into the inner emitter — useful when a test wants
|
|
127
|
-
* both ordering capture and a real SSE/WS guard wired into the same
|
|
128
|
-
* emitter chain.
|
|
129
|
-
*/
|
|
130
|
-
export const create_emit_ordering_audit_factory = (seq_ref, events_ref, extra_options) => {
|
|
131
|
-
return ({ db, log }) => create_audit_emitter({
|
|
132
|
-
...extra_options,
|
|
133
|
-
db,
|
|
134
|
-
log,
|
|
135
|
-
emit_decorator: (inner) => (ctx, input) => {
|
|
136
|
-
events_ref.push({ kind: 'emit', at: seq_ref.value++ });
|
|
137
|
-
inner(ctx, input);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
2
|
import type { ConnectionCloser } from '../actions/connection_closer.js';
|
|
3
|
-
/**
|
|
4
|
-
* Record of a single `ConnectionCloser` method invocation. `at` is the
|
|
5
|
-
* value of a monotonically-increasing sequence counter at the time of
|
|
6
|
-
* the call — pair with `create_emit_ordering_audit_factory` to record both
|
|
7
|
-
* close + audit emit calls into the same sequence for ordering tests.
|
|
8
|
-
*/
|
|
3
|
+
/** Record of a single `ConnectionCloser` method invocation. */
|
|
9
4
|
export interface RecordedClose {
|
|
10
5
|
method: 'session' | 'token' | 'account';
|
|
11
6
|
id: string;
|
|
12
|
-
at: number;
|
|
13
7
|
}
|
|
14
8
|
export interface RecordingCloser {
|
|
15
9
|
closer: ConnectionCloser;
|
|
@@ -17,24 +11,17 @@ export interface RecordingCloser {
|
|
|
17
11
|
}
|
|
18
12
|
/**
|
|
19
13
|
* Build a `ConnectionCloser` that records every call into `calls` rather
|
|
20
|
-
* than touching real transports. Each method returns 1 ("one
|
|
21
|
-
* closed") regardless of whether a real
|
|
22
|
-
*
|
|
14
|
+
* than touching real transports. Each method returns 1 ("one connection
|
|
15
|
+
* closed") regardless of whether a real connection exists — handlers
|
|
16
|
+
* ignore the return value.
|
|
23
17
|
*
|
|
24
|
-
*
|
|
25
|
-
* `
|
|
26
|
-
*
|
|
27
|
-
* uses a fresh internal counter — `at: N` values within a single test
|
|
28
|
-
* are meaningful, but cannot be compared against audit emit ordering.
|
|
18
|
+
* To see a handler's closes, add the closer to the backend's
|
|
19
|
+
* `deps.connection_closer` (`RealtimeCloser.add`), or build the action
|
|
20
|
+
* factory's deps with it.
|
|
29
21
|
*/
|
|
30
|
-
export declare const create_recording_closer: (
|
|
31
|
-
value: number;
|
|
32
|
-
}) => RecordingCloser;
|
|
22
|
+
export declare const create_recording_closer: () => RecordingCloser;
|
|
33
23
|
/**
|
|
34
|
-
* Pin `{method, id}` on a single recorded close call
|
|
35
|
-
* the `at: N` sequence number. Use at every "did the closer fire?"
|
|
36
|
-
* assertion site; the sequence number is only meaningful for dedicated
|
|
37
|
-
* ordering tests (paired with `create_emit_ordering_audit_factory`).
|
|
24
|
+
* Pin `{method, id}` on a single recorded close call.
|
|
38
25
|
*
|
|
39
26
|
* Throws via `assert.ok` if `call` is `undefined` — index a recorded
|
|
40
27
|
* `calls` array directly (`calls[0]`) and let this helper handle the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection_closer_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/connection_closer_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"connection_closer_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/connection_closer_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC7B,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,QAAO,eAiB1C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC7B,MAAM,aAAa,GAAG,SAAS,EAC/B,QAAQ,SAAS,GAAG,OAAO,GAAG,SAAS,EACvC,IAAI,MAAM,KACR,IAIF,CAAC"}
|
|
@@ -2,40 +2,34 @@ import './assert_dev_env.js';
|
|
|
2
2
|
import { assert } from 'vitest';
|
|
3
3
|
/**
|
|
4
4
|
* Build a `ConnectionCloser` that records every call into `calls` rather
|
|
5
|
-
* than touching real transports. Each method returns 1 ("one
|
|
6
|
-
* closed") regardless of whether a real
|
|
7
|
-
*
|
|
5
|
+
* than touching real transports. Each method returns 1 ("one connection
|
|
6
|
+
* closed") regardless of whether a real connection exists — handlers
|
|
7
|
+
* ignore the return value.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
* uses a fresh internal counter — `at: N` values within a single test
|
|
13
|
-
* are meaningful, but cannot be compared against audit emit ordering.
|
|
9
|
+
* To see a handler's closes, add the closer to the backend's
|
|
10
|
+
* `deps.connection_closer` (`RealtimeCloser.add`), or build the action
|
|
11
|
+
* factory's deps with it.
|
|
14
12
|
*/
|
|
15
|
-
export const create_recording_closer = (
|
|
13
|
+
export const create_recording_closer = () => {
|
|
16
14
|
const calls = [];
|
|
17
|
-
const seq = seq_ref ?? { value: 0 };
|
|
18
15
|
const closer = {
|
|
19
16
|
close_sockets_for_session: (id) => {
|
|
20
|
-
calls.push({ method: 'session', id
|
|
17
|
+
calls.push({ method: 'session', id });
|
|
21
18
|
return 1;
|
|
22
19
|
},
|
|
23
20
|
close_sockets_for_token: (id) => {
|
|
24
|
-
calls.push({ method: 'token', id
|
|
21
|
+
calls.push({ method: 'token', id });
|
|
25
22
|
return 1;
|
|
26
23
|
},
|
|
27
24
|
close_sockets_for_account: (id) => {
|
|
28
|
-
calls.push({ method: 'account', id
|
|
25
|
+
calls.push({ method: 'account', id });
|
|
29
26
|
return 1;
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
29
|
return { closer, calls };
|
|
33
30
|
};
|
|
34
31
|
/**
|
|
35
|
-
* Pin `{method, id}` on a single recorded close call
|
|
36
|
-
* the `at: N` sequence number. Use at every "did the closer fire?"
|
|
37
|
-
* assertion site; the sequence number is only meaningful for dedicated
|
|
38
|
-
* ordering tests (paired with `create_emit_ordering_audit_factory`).
|
|
32
|
+
* Pin `{method, id}` on a single recorded close call.
|
|
39
33
|
*
|
|
40
34
|
* Throws via `assert.ok` if `call` is `undefined` — index a recorded
|
|
41
35
|
* `calls` array directly (`calls[0]`) and let this helper handle the
|
|
@@ -2,9 +2,9 @@ import '../assert_dev_env.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Backend wiring facts recorded for documentation — **not** gating flags.
|
|
4
4
|
*
|
|
5
|
-
* The companion to `BackendCapabilities`: where each capability flag
|
|
6
|
-
* `test_if(capabilities.X, ...)`
|
|
7
|
-
*
|
|
5
|
+
* The companion to `BackendCapabilities`: where each capability flag is read
|
|
6
|
+
* by a suite (a `test_if(capabilities.X, ...)` gate, or a fork of one case's
|
|
7
|
+
* assertion), nothing reads these. They record middleware / limiter wiring that
|
|
8
8
|
* differs between the TS and Rust families (a backend-shape record) but gates
|
|
9
9
|
* no cross test today. They live in their own type precisely so
|
|
10
10
|
* `BackendCapabilities` stops claiming gating power it doesn't have — fold a
|
|
@@ -42,15 +42,17 @@ export interface BackendShapeNotes {
|
|
|
42
42
|
export interface BackendCapabilities {
|
|
43
43
|
/**
|
|
44
44
|
* WebSocket transport is reachable end-to-end. Gates the cross-process
|
|
45
|
-
* WS round-trip suite
|
|
46
|
-
*
|
|
45
|
+
* WS round-trip suite and the per-account connection-cap suite
|
|
46
|
+
* (`describe_ws_connection_cap_cross_tests`); the in-process
|
|
47
|
+
* `describe_ws_round_trip_tests` runs against `register_action_ws`
|
|
48
|
+
* directly and ignores this flag.
|
|
47
49
|
*/
|
|
48
50
|
readonly ws: boolean;
|
|
49
51
|
/**
|
|
50
52
|
* SSE transport is reachable end-to-end. Gates the cross-process SSE
|
|
51
53
|
* suite (`describe_cross_process_sse_tests` — connect, audit data frame,
|
|
52
|
-
* close-on-revoke); in-process SSE uses the
|
|
53
|
-
* ignores this flag.
|
|
54
|
+
* close-on-revoke, the per-session stream cap); in-process SSE uses the
|
|
55
|
+
* `on_audit_event` hook and ignores this flag.
|
|
54
56
|
*/
|
|
55
57
|
readonly sse: boolean;
|
|
56
58
|
/**
|
|
@@ -159,6 +161,55 @@ export interface BackendCapabilities {
|
|
|
159
161
|
* coverage.
|
|
160
162
|
*/
|
|
161
163
|
readonly peer_request: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* The backend's HTTP server accepts WebSocket frames written in the same
|
|
166
|
+
* TCP write as the upgrade request, handing them to the socket once the
|
|
167
|
+
* handshake completes. Gates the `frames sent with the handshake` case in
|
|
168
|
+
* `describe_cross_process_ws_tests` — the deterministic form of "frames
|
|
169
|
+
* that arrive before the connection is admitted wait for admission", since
|
|
170
|
+
* those frames are in the backend's hands before it can have admitted
|
|
171
|
+
* anything.
|
|
172
|
+
*
|
|
173
|
+
* `true` for Node (`ws`), Deno, and the Rust spine (hyper hands the
|
|
174
|
+
* leftover bytes to the upgraded stream); `false` for Bun, whose HTTP
|
|
175
|
+
* parser answers such a request `400` before any handler runs. A backend
|
|
176
|
+
* without it still runs the suite's client-library case (requests sent the
|
|
177
|
+
* moment the socket opens), which pins the same contract without forcing
|
|
178
|
+
* the ordering.
|
|
179
|
+
*/
|
|
180
|
+
readonly ws_handshake_pipelining: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* The backend's WebSocket endpoint mounts the self-service account actions
|
|
183
|
+
* (`account_session_revoke_all` among them), so a socket can revoke the
|
|
184
|
+
* session it is running on. Gates the self-revocation case in
|
|
185
|
+
* `describe_cross_process_ws_tests`: the socket reads the reply to its
|
|
186
|
+
* request, then is closed with `WS_CLOSE_SESSION_REVOKED`.
|
|
187
|
+
*
|
|
188
|
+
* `true` on fuz_app's own spine presets — the TS spine binary mounts
|
|
189
|
+
* `create_account_actions` on `/api/ws`, and the Rust `testing_spine_stub`
|
|
190
|
+
* serves one action registry on RPC and WS. `false` in the family defaults:
|
|
191
|
+
* a consumer's WS endpoint carries whatever its domain mounts, so it opts in
|
|
192
|
+
* once the account actions are there.
|
|
193
|
+
*/
|
|
194
|
+
readonly ws_account_actions: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* A socket that revokes the credential it is running on reads the reply to
|
|
197
|
+
* that request **before** the revocation's close. Read by the
|
|
198
|
+
* self-revocation case in `describe_cross_process_ws_tests` (which
|
|
199
|
+
* `ws_account_actions` gates): with it `true` the case requires the reply
|
|
200
|
+
* frame ahead of the `WS_CLOSE_SESSION_REVOKED` close; with it `false` the
|
|
201
|
+
* case requires the close alone.
|
|
202
|
+
*
|
|
203
|
+
* `true` for the TS family — `register_action_ws` sends the response and
|
|
204
|
+
* only then flushes the request's post-commit queue, where the close is.
|
|
205
|
+
* `false` for the Rust family: its dispatch runs the post-commit queue
|
|
206
|
+
* before handing the response to the socket loop, and the loop, finding the
|
|
207
|
+
* connection already closed, writes the close frame and drops the response.
|
|
208
|
+
* The caller's revocation still took effect; it is not told so. The flag
|
|
209
|
+
* records that divergence so the suite stays green on both spines without
|
|
210
|
+
* hiding it — flip it once the Rust spine answers first.
|
|
211
|
+
*/
|
|
212
|
+
readonly ws_self_revocation_reply: boolean;
|
|
162
213
|
/**
|
|
163
214
|
* A test `CellCreateAuthorize` policy is live-mounted on the backend's cell
|
|
164
215
|
* layer — creating a `kind: 'gated'` cell requires the `participant` role
|
|
@@ -177,12 +228,15 @@ export interface BackendCapabilities {
|
|
|
177
228
|
/**
|
|
178
229
|
* Capability declarations for the in-process Hono transport. Nearly every
|
|
179
230
|
* flag is `true` because in-process testing exercises the full backend
|
|
180
|
-
* with no missing optional behaviors. The
|
|
181
|
-
*
|
|
182
|
-
* socket with an `on_request` responder via
|
|
183
|
-
* in-process driver never runs it — the
|
|
184
|
-
* server-initiated requests
|
|
185
|
-
*
|
|
231
|
+
* with no missing optional behaviors. The exceptions are the flags whose
|
|
232
|
+
* cases are cross-process-only: `peer_request` (`describe_peer_ping_ws_tests`
|
|
233
|
+
* needs a real bound socket with an `on_request` responder via
|
|
234
|
+
* `create_ws_transport`, so the in-process driver never runs it — the
|
|
235
|
+
* transport itself supports server-initiated requests),
|
|
236
|
+
* `ws_handshake_pipelining` (raw bytes on a real socket),
|
|
237
|
+
* `ws_account_actions` (a real socket's reply-then-close ordering), and
|
|
238
|
+
* `cell_gated_create`. Cross-process consumers declare each flag explicitly
|
|
239
|
+
* per backend.
|
|
186
240
|
*/
|
|
187
241
|
export declare const in_process_capabilities: BackendCapabilities;
|
|
188
242
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA4C9B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACnC;AAED;;;;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OAAO,CAAC,IAAI,CAAC,KAAG,IAMrF,CAAC"}
|
|
@@ -7,25 +7,29 @@ import '../assert_dev_env.js';
|
|
|
7
7
|
* implement. No `if (config.name === 'rust')` branches anywhere — name-
|
|
8
8
|
* checking is a code smell that says capability vocabulary is missing.
|
|
9
9
|
*
|
|
10
|
-
* In-process Hono via `default_in_process_setup` declares every
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* In-process Hono via `default_in_process_setup` declares every capability
|
|
11
|
+
* its transport can exercise (see `in_process_capabilities` — the
|
|
12
|
+
* cross-process-only flags stay `false`). Cross-process backends opt in
|
|
13
|
+
* per-flag on their `BackendConfig`.
|
|
13
14
|
*
|
|
14
15
|
* **Where the per-backend declarations live** (this file owns only the
|
|
15
16
|
* vocabulary + the in-process preset):
|
|
16
17
|
*
|
|
17
|
-
* - `in_process_capabilities` — here; every flag `true
|
|
18
|
+
* - `in_process_capabilities` — here; every flag `true` except the
|
|
19
|
+
* cross-process-only ones.
|
|
18
20
|
* - `ts_default_capabilities` / `rust_default_capabilities` — consumer-facing
|
|
19
21
|
* family defaults, in `default_backend_configs.ts` (full literals, so adding
|
|
20
22
|
* a capability is a compile error until each family declares it).
|
|
21
23
|
* - `ts_spine_capabilities` / `ts_spine_bun_capabilities` — fuz_app's own TS
|
|
22
24
|
* spine presets, in `ts_spine_backend_config.ts` (deltas off the family
|
|
23
|
-
* default; Bun flips `oversized_reject_closes_connection`
|
|
25
|
+
* default; Bun flips `oversized_reject_closes_connection` and
|
|
26
|
+
* `ws_handshake_pipelining`).
|
|
24
27
|
* - `rust_spine_stub_capabilities` — fuz_app's Rust spine-stub preset, in
|
|
25
28
|
* `rust_spine_stub_backend_config.ts` (delta off the rust family default).
|
|
26
29
|
*
|
|
27
30
|
* **Gating flags vs shape notes.** `BackendCapabilities` holds only flags a
|
|
28
|
-
* suite actually gates on (each has a `test_if(capabilities.X, ...)` reader
|
|
31
|
+
* suite actually gates on (each has a `test_if(capabilities.X, ...)` reader,
|
|
32
|
+
* or — `ws_self_revocation_reply` — forks one case's assertion).
|
|
29
33
|
* Wiring facts that gate nothing — `bearer_auth` / `trusted_proxy` /
|
|
30
34
|
* `login_rate_limit` — live in the parallel `BackendShapeNotes` record
|
|
31
35
|
* (`in_process_shape_notes` here, `ts_default_shape_notes` /
|
|
@@ -38,12 +42,15 @@ import { test } from 'vitest';
|
|
|
38
42
|
/**
|
|
39
43
|
* Capability declarations for the in-process Hono transport. Nearly every
|
|
40
44
|
* flag is `true` because in-process testing exercises the full backend
|
|
41
|
-
* with no missing optional behaviors. The
|
|
42
|
-
*
|
|
43
|
-
* socket with an `on_request` responder via
|
|
44
|
-
* in-process driver never runs it — the
|
|
45
|
-
* server-initiated requests
|
|
46
|
-
*
|
|
45
|
+
* with no missing optional behaviors. The exceptions are the flags whose
|
|
46
|
+
* cases are cross-process-only: `peer_request` (`describe_peer_ping_ws_tests`
|
|
47
|
+
* needs a real bound socket with an `on_request` responder via
|
|
48
|
+
* `create_ws_transport`, so the in-process driver never runs it — the
|
|
49
|
+
* transport itself supports server-initiated requests),
|
|
50
|
+
* `ws_handshake_pipelining` (raw bytes on a real socket),
|
|
51
|
+
* `ws_account_actions` (a real socket's reply-then-close ordering), and
|
|
52
|
+
* `cell_gated_create`. Cross-process consumers declare each flag explicitly
|
|
53
|
+
* per backend.
|
|
47
54
|
*/
|
|
48
55
|
export const in_process_capabilities = Object.freeze({
|
|
49
56
|
ws: true,
|
|
@@ -56,6 +63,14 @@ export const in_process_capabilities = Object.freeze({
|
|
|
56
63
|
account_status: true,
|
|
57
64
|
oversized_reject_closes_connection: true,
|
|
58
65
|
peer_request: false,
|
|
66
|
+
// Cross-process-only, like `peer_request`: the case needs a real bound socket
|
|
67
|
+
// to write raw bytes to.
|
|
68
|
+
ws_handshake_pipelining: false,
|
|
69
|
+
// Cross-process-only: the case reads a real socket's frames in wire order.
|
|
70
|
+
ws_account_actions: false,
|
|
71
|
+
// Read only by the case `ws_account_actions` gates; the in-process
|
|
72
|
+
// dispatcher does answer first.
|
|
73
|
+
ws_self_revocation_reply: true,
|
|
59
74
|
// Cross-process-only: the test `CellCreateAuthorize` policy is mounted on the
|
|
60
75
|
// spine binaries' full mount + the Rust stub, not the in-process default app.
|
|
61
76
|
cell_gated_create: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_backend_configs.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_backend_configs.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQhG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"default_backend_configs.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_backend_configs.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQhG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,mBAsCpC,CAAC;AAEH;;;;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,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAC5C,wEAAwE;IACxE,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAClC,sEAAsE;IACtE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/D;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAC5C,MAAM,mCAAmC,KACvC,aA4CF,CAAC"}
|
|
@@ -41,6 +41,17 @@ export const ts_default_capabilities = Object.freeze({
|
|
|
41
41
|
// the HTTP RPC endpoint (the no-transport case). The TS spine config opts in;
|
|
42
42
|
// a generic consumer enables it once it wires that mount.
|
|
43
43
|
peer_request: false,
|
|
44
|
+
// Node (`ws`) and Deno hand frames pipelined with the upgrade request to the
|
|
45
|
+
// socket. A Bun-served consumer overrides to `false` (see the bun spine
|
|
46
|
+
// config) — `Bun.serve` answers such a request `400`.
|
|
47
|
+
ws_handshake_pipelining: true,
|
|
48
|
+
// Off by default: a consumer's WS endpoint mounts its own domain's actions.
|
|
49
|
+
// fuz_app's spine configs opt in (the spine binary mounts the account
|
|
50
|
+
// actions on `/api/ws`); a consumer does once its endpoint carries them.
|
|
51
|
+
ws_account_actions: false,
|
|
52
|
+
// `register_action_ws` sends a request's response before it flushes the
|
|
53
|
+
// post-commit queue a self-revocation's close is on.
|
|
54
|
+
ws_self_revocation_reply: true,
|
|
44
55
|
// Off by default — the `cell_gated_create` test policy is a fuz_app test
|
|
45
56
|
// fixture, mounted only on the spine binaries (`ts_spine_*`), not generic
|
|
46
57
|
// consumers.
|
|
@@ -70,6 +81,16 @@ export const rust_default_capabilities = Object.freeze({
|
|
|
70
81
|
// Server-initiated requests landed Rust-first canonical — the Rust spine
|
|
71
82
|
// drives the `peer/ping` round-trip, so the family opts into the suite.
|
|
72
83
|
peer_request: true,
|
|
84
|
+
// hyper hands bytes pipelined after the upgrade request to the upgraded
|
|
85
|
+
// stream, where they wait for the read loop that starts at admission.
|
|
86
|
+
ws_handshake_pipelining: true,
|
|
87
|
+
// Off by default, as on the TS family: a consumer opts in once its WS
|
|
88
|
+
// endpoint mounts the account actions. The `testing_spine_stub` preset does.
|
|
89
|
+
ws_account_actions: false,
|
|
90
|
+
// The Rust dispatch runs the post-commit queue — the self-revocation's
|
|
91
|
+
// close — before the socket loop writes the response, and the loop then
|
|
92
|
+
// drops it. A divergence from the TS spine; see the flag's doc.
|
|
93
|
+
ws_self_revocation_reply: false,
|
|
73
94
|
// Off by default — the `testing_spine_stub` preset opts in (it mounts the
|
|
74
95
|
// `TestCellGatedCreateAuthorize` policy); a generic Rust consumer doesn't.
|
|
75
96
|
cell_gated_create: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_offer_notification_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_notification_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqE9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAmC,MAAM,YAAY,CAAC;AAK7E,iFAAiF;AACjF,MAAM,WAAW,uCAAuC;IACvD,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,uEAAuE;IACvE,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;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC3D,SAAS,uCAAuC,KAC9C,
|
|
1
|
+
{"version":3,"file":"role_grant_offer_notification_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_notification_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqE9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAmC,MAAM,YAAY,CAAC;AAK7E,iFAAiF;AACjF,MAAM,WAAW,uCAAuC;IACvD,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,uEAAuE;IACvE,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;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC3D,SAAS,uCAAuC,KAC9C,IAuWF,CAAC"}
|