@fuzdev/fuz_app 0.182.0 → 0.184.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 (295) hide show
  1. package/README.md +2 -0
  2. package/dist/actions/CLAUDE.md +535 -1223
  3. package/dist/actions/action_codegen.d.ts +1 -1
  4. package/dist/actions/action_codegen.d.ts.map +1 -1
  5. package/dist/actions/action_codegen.js +3 -2
  6. package/dist/actions/connection_closer.d.ts +11 -9
  7. package/dist/actions/connection_closer.d.ts.map +1 -1
  8. package/dist/actions/connection_closer.js +11 -9
  9. package/dist/actions/frontend_rpc_client.d.ts +1 -1
  10. package/dist/actions/register_action_ws.d.ts +14 -1
  11. package/dist/actions/register_action_ws.d.ts.map +1 -1
  12. package/dist/actions/register_action_ws.js +2 -1
  13. package/dist/actions/ws_socket_session.d.ts +9 -1
  14. package/dist/actions/ws_socket_session.d.ts.map +1 -1
  15. package/dist/actions/ws_socket_session.js +43 -19
  16. package/dist/auth/CLAUDE.md +430 -1024
  17. package/dist/auth/account_queries.d.ts +1 -1
  18. package/dist/auth/account_queries.js +1 -1
  19. package/dist/auth/account_routes.d.ts +9 -8
  20. package/dist/auth/account_routes.d.ts.map +1 -1
  21. package/dist/auth/account_routes.js +78 -75
  22. package/dist/auth/admin_actions.d.ts.map +1 -1
  23. package/dist/auth/admin_actions.js +32 -28
  24. package/dist/auth/api_token.d.ts +20 -3
  25. package/dist/auth/api_token.d.ts.map +1 -1
  26. package/dist/auth/api_token.js +28 -9
  27. package/dist/auth/api_token_queries.d.ts +2 -2
  28. package/dist/auth/api_token_queries.js +2 -2
  29. package/dist/auth/audit_emitter.d.ts +75 -84
  30. package/dist/auth/audit_emitter.d.ts.map +1 -1
  31. package/dist/auth/audit_emitter.js +83 -71
  32. package/dist/auth/audit_log_schema.d.ts +25 -14
  33. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  34. package/dist/auth/audit_log_schema.js +23 -8
  35. package/dist/auth/auth_guard_resolver.d.ts +1 -1
  36. package/dist/auth/auth_guard_resolver.js +1 -1
  37. package/dist/auth/bearer_auth.d.ts +2 -5
  38. package/dist/auth/bearer_auth.d.ts.map +1 -1
  39. package/dist/auth/bearer_auth.js +4 -13
  40. package/dist/auth/bootstrap_account.d.ts +42 -26
  41. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  42. package/dist/auth/bootstrap_account.js +36 -19
  43. package/dist/auth/bootstrap_routes.d.ts +20 -21
  44. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  45. package/dist/auth/bootstrap_routes.js +26 -31
  46. package/dist/auth/bootstrap_token_store.d.ts +3 -4
  47. package/dist/auth/bootstrap_token_store.d.ts.map +1 -1
  48. package/dist/auth/bootstrap_token_store.js +1 -1
  49. package/dist/auth/daemon_token.d.ts +5 -1
  50. package/dist/auth/daemon_token.d.ts.map +1 -1
  51. package/dist/auth/daemon_token_middleware.d.ts +12 -8
  52. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  53. package/dist/auth/daemon_token_middleware.js +15 -21
  54. package/dist/auth/deps.d.ts +19 -5
  55. package/dist/auth/deps.d.ts.map +1 -1
  56. package/dist/auth/deps.js +3 -2
  57. package/dist/auth/invite_queries.d.ts +51 -3
  58. package/dist/auth/invite_queries.d.ts.map +1 -1
  59. package/dist/auth/invite_queries.js +81 -6
  60. package/dist/auth/invite_schema.d.ts +2 -1
  61. package/dist/auth/invite_schema.d.ts.map +1 -1
  62. package/dist/auth/middleware.d.ts +2 -3
  63. package/dist/auth/middleware.d.ts.map +1 -1
  64. package/dist/auth/middleware.js +3 -3
  65. package/dist/auth/request_context.d.ts +3 -3
  66. package/dist/auth/request_context.js +3 -3
  67. package/dist/auth/resolved_auth.d.ts +7 -7
  68. package/dist/auth/resolved_auth.d.ts.map +1 -1
  69. package/dist/auth/resolved_auth.js +4 -4
  70. package/dist/auth/role_grant_offer_actions.d.ts +27 -3
  71. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  72. package/dist/auth/role_grant_offer_actions.js +42 -35
  73. package/dist/auth/role_grant_offer_queries.d.ts +60 -4
  74. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  75. package/dist/auth/role_grant_offer_queries.js +79 -5
  76. package/dist/auth/role_grant_queries.d.ts +3 -52
  77. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  78. package/dist/auth/role_grant_queries.js +5 -80
  79. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  80. package/dist/auth/self_service_role_actions.js +11 -22
  81. package/dist/auth/session_cookie.d.ts +82 -174
  82. package/dist/auth/session_cookie.d.ts.map +1 -1
  83. package/dist/auth/session_cookie.js +80 -130
  84. package/dist/auth/session_middleware.d.ts +8 -17
  85. package/dist/auth/session_middleware.d.ts.map +1 -1
  86. package/dist/auth/session_middleware.js +14 -23
  87. package/dist/auth/session_queries.d.ts +15 -17
  88. package/dist/auth/session_queries.d.ts.map +1 -1
  89. package/dist/auth/session_queries.js +28 -20
  90. package/dist/auth/signup_routes.d.ts.map +1 -1
  91. package/dist/auth/signup_routes.js +93 -43
  92. package/dist/db/CLAUDE.md +5 -3
  93. package/dist/db/sql_columns.d.ts +1 -1
  94. package/dist/db/sql_columns.js +1 -1
  95. package/dist/dev/setup.d.ts +3 -1
  96. package/dist/dev/setup.d.ts.map +1 -1
  97. package/dist/dev/setup.js +3 -1
  98. package/dist/http/CLAUDE.md +315 -763
  99. package/dist/http/db_routes.d.ts +8 -23
  100. package/dist/http/db_routes.d.ts.map +1 -1
  101. package/dist/http/db_routes.js +73 -73
  102. package/dist/http/origin.d.ts +7 -8
  103. package/dist/http/origin.d.ts.map +1 -1
  104. package/dist/http/origin.js +7 -8
  105. package/dist/http/pending_effects.d.ts +118 -6
  106. package/dist/http/pending_effects.d.ts.map +1 -1
  107. package/dist/http/pending_effects.js +114 -6
  108. package/dist/http/route_result.d.ts +1 -1
  109. package/dist/http/route_spec.d.ts +14 -11
  110. package/dist/http/route_spec.d.ts.map +1 -1
  111. package/dist/realtime/sse.d.ts +4 -23
  112. package/dist/realtime/sse.d.ts.map +1 -1
  113. package/dist/realtime/sse.js +4 -25
  114. package/dist/server/app_backend.d.ts +4 -5
  115. package/dist/server/app_backend.d.ts.map +1 -1
  116. package/dist/server/app_backend.js +3 -1
  117. package/dist/server/app_server.d.ts +80 -16
  118. package/dist/server/app_server.d.ts.map +1 -1
  119. package/dist/server/app_server.js +113 -31
  120. package/dist/server/app_server_context.d.ts +1 -2
  121. package/dist/server/app_server_context.d.ts.map +1 -1
  122. package/dist/server/env.js +2 -2
  123. package/dist/testing/CLAUDE.md +265 -796
  124. package/dist/testing/admin_integration.d.ts +2 -3
  125. package/dist/testing/admin_integration.d.ts.map +1 -1
  126. package/dist/testing/admin_integration.js +3 -3
  127. package/dist/testing/adversarial_404.d.ts +6 -1
  128. package/dist/testing/adversarial_404.d.ts.map +1 -1
  129. package/dist/testing/adversarial_404.js +38 -17
  130. package/dist/testing/app_server.d.ts +23 -148
  131. package/dist/testing/app_server.d.ts.map +1 -1
  132. package/dist/testing/app_server.js +53 -131
  133. package/dist/testing/attack_surface.d.ts +1 -1
  134. package/dist/testing/attack_surface.d.ts.map +1 -1
  135. package/dist/testing/audit_completeness.d.ts +2 -3
  136. package/dist/testing/audit_completeness.d.ts.map +1 -1
  137. package/dist/testing/audit_completeness.js +1 -1
  138. package/dist/testing/audit_drift_guard.d.ts +11 -6
  139. package/dist/testing/audit_drift_guard.d.ts.map +1 -1
  140. package/dist/testing/audit_drift_guard.js +15 -8
  141. package/dist/testing/cross_backend/audit_cross_helpers.d.ts +12 -9
  142. package/dist/testing/cross_backend/audit_cross_helpers.d.ts.map +1 -1
  143. package/dist/testing/cross_backend/audit_cross_helpers.js +13 -14
  144. package/dist/testing/cross_backend/capabilities.d.ts +9 -6
  145. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
  146. package/dist/testing/cross_backend/capabilities.js +11 -7
  147. package/dist/testing/cross_backend/capability_mounts.d.ts +103 -0
  148. package/dist/testing/cross_backend/capability_mounts.d.ts.map +1 -0
  149. package/dist/testing/cross_backend/capability_mounts.js +428 -0
  150. package/dist/testing/cross_backend/cell_moderate.js +2 -2
  151. package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
  152. package/dist/testing/cross_backend/cell_relations.js +12 -11
  153. package/dist/testing/cross_backend/conformance_principal.d.ts +54 -0
  154. package/dist/testing/cross_backend/conformance_principal.d.ts.map +1 -0
  155. package/dist/testing/cross_backend/conformance_principal.js +283 -0
  156. package/dist/testing/cross_backend/conformance_table.d.ts +7 -56
  157. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  158. package/dist/testing/cross_backend/conformance_table.js +6 -274
  159. package/dist/testing/cross_backend/cookie_attributes.js +1 -1
  160. package/dist/testing/cross_backend/credential_deadline.d.ts.map +1 -1
  161. package/dist/testing/cross_backend/credential_deadline.js +2 -0
  162. package/dist/testing/cross_backend/credential_wire.d.ts +1 -1
  163. package/dist/testing/cross_backend/credential_wire.d.ts.map +1 -1
  164. package/dist/testing/cross_backend/db_state_diff.d.ts +72 -0
  165. package/dist/testing/cross_backend/db_state_diff.d.ts.map +1 -0
  166. package/dist/testing/cross_backend/db_state_diff.js +444 -0
  167. package/dist/testing/cross_backend/declared_skips.d.ts +68 -0
  168. package/dist/testing/cross_backend/declared_skips.d.ts.map +1 -0
  169. package/dist/testing/cross_backend/declared_skips.js +132 -0
  170. package/dist/testing/cross_backend/default_backend_configs.d.ts +3 -3
  171. package/dist/testing/cross_backend/default_spine_surface.d.ts +0 -6
  172. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  173. package/dist/testing/cross_backend/default_spine_surface.js +4 -9
  174. package/dist/testing/cross_backend/differential.d.ts +13 -5
  175. package/dist/testing/cross_backend/differential.d.ts.map +1 -1
  176. package/dist/testing/cross_backend/differential.js +35 -11
  177. package/dist/testing/cross_backend/differential_normalize.d.ts +12 -0
  178. package/dist/testing/cross_backend/differential_normalize.d.ts.map +1 -1
  179. package/dist/testing/cross_backend/differential_normalize.js +16 -0
  180. package/dist/testing/cross_backend/full_spine_mount.d.ts +1 -42
  181. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  182. package/dist/testing/cross_backend/full_spine_mount.js +45 -4
  183. package/dist/testing/cross_backend/in_process_setup.d.ts +28 -19
  184. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
  185. package/dist/testing/cross_backend/in_process_setup.js +156 -142
  186. package/dist/testing/cross_backend/login_security.d.ts +12 -0
  187. package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
  188. package/dist/testing/cross_backend/login_security.js +21 -4
  189. package/dist/testing/cross_backend/request_target_conformance_wire.d.ts +0 -2
  190. package/dist/testing/cross_backend/request_target_conformance_wire.d.ts.map +1 -1
  191. package/dist/testing/cross_backend/request_target_conformance_wire.js +3 -1
  192. package/dist/testing/cross_backend/revocation_drivers.d.ts +18 -5
  193. package/dist/testing/cross_backend/revocation_drivers.d.ts.map +1 -1
  194. package/dist/testing/cross_backend/revocation_drivers.js +18 -10
  195. package/dist/testing/cross_backend/role_grant_cross_helpers.d.ts +1 -1
  196. package/dist/testing/cross_backend/role_grant_cross_helpers.d.ts.map +1 -1
  197. package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
  198. package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +33 -1
  199. package/dist/testing/cross_backend/role_grant_participation.js +4 -4
  200. package/dist/testing/cross_backend/rpc_adversarial.js +1 -1
  201. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +3 -4
  202. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  203. package/dist/testing/cross_backend/rust_spine_consumer_surface.js +2 -2
  204. package/dist/testing/cross_backend/session_cap.d.ts +2 -2
  205. package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
  206. package/dist/testing/cross_backend/session_cap.js +22 -11
  207. package/dist/testing/cross_backend/setup.d.ts +32 -2
  208. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  209. package/dist/testing/cross_backend/setup.js +32 -1
  210. package/dist/testing/cross_backend/spine_suites.d.ts +125 -15
  211. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  212. package/dist/testing/cross_backend/spine_suites.js +459 -62
  213. package/dist/testing/cross_backend/spine_surface_constants.d.ts +1 -1
  214. package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
  215. package/dist/testing/cross_backend/spine_surface_constants.js +1 -0
  216. package/dist/testing/cross_backend/sse_round_trip.d.ts +9 -1
  217. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  218. package/dist/testing/cross_backend/sse_round_trip.js +123 -27
  219. package/dist/testing/cross_backend/standard.d.ts +2 -3
  220. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  221. package/dist/testing/cross_backend/standard.js +3 -3
  222. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  223. package/dist/testing/cross_backend/testing_backdoor.js +4 -2
  224. package/dist/testing/cross_backend/testing_credential_read.d.ts +10 -11
  225. package/dist/testing/cross_backend/testing_credential_read.d.ts.map +1 -1
  226. package/dist/testing/cross_backend/testing_credential_read.js +12 -12
  227. package/dist/testing/cross_backend/testing_reset_actions.d.ts +84 -47
  228. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  229. package/dist/testing/cross_backend/testing_reset_actions.js +95 -63
  230. package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
  231. package/dist/testing/cross_backend/testing_server_core.js +2 -3
  232. package/dist/testing/cross_backend/transport_composition.d.ts +1 -1
  233. package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
  234. package/dist/testing/cross_backend/transport_composition.js +7 -3
  235. package/dist/testing/cross_backend/ws_round_trip.d.ts +5 -0
  236. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  237. package/dist/testing/cross_backend/ws_round_trip.js +54 -8
  238. package/dist/testing/daemon_token_rotation.d.ts.map +1 -1
  239. package/dist/testing/daemon_token_rotation.js +2 -3
  240. package/dist/testing/data_exposure.d.ts.map +1 -1
  241. package/dist/testing/data_exposure.js +3 -0
  242. package/dist/testing/db.d.ts +0 -32
  243. package/dist/testing/db.d.ts.map +1 -1
  244. package/dist/testing/db.js +0 -86
  245. package/dist/testing/db_entities.d.ts +14 -0
  246. package/dist/testing/db_entities.d.ts.map +1 -1
  247. package/dist/testing/db_entities.js +17 -0
  248. package/dist/testing/db_invariant_queries.d.ts +259 -0
  249. package/dist/testing/db_invariant_queries.d.ts.map +1 -0
  250. package/dist/testing/db_invariant_queries.js +400 -0
  251. package/dist/testing/db_invariants.d.ts +106 -0
  252. package/dist/testing/db_invariants.d.ts.map +1 -0
  253. package/dist/testing/db_invariants.gen.sql.d.ts +11 -0
  254. package/dist/testing/db_invariants.gen.sql.d.ts.map +1 -0
  255. package/dist/testing/db_invariants.gen.sql.js +13 -0
  256. package/dist/testing/db_invariants.js +141 -0
  257. package/dist/testing/db_invariants.sql +152 -0
  258. package/dist/testing/describe_db.d.ts +36 -0
  259. package/dist/testing/describe_db.d.ts.map +1 -0
  260. package/dist/testing/describe_db.js +71 -0
  261. package/dist/testing/integration.d.ts +8 -12
  262. package/dist/testing/integration.d.ts.map +1 -1
  263. package/dist/testing/integration.js +13 -17
  264. package/dist/testing/integration_helpers.d.ts +1 -1
  265. package/dist/testing/integration_helpers.d.ts.map +1 -1
  266. package/dist/testing/rate_limiting.d.ts +3 -4
  267. package/dist/testing/rate_limiting.d.ts.map +1 -1
  268. package/dist/testing/rate_limiting.js +6 -5
  269. package/dist/testing/role_grant_helpers.d.ts +1 -1
  270. package/dist/testing/role_grant_helpers.d.ts.map +1 -1
  271. package/dist/testing/round_trip.d.ts.map +1 -1
  272. package/dist/testing/round_trip.js +3 -0
  273. package/dist/testing/rpc_attack_surface.d.ts +8 -6
  274. package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
  275. package/dist/testing/rpc_attack_surface.js +69 -6
  276. package/dist/testing/rpc_helpers.d.ts +1 -2
  277. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  278. package/dist/testing/rpc_helpers.js +3 -3
  279. package/dist/testing/rpc_round_trip.d.ts +3 -4
  280. package/dist/testing/rpc_round_trip.d.ts.map +1 -1
  281. package/dist/testing/rpc_round_trip.js +4 -1
  282. package/dist/testing/sse_round_trip.d.ts +3 -4
  283. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  284. package/dist/testing/sse_round_trip.js +15 -6
  285. package/dist/testing/stubs.d.ts +9 -8
  286. package/dist/testing/stubs.d.ts.map +1 -1
  287. package/dist/testing/stubs.js +20 -13
  288. package/dist/testing/test_app.d.ts +168 -0
  289. package/dist/testing/test_app.d.ts.map +1 -0
  290. package/dist/testing/test_app.js +123 -0
  291. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  292. package/dist/testing/ws_round_trip.js +3 -0
  293. package/dist/ui/ui_format.d.ts.map +1 -1
  294. package/dist/ui/ui_format.js +1 -2
  295. package/package.json +1 -1
@@ -18,15 +18,9 @@ import '../assert_dev_env.js';
18
18
  */
19
19
  import type { Logger } from '@fuzdev/fuz_util/log.ts';
20
20
  import { type RoleRegistry } from '../../auth/role_schema.js';
21
- import { type SessionOptions } from '../../auth/session_cookie.js';
22
21
  import { type RouteSpec } from '../../http/route_spec.js';
23
22
  import type { AppSurfaceSpec, RpcEndpointSpec } from '../../http/surface.js';
24
23
  import type { AppServerContext } from '../../server/app_server_context.js';
25
- /**
26
- * Session config — cookie name matches the binary's issued session cookie
27
- * (`fuz_session`) so cookie-attribute assertions + jar extraction line up.
28
- */
29
- export declare const spine_session_options: SessionOptions<string>;
30
24
  /**
31
25
  * The spine's closed role registry: built-ins plus two app roles —
32
26
  * `SPINE_CELL_EDITOR_ROLE` (no grant path; the role-shaped-`cell_grant`
@@ -1 +1 @@
1
- {"version":3,"file":"default_spine_surface.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/default_spine_surface.ts"],"names":[],"mappings":"AAAA,OA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AAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAgB3E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,YAGxB,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,gBAAgB,KAAG,KAAK,CAAC,eAAe,CAKhF,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"}
@@ -1,9 +1,9 @@
1
1
  import '../assert_dev_env.js';
2
2
  import { create_account_route_specs } from '../../auth/account_routes.js';
3
+ import { SESSION_COOKIE_NAME } from '../../auth/session_cookie.js';
3
4
  import { create_audit_log_route_specs } from '../../auth/audit_log_routes.js';
4
5
  import { create_role_registry } from '../../auth/role_schema.js';
5
6
  import { GRANT_PATH_ADMIN } from '../../auth/grant_path_schema.js';
6
- import { create_session_config } from '../../auth/session_cookie.js';
7
7
  import { create_signup_route_specs } from '../../auth/signup_routes.js';
8
8
  import { create_standard_rpc_actions } from '../../auth/standard_rpc_actions.js';
9
9
  import { create_ready_route_spec, load_expected_schema } from '../../http/common_routes.js';
@@ -15,11 +15,6 @@ import { create_test_app_surface_spec } from '../stubs.js';
15
15
  // (→ `audit_log_routes` → `hono/streaming`). Import only the constants this
16
16
  // module uses internally; callers that need a bare constant reach for the leaf.
17
17
  import { SPINE_ACCOUNT_PATH_PREFIX, SPINE_CELL_EDITOR_ROLE, SPINE_EXPECTED_SCHEMA_URL, SPINE_PARTICIPANT_ROLE, SPINE_RPC_PATH } from './spine_surface_constants.js';
18
- /**
19
- * Session config — cookie name matches the binary's issued session cookie
20
- * (`fuz_session`) so cookie-attribute assertions + jar extraction line up.
21
- */
22
- export const spine_session_options = create_session_config('fuz_session');
23
18
  /**
24
19
  * The spine's closed role registry: built-ins plus two app roles —
25
20
  * `SPINE_CELL_EDITOR_ROLE` (no grant path; the role-shaped-`cell_grant`
@@ -66,7 +61,7 @@ export const spine_rpc_endpoints = (ctx) => [
66
61
  export const create_spine_route_specs = (ctx) => [
67
62
  ...prefix_route_specs(SPINE_ACCOUNT_PATH_PREFIX, [
68
63
  ...create_account_route_specs(ctx.deps, {
69
- session_options: spine_session_options,
64
+ session_cookie_name: SESSION_COOKIE_NAME,
70
65
  // Honor the limiters the server was assembled with (on `AppServerContext`
71
66
  // per the `login_ip_rate_limiter` / `login_account_rate_limiter` TSDoc)
72
67
  // rather than hardcoding `null`. The standard spine binary passes `null`
@@ -81,7 +76,7 @@ export const create_spine_route_specs = (ctx) => [
81
76
  bootstrap_status: ctx.bootstrap_status
82
77
  }),
83
78
  ...create_signup_route_specs(ctx.deps, {
84
- session_options: spine_session_options,
79
+ session_cookie_name: SESSION_COOKIE_NAME,
85
80
  signup_ip_rate_limiter: null,
86
81
  signup_account_rate_limiter: null,
87
82
  // Disable the denial floor so the identity-parity suite's accepted
@@ -117,7 +112,7 @@ export const create_spine_ready_route_spec = (log) => create_ready_route_spec({
117
112
  * 409 against the route's declared error schema.
118
113
  */
119
114
  export const create_spine_surface_spec = () => create_test_app_surface_spec({
120
- session_options: spine_session_options,
115
+ session_cookie_name: SESSION_COOKIE_NAME,
121
116
  create_route_specs: create_spine_route_specs,
122
117
  rpc_endpoints: spine_rpc_endpoints,
123
118
  bootstrap: { mode: 'surface_only' },
@@ -1,9 +1,9 @@
1
1
  import '../assert_dev_env.js';
2
2
  import type { AppSurfaceSpec } from '../../http/surface.js';
3
- import type { SessionOptions } from '../../auth/session_cookie.js';
4
3
  import type { RpcEndpointsSuiteOption } from '../rpc_helpers.js';
5
4
  import type { ConformanceCase } from './conformance_case.js';
6
- import { type ConformancePrincipalConfig } from './conformance_table.js';
5
+ import type { ConformancePrincipalConfig } from './conformance_principal.js';
6
+ import { type DbStateProbe } from './db_state_diff.js';
7
7
  import type { SetupTest } from './setup.js';
8
8
  import type { WsEndpointTarget } from './ws_endpoint.js';
9
9
  /**
@@ -26,6 +26,13 @@ export interface DifferentialBackend {
26
26
  * suite throws at registration.
27
27
  */
28
28
  readonly ws?: WsEndpointTarget;
29
+ /**
30
+ * Reads the backend's database around each case, so the states the two
31
+ * backends are left in are compared too (module doc). Set on both or
32
+ * neither — set on one alone, the suite throws at registration. The suite
33
+ * closes it once its cases have run.
34
+ */
35
+ readonly db_state?: DbStateProbe;
29
36
  }
30
37
  /**
31
38
  * What a ledger entry matches: cases by name, or every case on a method —
@@ -65,7 +72,8 @@ export interface KnownDivergencePath {
65
72
  *
66
73
  * `what_differs` lists the normalized-response paths that differ
67
74
  * (`DifferentialDiff.path` — `status`, `headers.<name>`, `session_cookie`,
68
- * `body.error.data.reason`), each optionally with the value each side shows
75
+ * `body.error.data.reason`, and with `db_state` probes the database's,
76
+ * `db.audit_log[0].metadata.reason`), each optionally with the value each side shows
69
77
  * (`KnownDivergencePath`). A matched case may differ there and nowhere else.
70
78
  * An entry naming cases must still differ on each of them; one naming
71
79
  * methods, on at least one of its cases.
@@ -99,8 +107,8 @@ export interface DifferentialConformanceOptions {
99
107
  * (`resolve_conformance_rpc_endpoints`).
100
108
  */
101
109
  readonly live_rpc_endpoints?: RpcEndpointsSuiteOption;
102
- /** Session options — needed to resolve the `rpc_endpoints` factory form. */
103
- readonly session_options: SessionOptions<string>;
110
+ /** The session cookie's name — needed to resolve the `rpc_endpoints` factory form. */
111
+ readonly session_cookie_name: string;
104
112
  /** Maps the `role_holder` / `wrong_role` principals to seeded usernames. */
105
113
  readonly principals?: ConformancePrincipalConfig;
106
114
  /** The tracked divergences these cases may show. */
@@ -1 +1 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,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5D,wEAAwE;IACxE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAgBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,6BAA6B,GACzC,OAAO,aAAa,CAAC,eAAe,CAAC,EACrC,QAAQ,aAAa,CAAC,eAAe,CAAC,KACpC,KAAK,CAAC,MAAM,CA0Bd,CAAC;AA6BF;;;;;;GAMG;AACH,eAAO,MAAM,uCAAuC,GACnD,SAAS,8BAA8B,KACrC,IA4HF,CAAC"}
@@ -27,6 +27,14 @@ import '../assert_dev_env.js';
27
27
  * letting a server choose would read as a `content-encoding` and `vary`
28
28
  * difference on every case.
29
29
  *
30
+ * With a `db_state` probe on both backends (`create_db_state_probe`), each
31
+ * case also compares what it left in the databases: each probe marks the
32
+ * audit sequence before the case's fixture and reads the normalized state
33
+ * after its answer (`normalize_db_state`), and the two states' differences
34
+ * join the answer's under `db.` (`diff_db_states`), so a write one backend
35
+ * makes and the other doesn't fails the case like an answer would. Both
36
+ * backends must then be on PostgreSQL the test process reaches.
37
+ *
30
38
  * A difference that is tracked and accepted goes in the **known-divergence
31
39
  * ledger** (`KnownDivergence`), matched by case names or by methods, naming
32
40
  * the paths that differ (`what_differs`), each optionally with the value each
@@ -47,9 +55,10 @@ import '../assert_dev_env.js';
47
55
  *
48
56
  * @module
49
57
  */
50
- import { assert, describe, test } from 'vitest';
58
+ import { afterAll, assert, describe, test } from 'vitest';
51
59
  import { is_ws_conformance_case, resolve_conformance_rpc_endpoints, send_conformance_case } from './conformance_table.js';
52
60
  import { diff_differential_responses, differential_path_covers, format_differential_diffs, normalize_differential_response } from './differential_normalize.js';
61
+ import { diff_db_states } from './db_state_diff.js';
53
62
  /**
54
63
  * Headers every HTTP request the differential sends carries, beneath the
55
64
  * principal's: `accept-encoding: identity`, so each backend answers
@@ -136,17 +145,29 @@ export const describe_differential_conformance_tests = (options) => {
136
145
  throw new Error(`differential: backend '${(a.ws ? b : a).name}' has no ws target while ` +
137
146
  `'${(a.ws ? a : b).name}' does — set ws on both backends or neither.`);
138
147
  }
148
+ if ((a.db_state === undefined) !== (b.db_state === undefined)) {
149
+ throw new Error(`differential: backend '${(a.db_state ? b : a).name}' has no db_state probe while ` +
150
+ `'${(a.db_state ? a : b).name}' does — set db_state on both backends or neither.`);
151
+ }
139
152
  const over_ws = a.ws !== undefined;
140
153
  const cases = over_ws ? options.cases.filter(is_ws_conformance_case) : options.cases;
141
- const send = async (backend, c) => normalize_differential_response(await send_conformance_case(c, {
142
- fixture: await backend.setup_test(),
143
- surface_source,
144
- ...(principals && { principals }),
145
- resolved_rpc_endpoints,
146
- request_headers: DIFFERENTIAL_REQUEST_HEADERS,
147
- ...(backend.ws && { ws: backend.ws })
148
- }), options.session_options.cookie_name);
154
+ const send = async (backend, c) => {
155
+ const mark = backend.db_state ? await backend.db_state.mark() : null;
156
+ const response = normalize_differential_response(await send_conformance_case(c, {
157
+ fixture: await backend.setup_test(),
158
+ surface_source,
159
+ ...(principals && { principals }),
160
+ resolved_rpc_endpoints,
161
+ request_headers: DIFFERENTIAL_REQUEST_HEADERS,
162
+ ...(backend.ws && { ws: backend.ws })
163
+ }), options.session_cookie_name);
164
+ const db_state = backend.db_state && mark ? await backend.db_state.read(mark) : null;
165
+ return { response, db_state };
166
+ };
149
167
  describe(options.suite_name ?? 'differential conformance', () => {
168
+ afterAll(async () => {
169
+ await Promise.all([a.db_state?.close(), b.db_state?.close()]);
170
+ });
150
171
  // per entry: the cases it matched, the ones that ran to a diff, and
151
172
  // whether any of them showed it
152
173
  const matched = new Map();
@@ -163,8 +184,11 @@ export const describe_differential_conformance_tests = (options) => {
163
184
  ? `${c.name} [known: ${known.map((d) => d.tracking_id).join(', ')}]`
164
185
  : c.name;
165
186
  test(label, async () => {
166
- const [response_a, response_b] = await Promise.all([send(a, c), send(b, c)]);
167
- const diffs = diff_differential_responses(response_a, response_b);
187
+ const [sent_a, sent_b] = await Promise.all([send(a, c), send(b, c)]);
188
+ const diffs = diff_differential_responses(sent_a.response, sent_b.response);
189
+ if (sent_a.db_state && sent_b.db_state) {
190
+ diffs.push(...diff_db_states(sent_a.db_state, sent_b.db_state));
191
+ }
168
192
  for (const d of known) {
169
193
  const names = ran.get(d) ?? new Set();
170
194
  names.add(c.name);
@@ -134,6 +134,18 @@ export interface DifferentialDiff {
134
134
  readonly a: unknown;
135
135
  readonly b: unknown;
136
136
  }
137
+ /**
138
+ * Every place two JSON values differ, one entry per leaf path under `path`,
139
+ * by the rules `DifferentialDiff` describes — what
140
+ * `diff_differential_responses` runs over two bodies, for comparing any other
141
+ * normalized value the same way.
142
+ *
143
+ * @param path - the root path the entries are named under
144
+ * @param a - one side's value
145
+ * @param b - the other's
146
+ * @returns the differences, empty when the values are equal
147
+ */
148
+ export declare const diff_differential_values: (path: string, a: unknown, b: unknown) => Array<DifferentialDiff>;
137
149
  /**
138
150
  * Every place two normalized responses differ, in a stable order: status,
139
151
  * then header names, then the session cookie's effect, then the body
@@ -1 +1 @@
1
- {"version":3,"file":"differential_normalize.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/differential_normalize.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,mBAAmB,GAAG,cAA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a,CAAC,gBAAgB,CAAC,EACtC,QAAQ;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAChD,MAOU,CAAC"}
1
+ {"version":3,"file":"differential_normalize.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/differential_normalize.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,mBAAmB,GAAG,cAAc,CAAC;CAC9D;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAMvD,CAAC;AAEF,4EAA4E;AAC5E,MAAM,WAAW,oBAAoB;IACpC,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC,oBAAoB,CAUvE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC3C,UAAU,uBAAuB,EACjC,qBAAqB,MAAM,KACzB,oBA4CF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;CACpB;AA6BD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GACpC,MAAM,MAAM,EACZ,GAAG,OAAO,EACV,GAAG,OAAO,KACR,KAAK,CAAC,gBAAgB,CAIxB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,GACvC,GAAG,oBAAoB,EACvB,GAAG,oBAAoB,KACrB,KAAK,CAAC,gBAAgB,CAexB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,KAAG,OAEoB,CAAC;AAE9F;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GACrC,OAAO,aAAa,CAAC,gBAAgB,CAAC,EACtC,QAAQ;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAChD,MAOU,CAAC"}
@@ -110,6 +110,22 @@ const diff_values = (path, a, b, out) => {
110
110
  if (!Object.is(a, b))
111
111
  out.push({ path, a, b });
112
112
  };
113
+ /**
114
+ * Every place two JSON values differ, one entry per leaf path under `path`,
115
+ * by the rules `DifferentialDiff` describes — what
116
+ * `diff_differential_responses` runs over two bodies, for comparing any other
117
+ * normalized value the same way.
118
+ *
119
+ * @param path - the root path the entries are named under
120
+ * @param a - one side's value
121
+ * @param b - the other's
122
+ * @returns the differences, empty when the values are equal
123
+ */
124
+ export const diff_differential_values = (path, a, b) => {
125
+ const out = [];
126
+ diff_values(path, a, b, out);
127
+ return out;
128
+ };
113
129
  /**
114
130
  * Every place two normalized responses differ, in a stable order: status,
115
131
  * then header names, then the session cookie's effect, then the body
@@ -1,45 +1,4 @@
1
1
  import '../assert_dev_env.js';
2
- /**
3
- * The **full** live RPC mount for fuz_app's own spine test binary — the
4
- * complete action set `testing_spine_server.ts` exposes on a single RPC
5
- * endpoint, in one place.
6
- *
7
- * Where `default_spine_surface.ts` defines the **declared** surface
8
- * (`create_spine_surface_spec` / `spine_rpc_endpoints` — the
9
- * `create_standard_rpc_actions` bundle the spec-derived suites
10
- * auto-enumerate), this module defines its superset: the standard bundle
11
- * **plus** the families the binary live-mounts but keeps off the declared
12
- * surface —
13
- *
14
- * - the `_testing_*` daemon-token backdoors (`create_testing_actions`),
15
- * - the full cell verb set (CRUD + grant + field + item + audit),
16
- * - the opt-in `actor_lookup` / `actor_search` resolvers,
17
- * - the `_testing_origin_check` probe the origin conformance table drives,
18
- * - the `_testing_credential_read` probe the credential conformance table drives,
19
- * - the `_testing_shorten_credential_expiry` seam the credential-deadline
20
- * suite drives,
21
- * - the `_testing_room_evict` seam the rooms suite drives, over the room
22
- * registry the WebSocket-only room verbs run on,
23
- * - the `_testing_action_manifest` backdoor, appended last (it dumps the live
24
- * method set for the cross-impl manifest-parity gate, so it must enumerate
25
- * every method above it — and the room verbs, as `transport: 'ws'`).
26
- *
27
- * Single-sourcing the mount here lets the binary, the in-process parity
28
- * setup, and the `spine_method_coverage` reconciliation test all build the
29
- * same list — so a method can never be mounted in one place and forgotten
30
- * in another.
31
- *
32
- * The binary's WS endpoint serves the same list: `build_full_spine_mount`
33
- * builds it once and hands the WS mount the protocol actions plus every RPC
34
- * action, twinning the Rust `testing_spine_stub`, which compiles one action
35
- * registry and serves it on both transports — plus the room verbs and their
36
- * notifications, which only the WS endpoint serves (the stub's `ws_only`
37
- * specs, which its RPC dispatcher refuses). The reconciliation test
38
- * enumerates `build_full_spine_rpc_actions` with stub deps and asserts the live method set equals the tagged coverage
39
- * manifest; see `src/test/cross_backend/spine_method_coverage.ts`.
40
- *
41
- * @module
42
- */
43
2
  import type { Action, RpcAction } from '../../actions/action_types.js';
44
3
  import { ConnectionRegistry } from '../../actions/connection_registry.js';
45
4
  import { RoomRegistry } from '../../actions/room_registry.js';
@@ -81,7 +40,7 @@ export interface FullSpineMountOptions {
81
40
  * the off-surface families (`_testing_*` backdoors, cells, actor resolvers).
82
41
  *
83
42
  * Mirrors the previous inline assembly in `testing_spine_server.ts` exactly —
84
- * `session_options` is pinned to `spine_session_options` (the binary's cookie
43
+ * `session_cookie_name` is pinned to `SESSION_COOKIE_NAME` (the binary's cookie
85
44
  * config) and `roles` to `spine_roles` (carrying `cell_editor`), so the only
86
45
  * runtime-varying inputs are the daemon-token state and the room registry.
87
46
  *
@@ -1 +1 @@
1
- {"version":3,"file":"full_spine_mount.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/full_spine_mount.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAS1E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAMnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA2C7D;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GAAI,aAAa,kBAAkB,K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O,MAAM,0BAA0B,GAAI,aAAa,kBAAkB,KAAG,YAC1B,CAAC;AAEpD,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACrC;;;;;;OAMG;IACH,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;IAC9C;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;CACtC;AASD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,GACxC,MAAM,OAAO,EACb,SAAS,qBAAqB,KAC5B,KAAK,CAAC,SAAS,CAAwD,CAAC;AAwE3E,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,GAClC,MAAM,OAAO,EACb,SAAS,qBAAqB,KAC5B,cAYF,CAAC;AAaF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,QAAO,KAAK,CAAC,eAAe,CAOvE,CAAC"}
@@ -1,4 +1,46 @@
1
1
  import '../assert_dev_env.js';
2
+ /**
3
+ * The **full** live RPC mount for fuz_app's own spine test binary — the
4
+ * complete action set `testing_spine_server.ts` exposes on a single RPC
5
+ * endpoint, in one place.
6
+ *
7
+ * Where `default_spine_surface.ts` defines the **declared** surface
8
+ * (`create_spine_surface_spec` / `spine_rpc_endpoints` — the
9
+ * `create_standard_rpc_actions` bundle the spec-derived suites
10
+ * auto-enumerate), this module defines its superset: the standard bundle
11
+ * **plus** the families the binary live-mounts but keeps off the declared
12
+ * surface —
13
+ *
14
+ * - the `_testing_*` daemon-token backdoors (`create_testing_actions`),
15
+ * - the full cell verb set (CRUD + grant + field + item + audit),
16
+ * - the opt-in `actor_lookup` / `actor_search` resolvers,
17
+ * - the `_testing_origin_check` probe the origin conformance table drives,
18
+ * - the `_testing_credential_read` probe the credential conformance table drives,
19
+ * - the `_testing_shorten_credential_expiry` seam the credential-deadline
20
+ * suite drives,
21
+ * - the `_testing_room_evict` seam the rooms suite drives, over the room
22
+ * registry the WebSocket-only room verbs run on,
23
+ * - the `_testing_action_manifest` backdoor, appended last (it dumps the live
24
+ * method set for the cross-impl manifest-parity gate, so it must enumerate
25
+ * every method above it — and the room verbs, as `transport: 'ws'`).
26
+ *
27
+ * Single-sourcing the mount here lets the binary, the in-process parity
28
+ * setup, and the `spine_method_coverage` reconciliation test all build the
29
+ * same list — so a method can never be mounted in one place and forgotten
30
+ * in another.
31
+ *
32
+ * The binary's WS endpoint serves the same list: `build_full_spine_mount`
33
+ * builds it once and hands the WS mount the protocol actions plus every RPC
34
+ * action, twinning the Rust `testing_spine_stub`, which compiles one action
35
+ * registry and serves it on both transports — plus the room verbs and their
36
+ * notifications, which only the WS endpoint serves (the stub's `ws_only`
37
+ * specs, which its RPC dispatcher refuses). The reconciliation test
38
+ * enumerates `build_full_spine_rpc_actions` with stub deps and asserts the live method set equals the tagged coverage
39
+ * manifest; see `src/test/cross_backend/spine_method_coverage.ts`.
40
+ *
41
+ * @module
42
+ */
43
+ import { SESSION_COOKIE_NAME } from '../../auth/session_cookie.js';
2
44
  import { ConnectionRegistry } from '../../actions/connection_registry.js';
3
45
  import { peer_ping_action } from '../../actions/peer_ping.js';
4
46
  import { protocol_actions } from '../../actions/protocol.js';
@@ -18,7 +60,7 @@ import { create_testing_credential_read_action } from './testing_credential_read
18
60
  import { create_testing_origin_check_action } from './testing_origin_check.js';
19
61
  import { test_cell_gated_create_authorize } from './test_cell_gated_create_authorize.js';
20
62
  import { test_cell_grant_steward_revoke_authorize } from './test_cell_grant_steward_revoke_authorize.js';
21
- import { spine_roles, spine_session_options } from './default_spine_surface.js';
63
+ import { spine_roles } from './default_spine_surface.js';
22
64
  import { SPINE_RPC_PATH } from './spine_surface_constants.js';
23
65
  /**
24
66
  * The domain tables the spine binary's `_testing_reset` empties beside the
@@ -56,7 +98,7 @@ export const create_spine_room_registry = (connections) => new RoomRegistry(conn
56
98
  * the off-surface families (`_testing_*` backdoors, cells, actor resolvers).
57
99
  *
58
100
  * Mirrors the previous inline assembly in `testing_spine_server.ts` exactly —
59
- * `session_options` is pinned to `spine_session_options` (the binary's cookie
101
+ * `session_cookie_name` is pinned to `SESSION_COOKIE_NAME` (the binary's cookie
60
102
  * config) and `roles` to `spine_roles` (carrying `cell_editor`), so the only
61
103
  * runtime-varying inputs are the daemon-token state and the room registry.
62
104
  *
@@ -79,7 +121,6 @@ const build_full_spine_actions = (deps, options) => {
79
121
  const actions = [
80
122
  ...create_standard_rpc_actions(deps, { roles: spine_roles }),
81
123
  ...create_testing_actions(deps, {
82
- session_options: spine_session_options,
83
124
  daemon_token_state: options.daemon_token_state,
84
125
  reset_state: create_reset_spine_domain_state(room_registry)
85
126
  }),
@@ -107,7 +148,7 @@ const build_full_spine_actions = (deps, options) => {
107
148
  // cookie name — out of `create_testing_actions` for the same reason
108
149
  create_testing_credential_read_action({
109
150
  keyring: deps.keyring,
110
- session_options: spine_session_options
151
+ session_cookie_name: SESSION_COOKIE_NAME
111
152
  }),
112
153
  // the credential-deadline suite's shorten-only seam — kept out of
113
154
  // `create_testing_actions` for the same reason
@@ -3,8 +3,8 @@ import type { RouteSpec } from '../../http/route_spec.js';
3
3
  import type { AppSurfaceSpec } from '../../http/surface.js';
4
4
  import type { BootstrapServerOptions } from '../../server/app_server.js';
5
5
  import type { AppServerContext } from '../../server/app_server_context.js';
6
- import type { SessionOptions } from '../../auth/session_cookie.js';
7
- import { type CreateTestAppOptions, type SuiteAppOptions } from '../app_server.js';
6
+ import { type CreateTestAppOptions, type SuiteAppOptions } from '../test_app.js';
7
+ import { type DbInvariantExclusions } from '../db_invariant_queries.js';
8
8
  import { type RpcEndpointsSuiteOption } from '../rpc_helpers.js';
9
9
  import { type BackendCapabilities } from './capabilities.js';
10
10
  import { type SetupTest, type ExtraAccountSpec } from './setup.js';
@@ -49,9 +49,17 @@ export interface InProcessSetupOptions extends CreateTestAppOptions {
49
49
  * `_testing_reset` cradle so suite bodies read
50
50
  * `fixture.extra_accounts[username]` uniformly regardless of transport.
51
51
  *
52
+ * The keeper holds `options.roles`, or `create_test_app`'s default when
53
+ * omitted (`DEFAULT_TEST_KEEPER_ROLES` — keeper and admin, as a production
54
+ * bootstrap and the cross-process reset seed it). The database invariant
55
+ * check is the test app's: registered when the fixture is built inside a
56
+ * test, less `options.exclude_db_invariants`, and run on demand by
57
+ * `fixture.assert_db_invariants`. The exclusions are validated here, before
58
+ * any test runs.
59
+ *
52
60
  * The describe-level `auth_integration_truncate_tables` / WASM database
53
- * cache lifecycle stays in `create_default_db_factory` / `create_describe_db`
54
- * (`testing/db.ts`) — `default_in_process_setup` doesn't manage db state
61
+ * cache lifecycle stays in `create_default_db_factory` (`testing/db.ts`) /
62
+ * `create_describe_db` (`testing/describe_db.ts`) — `default_in_process_setup` doesn't manage db state
55
63
  * beyond what `create_test_app` already does.
56
64
  */
57
65
  export declare const default_in_process_setup: (options: InProcessSetupOptions) => SetupTest;
@@ -62,7 +70,7 @@ export declare const default_in_process_setup: (options: InProcessSetupOptions)
62
70
  * `{setup_test, surface_source, capabilities}` bundle.
63
71
  */
64
72
  export interface DefaultInProcessSuiteOptions {
65
- session_options: SessionOptions<string>;
73
+ session_cookie_name: string;
66
74
  create_route_specs: (ctx: AppServerContext) => Array<RouteSpec>;
67
75
  rpc_endpoints?: RpcEndpointsSuiteOption;
68
76
  /**
@@ -75,14 +83,10 @@ export interface DefaultInProcessSuiteOptions {
75
83
  app_options?: SuiteAppOptions;
76
84
  /**
77
85
  * Additional roles to grant the bootstrapped keeper alongside
78
- * `ROLE_KEEPER` — additive, never replaces. The keeper account
79
- * always holds `ROLE_KEEPER` (otherwise daemon-token auth breaks);
80
- * pass extras here for suites that need additional role coverage.
81
- *
82
- * Admin-suite consumers pass `[ROLE_ADMIN]` so the default keeper
83
- * can hit admin-gated RPC methods.
84
- * `describe_standard_admin_integration_tests` and
85
- * `describe_audit_completeness_tests` need this.
86
+ * `DEFAULT_TEST_KEEPER_ROLES` (`ROLE_KEEPER` and `ROLE_ADMIN`, what a
87
+ * production bootstrap grants) — additive, never replaces. Pass extras
88
+ * here for suites that need additional role coverage; listing
89
+ * `ROLE_ADMIN` again is harmless.
86
90
  */
87
91
  extra_keeper_roles?: Array<string>;
88
92
  /**
@@ -103,6 +107,11 @@ export interface DefaultInProcessSuiteOptions {
103
107
  * `CrossProcessSetupOptions.reject_unknown_audit_metadata_keys`.
104
108
  */
105
109
  reject_unknown_audit_metadata_keys?: boolean;
110
+ /**
111
+ * Database invariants left unchecked after each test, each with its reason
112
+ * — see `CrossProcessSetupOptions.exclude_db_invariants`.
113
+ */
114
+ exclude_db_invariants?: DbInvariantExclusions;
106
115
  /**
107
116
  * Pre-built `AppSurfaceSpec` — overrides the default which calls
108
117
  * `create_test_app_surface_spec` against the same factory inputs.
@@ -115,7 +124,7 @@ export interface DefaultInProcessSuiteOptions {
115
124
  * Build the full in-process suite bundle in a single helper invocation.
116
125
  * Output covers `{setup_test, surface_source, capabilities}` plus every
117
126
  * factory input the Tier 1 suites read at their top level
118
- * (`session_options`, `create_route_specs`, `rpc_endpoints`), and the
127
+ * (`session_cookie_name`, `create_route_specs`, `rpc_endpoints`), and the
119
128
  * integration suite's `base_url` (`null`, no socket) and `max_body_bytes`
120
129
  * (`app_options.max_body_size`, `app_options.host_gate`) — so the call site spreads once and adds
121
130
  * only suite-specific extras (`roles`, `skip_routes`, `input_overrides`,
@@ -124,7 +133,7 @@ export interface DefaultInProcessSuiteOptions {
124
133
  * ```ts
125
134
  * // Suite-extras-free call: helper output is the entire options bag.
126
135
  * describe_round_trip_validation(default_in_process_suite_options({
127
- * session_options,
136
+ * session_cookie_name,
128
137
  * create_route_specs,
129
138
  * rpc_endpoints: [rpc_endpoint_spec],
130
139
  * }));
@@ -132,14 +141,14 @@ export interface DefaultInProcessSuiteOptions {
132
141
  * // With suite-specific extras: spread and add.
133
142
  * describe_standard_admin_integration_tests({
134
143
  * ...default_in_process_suite_options({
135
- * session_options, create_route_specs, rpc_endpoints,
136
- * extra_keeper_roles: [ROLE_ADMIN],
144
+ * session_cookie_name, create_route_specs, rpc_endpoints,
145
+ * extra_keeper_roles: [MY_APP_ROLE],
137
146
  * }),
138
147
  * roles,
139
148
  * });
140
149
  * ```
141
150
  *
142
- * Suites that don't read `session_options` / `rpc_endpoints` at their
151
+ * Suites that don't read `session_cookie_name` / `rpc_endpoints` at their
143
152
  * top level (`round_trip`, `data_exposure`) accept the spread anyway —
144
153
  * excess properties on spread sources aren't checked by TS, and the
145
154
  * uniform shape keeps consumer call sites mechanical.
@@ -148,7 +157,7 @@ export declare const default_in_process_suite_options: <const O extends DefaultI
148
157
  setup_test: SetupTest;
149
158
  surface_source: AppSurfaceSpec;
150
159
  capabilities: BackendCapabilities;
151
- session_options: O["session_options"];
160
+ session_cookie_name: O["session_cookie_name"];
152
161
  create_route_specs: O["create_route_specs"];
153
162
  rpc_endpoints: O["rpc_endpoints"];
154
163
  base_url: null;
@@ -1 +1 @@
1
- {"version":3,"file":"in_process_setup.d.ts","sourceRoot":"","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;AAanE,OAAO,EAIN,KAAK,oBAAoB,EACzB,KAAK,eAAe,EAEpB,MAAM,kBAAkB,CAAC;AAE1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