@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.
- package/README.md +2 -0
- package/dist/actions/CLAUDE.md +535 -1223
- package/dist/actions/action_codegen.d.ts +1 -1
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +3 -2
- package/dist/actions/connection_closer.d.ts +11 -9
- package/dist/actions/connection_closer.d.ts.map +1 -1
- package/dist/actions/connection_closer.js +11 -9
- package/dist/actions/frontend_rpc_client.d.ts +1 -1
- package/dist/actions/register_action_ws.d.ts +14 -1
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +2 -1
- package/dist/actions/ws_socket_session.d.ts +9 -1
- package/dist/actions/ws_socket_session.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.js +43 -19
- package/dist/auth/CLAUDE.md +430 -1024
- package/dist/auth/account_queries.d.ts +1 -1
- package/dist/auth/account_queries.js +1 -1
- package/dist/auth/account_routes.d.ts +9 -8
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +78 -75
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +32 -28
- package/dist/auth/api_token.d.ts +20 -3
- package/dist/auth/api_token.d.ts.map +1 -1
- package/dist/auth/api_token.js +28 -9
- package/dist/auth/api_token_queries.d.ts +2 -2
- package/dist/auth/api_token_queries.js +2 -2
- package/dist/auth/audit_emitter.d.ts +75 -84
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +83 -71
- package/dist/auth/audit_log_schema.d.ts +25 -14
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +23 -8
- package/dist/auth/auth_guard_resolver.d.ts +1 -1
- package/dist/auth/auth_guard_resolver.js +1 -1
- package/dist/auth/bearer_auth.d.ts +2 -5
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +4 -13
- package/dist/auth/bootstrap_account.d.ts +42 -26
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +36 -19
- package/dist/auth/bootstrap_routes.d.ts +20 -21
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +26 -31
- package/dist/auth/bootstrap_token_store.d.ts +3 -4
- package/dist/auth/bootstrap_token_store.d.ts.map +1 -1
- package/dist/auth/bootstrap_token_store.js +1 -1
- package/dist/auth/daemon_token.d.ts +5 -1
- package/dist/auth/daemon_token.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.d.ts +12 -8
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +15 -21
- package/dist/auth/deps.d.ts +19 -5
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/deps.js +3 -2
- package/dist/auth/invite_queries.d.ts +51 -3
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +81 -6
- package/dist/auth/invite_schema.d.ts +2 -1
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/middleware.d.ts +2 -3
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +3 -3
- package/dist/auth/request_context.d.ts +3 -3
- package/dist/auth/request_context.js +3 -3
- package/dist/auth/resolved_auth.d.ts +7 -7
- package/dist/auth/resolved_auth.d.ts.map +1 -1
- package/dist/auth/resolved_auth.js +4 -4
- package/dist/auth/role_grant_offer_actions.d.ts +27 -3
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +42 -35
- package/dist/auth/role_grant_offer_queries.d.ts +60 -4
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +79 -5
- package/dist/auth/role_grant_queries.d.ts +3 -52
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +5 -80
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +11 -22
- package/dist/auth/session_cookie.d.ts +82 -174
- package/dist/auth/session_cookie.d.ts.map +1 -1
- package/dist/auth/session_cookie.js +80 -130
- package/dist/auth/session_middleware.d.ts +8 -17
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +14 -23
- package/dist/auth/session_queries.d.ts +15 -17
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +28 -20
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +93 -43
- package/dist/db/CLAUDE.md +5 -3
- package/dist/db/sql_columns.d.ts +1 -1
- package/dist/db/sql_columns.js +1 -1
- package/dist/dev/setup.d.ts +3 -1
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +3 -1
- package/dist/http/CLAUDE.md +315 -763
- package/dist/http/db_routes.d.ts +8 -23
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +73 -73
- package/dist/http/origin.d.ts +7 -8
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/origin.js +7 -8
- package/dist/http/pending_effects.d.ts +118 -6
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/pending_effects.js +114 -6
- package/dist/http/route_result.d.ts +1 -1
- package/dist/http/route_spec.d.ts +14 -11
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/realtime/sse.d.ts +4 -23
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +4 -25
- package/dist/server/app_backend.d.ts +4 -5
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +3 -1
- package/dist/server/app_server.d.ts +80 -16
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +113 -31
- package/dist/server/app_server_context.d.ts +1 -2
- package/dist/server/app_server_context.d.ts.map +1 -1
- package/dist/server/env.js +2 -2
- package/dist/testing/CLAUDE.md +265 -796
- package/dist/testing/admin_integration.d.ts +2 -3
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +3 -3
- package/dist/testing/adversarial_404.d.ts +6 -1
- package/dist/testing/adversarial_404.d.ts.map +1 -1
- package/dist/testing/adversarial_404.js +38 -17
- package/dist/testing/app_server.d.ts +23 -148
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +53 -131
- package/dist/testing/attack_surface.d.ts +1 -1
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/audit_completeness.d.ts +2 -3
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +1 -1
- package/dist/testing/audit_drift_guard.d.ts +11 -6
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +15 -8
- package/dist/testing/cross_backend/audit_cross_helpers.d.ts +12 -9
- package/dist/testing/cross_backend/audit_cross_helpers.d.ts.map +1 -1
- package/dist/testing/cross_backend/audit_cross_helpers.js +13 -14
- package/dist/testing/cross_backend/capabilities.d.ts +9 -6
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- package/dist/testing/cross_backend/capabilities.js +11 -7
- package/dist/testing/cross_backend/capability_mounts.d.ts +103 -0
- package/dist/testing/cross_backend/capability_mounts.d.ts.map +1 -0
- package/dist/testing/cross_backend/capability_mounts.js +428 -0
- package/dist/testing/cross_backend/cell_moderate.js +2 -2
- package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_relations.js +12 -11
- package/dist/testing/cross_backend/conformance_principal.d.ts +54 -0
- package/dist/testing/cross_backend/conformance_principal.d.ts.map +1 -0
- package/dist/testing/cross_backend/conformance_principal.js +283 -0
- package/dist/testing/cross_backend/conformance_table.d.ts +7 -56
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +6 -274
- package/dist/testing/cross_backend/cookie_attributes.js +1 -1
- package/dist/testing/cross_backend/credential_deadline.d.ts.map +1 -1
- package/dist/testing/cross_backend/credential_deadline.js +2 -0
- package/dist/testing/cross_backend/credential_wire.d.ts +1 -1
- package/dist/testing/cross_backend/credential_wire.d.ts.map +1 -1
- package/dist/testing/cross_backend/db_state_diff.d.ts +72 -0
- package/dist/testing/cross_backend/db_state_diff.d.ts.map +1 -0
- package/dist/testing/cross_backend/db_state_diff.js +444 -0
- package/dist/testing/cross_backend/declared_skips.d.ts +68 -0
- package/dist/testing/cross_backend/declared_skips.d.ts.map +1 -0
- package/dist/testing/cross_backend/declared_skips.js +132 -0
- package/dist/testing/cross_backend/default_backend_configs.d.ts +3 -3
- package/dist/testing/cross_backend/default_spine_surface.d.ts +0 -6
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +4 -9
- package/dist/testing/cross_backend/differential.d.ts +13 -5
- package/dist/testing/cross_backend/differential.d.ts.map +1 -1
- package/dist/testing/cross_backend/differential.js +35 -11
- package/dist/testing/cross_backend/differential_normalize.d.ts +12 -0
- package/dist/testing/cross_backend/differential_normalize.d.ts.map +1 -1
- package/dist/testing/cross_backend/differential_normalize.js +16 -0
- package/dist/testing/cross_backend/full_spine_mount.d.ts +1 -42
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +45 -4
- package/dist/testing/cross_backend/in_process_setup.d.ts +28 -19
- package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/in_process_setup.js +156 -142
- package/dist/testing/cross_backend/login_security.d.ts +12 -0
- package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
- package/dist/testing/cross_backend/login_security.js +21 -4
- package/dist/testing/cross_backend/request_target_conformance_wire.d.ts +0 -2
- package/dist/testing/cross_backend/request_target_conformance_wire.d.ts.map +1 -1
- package/dist/testing/cross_backend/request_target_conformance_wire.js +3 -1
- package/dist/testing/cross_backend/revocation_drivers.d.ts +18 -5
- package/dist/testing/cross_backend/revocation_drivers.d.ts.map +1 -1
- package/dist/testing/cross_backend/revocation_drivers.js +18 -10
- package/dist/testing/cross_backend/role_grant_cross_helpers.d.ts +1 -1
- package/dist/testing/cross_backend/role_grant_cross_helpers.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +33 -1
- package/dist/testing/cross_backend/role_grant_participation.js +4 -4
- package/dist/testing/cross_backend/rpc_adversarial.js +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +3 -4
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.js +2 -2
- package/dist/testing/cross_backend/session_cap.d.ts +2 -2
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +22 -11
- package/dist/testing/cross_backend/setup.d.ts +32 -2
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +32 -1
- package/dist/testing/cross_backend/spine_suites.d.ts +125 -15
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_suites.js +459 -62
- package/dist/testing/cross_backend/spine_surface_constants.d.ts +1 -1
- package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_surface_constants.js +1 -0
- package/dist/testing/cross_backend/sse_round_trip.d.ts +9 -1
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +123 -27
- package/dist/testing/cross_backend/standard.d.ts +2 -3
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/standard.js +3 -3
- package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_backdoor.js +4 -2
- package/dist/testing/cross_backend/testing_credential_read.d.ts +10 -11
- package/dist/testing/cross_backend/testing_credential_read.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_credential_read.js +12 -12
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +84 -47
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +95 -63
- package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_core.js +2 -3
- package/dist/testing/cross_backend/transport_composition.d.ts +1 -1
- package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
- package/dist/testing/cross_backend/transport_composition.js +7 -3
- package/dist/testing/cross_backend/ws_round_trip.d.ts +5 -0
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +54 -8
- package/dist/testing/daemon_token_rotation.d.ts.map +1 -1
- package/dist/testing/daemon_token_rotation.js +2 -3
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +3 -0
- package/dist/testing/db.d.ts +0 -32
- package/dist/testing/db.d.ts.map +1 -1
- package/dist/testing/db.js +0 -86
- package/dist/testing/db_entities.d.ts +14 -0
- package/dist/testing/db_entities.d.ts.map +1 -1
- package/dist/testing/db_entities.js +17 -0
- package/dist/testing/db_invariant_queries.d.ts +259 -0
- package/dist/testing/db_invariant_queries.d.ts.map +1 -0
- package/dist/testing/db_invariant_queries.js +400 -0
- package/dist/testing/db_invariants.d.ts +106 -0
- package/dist/testing/db_invariants.d.ts.map +1 -0
- package/dist/testing/db_invariants.gen.sql.d.ts +11 -0
- package/dist/testing/db_invariants.gen.sql.d.ts.map +1 -0
- package/dist/testing/db_invariants.gen.sql.js +13 -0
- package/dist/testing/db_invariants.js +141 -0
- package/dist/testing/db_invariants.sql +152 -0
- package/dist/testing/describe_db.d.ts +36 -0
- package/dist/testing/describe_db.d.ts.map +1 -0
- package/dist/testing/describe_db.js +71 -0
- package/dist/testing/integration.d.ts +8 -12
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +13 -17
- package/dist/testing/integration_helpers.d.ts +1 -1
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/rate_limiting.d.ts +3 -4
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +6 -5
- package/dist/testing/role_grant_helpers.d.ts +1 -1
- package/dist/testing/role_grant_helpers.d.ts.map +1 -1
- package/dist/testing/round_trip.d.ts.map +1 -1
- package/dist/testing/round_trip.js +3 -0
- package/dist/testing/rpc_attack_surface.d.ts +8 -6
- package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
- package/dist/testing/rpc_attack_surface.js +69 -6
- package/dist/testing/rpc_helpers.d.ts +1 -2
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +3 -3
- package/dist/testing/rpc_round_trip.d.ts +3 -4
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +4 -1
- package/dist/testing/sse_round_trip.d.ts +3 -4
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +15 -6
- package/dist/testing/stubs.d.ts +9 -8
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +20 -13
- package/dist/testing/test_app.d.ts +168 -0
- package/dist/testing/test_app.d.ts.map +1 -0
- package/dist/testing/test_app.js +123 -0
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +3 -0
- package/dist/ui/ui_format.d.ts.map +1 -1
- package/dist/ui/ui_format.js +1 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
|
-
import type { TestAccount } from '../
|
|
2
|
+
import type { TestAccount } from '../test_app.js';
|
|
3
3
|
import type { TestFixture } from './setup.js';
|
|
4
4
|
/** Options for the role-grant fixtures. */
|
|
5
5
|
export interface RoleGrantFixtureOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_cross_helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/role_grant_cross_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAoB9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"role_grant_cross_helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/role_grant_cross_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAoB9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,2CAA2C;AAC3C,MAAM,WAAW,uBAAuB;IACvC,qFAAqF;IACrF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,GAC3C,SAAS,WAAW,EACpB,eAAe,MAAM,EACrB,kBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAoC,EAC1E,UAAS,uBAA4B,KACnC,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAWxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GACpC,SAAS,WAAW,EACpB,WAAW,WAAW,EACtB,UAAS,uBAA4B,KACnC,OAAO,CAAC,MAAM,CAgBhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_offer_lifecycle.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"role_grant_offer_lifecycle.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqG9B,OAAO,KAAK,EAAE,wBAAwB,EAAe,MAAM,YAAY,CAAC;AAMxE,qEAAqE;AACrE,MAAM,WAAW,uCAAwC,SAAQ,wBAAwB;IACxF;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,+CAA+C,GAC3D,SAAS,uCAAuC,KAC9C,IAqsBF,CAAC"}
|
|
@@ -20,6 +20,12 @@ import '../assert_dev_env.js';
|
|
|
20
20
|
* - **already decided → 400** `invalid_request` with reason
|
|
21
21
|
* `role_grant_offer_terminal` — a decline or retract after an accept, a
|
|
22
22
|
* second decline, a second retract, and either one after the other.
|
|
23
|
+
* - **a re-offer refreshes the pending offer.** The grantor offering the same
|
|
24
|
+
* role to the same account while its offer is pending answers that offer —
|
|
25
|
+
* the same id, its `message` the new one, and its `to_actor_id` the new
|
|
26
|
+
* request's: naming the recipient's actor narrows it, naming none widens it
|
|
27
|
+
* back — and the inbox still holds the one offer. Once the offer is decided,
|
|
28
|
+
* a re-offer is a new offer.
|
|
23
29
|
* - **a decided offer can't be accepted.** An accept after a decline or a
|
|
24
30
|
* retract is `role_grant_offer_terminal` and grants nothing — the
|
|
25
31
|
* recipient holds no grant of the role and the offer reads back unaccepted.
|
|
@@ -66,7 +72,7 @@ import '../assert_dev_env.js';
|
|
|
66
72
|
*/
|
|
67
73
|
import { assert, describe, test } from 'vitest';
|
|
68
74
|
import { rpc_call } from '../rpc_helpers.js';
|
|
69
|
-
import { ERROR_CANNOT_REVOKE_KEEPER_ADMIN, ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH, ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED, ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_SELF_TARGET, ERROR_ROLE_GRANT_OFFER_TERMINAL, RoleGrantOfferDeclineOutput, RoleGrantOfferHistoryOutput, RoleGrantOfferRetractOutput } from '../../auth/role_grant_offer_action_specs.js';
|
|
75
|
+
import { ERROR_CANNOT_REVOKE_KEEPER_ADMIN, ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH, ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED, ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_SELF_TARGET, ERROR_ROLE_GRANT_OFFER_TERMINAL, RoleGrantOfferCreateOutput, RoleGrantOfferDeclineOutput, RoleGrantOfferHistoryOutput, RoleGrantOfferListOutput, RoleGrantOfferRetractOutput } from '../../auth/role_grant_offer_action_specs.js';
|
|
70
76
|
import { AdminAccountListOutput } from '../../auth/admin_action_specs.js';
|
|
71
77
|
import { ROLE_ADMIN } from '../../auth/role_schema.js';
|
|
72
78
|
import { expect_output } from './cross_rpc.js';
|
|
@@ -115,6 +121,32 @@ export const describe_role_grant_offer_lifecycle_cross_tests = (options) => {
|
|
|
115
121
|
const { offers } = listed.result;
|
|
116
122
|
return offers.some((offer) => offer.id === offer_id);
|
|
117
123
|
};
|
|
124
|
+
describe('a re-offer refreshes the pending offer', () => {
|
|
125
|
+
test("a re-offer while pending answers the same offer, its actor narrowed and widened; after a decline it's a new offer", async () => {
|
|
126
|
+
const fixture = await setup_test();
|
|
127
|
+
const recipient = await fixture.create_account({ username: 'lifecycle_reoffer' });
|
|
128
|
+
const recipient_headers = recipient.create_session_headers();
|
|
129
|
+
const grantor_headers = fixture.create_session_headers();
|
|
130
|
+
const offer = async (params) => expect_output(await rpc(fixture, 'role_grant_offer_create', { to_account_id: recipient.account.id, role, ...params }, grantor_headers), RoleGrantOfferCreateOutput).offer;
|
|
131
|
+
const first = await offer({ message: 'first' });
|
|
132
|
+
assert.strictEqual(first.to_actor_id, null);
|
|
133
|
+
const narrowed = await offer({ to_actor_id: recipient.actor.id, message: 'narrowed' });
|
|
134
|
+
assert.strictEqual(narrowed.id, first.id, 'a re-offer while pending is the same offer');
|
|
135
|
+
assert.strictEqual(narrowed.to_actor_id, recipient.actor.id, 'naming the actor narrows it');
|
|
136
|
+
assert.strictEqual(narrowed.message, 'narrowed');
|
|
137
|
+
const widened = await offer({ message: 'widened' });
|
|
138
|
+
assert.strictEqual(widened.id, first.id);
|
|
139
|
+
assert.strictEqual(widened.to_actor_id, null, 'naming no actor widens it back');
|
|
140
|
+
assert.strictEqual(widened.message, 'widened');
|
|
141
|
+
// the inbox holds the one offer, as the last re-offer left it
|
|
142
|
+
const { offers } = expect_output(await rpc(fixture, 'role_grant_offer_list', {}, recipient_headers), RoleGrantOfferListOutput);
|
|
143
|
+
assert.deepStrictEqual(offers.map(({ id, to_actor_id, message }) => ({ id, to_actor_id, message })), [{ id: first.id, to_actor_id: null, message: 'widened' }]);
|
|
144
|
+
assert_ok(await decline(fixture, first.id, recipient_headers), 'decline');
|
|
145
|
+
const after_decline = await offer({ message: 'again' });
|
|
146
|
+
assert.notStrictEqual(after_decline.id, first.id, 'a decided offer is not reopened');
|
|
147
|
+
assert.ok(await is_pending(fixture, recipient, after_decline.id), 'the new offer is pending');
|
|
148
|
+
});
|
|
149
|
+
});
|
|
118
150
|
describe('role_grant_offer decline + retract refusals', () => {
|
|
119
151
|
test('a decline by anyone but the recipient → 404, identical to a missing offer; the offer stays pending', async () => {
|
|
120
152
|
const fixture = await setup_test();
|
|
@@ -64,10 +64,10 @@ export const describe_role_grant_participation_cross_tests = (options) => {
|
|
|
64
64
|
test(`admin assigns the ${role} app-role to a fresh account (idempotent)`, async () => {
|
|
65
65
|
const fixture = await setup_test();
|
|
66
66
|
const recipient = await fixture.create_account({ username: 'participation_assignee' });
|
|
67
|
-
// The keeper holds ROLE_ADMIN (seeded
|
|
68
|
-
// clears the dispatcher admin gate; `participant` is
|
|
69
|
-
// it clears the grant-path gate; the recipient is
|
|
70
|
-
// target actor resolves without `to_actor_id`.
|
|
67
|
+
// The keeper holds ROLE_ADMIN (seeded by default, as a production
|
|
68
|
+
// bootstrap), so it clears the dispatcher admin gate; `participant` is
|
|
69
|
+
// admin-grantable, so it clears the grant-path gate; the recipient is
|
|
70
|
+
// single-actor, so the target actor resolves without `to_actor_id`.
|
|
71
71
|
const first = await rpc(fixture.transport, 'role_grant_assign', { to_account_id: recipient.account.id, role }, fixture.create_session_headers());
|
|
72
72
|
assert.ok(first.ok, `assign must succeed: ${JSON.stringify(first)}`);
|
|
73
73
|
const assigned = first.result;
|
|
@@ -79,7 +79,7 @@ import { PROTOCOL_ACTION_METHODS } from '../../actions/action_codegen.js';
|
|
|
79
79
|
import { TESTING_METHOD_PREFIX } from '../surface_invariants.js';
|
|
80
80
|
import { create_rpc_post_init } from '../rpc_helpers.js';
|
|
81
81
|
import { assert_rpc_envelope_refusal, create_rpc_envelope_cases, generate_rpc_params_test_cases, to_rpc_envelope_request } from '../rpc_envelope_cases.js';
|
|
82
|
-
import { resolve_conformance_principal } from './
|
|
82
|
+
import { resolve_conformance_principal } from './conformance_principal.js';
|
|
83
83
|
import { SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
84
84
|
import { xfail_until } from './xfail.js';
|
|
85
85
|
import { expected_invalid_reason } from '../adversarial_input_cases.js';
|
|
@@ -23,7 +23,6 @@ import '../assert_dev_env.js';
|
|
|
23
23
|
import type { RpcAction } from '../../actions/action_types.js';
|
|
24
24
|
import type { ActionSpecUnion } from '../../actions/action_spec.js';
|
|
25
25
|
import type { RoleRegistry } from '../../auth/role_schema.js';
|
|
26
|
-
import type { SessionOptions } from '../../auth/session_cookie.js';
|
|
27
26
|
import type { AppSurfaceSpec, RpcEndpointSpec } from '../../http/surface.js';
|
|
28
27
|
import type { AppServerContext } from '../../server/app_server_context.js';
|
|
29
28
|
/**
|
|
@@ -62,8 +61,8 @@ export interface RustSpineConsumerRpcEndpointsOptions {
|
|
|
62
61
|
}
|
|
63
62
|
/** Options for `create_rust_spine_consumer_surface_spec`. */
|
|
64
63
|
export interface RustSpineConsumerSurfaceSpecOptions extends RustSpineConsumerRpcEndpointsOptions {
|
|
65
|
-
/** The
|
|
66
|
-
readonly
|
|
64
|
+
/** The session cookie's name. */
|
|
65
|
+
readonly session_cookie_name: string;
|
|
67
66
|
/**
|
|
68
67
|
* Whether the server mounts the spine's host gate
|
|
69
68
|
* (`fuz_http::StackOptions::host_gate`, on by default), declared as the
|
|
@@ -91,7 +90,7 @@ export declare const create_rust_spine_consumer_rpc_endpoints: (options: RustSpi
|
|
|
91
90
|
* layer every consumer test binary wires, and — unless `host_gate` is
|
|
92
91
|
* `false` — the host gate's `host` layer.
|
|
93
92
|
*
|
|
94
|
-
* @param options - the consumer's session
|
|
93
|
+
* @param options - the consumer's session cookie name, action specs, extras and roles
|
|
95
94
|
* @returns the surface spec, for `describe_spine_cross_suites`'s `surface_source`
|
|
96
95
|
* @throws Error when an account route shape the Rust router mounts is missing,
|
|
97
96
|
* or an `exclude_methods` entry names no domain spec
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rust_spine_consumer_surface.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/rust_spine_consumer_surface.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,8BAA8B,CAAC;AAM/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"rust_spine_consumer_surface.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/rust_spine_consumer_surface.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;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AAO,MAAM,uCAAuC,GACnD,SAAS,mCAAmC,KAC1C,cAUA,CAAC"}
|
|
@@ -86,13 +86,13 @@ const create_spine_consumer_route_specs = (ctx) => {
|
|
|
86
86
|
* layer every consumer test binary wires, and — unless `host_gate` is
|
|
87
87
|
* `false` — the host gate's `host` layer.
|
|
88
88
|
*
|
|
89
|
-
* @param options - the consumer's session
|
|
89
|
+
* @param options - the consumer's session cookie name, action specs, extras and roles
|
|
90
90
|
* @returns the surface spec, for `describe_spine_cross_suites`'s `surface_source`
|
|
91
91
|
* @throws Error when an account route shape the Rust router mounts is missing,
|
|
92
92
|
* or an `exclude_methods` entry names no domain spec
|
|
93
93
|
*/
|
|
94
94
|
export const create_rust_spine_consumer_surface_spec = (options) => create_test_app_surface_spec({
|
|
95
|
-
|
|
95
|
+
session_cookie_name: options.session_cookie_name,
|
|
96
96
|
create_route_specs: create_spine_consumer_route_specs,
|
|
97
97
|
rpc_endpoints: create_rust_spine_consumer_rpc_endpoints(options),
|
|
98
98
|
// the binaries mount `bootstrap_router`; `surface_only` declares its shape
|
|
@@ -25,8 +25,8 @@ export interface SessionCapCrossTestOptions {
|
|
|
25
25
|
readonly ws?: WsEndpointTarget;
|
|
26
26
|
/**
|
|
27
27
|
* Whether the `ws` endpoint mounts the self-service account actions
|
|
28
|
-
* (`capabilities.ws_account_actions`),
|
|
29
|
-
* over a socket
|
|
28
|
+
* (`capabilities.ws_account_actions`), for the case that lists the
|
|
29
|
+
* sessions over a socket; `false` (the default) skips it.
|
|
30
30
|
*/
|
|
31
31
|
readonly ws_account_actions?: boolean;
|
|
32
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_cap.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/session_cap.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA+E9B,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAOzD,OAAO,KAAK,EAAE,gBAAgB,EA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,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,gCAAgC,GAAI,SAAS,0BAA0B,KAAG,IAkStF,CAAC"}
|
|
@@ -89,6 +89,15 @@ export const describe_session_cap_cross_tests = (options) => {
|
|
|
89
89
|
// a refused login past the cap is the defect, not a test fault
|
|
90
90
|
label: `${label} (the cap evicts, it never refuses)`
|
|
91
91
|
});
|
|
92
|
+
/** `account_session_list` on a transport: the listed ids, and those marked current. */
|
|
93
|
+
const list_on = async (transport, headers, label) => {
|
|
94
|
+
const { sessions } = expect_output(await cross_rpc_call(transport, rpc_path, 'account_session_list', undefined, headers), SessionListOutput);
|
|
95
|
+
assert.ok(sessions.length > 0, `${label}: the account lists its sessions`);
|
|
96
|
+
return {
|
|
97
|
+
ids: sessions.map((s) => s.id).sort(),
|
|
98
|
+
current: sessions.filter((s) => s.is_current).map((s) => s.id)
|
|
99
|
+
};
|
|
100
|
+
};
|
|
92
101
|
describe('per-account session cap parity', () => {
|
|
93
102
|
test(`logging in ${max_sessions + 1} times evicts the oldest session (the newest ${max_sessions} resolve, the first does not)`, async () => {
|
|
94
103
|
const fixture = await setup_test();
|
|
@@ -148,15 +157,6 @@ export const describe_session_cap_cross_tests = (options) => {
|
|
|
148
157
|
});
|
|
149
158
|
const first = await login(fixture, 'the first login');
|
|
150
159
|
const second = await login(fixture, 'the second login');
|
|
151
|
-
/** `account_session_list` on a transport: the listed ids, and those marked current. */
|
|
152
|
-
const list_on = async (transport, headers, label) => {
|
|
153
|
-
const { sessions } = expect_output(await cross_rpc_call(transport, rpc_path, 'account_session_list', undefined, headers), SessionListOutput);
|
|
154
|
-
assert.ok(sessions.length > 0, `${label}: the account lists its sessions`);
|
|
155
|
-
return {
|
|
156
|
-
ids: sessions.map((s) => s.id).sort(),
|
|
157
|
-
current: sessions.filter((s) => s.is_current).map((s) => s.id)
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
160
|
const on_first = await list_on(first, {}, 'the first login');
|
|
161
161
|
const on_second = await list_on(second, {}, 'the second login');
|
|
162
162
|
assert.strictEqual(on_first.current.length, 1, 'the first login sees exactly one current session');
|
|
@@ -175,8 +175,19 @@ export const describe_session_cap_cross_tests = (options) => {
|
|
|
175
175
|
const on_daemon_with_cookie = await list_on(fixture.fresh_transport({ origin: null }), fixture.create_daemon_token_headers(fixture.create_session_headers()), 'a daemon-token caller sending a session cookie');
|
|
176
176
|
assert.deepStrictEqual(on_daemon_with_cookie.ids, on_keeper.ids);
|
|
177
177
|
assert.deepStrictEqual(on_daemon_with_cookie.current, [], 'a daemon token authenticated the request, not the cookie beside it');
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
});
|
|
179
|
+
test_if(ws !== undefined && ws_account_actions, "the session list over a socket marks the socket's own session current", async () => {
|
|
180
|
+
assert.ok(ws !== undefined);
|
|
181
|
+
const fixture = await setup_test();
|
|
182
|
+
await fixture.create_account({
|
|
183
|
+
username,
|
|
184
|
+
password_value: DEFAULT_TEST_PASSWORD,
|
|
185
|
+
roles: [...ws_account_roles]
|
|
186
|
+
});
|
|
187
|
+
const first = await login(fixture, 'the first login');
|
|
188
|
+
await login(fixture, 'the second login');
|
|
189
|
+
const on_first = await list_on(first, {}, 'the first login');
|
|
190
|
+
assert.strictEqual(on_first.current.length, 1, 'the first login sees exactly one current session');
|
|
180
191
|
const client = await create_ws_transport({
|
|
181
192
|
base_url: ws.base_url,
|
|
182
193
|
ws_path: ws.ws_path,
|
|
@@ -23,12 +23,13 @@ import '../assert_dev_env.js';
|
|
|
23
23
|
*/
|
|
24
24
|
import { type Infer, type AnySchema } from '@fuzdev/fuz_schema/schema.ts';
|
|
25
25
|
import { Uuid } from '../../primitive_schemas.js';
|
|
26
|
-
import type { TestAccount } from '../
|
|
26
|
+
import type { TestAccount } from '../test_app.js';
|
|
27
27
|
import type { BackendCapabilities } from './capabilities.js';
|
|
28
28
|
import { type FetchTransport } from '../transports/fetch_transport.js';
|
|
29
29
|
import { MigrationTracker, type SchemaSnapshot } from '../schema_introspect.js';
|
|
30
30
|
import { ActionManifest } from './action_manifest.js';
|
|
31
31
|
import type { BackendHandle } from './spawn_backend.js';
|
|
32
|
+
import { type DbInvariantExclusions } from '../db_invariant_queries.js';
|
|
32
33
|
/**
|
|
33
34
|
* Options for `TestFixture.create_account` — mints an additional
|
|
34
35
|
* bootstrapped account alongside the keeper. Matches the existing
|
|
@@ -197,7 +198,7 @@ export interface TestFixture {
|
|
|
197
198
|
* return the ready-to-send `Cookie` header value (`name=value`). The
|
|
198
199
|
* minted `auth_session` row is backdated while the signed cookie payload
|
|
199
200
|
* stays valid — so resolution clears the cookie-payload gate
|
|
200
|
-
* (`
|
|
201
|
+
* (`parse_session_from_cookies`) and is refused at the authoritative DB-row gate
|
|
201
202
|
* (`query_session_get_valid` — `WHERE expires_at > NOW()`). Backs the
|
|
202
203
|
* `expired_session` conformance principal. In-process mints directly via
|
|
203
204
|
* `mint_test_session`; cross-process drives the `_testing_mint_session`
|
|
@@ -247,6 +248,16 @@ export interface TestFixture {
|
|
|
247
248
|
* `assert_audit_event_metadata`.
|
|
248
249
|
*/
|
|
249
250
|
readonly reject_unknown_audit_metadata_keys?: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Check the database invariants (`DB_INVARIANTS`, less the setup's
|
|
253
|
+
* `exclude_db_invariants`) now, throwing on a violation — cross-process
|
|
254
|
+
* over the backend's `_testing_db_invariants`, in-process on the fixture's
|
|
255
|
+
* own database; a no-op when the setup excludes `all`. The setup
|
|
256
|
+
* already runs it when each test finishes if built inside that test; a
|
|
257
|
+
* fixture built in `beforeAll` and shared by a describe is checked by the
|
|
258
|
+
* suite (`check_db_invariants_after_all`).
|
|
259
|
+
*/
|
|
260
|
+
readonly assert_db_invariants: () => Promise<void>;
|
|
250
261
|
}
|
|
251
262
|
/**
|
|
252
263
|
* Fixture-producing function. Invoked once inside every `test()` body by
|
|
@@ -460,7 +471,26 @@ export interface CrossProcessSetupOptions {
|
|
|
460
471
|
readonly signup_path?: string;
|
|
461
472
|
/** REST login route `fixture.create_account` logs in through. Default `SPINE_ACCOUNT_LOGIN_PATH`. */
|
|
462
473
|
readonly login_path?: string;
|
|
474
|
+
/**
|
|
475
|
+
* Database invariants (`DB_INVARIANTS`) left unchecked after each test,
|
|
476
|
+
* each with the non-empty reason it can't hold — tests that write rows
|
|
477
|
+
* directly, without the cascade the spine runs, or a gap an `xfail_until`
|
|
478
|
+
* marker tracks (`DbInvariantExclusions`). Every other invariant is checked
|
|
479
|
+
* when a test that called `setup_test()` finishes, over the backend's
|
|
480
|
+
* `_testing_db_invariants` backdoor, which `capabilities.testing_backdoors`
|
|
481
|
+
* must declare — the setup throws otherwise, unless `all` turns the check
|
|
482
|
+
* off with its reason. The setup logs its exclusions once. Under
|
|
483
|
+
* `describe.concurrent` a violation can land on a sibling of the test that
|
|
484
|
+
* left it (`register_db_invariants_check`).
|
|
485
|
+
*/
|
|
486
|
+
readonly exclude_db_invariants?: DbInvariantExclusions;
|
|
463
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* Matches a username `fixture.create_account()` generates — fresh per
|
|
490
|
+
* call, so a cross-backend comparison treats it as a volatile value.
|
|
491
|
+
* Unanchored and without flags; build a `g` copy to replace every match.
|
|
492
|
+
*/
|
|
493
|
+
export declare const GENERATED_USERNAME_PATTERN: RegExp;
|
|
464
494
|
/**
|
|
465
495
|
* Capture a backend's schema snapshot over the `_testing_schema_snapshot`
|
|
466
496
|
* RPC action (keeper daemon-token channel). The canonical way for a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/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ACjD,yEAAyE;IACzE,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5D,gDAAgD;IAChD,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,GACrC,QAAQ,SAAS;IAAE,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAEpE,cAAc,MAAM,EACpB,WAAW;IACV,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC5C,EACD,QAAQ;IACP,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE,KACC,wBAAwB,CAAC,QAAQ,CAuDnC,CAAC;AAgUF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,2BAA2B,GACvC,QAAQ,sCAAsC,EAC9C,UAAU,wBAAwB,KAChC,SA+RF,CAAC"}
|
|
@@ -30,6 +30,8 @@ import { create_fetch_transport } from '../transports/fetch_transport.js';
|
|
|
30
30
|
import { MigrationTracker } from '../schema_introspect.js';
|
|
31
31
|
import { ActionManifest } from './action_manifest.js';
|
|
32
32
|
import { SPINE_ACCOUNT_LOGIN_PATH, SPINE_ACCOUNT_SIGNUP_PATH } from './spine_surface_constants.js';
|
|
33
|
+
import { announce_db_invariant_exclusions, assert_db_invariant_rows, register_db_invariants_check } from '../db_invariants.js';
|
|
34
|
+
import { DB_INVARIANTS_EXCLUDE_ALL, DbInvariantRows } from '../db_invariant_queries.js';
|
|
33
35
|
/**
|
|
34
36
|
* Build a `TestAccount` from a seeded `{account, actor, api_token,
|
|
35
37
|
* session_cookie}` bundle and the session cookie name — the header builders
|
|
@@ -126,6 +128,12 @@ const TokenCreateResponseShape = strip_object({
|
|
|
126
128
|
*/
|
|
127
129
|
let username_counter = 0;
|
|
128
130
|
const PID_BASE36 = process.pid.toString(36);
|
|
131
|
+
/**
|
|
132
|
+
* Matches a username `fixture.create_account()` generates — fresh per
|
|
133
|
+
* call, so a cross-backend comparison treats it as a volatile value.
|
|
134
|
+
* Unanchored and without flags; build a `g` copy to replace every match.
|
|
135
|
+
*/
|
|
136
|
+
export const GENERATED_USERNAME_PATTERN = /test_user_[0-9a-z]+_[0-9a-z]+_[0-9a-z]+/;
|
|
129
137
|
const generate_default_username = () => {
|
|
130
138
|
const suffix = `_${PID_BASE36}_${Date.now().toString(36)}_${(++username_counter).toString(36)}`;
|
|
131
139
|
const max_prefix = USERNAME_LENGTH_MAX - suffix.length;
|
|
@@ -615,6 +623,19 @@ export const default_cross_process_setup = (handle, options) => {
|
|
|
615
623
|
const signup_path = options?.signup_path ?? SPINE_ACCOUNT_SIGNUP_PATH;
|
|
616
624
|
const login_path = options?.login_path ?? SPINE_ACCOUNT_LOGIN_PATH;
|
|
617
625
|
const { cookie_name } = handle.config;
|
|
626
|
+
const exclude_db_invariants = options?.exclude_db_invariants;
|
|
627
|
+
const setup_label = `default_cross_process_setup(${handle.config.name})`;
|
|
628
|
+
announce_db_invariant_exclusions(exclude_db_invariants, setup_label);
|
|
629
|
+
const check_db_invariants = exclude_db_invariants?.[DB_INVARIANTS_EXCLUDE_ALL] === undefined;
|
|
630
|
+
if (check_db_invariants &&
|
|
631
|
+
!handle.config.capabilities.testing_backdoors.includes('_testing_db_invariants')) {
|
|
632
|
+
throw new Error(`${setup_label}: the backend doesn't declare _testing_db_invariants in ` +
|
|
633
|
+
`capabilities.testing_backdoors, so the per-test database invariant check can't run — ` +
|
|
634
|
+
`mount the backdoor and declare it, or turn the check off with ` +
|
|
635
|
+
`exclude_db_invariants: {${DB_INVARIANTS_EXCLUDE_ALL}: '<reason>'} on this setup ` +
|
|
636
|
+
`(through describe_spine_cross_suites, its ` +
|
|
637
|
+
`setup: {exclude_db_invariants: {${DB_INVARIANTS_EXCLUDE_ALL}: '<reason>'}})`);
|
|
638
|
+
}
|
|
618
639
|
return async () => {
|
|
619
640
|
const { keeper, extra_accounts: seeded_extras, extra_actors } = await fire_testing_reset(handle, {
|
|
620
641
|
extra_keeper_roles,
|
|
@@ -680,7 +701,7 @@ export const default_cross_process_setup = (handle, options) => {
|
|
|
680
701
|
base_url: handle.config.base_url,
|
|
681
702
|
initial_cookies: [`${cookie_name}=${keeper.session_cookie}`]
|
|
682
703
|
});
|
|
683
|
-
|
|
704
|
+
const fixture = {
|
|
684
705
|
transport,
|
|
685
706
|
fresh_transport: (fresh_options) => create_fetch_transport({
|
|
686
707
|
base_url: handle.config.base_url,
|
|
@@ -695,6 +716,14 @@ export const default_cross_process_setup = (handle, options) => {
|
|
|
695
716
|
extra_accounts,
|
|
696
717
|
extra_actors,
|
|
697
718
|
reject_unknown_audit_metadata_keys: options?.reject_unknown_audit_metadata_keys ?? false,
|
|
719
|
+
// over the backdoor on the daemon-token channel, unrecorded by a
|
|
720
|
+
// transcript, so a `memory://` backend is checked like any other
|
|
721
|
+
assert_db_invariants: async () => {
|
|
722
|
+
if (!check_db_invariants)
|
|
723
|
+
return;
|
|
724
|
+
const answer = await capture_via_daemon(refreshed_handle, '_testing_db_invariants', DbInvariantRows);
|
|
725
|
+
assert_db_invariant_rows(answer.rows, handle.config.name, exclude_db_invariants);
|
|
726
|
+
},
|
|
698
727
|
// Forge over the wire — the cross-process driver has no keyring,
|
|
699
728
|
// so `_testing_mint_session` mints the backdated row + signs the
|
|
700
729
|
// cookie server-side over the keeper's daemon-token channel.
|
|
@@ -773,5 +802,7 @@ export const default_cross_process_setup = (handle, options) => {
|
|
|
773
802
|
return other.api_token;
|
|
774
803
|
}
|
|
775
804
|
};
|
|
805
|
+
register_db_invariants_check(fixture.assert_db_invariants);
|
|
806
|
+
return fixture;
|
|
776
807
|
};
|
|
777
808
|
};
|