@fuzdev/fuz_app 0.185.0 → 0.187.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.
Files changed (131) hide show
  1. package/dist/actions/CLAUDE.md +14 -2
  2. package/dist/actions/perform_action.d.ts.map +1 -1
  3. package/dist/actions/perform_action.js +36 -5
  4. package/dist/actions/ws_socket_session.d.ts.map +1 -1
  5. package/dist/actions/ws_socket_session.js +3 -1
  6. package/dist/auth/CLAUDE.md +17 -6
  7. package/dist/auth/account_queries.d.ts +60 -44
  8. package/dist/auth/account_queries.d.ts.map +1 -1
  9. package/dist/auth/account_queries.js +64 -54
  10. package/dist/auth/account_routes.d.ts.map +1 -1
  11. package/dist/auth/account_routes.js +59 -25
  12. package/dist/auth/admin_actions.d.ts.map +1 -1
  13. package/dist/auth/admin_actions.js +26 -9
  14. package/dist/auth/audit_emitter.js +2 -2
  15. package/dist/auth/audit_log_queries.d.ts +11 -3
  16. package/dist/auth/audit_log_queries.d.ts.map +1 -1
  17. package/dist/auth/audit_log_queries.js +4 -4
  18. package/dist/auth/audit_log_schema.js +1 -1
  19. package/dist/auth/auth_ddl.d.ts.map +1 -1
  20. package/dist/auth/auth_ddl.js +4 -0
  21. package/dist/auth/cleanup.js +1 -1
  22. package/dist/auth/migrations.d.ts.map +1 -1
  23. package/dist/auth/migrations.js +35 -0
  24. package/dist/auth/role_grant_offer_action_specs.d.ts +1 -1
  25. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  26. package/dist/auth/role_grant_offer_action_specs.js +2 -1
  27. package/dist/auth/role_grant_offer_actions.d.ts +12 -0
  28. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  29. package/dist/auth/role_grant_offer_actions.js +48 -20
  30. package/dist/auth/role_grant_offer_queries.d.ts +28 -15
  31. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  32. package/dist/auth/role_grant_offer_queries.js +35 -16
  33. package/dist/auth/role_grant_queries.d.ts +118 -20
  34. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  35. package/dist/auth/role_grant_queries.js +145 -24
  36. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  37. package/dist/auth/self_service_role_actions.js +15 -0
  38. package/dist/auth/session_queries.d.ts +24 -0
  39. package/dist/auth/session_queries.d.ts.map +1 -1
  40. package/dist/auth/session_queries.js +28 -0
  41. package/dist/db/CLAUDE.md +3 -3
  42. package/dist/db/cell_ddl.d.ts +8 -3
  43. package/dist/db/cell_ddl.d.ts.map +1 -1
  44. package/dist/db/cell_ddl.js +10 -5
  45. package/dist/db/migrate.d.ts +46 -22
  46. package/dist/db/migrate.d.ts.map +1 -1
  47. package/dist/db/migrate.js +103 -85
  48. package/dist/http/body_limit.d.ts +4 -4
  49. package/dist/http/body_limit.js +4 -4
  50. package/dist/server/app_backend.d.ts.map +1 -1
  51. package/dist/server/app_backend.js +1 -4
  52. package/dist/testing/CLAUDE.md +161 -27
  53. package/dist/testing/app_server.d.ts +5 -7
  54. package/dist/testing/app_server.d.ts.map +1 -1
  55. package/dist/testing/app_server.js +5 -7
  56. package/dist/testing/auth_apps.d.ts +3 -1
  57. package/dist/testing/auth_apps.d.ts.map +1 -1
  58. package/dist/testing/auth_apps.js +22 -5
  59. package/dist/testing/cross_backend/backend_both_live.d.ts +47 -0
  60. package/dist/testing/cross_backend/backend_both_live.d.ts.map +1 -0
  61. package/dist/testing/cross_backend/backend_both_live.js +566 -0
  62. package/dist/testing/cross_backend/backend_config.d.ts +8 -0
  63. package/dist/testing/cross_backend/backend_config.d.ts.map +1 -1
  64. package/dist/testing/cross_backend/backend_log.d.ts +71 -0
  65. package/dist/testing/cross_backend/backend_log.d.ts.map +1 -0
  66. package/dist/testing/cross_backend/backend_log.js +134 -0
  67. package/dist/testing/cross_backend/backend_swap.d.ts +41 -0
  68. package/dist/testing/cross_backend/backend_swap.d.ts.map +1 -0
  69. package/dist/testing/cross_backend/backend_swap.js +267 -0
  70. package/dist/testing/cross_backend/body_size_smuggling.js +3 -3
  71. package/dist/testing/cross_backend/bootstrap_backend.js +4 -4
  72. package/dist/testing/cross_backend/conformance_case.d.ts +11 -6
  73. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  74. package/dist/testing/cross_backend/conformance_case.js +4 -0
  75. package/dist/testing/cross_backend/conformance_principal.d.ts +2 -2
  76. package/dist/testing/cross_backend/conformance_principal.d.ts.map +1 -1
  77. package/dist/testing/cross_backend/conformance_principal.js +27 -10
  78. package/dist/testing/cross_backend/default_backend_configs.d.ts +38 -5
  79. package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
  80. package/dist/testing/cross_backend/default_backend_configs.js +50 -15
  81. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
  82. package/dist/testing/cross_backend/in_process_setup.js +52 -30
  83. package/dist/testing/cross_backend/revocation_drivers.d.ts +14 -2
  84. package/dist/testing/cross_backend/revocation_drivers.d.ts.map +1 -1
  85. package/dist/testing/cross_backend/revocation_drivers.js +36 -8
  86. package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts +7 -0
  87. package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
  88. package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +4 -2
  89. package/dist/testing/cross_backend/setup.d.ts +44 -43
  90. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  91. package/dist/testing/cross_backend/setup.js +64 -62
  92. package/dist/testing/cross_backend/shared_database_backends.d.ts +175 -0
  93. package/dist/testing/cross_backend/shared_database_backends.d.ts.map +1 -0
  94. package/dist/testing/cross_backend/shared_database_backends.js +298 -0
  95. package/dist/testing/cross_backend/spawn_backend.d.ts +7 -3
  96. package/dist/testing/cross_backend/spawn_backend.d.ts.map +1 -1
  97. package/dist/testing/cross_backend/spawn_backend.js +86 -7
  98. package/dist/testing/cross_backend/spine_suites.d.ts +1 -1
  99. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  100. package/dist/testing/cross_backend/spine_suites.js +5 -2
  101. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  102. package/dist/testing/cross_backend/sse_round_trip.js +4 -2
  103. package/dist/testing/cross_backend/testing_reset_actions.d.ts +7 -6
  104. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  105. package/dist/testing/cross_backend/testing_reset_actions.js +10 -8
  106. package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
  107. package/dist/testing/cross_backend/testing_server_bun.js +7 -31
  108. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  109. package/dist/testing/cross_backend/ws_round_trip.js +4 -3
  110. package/dist/testing/data_exposure.d.ts +4 -1
  111. package/dist/testing/data_exposure.d.ts.map +1 -1
  112. package/dist/testing/data_exposure.js +93 -25
  113. package/dist/testing/db_invariants.d.ts +5 -5
  114. package/dist/testing/db_invariants.js +5 -5
  115. package/dist/testing/logged_errors.d.ts +61 -0
  116. package/dist/testing/logged_errors.d.ts.map +1 -0
  117. package/dist/testing/logged_errors.js +285 -0
  118. package/dist/testing/middleware_gate_probes.d.ts.map +1 -1
  119. package/dist/testing/middleware_gate_probes.js +15 -8
  120. package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
  121. package/dist/testing/rpc_attack_surface.js +41 -16
  122. package/dist/testing/stubs.d.ts +5 -1
  123. package/dist/testing/stubs.d.ts.map +1 -1
  124. package/dist/testing/stubs.js +6 -3
  125. package/dist/testing/test_app.d.ts +40 -11
  126. package/dist/testing/test_app.d.ts.map +1 -1
  127. package/dist/testing/test_app.js +66 -9
  128. package/dist/testing/transports/fetch_transport.d.ts +10 -0
  129. package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
  130. package/dist/testing/transports/fetch_transport.js +13 -0
  131. package/package.json +5 -3
@@ -0,0 +1,566 @@
1
+ import '../assert_dev_env.js';
2
+ /**
3
+ * Both spines live: two backends serving one Postgres database at once. The
4
+ * backend swap (`backend_swap.ts`) runs them one at a time; here a credential
5
+ * minted on one is used, revoked and refused across the other while both
6
+ * run, and the per-process state each keeps is pinned as the declared limit
7
+ * it is.
8
+ *
9
+ * Per order, over a database emptied first, never reset in between
10
+ * (`_testing_reset` would drop what the other spine holds):
11
+ *
12
+ * - **Boot state** — the second spawned before the first's bootstrap. Its
13
+ * `/status` still advertises bootstrap and its daemon token resolves no
14
+ * keeper, both read once at its boot. A `POST /bootstrap` on it is refused
15
+ * by the database's lock, which also closes its window; its daemon token
16
+ * still resolves no keeper until it restarts. Both stop before the next
17
+ * phase.
18
+ * - **Boot** — the first spawned, its keeper bootstrapped, then the second
19
+ * spawned over that database, so its daemon leg resolves the keeper at
20
+ * assembly (the spawn order the per-process keeper cache forces).
21
+ * - **Live cross-spine credential honor** — mint on the first, prove it on
22
+ * both, revoke on the second, refused on the first at once: a session
23
+ * logged out and one revoked by id, an API token revoked, a password
24
+ * changed, an account deleted; and an offer the first made accepted on the
25
+ * second, after which the first's admin gate passes. Each revoke is
26
+ * bracketed by per-table content digests read after both backends drain,
27
+ * so the tables it changed are exactly the ones it should, and every test
28
+ * ends with both backends' invariant check.
29
+ * - **Declared limits** — what each process keeps to itself, pinned by name
30
+ * (`docs/security.md` § Single-Process Architecture): a socket open on the
31
+ * first outlives the second's password change, logout and token revoke,
32
+ * and keeps answering per-message calls; a role-gated socket on the first
33
+ * outlives the second's role revoke and keeps receiving the account's
34
+ * pushes; an offer made on either notifies no socket on the other. Each
35
+ * assertion holds today's behavior, so a cross-process close or
36
+ * notification that lands within `STAYS_OPEN_MS` fails it loudly — then
37
+ * the limit is lifted and the test flipped.
38
+ * - **Close** — both drained, invariants checked on both, then each torn down
39
+ * (exit `0`, no unexpected error in its log, `spawn_backend`).
40
+ *
41
+ * **What the configs must share** is the swap's
42
+ * (`to_shared_database_problems`): the database (`DATABASE_URL`, exact
43
+ * strings), the cookie name and `SECRET_FUZ_COOKIE_KEYS`, a startup reset
44
+ * off, and the drain and invariant backdoors. Their daemon-token, bootstrap
45
+ * token and fact directories stay their own (each config's paths). The
46
+ * socket cases run when the first backend declares `ws` and
47
+ * `ws_account_actions` (and `ws_role_gated` for the gated case; `ws` on both
48
+ * for the notification case).
49
+ *
50
+ * @module
51
+ */
52
+ import { afterAll, assert, beforeAll, describe, test } from 'vitest';
53
+ import { SessionListOutput, SessionRevokeOutput, TokenCreateOutput, TokenRevokeOutput } from '../../auth/account_action_specs.js';
54
+ import { AccountDeleteOutput, InviteCreateOutput } from '../../auth/admin_action_specs.js';
55
+ import { RoleGrantAssignOutput, RoleGrantOfferAcceptOutput, RoleGrantOfferCreateOutput, RoleGrantOfferHistoryOutput, RoleGrantOfferListOutput, RoleGrantRevokeOutput } from '../../auth/role_grant_offer_action_specs.js';
56
+ import { ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD } from '../../auth/role_grant_offer_notifications.js';
57
+ import { ROLE_ADMIN } from '../../auth/role_schema.js';
58
+ import { create_db } from '../../db/create_db.js';
59
+ import { ERROR_ALREADY_BOOTSTRAPPED, ERROR_AUTHENTICATION_REQUIRED, ERROR_INSUFFICIENT_PERMISSIONS, ERROR_INVALID_CREDENTIALS } from '../../http/error_schemas.js';
60
+ import { bootstrap } from '../transports/bootstrap.js';
61
+ import { is_notification_with } from '../transports/ws_client.js';
62
+ import { create_admitted_ws_transport } from '../transports/ws_transport.js';
63
+ import { test_if } from './capabilities.js';
64
+ import { error_reason } from './cross_rpc.js';
65
+ import { spawn_backend } from './spawn_backend.js';
66
+ import { assert_backend_invariants, backend_daemon_rpc, backend_post_json, backend_rpc_as, backend_transport, drain_backend_effects, passes_admin_gate, read_shared_database_snapshot, teardown_live_backend, to_changed_tables, to_shared_database_problems, verified_account_id, with_live_backend } from './shared_database_backends.js';
67
+ import { SPINE_ACCOUNT_LOGIN_PATH, SPINE_ACCOUNT_LOGOUT_PATH, SPINE_ACCOUNT_PASSWORD_PATH, SPINE_ACCOUNT_SIGNUP_PATH, SPINE_ACCOUNT_STATUS_PATH, SPINE_PARTICIPANT_ROLE, SPINE_ROLE_GATED_WS_PATH } from './spine_surface_constants.js';
68
+ const MEMBER_PASSWORD = 'both-live-password-before';
69
+ const MEMBER_PASSWORD_CHANGED = 'both-live-password-after';
70
+ /**
71
+ * How long a socket that must stay open, or must hear nothing, is watched —
72
+ * long past the same-process close the other suites see in milliseconds.
73
+ */
74
+ const STAYS_OPEN_MS = 1500;
75
+ /** What a spawning test may take past its backends' startup windows (ms). */
76
+ const BOTH_LIVE_PHASE_WORK_MS = 30_000;
77
+ /** The tables a step writes, by the spine-owned table names. */
78
+ const TABLE_AUDIT_LOG = 'public.audit_log';
79
+ const TABLE_AUTH_SESSION = 'public.auth_session';
80
+ const TABLE_API_TOKEN = 'public.api_token';
81
+ const TABLE_ACCOUNT = 'public.account';
82
+ const TABLE_ACTOR = 'public.actor';
83
+ const TABLE_ROLE_GRANT = 'public.role_grant';
84
+ const TABLE_ROLE_GRANT_OFFER = 'public.role_grant_offer';
85
+ /** The `Cookie` pair of each `Set-Cookie` line, for a socket upgrade. */
86
+ const to_cookie_pairs = (set_cookies) => set_cookies.map((line) => line.split(';')[0].trim());
87
+ /** Log `username` in on `config`'s backend, asserting it succeeds; its `Set-Cookie` lines. */
88
+ const login = async (config, username, password) => {
89
+ const res = await backend_post_json(backend_transport(config), SPINE_ACCOUNT_LOGIN_PATH, {
90
+ username,
91
+ password
92
+ });
93
+ assert.strictEqual(res.status, 200, `${config.name}: ${username} logs in`);
94
+ assert.strictEqual(res.set_cookies.length, 1, 'a login sets exactly the session cookie');
95
+ return res.set_cookies;
96
+ };
97
+ /** A login on `config` refused 401 `invalid_credentials`. */
98
+ const assert_login_refused = async (config, username, password, message) => {
99
+ const res = await backend_post_json(backend_transport(config), SPINE_ACCOUNT_LOGIN_PATH, {
100
+ username,
101
+ password
102
+ });
103
+ assert.strictEqual(res.status, 401, `${config.name}: ${message}`);
104
+ assert.strictEqual(res.body.error, ERROR_INVALID_CREDENTIALS);
105
+ };
106
+ /** The keeper invites `username` on the first backend, which signs it up. */
107
+ const create_member = async (live, username) => {
108
+ const { config } = live.a;
109
+ await backend_rpc_as(config, live.keeper_cookies, 'invite_create', { username }, InviteCreateOutput);
110
+ const signup = await backend_post_json(backend_transport(config), SPINE_ACCOUNT_SIGNUP_PATH, {
111
+ username,
112
+ password: MEMBER_PASSWORD
113
+ });
114
+ assert.strictEqual(signup.status, 200, `signup: ${JSON.stringify(signup.body)}`);
115
+ const body = signup.body;
116
+ return { username, account_id: body.account.id, actor_id: body.actor.id };
117
+ };
118
+ /** Mint a full eternal API token on `config` over a session. */
119
+ const create_token = (config, cookies) => backend_rpc_as(config, cookies, 'account_token_create', { scope: { kind: 'full' }, lifetime: { kind: 'eternal' } }, TokenCreateOutput);
120
+ /** Assert a credential authenticates as `account_id` on both backends. */
121
+ const assert_live_on_both = async (live, credential, account_id, what) => {
122
+ for (const { config } of [live.a, live.b]) {
123
+ assert.strictEqual(await verified_account_id(config, credential), account_id, `${config.name}: ${what} authenticates`);
124
+ }
125
+ };
126
+ /** Assert a credential is refused 401 on `handle`'s backend. */
127
+ const assert_refused = async (handle, credential, what) => {
128
+ assert.isNull(await verified_account_id(handle.config, credential), `${handle.config.name}: ${what} is refused`);
129
+ };
130
+ const drain_both = async (live) => {
131
+ await drain_backend_effects(live.a);
132
+ await drain_backend_effects(live.b);
133
+ };
134
+ /** Drain both backends, then read the snapshot — nothing detached lands after it. */
135
+ const drained_snapshot = async (live, db) => {
136
+ await drain_both(live);
137
+ return read_shared_database_snapshot(db);
138
+ };
139
+ const assert_invariants_both = async (live) => {
140
+ await assert_backend_invariants(live.a);
141
+ await assert_backend_invariants(live.b);
142
+ };
143
+ /**
144
+ * Assert the tables that changed between two drained snapshots are exactly
145
+ * `expected` — a step that wrote less missed its write, one that wrote more
146
+ * wrote what it shouldn't.
147
+ */
148
+ const assert_changed_tables = (before, after, expected, step) => {
149
+ assert.deepStrictEqual(to_changed_tables(before, after), [...expected].sort(), `the tables ${step} changed`);
150
+ };
151
+ /** Open an admitted socket on `config`'s `ws_path` (or `path`) on a session. */
152
+ const open_session_socket = (config, cookies, path = config.ws_path) => create_admitted_ws_transport({
153
+ base_url: config.base_url,
154
+ ws_path: path,
155
+ cookies: to_cookie_pairs(cookies)
156
+ });
157
+ /** Open an admitted socket on `config`'s `ws_path` on a bearer token (Origin-free). */
158
+ const open_bearer_socket = (config, token) => create_admitted_ws_transport({
159
+ base_url: config.base_url,
160
+ ws_path: config.ws_path,
161
+ cookies: [],
162
+ origin: null,
163
+ headers: { authorization: `Bearer ${token}` }
164
+ });
165
+ /**
166
+ * Assert `socket` stays open past `STAYS_OPEN_MS` and still answers a
167
+ * per-message `account_verify` as `account_id` — dispatch re-reads the actor
168
+ * and its grants, never the session or token the socket opened on.
169
+ */
170
+ const assert_socket_still_serves = async (socket, account_id, limit) => {
171
+ assert.isFalse(await socket.wait_for_close(STAYS_OPEN_MS), `${limit}: the socket closed (${socket.close_code}) — a cross-process close landed? ` +
172
+ 'lift the declared limit and flip this test');
173
+ const verified = await socket.request('still_serves', 'account_verify', undefined);
174
+ assert.strictEqual(verified.id, account_id, `${limit}: the socket still acts as the account`);
175
+ };
176
+ /** Close sockets, ignoring a socket the server already closed. */
177
+ const close_sockets = async (sockets) => {
178
+ for (const socket of sockets) {
179
+ await socket?.close().catch(() => { });
180
+ }
181
+ };
182
+ /** The anonymous `/status` answer: its status and `bootstrap_available`. */
183
+ const read_status = async (config) => {
184
+ const res = await backend_transport(config)(SPINE_ACCOUNT_STATUS_PATH, { method: 'GET' });
185
+ const body = (await res.json());
186
+ return { status: res.status, bootstrap_available: body.bootstrap_available };
187
+ };
188
+ /**
189
+ * Throw naming each way `order`'s configs can't run at once over
190
+ * `database_url` (`to_shared_database_problems`, and `offer_role` not `admin`).
191
+ */
192
+ const assert_both_live = (order, database_url, offer_role) => {
193
+ const problems = [];
194
+ if (offer_role === ROLE_ADMIN) {
195
+ problems.push(`offer_role is ${ROLE_ADMIN}, the role the gated socket's grant, the accepted offer and the reverse notification offer use`);
196
+ }
197
+ problems.push(...to_shared_database_problems([order.first, order.second], database_url));
198
+ if (problems.length > 0) {
199
+ throw new Error(`backend both live '${order.label}': ${problems.join('; ')}`);
200
+ }
201
+ };
202
+ /**
203
+ * Describe both spines live over each order (§module doc): per order, the
204
+ * boot-state limits, the boot, the live cross-spine credential cases, the
205
+ * declared per-process limits, and the close, run in turn. Each test after the
206
+ * boot fails naming it when the boot did not complete.
207
+ *
208
+ * @param options - the orders, the shared database, and how to empty it
209
+ */
210
+ export const describe_backend_both_live_tests = (options) => {
211
+ const { orders, database_url, empty_database, offer_role = SPINE_PARTICIPANT_ROLE, gated_ws_path = SPINE_ROLE_GATED_WS_PATH } = options;
212
+ describe('backend both live', () => {
213
+ let db = null;
214
+ let close_db = null;
215
+ beforeAll(async () => {
216
+ const created = await create_db(database_url);
217
+ db = created.db;
218
+ close_db = created.close;
219
+ });
220
+ afterAll(async () => {
221
+ await close_db?.();
222
+ });
223
+ const get_db = () => {
224
+ assert.ok(db, 'the snapshot connection is open');
225
+ return db;
226
+ };
227
+ for (const order of orders) {
228
+ const { label, first, second } = order;
229
+ const spawn_timeout = first.startup_timeout_ms + second.startup_timeout_ms + BOTH_LIVE_PHASE_WORK_MS;
230
+ const first_live = { handle: null };
231
+ const second_live = { handle: null };
232
+ const state = {};
233
+ const get_live = () => {
234
+ const a = first_live.handle;
235
+ const b = second_live.handle;
236
+ assert.ok(a && b && state.keeper, 'both backends booted (the boot test passed)');
237
+ return { a, b, keeper_id: state.keeper.id, keeper_cookies: state.keeper.cookies };
238
+ };
239
+ const ws_first = first.capabilities.ws && first.capabilities.ws_account_actions;
240
+ describe(label, () => {
241
+ afterAll(async () => {
242
+ await teardown_live_backend(second_live);
243
+ await teardown_live_backend(first_live);
244
+ });
245
+ // Declared limit (docs/security.md § Single-Process Architecture):
246
+ // `/status`'s `bootstrap_available` and the daemon leg's keeper are
247
+ // read once per process, at boot — the reason the boot below spawns
248
+ // the second backend only after the first's bootstrap.
249
+ test(`declared limit: ${second.name} booted before ${first.name}'s bootstrap keeps its boot-time bootstrap state`, async () => {
250
+ assert_both_live(order, database_url, offer_role);
251
+ await empty_database();
252
+ await with_live_backend(first, first_live, (a) => with_live_backend(second, second_live, async (b) => {
253
+ const before = await read_status(b.config);
254
+ assert.strictEqual(before.status, 401);
255
+ assert.strictEqual(before.bootstrap_available, true, `${b.config.name} advertises bootstrap over the empty database`);
256
+ await bootstrap({ transport: backend_transport(a.config), config: a.config });
257
+ const own = await read_status(a.config);
258
+ assert.notStrictEqual(own.bootstrap_available, true, `${a.config.name} closed bootstrap on its own`);
259
+ const stale = await read_status(b.config);
260
+ assert.strictEqual(stale.bootstrap_available, true, `declared limit: ${b.config.name}'s /status still advertises bootstrap ` +
261
+ "after the other spine's — a re-read landed? lift the limit and flip this");
262
+ const keeperless = await backend_daemon_rpc(b, '_testing_drain_effects');
263
+ assert.strictEqual(keeperless.status, 401, `declared limit: ${b.config.name}'s daemon token resolves no keeper ` +
264
+ 'until it restarts — a re-resolve landed? lift the limit and flip this');
265
+ assert.strictEqual(error_reason(keeperless), ERROR_AUTHENTICATION_REQUIRED);
266
+ // the window it advertises is closed where it counts: the lock
267
+ const rebootstrap = await backend_post_json(backend_transport(b.config), b.config.bootstrap_path, {
268
+ token: b.config.bootstrap.token,
269
+ username: b.config.bootstrap.username,
270
+ password: b.config.bootstrap.password
271
+ });
272
+ assert.strictEqual(rebootstrap.status, 403, 'the stale window bootstraps nothing');
273
+ assert.strictEqual(rebootstrap.body.error, ERROR_ALREADY_BOOTSTRAPPED);
274
+ const closed = await read_status(b.config);
275
+ assert.notStrictEqual(closed.bootstrap_available, true, `${b.config.name}: the lock refusal closes its window`);
276
+ // the second's daemon leg can't drain it (the limit above);
277
+ // its teardown awaits what it holds
278
+ await drain_backend_effects(a);
279
+ await assert_backend_invariants(a);
280
+ }));
281
+ }, spawn_timeout);
282
+ test(`${first.name} bootstraps over an empty database and ${second.name} boots over it`, async () => {
283
+ assert_both_live(order, database_url, offer_role);
284
+ await empty_database();
285
+ const a = await spawn_backend(first);
286
+ first_live.handle = a;
287
+ const keeper = await bootstrap({
288
+ transport: backend_transport(a.config),
289
+ config: a.config
290
+ });
291
+ await drain_backend_effects(a);
292
+ const b = await spawn_backend(second);
293
+ second_live.handle = b;
294
+ state.keeper = { id: keeper.account.id, cookies: keeper.cookies };
295
+ const live = get_live();
296
+ // the second's boot resolved the keeper the first bootstrapped
297
+ await drain_backend_effects(b);
298
+ const status = await read_status(b.config);
299
+ assert.strictEqual(status.status, 401);
300
+ assert.notStrictEqual(status.bootstrap_available, true, 'bootstrap is closed');
301
+ await assert_live_on_both(live, { cookies: keeper.cookies }, keeper.account.id, "the keeper's cookie");
302
+ await assert_invariants_both(live);
303
+ }, spawn_timeout);
304
+ describe('live cross-spine credential honor', () => {
305
+ test(`a session minted on ${first.name}, logged out on ${second.name}`, async () => {
306
+ const live = get_live();
307
+ const member = await create_member(live, 'live_logout');
308
+ const cookies = await login(first, member.username, MEMBER_PASSWORD);
309
+ const spare = await login(first, member.username, MEMBER_PASSWORD);
310
+ await assert_live_on_both(live, { cookies }, member.account_id, 'the session');
311
+ const before = await drained_snapshot(live, get_db());
312
+ const logout = await backend_post_json(backend_transport(second, cookies), SPINE_ACCOUNT_LOGOUT_PATH, {});
313
+ assert.strictEqual(logout.status, 200, `${second.name} logs the session out`);
314
+ await assert_refused(live.a, { cookies }, 'the logged-out session');
315
+ await assert_refused(live.b, { cookies }, 'the logged-out session');
316
+ // logout ends one session, not the account's others
317
+ await assert_live_on_both(live, { cookies: spare }, member.account_id, 'the spare session');
318
+ const after = await drained_snapshot(live, get_db());
319
+ assert_changed_tables(before, after, [TABLE_AUTH_SESSION, TABLE_AUDIT_LOG], 'logout');
320
+ await assert_invariants_both(live);
321
+ });
322
+ test(`a session minted on ${first.name}, revoked by id on ${second.name}`, async () => {
323
+ const live = get_live();
324
+ const member = await create_member(live, 'live_session_revoke');
325
+ const target = await login(first, member.username, MEMBER_PASSWORD);
326
+ const revoker = await login(second, member.username, MEMBER_PASSWORD);
327
+ await assert_live_on_both(live, { cookies: target }, member.account_id, 'the target');
328
+ const { sessions } = await backend_rpc_as(first, target, 'account_session_list', undefined, SessionListOutput);
329
+ const current = sessions.find((s) => s.is_current);
330
+ assert.ok(current, 'the session list names the caller');
331
+ const before = await drained_snapshot(live, get_db());
332
+ const revoked = await backend_rpc_as(second, revoker, 'account_session_revoke', { session_id: current.id }, SessionRevokeOutput);
333
+ assert.isTrue(revoked.revoked, `${second.name} revokes the session`);
334
+ await assert_refused(live.a, { cookies: target }, 'the revoked session');
335
+ await assert_refused(live.b, { cookies: target }, 'the revoked session');
336
+ await assert_live_on_both(live, { cookies: revoker }, member.account_id, 'the revoking session');
337
+ const after = await drained_snapshot(live, get_db());
338
+ assert_changed_tables(before, after, [TABLE_AUTH_SESSION, TABLE_AUDIT_LOG], 'the session revoke');
339
+ await assert_invariants_both(live);
340
+ });
341
+ test(`an API token minted on ${first.name}, revoked on ${second.name}`, async () => {
342
+ const live = get_live();
343
+ const member = await create_member(live, 'live_token');
344
+ const cookies = await login(first, member.username, MEMBER_PASSWORD);
345
+ const token = await create_token(first, cookies);
346
+ const spare = await create_token(first, cookies);
347
+ await assert_live_on_both(live, { bearer: token.token }, member.account_id, 'the token');
348
+ const before = await drained_snapshot(live, get_db());
349
+ const revoked = await backend_rpc_as(second, cookies, 'account_token_revoke', { token_id: token.id }, TokenRevokeOutput);
350
+ assert.isTrue(revoked.revoked, `${second.name} revokes the token`);
351
+ await assert_refused(live.a, { bearer: token.token }, 'the revoked token');
352
+ await assert_refused(live.b, { bearer: token.token }, 'the revoked token');
353
+ // the revoke ends one token, not the account's others
354
+ await assert_live_on_both(live, { bearer: spare.token }, member.account_id, 'the spare token');
355
+ await assert_live_on_both(live, { cookies }, member.account_id, 'the session');
356
+ const after = await drained_snapshot(live, get_db());
357
+ assert_changed_tables(before, after, [TABLE_API_TOKEN, TABLE_AUDIT_LOG], 'the revoke');
358
+ await assert_invariants_both(live);
359
+ });
360
+ test(`a password changed on ${second.name} ends ${first.name}'s credentials`, async () => {
361
+ const live = get_live();
362
+ const member = await create_member(live, 'live_password');
363
+ const session = await login(first, member.username, MEMBER_PASSWORD);
364
+ const token = await create_token(first, session);
365
+ const changer = await login(second, member.username, MEMBER_PASSWORD);
366
+ await assert_live_on_both(live, { cookies: session }, member.account_id, 'the session');
367
+ await assert_live_on_both(live, { bearer: token.token }, member.account_id, 'the token');
368
+ const before = await drained_snapshot(live, get_db());
369
+ const changed = await backend_post_json(backend_transport(second, changer), SPINE_ACCOUNT_PASSWORD_PATH, { current_password: MEMBER_PASSWORD, new_password: MEMBER_PASSWORD_CHANGED });
370
+ assert.strictEqual(changed.status, 200, `password change: ${JSON.stringify(changed.body)}`);
371
+ await assert_refused(live.a, { cookies: session }, "the first spine's session");
372
+ await assert_refused(live.a, { bearer: token.token }, "the first spine's token");
373
+ await assert_refused(live.b, { cookies: session }, "the first spine's session");
374
+ await assert_refused(live.b, { bearer: token.token }, "the first spine's token");
375
+ await assert_refused(live.a, { cookies: changer }, 'the changing session');
376
+ await assert_login_refused(first, member.username, MEMBER_PASSWORD, 'the old password is refused');
377
+ const after = await drained_snapshot(live, get_db());
378
+ assert_changed_tables(before, after, [TABLE_ACCOUNT, TABLE_AUTH_SESSION, TABLE_API_TOKEN, TABLE_AUDIT_LOG], 'the password change');
379
+ await login(first, member.username, MEMBER_PASSWORD_CHANGED);
380
+ await assert_invariants_both(live);
381
+ });
382
+ test(`an offer made on ${first.name}, accepted on ${second.name}`, async () => {
383
+ const live = get_live();
384
+ const member = await create_member(live, 'live_offer');
385
+ const cookies = await login(first, member.username, MEMBER_PASSWORD);
386
+ const { offer } = await backend_rpc_as(first, live.keeper_cookies, 'role_grant_offer_create', { to_account_id: member.account_id, role: ROLE_ADMIN }, RoleGrantOfferCreateOutput);
387
+ const { offers } = await backend_rpc_as(second, cookies, 'role_grant_offer_list', undefined, RoleGrantOfferListOutput);
388
+ assert.deepStrictEqual(offers.map((o) => o.id), [offer.id], `${second.name} lists the offer`);
389
+ assert.isFalse(await passes_admin_gate(first, cookies), 'no admin before the accept');
390
+ const before = await drained_snapshot(live, get_db());
391
+ const accepted = await backend_rpc_as(second, cookies, 'role_grant_offer_accept', { offer_id: offer.id }, RoleGrantOfferAcceptOutput);
392
+ assert.isTrue(await passes_admin_gate(first, cookies), `${first.name} honors the grant at once`);
393
+ const history = await backend_rpc_as(first, live.keeper_cookies, 'role_grant_offer_history', {}, RoleGrantOfferHistoryOutput);
394
+ const read = history.offers.find((o) => o.id === offer.id);
395
+ assert.ok(read, "the keeper's history lists the offer");
396
+ assert.strictEqual(read.resulting_role_grant_id, accepted.role_grant_id);
397
+ const after = await drained_snapshot(live, get_db());
398
+ assert_changed_tables(before, after, [TABLE_ROLE_GRANT, TABLE_ROLE_GRANT_OFFER, TABLE_AUDIT_LOG], 'the accept');
399
+ await assert_invariants_both(live);
400
+ });
401
+ test(`an account deleted on ${second.name} ends ${first.name}'s credentials`, async () => {
402
+ const live = get_live();
403
+ const member = await create_member(live, 'live_delete');
404
+ const session = await login(first, member.username, MEMBER_PASSWORD);
405
+ const token = await create_token(first, session);
406
+ const deleter = await login(second, member.username, MEMBER_PASSWORD);
407
+ await assert_live_on_both(live, { cookies: session }, member.account_id, 'the session');
408
+ await assert_live_on_both(live, { bearer: token.token }, member.account_id, 'the token');
409
+ const before = await drained_snapshot(live, get_db());
410
+ const deleted = await backend_rpc_as(second, deleter, 'account_delete', {}, AccountDeleteOutput);
411
+ assert.isTrue(deleted.deleted, `${second.name} deletes the account`);
412
+ await assert_refused(live.a, { cookies: session }, "the deleted account's session");
413
+ await assert_refused(live.a, { bearer: token.token }, "the deleted account's token");
414
+ await assert_refused(live.b, { cookies: session }, "the deleted account's session");
415
+ await assert_refused(live.b, { bearer: token.token }, "the deleted account's token");
416
+ await assert_login_refused(first, member.username, MEMBER_PASSWORD, "the deleted account's password is refused");
417
+ const after = await drained_snapshot(live, get_db());
418
+ assert_changed_tables(before, after, [TABLE_ACCOUNT, TABLE_ACTOR, TABLE_AUTH_SESSION, TABLE_API_TOKEN, TABLE_AUDIT_LOG], 'the delete');
419
+ await assert_invariants_both(live);
420
+ });
421
+ });
422
+ // Each case pins a declared limit (docs/security.md § Single-Process
423
+ // Architecture): a revocation closes the connections of its own
424
+ // process only, and a notification reaches its own process's
425
+ // sockets only. HTTP on both spines proves each revocation landed,
426
+ // so the socket outliving it is the limit, not a vacuous revoke.
427
+ describe('declared limits', () => {
428
+ test_if(ws_first, `declared limit: a socket on ${first.name} outlives a password change on ${second.name}`, async () => {
429
+ const live = get_live();
430
+ const member = await create_member(live, 'limit_password');
431
+ const session = await login(first, member.username, MEMBER_PASSWORD);
432
+ const changer = await login(second, member.username, MEMBER_PASSWORD);
433
+ let socket = null;
434
+ try {
435
+ socket = await open_session_socket(first, session);
436
+ const changed = await backend_post_json(backend_transport(second, changer), SPINE_ACCOUNT_PASSWORD_PATH, { current_password: MEMBER_PASSWORD, new_password: MEMBER_PASSWORD_CHANGED });
437
+ assert.strictEqual(changed.status, 200);
438
+ await assert_refused(live.a, { cookies: session }, 'the old session');
439
+ await assert_refused(live.b, { cookies: session }, 'the old session');
440
+ await assert_socket_still_serves(socket, member.account_id, 'password change across processes');
441
+ }
442
+ finally {
443
+ await close_sockets([socket]);
444
+ }
445
+ await drain_both(live);
446
+ await assert_invariants_both(live);
447
+ });
448
+ test_if(ws_first, `declared limit: a socket on ${first.name} outlives its session's logout on ${second.name}`, async () => {
449
+ const live = get_live();
450
+ const member = await create_member(live, 'limit_logout');
451
+ const session = await login(first, member.username, MEMBER_PASSWORD);
452
+ let socket = null;
453
+ try {
454
+ socket = await open_session_socket(first, session);
455
+ const logout = await backend_post_json(backend_transport(second, session), SPINE_ACCOUNT_LOGOUT_PATH, {});
456
+ assert.strictEqual(logout.status, 200);
457
+ await assert_refused(live.a, { cookies: session }, 'the logged-out session');
458
+ await assert_refused(live.b, { cookies: session }, 'the logged-out session');
459
+ await assert_socket_still_serves(socket, member.account_id, 'logout across processes');
460
+ }
461
+ finally {
462
+ await close_sockets([socket]);
463
+ }
464
+ await drain_both(live);
465
+ await assert_invariants_both(live);
466
+ });
467
+ test_if(ws_first, `declared limit: a socket on ${first.name} outlives its token's revoke on ${second.name}`, async () => {
468
+ const live = get_live();
469
+ const member = await create_member(live, 'limit_token');
470
+ const session = await login(first, member.username, MEMBER_PASSWORD);
471
+ const token = await create_token(first, session);
472
+ let socket = null;
473
+ try {
474
+ socket = await open_bearer_socket(first, token.token);
475
+ const revoked = await backend_rpc_as(second, session, 'account_token_revoke', { token_id: token.id }, TokenRevokeOutput);
476
+ assert.isTrue(revoked.revoked);
477
+ await assert_refused(live.a, { bearer: token.token }, 'the revoked token');
478
+ await assert_refused(live.b, { bearer: token.token }, 'the revoked token');
479
+ await assert_socket_still_serves(socket, member.account_id, 'token revoke across processes');
480
+ }
481
+ finally {
482
+ await close_sockets([socket]);
483
+ }
484
+ await drain_both(live);
485
+ await assert_invariants_both(live);
486
+ });
487
+ test_if(ws_first && first.capabilities.ws_role_gated, `declared limit: a role-gated socket on ${first.name} outlives the role's revoke on ${second.name}`, async () => {
488
+ const live = get_live();
489
+ const member = await create_member(live, 'limit_role');
490
+ const { role_grant_id } = await backend_rpc_as(first, live.keeper_cookies, 'role_grant_assign', { to_account_id: member.account_id, role: ROLE_ADMIN }, RoleGrantAssignOutput);
491
+ const session = await login(first, member.username, MEMBER_PASSWORD);
492
+ let socket = null;
493
+ try {
494
+ // admitted at the gate: the grant is live on the first
495
+ socket = await open_session_socket(first, session, gated_ws_path);
496
+ await socket.request('admin_before', 'invite_list', undefined);
497
+ const revoked = await backend_rpc_as(second, live.keeper_cookies, 'role_grant_revoke', { actor_id: member.actor_id, role_grant_id }, RoleGrantRevokeOutput);
498
+ assert.isTrue(revoked.revoked);
499
+ assert.isFalse(await passes_admin_gate(first, session), 'the role is gone');
500
+ assert.isFalse(await passes_admin_gate(second, session), 'the role is gone');
501
+ assert.isFalse(await socket.wait_for_close(STAYS_OPEN_MS), `declared limit: the gated socket closed (${socket.close_code}) on the ` +
502
+ "other process's role revoke — lift the limit and flip this test");
503
+ // per-message dispatch re-reads the grants: the socket keeps
504
+ // the gate's pushes, not the role's actions
505
+ const refused = await socket.request('admin_after', 'invite_list', undefined).then(() => null, (err) => err);
506
+ assert.ok(refused instanceof Error, 'the revoked role still authorizes a per-message call');
507
+ assert.include(refused.message, `"reason":"${ERROR_INSUFFICIENT_PERMISSIONS}"`, 'refused for the role');
508
+ const { offer } = await backend_rpc_as(first, live.keeper_cookies, 'role_grant_offer_create', { to_account_id: member.account_id, role: offer_role }, RoleGrantOfferCreateOutput);
509
+ await socket.wait_for(is_notification_with(ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, (p) => p.offer.id === offer.id), 5000);
510
+ }
511
+ finally {
512
+ await close_sockets([socket]);
513
+ }
514
+ await drain_both(live);
515
+ await assert_invariants_both(live);
516
+ });
517
+ test_if(ws_first && second.capabilities.ws && second.capabilities.ws_account_actions, `declared limit: an offer made on either of ${first.name} and ${second.name} notifies no socket on the other`, async () => {
518
+ const live = get_live();
519
+ const member = await create_member(live, 'limit_notify');
520
+ const session = await login(first, member.username, MEMBER_PASSWORD);
521
+ let near = null;
522
+ let far = null;
523
+ try {
524
+ near = await open_session_socket(first, session);
525
+ far = await open_session_socket(second, session);
526
+ const { offer } = await backend_rpc_as(first, live.keeper_cookies, 'role_grant_offer_create', { to_account_id: member.account_id, role: offer_role }, RoleGrantOfferCreateOutput);
527
+ const is_this_offer = is_notification_with(ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, (p) => p.offer.id === offer.id);
528
+ // the control: the offering process's socket hears it
529
+ await near
530
+ .wait_for(is_this_offer, 5000)
531
+ .catch(() => assert.fail(`${first.name}'s own socket hears its offer (the near control)`));
532
+ const heard = await far.wait_for(is_this_offer, STAYS_OPEN_MS).then(() => true, () => false);
533
+ assert.isFalse(heard, `declared limit: ${second.name}'s socket heard ${first.name}'s offer — ` +
534
+ 'a cross-process notification landed? lift the limit and flip this test');
535
+ // the far control, and the reverse direction: an offer made on
536
+ // the second reaches its own socket and not the first's (a
537
+ // different role, so it is a new offer, not the pending one)
538
+ const { offer: far_offer } = await backend_rpc_as(second, live.keeper_cookies, 'role_grant_offer_create', { to_account_id: member.account_id, role: ROLE_ADMIN }, RoleGrantOfferCreateOutput);
539
+ const is_far_offer = is_notification_with(ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, (p) => p.offer.id === far_offer.id);
540
+ await far
541
+ .wait_for(is_far_offer, 5000)
542
+ .catch(() => assert.fail(`${second.name}'s own socket hears its offer (the far control)`));
543
+ const heard_reverse = await near.wait_for(is_far_offer, STAYS_OPEN_MS).then(() => true, () => false);
544
+ assert.isFalse(heard_reverse, `declared limit: ${first.name}'s socket heard ${second.name}'s offer — ` +
545
+ 'a cross-process notification landed? lift the limit and flip this test');
546
+ }
547
+ finally {
548
+ await close_sockets([near, far]);
549
+ }
550
+ await drain_both(live);
551
+ await assert_invariants_both(live);
552
+ });
553
+ });
554
+ test('both drain, hold their invariants, and stop cleanly', async () => {
555
+ const live = get_live();
556
+ await drain_both(live);
557
+ await assert_invariants_both(live);
558
+ second_live.handle = null;
559
+ await live.b.teardown();
560
+ first_live.handle = null;
561
+ await live.a.teardown();
562
+ }, spawn_timeout);
563
+ });
564
+ }
565
+ });
566
+ };
@@ -19,6 +19,7 @@ import '../assert_dev_env.js';
19
19
  * @module
20
20
  */
21
21
  import type { BackendCapabilities } from './capabilities.js';
22
+ import type { BackendLogConfig } from './backend_log.js';
22
23
  /**
23
24
  * Auth-bootstrap configuration for a spawnable test binary. The runner
24
25
  * writes `token` to `token_path` before launching the child, then POSTs
@@ -110,5 +111,12 @@ export interface BackendConfig {
110
111
  * existing flags.
111
112
  */
112
113
  readonly capabilities: BackendCapabilities;
114
+ /**
115
+ * Where `spawn_backend` tees the child's stdout and stderr, and the error
116
+ * lines it may log — teardown fails on any other (`backend_log.ts`). The
117
+ * family builders set it under the backend's temp root; omitted, the
118
+ * output is not kept and nothing is checked.
119
+ */
120
+ readonly log?: BackendLogConfig;
113
121
  }
114
122
  //# sourceMappingURL=backend_config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend_config.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/backend_config.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACtC,qFAAqF;IACrF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC7B,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAC3C"}
1
+ {"version":3,"file":"backend_config.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/backend_config.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACtC,qFAAqF;IACrF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC7B,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC;CAChC"}