@fuzdev/fuz_app 0.127.0 → 0.129.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 +35 -18
- package/dist/actions/connection_closer.d.ts +16 -4
- package/dist/actions/connection_closer.d.ts.map +1 -1
- package/dist/actions/connection_closer.js +20 -4
- package/dist/actions/register_action_ws.d.ts +10 -3
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +6 -3
- package/dist/actions/register_ws_endpoint.d.ts +3 -1
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +3 -1
- package/dist/auth/CLAUDE.md +14 -10
- package/dist/auth/actor_lookup_action_specs.d.ts +2 -2
- package/dist/auth/actor_lookup_action_specs.js +2 -2
- package/dist/auth/audit_emitter.d.ts +73 -19
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +57 -21
- package/dist/auth/bearer_auth.d.ts +3 -2
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +3 -2
- package/dist/auth/middleware.d.ts +30 -0
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +59 -0
- package/dist/auth/request_context.d.ts +1 -1
- package/dist/auth/request_context.js +1 -1
- package/dist/auth/token_scope.d.ts +4 -2
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +10 -2
- package/dist/http/CLAUDE.md +3 -4
- package/dist/http/auth_shape.d.ts +3 -2
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +3 -2
- package/dist/http/common_routes.d.ts +1 -14
- package/dist/http/common_routes.d.ts.map +1 -1
- package/dist/http/common_routes.js +1 -19
- package/dist/http/ip_canonical.d.ts +1 -1
- package/dist/http/ip_canonical.js +1 -1
- package/dist/realtime/sse_auth_guard.d.ts +6 -2
- package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
- package/dist/realtime/sse_auth_guard.js +3 -1
- package/dist/server/app_server.d.ts +157 -19
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +226 -128
- package/dist/server/surface_route.d.ts +32 -0
- package/dist/server/surface_route.d.ts.map +1 -0
- package/dist/server/surface_route.js +46 -0
- package/dist/testing/CLAUDE.md +50 -32
- package/dist/testing/app_server.d.ts +40 -5
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +84 -68
- package/dist/testing/attack_surface.d.ts +1 -1
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +1 -1
- package/dist/testing/audit_drift_guard.d.ts +5 -3
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +14 -4
- package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/account_lifecycle.js +1 -2
- package/dist/testing/cross_backend/capabilities.d.ts +3 -1
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.d.ts +2 -2
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +5 -2
- package/dist/testing/cross_backend/identity_parity.js +1 -1
- package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/in_process_setup.js +4 -1
- package/dist/testing/cross_backend/method_coverage.d.ts +1 -1
- package/dist/testing/cross_backend/method_coverage.d.ts.map +1 -1
- package/dist/testing/cross_backend/method_coverage.js +2 -2
- package/dist/testing/cross_backend/peer_ping_ws.d.ts +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.d.ts +4 -4
- package/dist/testing/cross_backend/setup.js +1 -1
- package/dist/testing/cross_backend/sse_round_trip.d.ts +1 -1
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +51 -32
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +70 -51
- package/dist/testing/cross_backend/testing_server_bun.d.ts +1 -1
- package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_bun.js +80 -64
- package/dist/testing/cross_backend/testing_server_core.d.ts +10 -4
- package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_deno.d.ts +1 -1
- package/dist/testing/cross_backend/testing_server_deno.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_deno.js +1 -1
- package/dist/testing/cross_backend/testing_server_node.d.ts +1 -1
- package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_node.js +2 -2
- package/dist/testing/cross_backend/ws_round_trip.d.ts +3 -2
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +51 -13
- package/dist/testing/stubs.d.ts +65 -10
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +95 -41
- package/dist/testing/ws_round_trip.d.ts +1 -3
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/ui/AdminSurface.svelte +3 -1
- package/dist/ui/AdminSurface.svelte.d.ts.map +1 -1
- package/dist/ui/CLAUDE.md +3 -1
- package/dist/ui/async_slot.svelte.d.ts +4 -4
- package/dist/ui/async_slot.svelte.js +4 -4
- package/dist/ui/keyed_async_slot.svelte.d.ts +4 -4
- package/dist/ui/keyed_async_slot.svelte.js +3 -3
- package/package.json +1 -1
|
@@ -44,8 +44,10 @@ export const install_audit_drift_guard = () => {
|
|
|
44
44
|
* forward from the input envelope. Tests asserting on role-grant-shape
|
|
45
45
|
* emissions read out of the same homogeneous `calls` array.
|
|
46
46
|
* `notify` is a no-op; `add_listener` records into a local array that
|
|
47
|
-
* `listener_count` reports
|
|
48
|
-
*
|
|
47
|
+
* `listener_count` reports, and returns a remover with the production
|
|
48
|
+
* semantics (per registration, idempotent) — registered listeners never fire,
|
|
49
|
+
* since this emitter captures `emit` shapes, not fan-out. `drain_inflight` resolves at once:
|
|
50
|
+
* a recorded call writes nothing, so nothing is ever in flight.
|
|
49
51
|
*
|
|
50
52
|
* `emit` AND `emit_pool` both append to `calls`, so a test reads either
|
|
51
53
|
* entry point's writes off the same array.
|
|
@@ -65,6 +67,7 @@ export const install_audit_drift_guard = () => {
|
|
|
65
67
|
*/
|
|
66
68
|
export const create_recording_audit_emitter = (calls_ref) => {
|
|
67
69
|
const calls = calls_ref ?? [];
|
|
70
|
+
// one entry per registration, as `create_audit_emitter` keeps them
|
|
68
71
|
const listeners = [];
|
|
69
72
|
const emitter = {
|
|
70
73
|
emit: (_ctx, input) => {
|
|
@@ -88,9 +91,16 @@ export const create_recording_audit_emitter = (calls_ref) => {
|
|
|
88
91
|
},
|
|
89
92
|
notify: () => undefined,
|
|
90
93
|
add_listener: (listener) => {
|
|
91
|
-
|
|
94
|
+
const entry = { listener };
|
|
95
|
+
listeners.push(entry);
|
|
96
|
+
return () => {
|
|
97
|
+
const index = listeners.indexOf(entry);
|
|
98
|
+
if (index !== -1)
|
|
99
|
+
listeners.splice(index, 1);
|
|
100
|
+
};
|
|
92
101
|
},
|
|
93
|
-
listener_count: () => listeners.length
|
|
102
|
+
listener_count: () => listeners.length,
|
|
103
|
+
drain_inflight: () => Promise.resolve()
|
|
94
104
|
};
|
|
95
105
|
return { emitter, calls };
|
|
96
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_lifecycle.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/account_lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAsC9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AAG1E;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GAAG,uCAAuC,CAAC;AAEvF,eAAO,MAAM,sCAAsC,GAClD,SAAS,gCAAgC,KACvC,
|
|
1
|
+
{"version":3,"file":"account_lifecycle.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/account_lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAsC9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AAG1E;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GAAG,uCAAuC,CAAC;AAEvF,eAAO,MAAM,sCAAsC,GAClD,SAAS,gCAAgC,KACvC,IAoUF,CAAC"}
|
|
@@ -88,8 +88,7 @@ export const describe_account_lifecycle_cross_tests = (options) => {
|
|
|
88
88
|
const del = await cross_rpc_call(t, rpc_path, 'account_delete', { account_id: fixture.account.id }, fixture.create_session_headers());
|
|
89
89
|
assert.strictEqual(error_reason(del), ERROR_CANNOT_DELETE_KEEPER);
|
|
90
90
|
// Deterministic barrier before reading: await in-flight
|
|
91
|
-
// fire-and-forget audit writes
|
|
92
|
-
// satisfied-by-construction on the TS spine via await_pending_effects).
|
|
91
|
+
// fire-and-forget audit writes on either spine.
|
|
93
92
|
const td = fixture.fresh_transport({ origin: null });
|
|
94
93
|
const drained = await cross_rpc_call(td, rpc_path, '_testing_drain_effects', undefined, fixture.create_daemon_token_headers());
|
|
95
94
|
assert.ok(drained.ok, `_testing_drain_effects failed: ${JSON.stringify(drained.error)}`);
|
|
@@ -183,7 +183,9 @@ export interface BackendCapabilities {
|
|
|
183
183
|
* (`account_session_revoke_all` among them), so a socket can revoke the
|
|
184
184
|
* session it is running on. Gates the self-revocation case in
|
|
185
185
|
* `describe_cross_process_ws_tests`: the socket reads the reply to its
|
|
186
|
-
* request, then is closed with `WS_CLOSE_SESSION_REVOKED`.
|
|
186
|
+
* request, then is closed with `WS_CLOSE_SESSION_REVOKED`. Also gates that
|
|
187
|
+
* suite's WS-mutation audit case (with `rpc_path`; it calls
|
|
188
|
+
* `_testing_drain_effects`).
|
|
187
189
|
*
|
|
188
190
|
* `true` on fuz_app's own spine presets — the TS spine binary mounts its
|
|
189
191
|
* full action set on `/api/ws`, and the Rust `testing_spine_stub` serves
|
|
@@ -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;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;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;;;;;;;;;;;;;;;;;OAiBG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H,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,EAAE,mBAsBpC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,iBAInC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,OAAO,EAAE,MAAM,MAAM,EAAE,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAG,IAMrF,CAAC"}
|
|
@@ -47,7 +47,7 @@ export declare const spine_session_options: SessionOptions<string>;
|
|
|
47
47
|
* (`admin_account_list.grantable_roles` carries it on both spines).
|
|
48
48
|
*/
|
|
49
49
|
export declare const spine_roles: RoleSchemaResult;
|
|
50
|
-
/** Options for
|
|
50
|
+
/** Options for `spine_rpc_endpoints`. */
|
|
51
51
|
export interface SpineRpcEndpointsOptions {
|
|
52
52
|
/**
|
|
53
53
|
* WS notification sender threaded into the role-grant-offer sub-factory for
|
|
@@ -97,7 +97,7 @@ export declare const spine_rpc_endpoints: (ctx: AppServerContext, options?: Spin
|
|
|
97
97
|
export declare const create_spine_route_specs: (ctx: AppServerContext) => Array<RouteSpec>;
|
|
98
98
|
/**
|
|
99
99
|
* The spine's `/ready` route spec — the column-presence schema-drift deploy
|
|
100
|
-
* gate, reading
|
|
100
|
+
* gate, reading `SPINE_EXPECTED_SCHEMA_URL`. Mounted **live** by the TS
|
|
101
101
|
* spine binary (in `build_spine_app`) and the in-process readiness parity leg,
|
|
102
102
|
* but kept **off** the declared surface (`create_spine_surface_spec`) like the
|
|
103
103
|
* fact-serving / ws / sse behaviors — `describe_ready_cross_tests` (gated on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_spine_surface.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_spine_surface.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI1F,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAe3E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAAwC,CAAC;AAElG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,gBAGxB,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"default_spine_surface.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_spine_surface.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI1F,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAe3E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAAwC,CAAC;AAElG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,gBAGxB,CAAC;AAEH,yCAAyC;AACzC,MAAM,WAAW,wBAAwB;IACxC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACzD;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,GAC/B,KAAK,gBAAgB,EACrB,UAAU,wBAAwB,KAChC,KAAK,CAAC,eAAe,CAQvB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GAAI,KAAK,gBAAgB,KAAG,KAAK,CAAC,SAAS,CAgC/E,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,MAAM,KAAG,SAC+B,CAAC;AAE7F;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,QAAO,cAS1C,CAAC"}
|
|
@@ -102,7 +102,7 @@ export const create_spine_route_specs = (ctx) => [
|
|
|
102
102
|
];
|
|
103
103
|
/**
|
|
104
104
|
* The spine's `/ready` route spec — the column-presence schema-drift deploy
|
|
105
|
-
* gate, reading
|
|
105
|
+
* gate, reading `SPINE_EXPECTED_SCHEMA_URL`. Mounted **live** by the TS
|
|
106
106
|
* spine binary (in `build_spine_app`) and the in-process readiness parity leg,
|
|
107
107
|
* but kept **off** the declared surface (`create_spine_surface_spec`) like the
|
|
108
108
|
* fact-serving / ws / sse behaviors — `describe_ready_cross_tests` (gated on
|
|
@@ -124,5 +124,8 @@ export const create_spine_surface_spec = () => create_test_app_surface_spec({
|
|
|
124
124
|
session_options: spine_session_options,
|
|
125
125
|
create_route_specs: create_spine_route_specs,
|
|
126
126
|
rpc_endpoints: spine_rpc_endpoints,
|
|
127
|
-
bootstrap: { mode: 'surface_only' }
|
|
127
|
+
bootstrap: { mode: 'surface_only' },
|
|
128
|
+
// both spine binaries mount the daemon-token layer (the TS one rotates a
|
|
129
|
+
// token on disk); `GET /api/surface` stays off, the default on both
|
|
130
|
+
daemon_token: true
|
|
128
131
|
});
|
|
@@ -279,7 +279,7 @@ export const describe_identity_parity_cross_tests = (options) => {
|
|
|
279
279
|
const signup = (fixture, username, password = DEFAULT_TEST_PASSWORD) => post_json(fixture, signup_path, { username, password });
|
|
280
280
|
/**
|
|
281
281
|
* Assert an attempt settled to `status` **and** carried the flat-REST error
|
|
282
|
-
* reason that status implies on every spine (see
|
|
282
|
+
* reason that status implies on every spine (see `REASON_BY_STATUS`) —
|
|
283
283
|
* a body-shape check, not just a status check, so a backend can't pass by
|
|
284
284
|
* returning the right status with the wrong/leaky body.
|
|
285
285
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in_process_setup.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/in_process_setup.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqB9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,EAIN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CAAC,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,qBAAqB,KAAG,SAqEjC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,kBAAkB,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAChE,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACjD;;;OAGG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,gCAAgC,GAAI,KAAK,CAAC,CAAC,SAAS,4BAA4B,EAC5F,SAAS,CAAC,KACR;IACF,UAAU,EAAE,SAAS,CAAC;IACtB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,mBAAmB,CAAC;IAClC,eAAe,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACtC,kBAAkB,EAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5C,aAAa,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC;CA8BjC,CAAC"}
|
|
@@ -157,7 +157,10 @@ export const default_in_process_suite_options = (options) => ({
|
|
|
157
157
|
// Mirror what `create_test_app` → `create_app_server` will mount.
|
|
158
158
|
// Both helpers read from the top-level `bootstrap` slot so surface
|
|
159
159
|
// and live app stay in sync by construction.
|
|
160
|
-
bootstrap: options.bootstrap
|
|
160
|
+
bootstrap: options.bootstrap,
|
|
161
|
+
surface_route: options.app_options?.surface_route,
|
|
162
|
+
// `create_test_app` always passes a `daemon_token_state`
|
|
163
|
+
daemon_token: true
|
|
161
164
|
}),
|
|
162
165
|
capabilities: in_process_capabilities,
|
|
163
166
|
session_options: options.session_options,
|
|
@@ -39,7 +39,7 @@ export interface MethodCoverageEntry {
|
|
|
39
39
|
/** Optional free-text note printed nowhere — documentation for the reader. */
|
|
40
40
|
readonly note?: string;
|
|
41
41
|
}
|
|
42
|
-
/** Inputs for
|
|
42
|
+
/** Inputs for `assert_rpc_method_coverage`. */
|
|
43
43
|
export interface RpcMethodCoverageInput {
|
|
44
44
|
/** Every method the live RPC endpoint mounts (`action.spec.method`). */
|
|
45
45
|
readonly live_methods: ReadonlyArray<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method_coverage.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/method_coverage.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,kBAAkB;AAC7B;;;;GAIG;AACD,UAAU,CAAC;;;;GAIV,GACD,aAAa,CAAC;;;;GAIb,GACD,UAAU,CAAC;AAEd,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,mBAAmB,CAAC;IAChD;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"method_coverage.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/method_coverage.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,kBAAkB;AAC7B;;;;GAIG;AACD,UAAU,CAAC;;;;GAIV,GACD,aAAa,CAAC;;;;GAIb,GACD,UAAU,CAAC;AAEd,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,mBAAmB,CAAC;IAChD;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,sBAAsB;IACtC,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACtD,yDAAyD;IACzD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACxC;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,sBAAsB,KAAG,IAyF1E,CAAC"}
|
|
@@ -14,8 +14,8 @@ import '../assert_dev_env.js';
|
|
|
14
14
|
* actually claimed by a suite — so a newly mounted-but-untested method could
|
|
15
15
|
* ship silently.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
* set against a
|
|
17
|
+
* `assert_rpc_method_coverage` closes that gap: it diffs the live method
|
|
18
|
+
* set against a `MethodCoverageEntry` manifest (both directions — a
|
|
19
19
|
* mounted-but-unclaimed method *and* a stale manifest row both fail loud) and
|
|
20
20
|
* checks each entry's tier is consistent with the declared surface + the
|
|
21
21
|
* backdoor prefix. The manifest becomes the forcing function — a new method
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
2
|
import { type BackendCapabilities } from './capabilities.js';
|
|
3
3
|
import type { SetupTest } from './setup.js';
|
|
4
|
-
/** Configuration for
|
|
4
|
+
/** Configuration for `describe_peer_ping_ws_tests`. */
|
|
5
5
|
export interface PeerPingWsTestOptions {
|
|
6
6
|
/** Per-test fixture producer (`default_cross_process_setup(handle, ...)`). */
|
|
7
7
|
readonly setup_test: SetupTest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer_ping_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/peer_ping_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkD9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAuB5C,
|
|
1
|
+
{"version":3,"file":"peer_ping_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/peer_ping_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkD9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAuB5C,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACrC,8EAA8E;IAC9E,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;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,SAAS,qBAAqB,KAAG,IA8O5E,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
2
|
import { type BackendCapabilities } from './capabilities.js';
|
|
3
3
|
import type { SetupTest } from './setup.js';
|
|
4
|
-
/** Configuration for
|
|
4
|
+
/** Configuration for `describe_role_grant_offer_notification_ws_tests`. */
|
|
5
5
|
export interface RoleGrantOfferNotificationWsTestOptions {
|
|
6
6
|
/** Per-test fixture producer (`default_cross_process_setup(handle, ...)`). */
|
|
7
7
|
readonly setup_test: SetupTest;
|
|
@@ -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,
|
|
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,2EAA2E;AAC3E,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"}
|
|
@@ -327,7 +327,7 @@ export interface BootstrappedBackendHandle extends BackendHandle {
|
|
|
327
327
|
*/
|
|
328
328
|
export type ReconstructedBootstrappedBackendHandle = Omit<BootstrappedBackendHandle, 'child' | 'teardown'>;
|
|
329
329
|
/**
|
|
330
|
-
* Serializable subset of
|
|
330
|
+
* Serializable subset of `BootstrappedBackendHandle` suitable for
|
|
331
331
|
* vitest's `project.provide()` — vitest 4 hard-rejects non-serializable
|
|
332
332
|
* values, so the live `child: ChildProcess` + `teardown: () => Promise<void>`
|
|
333
333
|
* + `keeper_transport: FetchTransport` (closure) must stay in the
|
|
@@ -335,8 +335,8 @@ export type ReconstructedBootstrappedBackendHandle = Omit<BootstrappedBackendHan
|
|
|
335
335
|
* (`config`, `daemon_token`, `keeper_account`, `keeper_actor`,
|
|
336
336
|
* `keeper_cookies`) round-trip through structured clone fine.
|
|
337
337
|
*
|
|
338
|
-
* `globalSetup` calls
|
|
339
|
-
* `project.provide`; test files call
|
|
338
|
+
* `globalSetup` calls `serialize_bootstrapped_handle` before
|
|
339
|
+
* `project.provide`; test files call `reconstruct_bootstrapped_handle`
|
|
340
340
|
* on the injected value to rebuild a usable handle (without `child` /
|
|
341
341
|
* `teardown` — lifecycle stays with `globalSetup`).
|
|
342
342
|
*/
|
|
@@ -354,7 +354,7 @@ export interface SerializableBootstrappedBackendHandle {
|
|
|
354
354
|
export declare const serialize_bootstrapped_handle: (handle: BootstrappedBackendHandle) => SerializableBootstrappedBackendHandle;
|
|
355
355
|
/**
|
|
356
356
|
* Rebuild a usable handle from the serialized subset. Synthesizes a
|
|
357
|
-
* fresh
|
|
357
|
+
* fresh `FetchTransport` primed with the keeper's `Set-Cookie`
|
|
358
358
|
* values so `_testing_reset` and other keeper-authenticated calls work.
|
|
359
359
|
* The returned shape omits `child` and `teardown` — lifecycle stays
|
|
360
360
|
* with `globalSetup`; tests that try to teardown themselves wouldn't
|
|
@@ -67,7 +67,7 @@ export const serialize_bootstrapped_handle = (handle) => ({
|
|
|
67
67
|
});
|
|
68
68
|
/**
|
|
69
69
|
* Rebuild a usable handle from the serialized subset. Synthesizes a
|
|
70
|
-
* fresh
|
|
70
|
+
* fresh `FetchTransport` primed with the keeper's `Set-Cookie`
|
|
71
71
|
* values so `_testing_reset` and other keeper-authenticated calls work.
|
|
72
72
|
* The returned shape omits `child` and `teardown` — lifecycle stays
|
|
73
73
|
* with `globalSetup`; tests that try to teardown themselves wouldn't
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
2
|
import { type BackendCapabilities } from './capabilities.js';
|
|
3
3
|
import type { SetupTest } from './setup.js';
|
|
4
|
-
/** Configuration for
|
|
4
|
+
/** Configuration for `describe_cross_process_sse_tests`. */
|
|
5
5
|
export interface CrossProcessSseTestOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Per-test fixture producer (`default_cross_process_setup(handle)`). Each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse_round_trip.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/sse_round_trip.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8E9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK5C,
|
|
1
|
+
{"version":3,"file":"sse_round_trip.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/sse_round_trip.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8E9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK5C,4DAA4D;AAC5D,MAAM,WAAW,0BAA0B;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AA0BD;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,0BAA0B,KAAG,IA2PtF,CAAC"}
|
|
@@ -2,7 +2,7 @@ import '../assert_dev_env.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Test-binary RPC actions for cross-process integration tests.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* The daemon-token-authed actions bundled by `create_testing_actions`:
|
|
6
6
|
* **`_testing_reset`** (DB wipe + keeper re-seed), **`_testing_drain_effects`**
|
|
7
7
|
* (audit barrier), **`_testing_mint_session`** (forge an
|
|
8
8
|
* expired-by-construction server-side session for the expiry conformance
|
|
@@ -31,11 +31,11 @@ import '../assert_dev_env.js';
|
|
|
31
31
|
* new keeper + secondary credentials return as the action output so
|
|
32
32
|
* the per-test fixture closes over them.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
34
|
+
* In-process and cross-process keeper lifetimes match: both modes run
|
|
35
|
+
* against a freshly bootstrapped keeper per test, so mutation-cascade
|
|
36
|
+
* tests (password change, revoke-all, hardcoded-username signup
|
|
37
|
+
* uniqueness) and direct keeper-vs-admin probes work uniformly
|
|
38
|
+
* cross-process.
|
|
39
39
|
*
|
|
40
40
|
* **Keeper ≠ admin.** The `keeper` and `admin` roles are independent.
|
|
41
41
|
* Keeper authorizes daemon-token / bootstrap paths; admin authorizes
|
|
@@ -47,9 +47,8 @@ import '../assert_dev_env.js';
|
|
|
47
47
|
* via `extra_accounts: [{username, roles: [ROLE_KEEPER]}]` so the
|
|
48
48
|
* account is seeded at this same bootstrap-equivalent step.
|
|
49
49
|
*
|
|
50
|
-
* **No free-form runtime bypass.**
|
|
51
|
-
*
|
|
52
|
-
* was rejected because a runtime bypass would let tests skip the
|
|
50
|
+
* **No free-form runtime bypass.** There is no action for arbitrary
|
|
51
|
+
* direct role grants: a runtime bypass would let tests skip the
|
|
53
52
|
* production consent flow's side-effects (audit emit, WS fan-out) and
|
|
54
53
|
* silently mask bugs in those paths. The bypass that does exist —
|
|
55
54
|
* `extra_accounts` — is framed as bootstrap-time seeding, the same
|
|
@@ -71,6 +70,7 @@ import '../assert_dev_env.js';
|
|
|
71
70
|
import { z } from 'zod';
|
|
72
71
|
import { type RpcAction } from '../../actions/action_rpc.js';
|
|
73
72
|
import type { AppDeps } from '../../auth/deps.js';
|
|
73
|
+
import type { AuditEmitter } from '../../auth/audit_emitter.js';
|
|
74
74
|
import type { SessionOptions } from '../../auth/session_cookie.js';
|
|
75
75
|
import type { DaemonTokenState } from '../../auth/daemon_token.js';
|
|
76
76
|
import type { Db } from '../../db/db.js';
|
|
@@ -162,16 +162,21 @@ export declare const testing_reset_action_spec: {
|
|
|
162
162
|
* the cross-backend conformance suite uses in place of a poll/sleep before
|
|
163
163
|
* asserting on audit rows.
|
|
164
164
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
165
|
+
* The handler awaits `AuditEmitter.drain_inflight`, which waits until no
|
|
166
|
+
* tracked `emit` write is outstanding — so the binary's emitter must be built
|
|
167
|
+
* with `track_inflight: true`, or the drain resolves at once and is no barrier.
|
|
168
|
+
* Tracking is what makes it a barrier whatever the transport: an **HTTP**
|
|
169
|
+
* mutation on a binary running `await_pending_effects: true` has its writes
|
|
170
|
+
* settled by the time it responds, but a **WS** mutation is answered before
|
|
171
|
+
* its effects flush (reply-then-close for a self-revocation), so its audit
|
|
172
|
+
* write can still be in flight when the caller reads the reply. The Rust
|
|
173
|
+
* spine does the same await in `AuditEmitter::drain_inflight`, over an
|
|
174
|
+
* emitter built with `new_with_inflight_tracking`.
|
|
175
|
+
*
|
|
176
|
+
* Covered: every `emit` that ran before the drain was dispatched, and any
|
|
177
|
+
* started while it waits. A write that starts after the drain resolves is
|
|
178
|
+
* not — nor are eager writes outside `emit` (session touch, token usage),
|
|
179
|
+
* which only the dispatching transport's own flush awaits.
|
|
175
180
|
*
|
|
176
181
|
* `auth` gates on the daemon-token credential, matching `_testing_reset`.
|
|
177
182
|
*/
|
|
@@ -243,13 +248,15 @@ export declare const testing_mint_session_action_spec: {
|
|
|
243
248
|
readonly description: string;
|
|
244
249
|
};
|
|
245
250
|
/**
|
|
246
|
-
* Build the standalone `_testing_drain_effects` action
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* suite asserts on audit rows (the spine binary bundles it via
|
|
251
|
+
* Build the standalone `_testing_drain_effects` action over `audit` — the
|
|
252
|
+
* emitter the backend's handlers emit through (`deps.audit`), built with
|
|
253
|
+
* `track_inflight: true` (see the spec doc). Mount it on any test endpoint
|
|
254
|
+
* whose suite asserts on audit rows (the spine binary bundles it via
|
|
250
255
|
* `create_testing_actions`; in-process suites mount it directly).
|
|
256
|
+
*
|
|
257
|
+
* @param audit - the backend's emitter, whose in-flight writes the action awaits
|
|
251
258
|
*/
|
|
252
|
-
export declare const create_testing_drain_effects_action: () => RpcAction;
|
|
259
|
+
export declare const create_testing_drain_effects_action: (audit: AuditEmitter) => RpcAction;
|
|
253
260
|
/**
|
|
254
261
|
* `_testing_put_fact` — seed an **embedded** fact (`fact.bytes`) for the
|
|
255
262
|
* cross-process fact-serving suite, which drives over real HTTP and has no
|
|
@@ -441,6 +448,18 @@ export declare const testing_action_manifest_action_spec: {
|
|
|
441
448
|
readonly async: true;
|
|
442
449
|
readonly description: string;
|
|
443
450
|
};
|
|
451
|
+
/**
|
|
452
|
+
* Build the `_testing_action_manifest` action over a backend's full live RPC
|
|
453
|
+
* mount. The handler closes over a manifest computed once at assembly time
|
|
454
|
+
* from every `mounted` spec except the protocol methods (`PROTOCOL_METHODS`)
|
|
455
|
+
* **plus this action's own spec** — the manifest action is itself a live
|
|
456
|
+
* method, so it must appear in the dump it serves. `mounted` excludes it
|
|
457
|
+
* (it's appended to the mount *after* the rest is assembled, in
|
|
458
|
+
* `build_full_spine_rpc_actions`), so its static spec is folded in here; the
|
|
459
|
+
* Rust mirror folds in its own descriptor the same way.
|
|
460
|
+
*
|
|
461
|
+
* @param mounted - every other action on the backend's live RPC mount
|
|
462
|
+
*/
|
|
444
463
|
export declare const create_testing_action_manifest_action: (mounted: ReadonlyArray<RpcAction>) => RpcAction;
|
|
445
464
|
/** Options for `create_testing_actions`. */
|
|
446
465
|
export interface CreateTestingActionsOptions {
|
|
@@ -452,9 +471,10 @@ export interface CreateTestingActionsOptions {
|
|
|
452
471
|
*/
|
|
453
472
|
readonly session_options: SessionOptions<string>;
|
|
454
473
|
/**
|
|
455
|
-
* Daemon-token runtime state — the reset action
|
|
456
|
-
* `state.keeper_account_id`
|
|
457
|
-
*
|
|
474
|
+
* Daemon-token runtime state — the reset action points
|
|
475
|
+
* `state.keeper_account_id` at the freshly seeded keeper once its
|
|
476
|
+
* transaction commits (a post-commit effect, so a reset that rolls back
|
|
477
|
+
* leaves the previous keeper cached). Pass the same `DaemonTokenState`
|
|
458
478
|
* instance the daemon-token middleware reads.
|
|
459
479
|
*/
|
|
460
480
|
readonly daemon_token_state: DaemonTokenState;
|
|
@@ -475,9 +495,10 @@ export interface CreateTestingActionsOptions {
|
|
|
475
495
|
/**
|
|
476
496
|
* Build the testing RPC actions for a test binary's registry.
|
|
477
497
|
*
|
|
478
|
-
* Returns `
|
|
479
|
-
*
|
|
480
|
-
*
|
|
498
|
+
* Returns the bundled `_testing_*` actions (module doc). The test binary
|
|
499
|
+
* calls this at server-assembly time and registers the result on its
|
|
500
|
+
* dispatcher. `_testing_drain_effects` drains `deps.audit`, so the binary's
|
|
501
|
+
* `audit_factory` builds the emitter with `track_inflight: true`.
|
|
481
502
|
*
|
|
482
503
|
* The reset action's table-wipe list mirrors
|
|
483
504
|
* `auth_integration_truncate_tables` from `testing/db.ts` — the
|
|
@@ -487,6 +508,4 @@ export interface CreateTestingActionsOptions {
|
|
|
487
508
|
* without updating this handler fails CI.
|
|
488
509
|
*/
|
|
489
510
|
export declare const create_testing_actions: (deps: AppDeps, options: CreateTestingActionsOptions) => Array<RpcAction>;
|
|
490
|
-
/** Set of auth-namespace tables `_testing_reset` wipes. Mirrored by the coverage test. */
|
|
491
|
-
export declare const testing_reset_wiped_tables: string[];
|
|
492
511
|
//# sourceMappingURL=testing_reset_actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing_reset_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_reset_actions.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B
|
|
1
|
+
{"version":3,"file":"testing_reset_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_reset_actions.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