@fuzdev/fuz_app 0.168.0 → 0.169.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 (132) hide show
  1. package/dist/actions/CLAUDE.md +1 -1
  2. package/dist/actions/action_codegen.d.ts +9 -7
  3. package/dist/actions/action_codegen.d.ts.map +1 -1
  4. package/dist/actions/action_codegen.js +20 -15
  5. package/dist/actions/action_event_data.d.ts +16 -16
  6. package/dist/actions/heartbeat.d.ts +1 -1
  7. package/dist/auth/account_action_specs.d.ts +11 -11
  8. package/dist/auth/account_action_specs.js +1 -1
  9. package/dist/auth/account_route_schema.d.ts +18 -18
  10. package/dist/auth/account_route_schema.js +1 -1
  11. package/dist/auth/account_routes.js +1 -1
  12. package/dist/auth/account_schema.d.ts +38 -40
  13. package/dist/auth/account_schema.d.ts.map +1 -1
  14. package/dist/auth/account_schema.js +7 -8
  15. package/dist/auth/actor_lookup_action_specs.d.ts +7 -7
  16. package/dist/auth/actor_lookup_action_specs.js +1 -1
  17. package/dist/auth/actor_search_action_specs.d.ts +6 -6
  18. package/dist/auth/actor_search_action_specs.js +1 -1
  19. package/dist/auth/admin_action_specs.d.ts +166 -166
  20. package/dist/auth/admin_action_specs.js +1 -1
  21. package/dist/auth/app_settings_schema.d.ts +3 -3
  22. package/dist/auth/app_settings_schema.d.ts.map +1 -1
  23. package/dist/auth/app_settings_schema.js +1 -1
  24. package/dist/auth/audit_log_route_schema.d.ts +1 -1
  25. package/dist/auth/audit_log_route_schema.js +1 -1
  26. package/dist/auth/audit_log_schema.d.ts +61 -61
  27. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  28. package/dist/auth/audit_log_schema.js +1 -1
  29. package/dist/auth/bootstrap_route_schema.d.ts +4 -4
  30. package/dist/auth/bootstrap_route_schema.js +1 -1
  31. package/dist/auth/cell_action_specs.d.ts +424 -424
  32. package/dist/auth/cell_action_specs.js +1 -1
  33. package/dist/auth/cell_audit_action_specs.d.ts +14 -14
  34. package/dist/auth/cell_audit_action_specs.js +1 -1
  35. package/dist/auth/cell_audit_metadata.d.ts +8 -8
  36. package/dist/auth/cell_audit_metadata.js +1 -1
  37. package/dist/auth/cell_field_action_specs.d.ts +55 -55
  38. package/dist/auth/cell_field_action_specs.js +1 -1
  39. package/dist/auth/cell_field_audit_metadata.d.ts +4 -4
  40. package/dist/auth/cell_field_audit_metadata.js +1 -1
  41. package/dist/auth/cell_grant_action_specs.d.ts +61 -61
  42. package/dist/auth/cell_grant_action_specs.js +1 -1
  43. package/dist/auth/cell_grant_audit_metadata.d.ts +10 -10
  44. package/dist/auth/cell_grant_audit_metadata.js +1 -1
  45. package/dist/auth/cell_item_action_specs.d.ts +76 -76
  46. package/dist/auth/cell_item_action_specs.js +1 -1
  47. package/dist/auth/cell_item_audit_metadata.d.ts +5 -5
  48. package/dist/auth/cell_item_audit_metadata.js +1 -1
  49. package/dist/auth/invite_schema.d.ts +11 -11
  50. package/dist/auth/invite_schema.d.ts.map +1 -1
  51. package/dist/auth/invite_schema.js +1 -1
  52. package/dist/auth/name_schema.js +1 -1
  53. package/dist/auth/password.js +1 -1
  54. package/dist/auth/role_grant_offer_action_specs.d.ts +182 -182
  55. package/dist/auth/role_grant_offer_action_specs.js +1 -1
  56. package/dist/auth/role_grant_offer_notifications.d.ts +107 -107
  57. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  58. package/dist/auth/role_grant_offer_notifications.js +1 -1
  59. package/dist/auth/role_grant_offer_schema.d.ts +9 -9
  60. package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
  61. package/dist/auth/role_grant_offer_schema.js +1 -1
  62. package/dist/auth/self_service_role_action_specs.d.ts +2 -2
  63. package/dist/auth/self_service_role_action_specs.js +1 -1
  64. package/dist/auth/signup_route_schema.d.ts +2 -2
  65. package/dist/auth/signup_route_schema.js +1 -1
  66. package/dist/auth/token_scope.d.ts +8 -8
  67. package/dist/db/file_fact_url.d.ts +1 -1
  68. package/dist/http/CLAUDE.md +7 -7
  69. package/dist/http/auth_shape.d.ts +15 -32
  70. package/dist/http/auth_shape.d.ts.map +1 -1
  71. package/dist/http/auth_shape.js +31 -38
  72. package/dist/http/db_routes.d.ts +1 -1
  73. package/dist/http/db_routes.d.ts.map +1 -1
  74. package/dist/http/db_routes.js +1 -1
  75. package/dist/http/error_schemas.d.ts +18 -18
  76. package/dist/http/jsonrpc.d.ts +11 -11
  77. package/dist/http/schema_helpers.d.ts +2 -2
  78. package/dist/http/schema_helpers.d.ts.map +1 -1
  79. package/dist/http/schema_helpers.js +8 -7
  80. package/dist/primitive_schemas.d.ts +173 -115
  81. package/dist/primitive_schemas.d.ts.map +1 -1
  82. package/dist/primitive_schemas.js +134 -158
  83. package/dist/schema_issues.d.ts +10 -7
  84. package/dist/schema_issues.d.ts.map +1 -1
  85. package/dist/schema_issues.js +38 -8
  86. package/dist/server/serve_fact_route.js +1 -1
  87. package/dist/server/surface_route.js +1 -1
  88. package/dist/testing/CLAUDE.md +3 -3
  89. package/dist/testing/cross_backend/conformance_case.d.ts +96 -114
  90. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  91. package/dist/testing/cross_backend/conformance_case.js +0 -256
  92. package/dist/testing/cross_backend/fact_serving.js +1 -1
  93. package/dist/testing/cross_backend/setup.d.ts +1 -1
  94. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  95. package/dist/testing/cross_backend/setup.js +3 -4
  96. package/dist/testing/cross_backend/testing_origin_check.d.ts +8 -8
  97. package/dist/testing/cross_backend/testing_reset_actions.d.ts +608 -201
  98. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  99. package/dist/testing/cross_backend/testing_reset_actions.js +46 -55
  100. package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
  101. package/dist/testing/cross_backend/ws_outbound_overflow.js +35 -0
  102. package/dist/testing/rpc_helpers.d.ts +1 -1
  103. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  104. package/dist/testing/rpc_helpers.js +0 -1
  105. package/dist/testing/schema_generators.js +1 -13
  106. package/dist/testing/schema_introspect.d.ts +438 -78
  107. package/dist/testing/schema_introspect.d.ts.map +1 -1
  108. package/dist/testing/schema_introspect.js +26 -26
  109. package/dist/testing/transports/bootstrap.d.ts +1 -1
  110. package/dist/testing/transports/bootstrap.d.ts.map +1 -1
  111. package/dist/testing/transports/bootstrap.js +1 -1
  112. package/dist/ui/BootstrapForm.svelte +1 -2
  113. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  114. package/dist/ui/SignupForm.svelte +1 -2
  115. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  116. package/dist/ui/admin_accounts_state.svelte.d.ts +5 -5
  117. package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
  118. package/dist/ui/admin_invites_state.svelte.d.ts +1 -1
  119. package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
  120. package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
  121. package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
  122. package/dist/ui/role_grant_offers_state.svelte.d.ts +1 -1
  123. package/dist/zod.d.ts +18 -3
  124. package/dist/zod.d.ts.map +1 -1
  125. package/dist/zod.js +26 -3
  126. package/dist/zod_schemas.d.ts +100 -0
  127. package/dist/zod_schemas.d.ts.map +1 -0
  128. package/dist/zod_schemas.js +157 -0
  129. package/package.json +5 -5
  130. package/dist/primitive_schemas_fuz.d.ts +0 -178
  131. package/dist/primitive_schemas_fuz.d.ts.map +0 -1
  132. package/dist/primitive_schemas_fuz.js +0 -149
@@ -7,7 +7,7 @@ import '../assert_dev_env.js';
7
7
  * carried as **data**. The case references a `method` (an RPC method name
8
8
  * or a REST auth-route suffix); the runner
9
9
  * (`describe_conformance_table_tests`) resolves the `input` / `output`
10
- * Zod schemas from the live action-spec registry / `RouteSpec` — the case
10
+ * schemas from the live action-spec registry / `RouteSpec` — the case
11
11
  * never carries a schema. This is the opinionated behavioral/security
12
12
  * layer on top of the spec-derived auto-enumeration
13
13
  * (`describe_rpc_round_trip_tests` / `describe_rpc_attack_surface_tests`):
@@ -23,7 +23,6 @@ import '../assert_dev_env.js';
23
23
  *
24
24
  * @module
25
25
  */
26
- import { z } from 'zod';
27
26
  /**
28
27
  * Closed enum of fixture-provisioned principals a case runs `as`. Each
29
28
  * value maps to a `TestFixture` accessor (or a seeded `extra_accounts`
@@ -94,22 +93,7 @@ import { z } from 'zod';
94
93
  * a backdated `auth_session` row behind a still-valid signed cookie
95
94
  * payload, so the authoritative DB-row expiry gate is what refuses it).
96
95
  */
97
- export declare const ConformancePrincipal: z.ZodEnum<{
98
- keeper: "keeper";
99
- token: "token";
100
- anonymous: "anonymous";
101
- daemon: "daemon";
102
- invalid_daemon: "invalid_daemon";
103
- daemon_browser: "daemon_browser";
104
- bearer_browser: "bearer_browser";
105
- malformed_bearer: "malformed_bearer";
106
- scoped_token: "scoped_token";
107
- fresh_non_admin: "fresh_non_admin";
108
- role_holder: "role_holder";
109
- wrong_role: "wrong_role";
110
- expired_session: "expired_session";
111
- }>;
112
- export type ConformancePrincipal = z.infer<typeof ConformancePrincipal>;
96
+ export type ConformancePrincipal = 'keeper' | 'daemon' | 'invalid_daemon' | 'daemon_browser' | 'token' | 'bearer_browser' | 'malformed_bearer' | 'scoped_token' | 'anonymous' | 'fresh_non_admin' | 'role_holder' | 'wrong_role' | 'expired_session';
113
97
  /**
114
98
  * The single RPC method the `scoped_token` principal's narrowed token admits.
115
99
  *
@@ -144,53 +128,87 @@ export declare const SCOPED_TOKEN_ADMITTED_METHOD = "account_verify";
144
128
  * Unavailable for principals that present no account (`anonymous`,
145
129
  * `bearer_browser`, `malformed_bearer`) — the runner throws.
146
130
  */
147
- export declare const ConformanceActingBinding: z.ZodEnum<{
148
- principal: "principal";
149
- keeper_actor: "keeper_actor";
150
- extra_actor: "extra_actor";
151
- }>;
152
- export type ConformanceActingBinding = z.infer<typeof ConformanceActingBinding>;
131
+ export type ConformanceActingBinding = 'principal' | 'extra_actor' | 'keeper_actor';
153
132
  /** The request a conformance case issues. */
154
- export declare const ConformanceCaseRequest: z.ZodObject<{
155
- method: z.ZodString;
156
- params: z.ZodOptional<z.ZodUnknown>;
157
- params_json: z.ZodOptional<z.ZodString>;
158
- as: z.ZodEnum<{
159
- keeper: "keeper";
160
- token: "token";
161
- anonymous: "anonymous";
162
- daemon: "daemon";
163
- invalid_daemon: "invalid_daemon";
164
- daemon_browser: "daemon_browser";
165
- bearer_browser: "bearer_browser";
166
- malformed_bearer: "malformed_bearer";
167
- scoped_token: "scoped_token";
168
- fresh_non_admin: "fresh_non_admin";
169
- role_holder: "role_holder";
170
- wrong_role: "wrong_role";
171
- expired_session: "expired_session";
172
- }>;
173
- acting: z.ZodOptional<z.ZodEnum<{
174
- principal: "principal";
175
- keeper_actor: "keeper_actor";
176
- extra_actor: "extra_actor";
177
- }>>;
178
- verb: z.ZodOptional<z.ZodEnum<{
179
- GET: "GET";
180
- POST: "POST";
181
- }>>;
182
- }, z.core.$strict>;
183
- export type ConformanceCaseRequest = z.infer<typeof ConformanceCaseRequest>;
133
+ export interface ConformanceCaseRequest {
134
+ /**
135
+ * RPC method name (e.g. `admin_account_list`) or a REST auth-route suffix
136
+ * (e.g. `/login`). A leading `/` selects the REST branch; otherwise the
137
+ * runner resolves the RPC action from the spec registry.
138
+ */
139
+ method: string;
140
+ /** Request params / body. Omit for nullary methods. */
141
+ params?: unknown;
142
+ /**
143
+ * RPC params as raw JSON text, sent verbatim in place of `params` — for a
144
+ * spelling `JSON.stringify` loses (`5.0`, `1e1`, `-0`). Exclusive with
145
+ * `params` and `acting`; RPC methods only.
146
+ */
147
+ params_json?: string;
148
+ as: ConformancePrincipal;
149
+ /**
150
+ * Bind `params.acting` at run time to the named actor
151
+ * (`ConformanceActingBinding`). Params must be an object or omitted, and
152
+ * must not carry `acting` themselves.
153
+ */
154
+ acting?: ConformanceActingBinding;
155
+ /** HTTP verb. Defaults to POST; use GET for `side_effects: false` reads. */
156
+ verb?: 'POST' | 'GET';
157
+ }
184
158
  /** The expected response shape a conformance case asserts. */
185
- export declare const ConformanceCaseExpectation: z.ZodObject<{
186
- status: z.ZodNumber;
187
- error_reason: z.ZodOptional<z.ZodString>;
188
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
189
- absent_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
190
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
191
- equivalence_group: z.ZodOptional<z.ZodString>;
192
- }, z.core.$strict>;
193
- export type ConformanceCaseExpectation = z.infer<typeof ConformanceCaseExpectation>;
159
+ export interface ConformanceCaseExpectation {
160
+ /** Expected HTTP status code. */
161
+ status: number;
162
+ /**
163
+ * Expected error reason — pass the IMPORTED `ERROR_*` constant from
164
+ * `http/error_schemas.ts`, never a string literal. Asserted against the RPC
165
+ * `error.data.reason` (when the denial carries one) or the REST flat-body
166
+ * `error` field. The pre-authorization 401 carries `data.reason` too; a
167
+ * denial that genuinely omits it falls back to the `status` assertion to pin
168
+ * the class.
169
+ */
170
+ error_reason?: string;
171
+ /**
172
+ * Specific field-value assertions on the success `result` (2xx) or the
173
+ * error `error.data` (non-2xx). Each key must deep-equal the corresponding
174
+ * response field.
175
+ */
176
+ fields?: Record<string, unknown>;
177
+ /**
178
+ * Sensitive field names that must NOT appear ANYWHERE (at any depth) in the
179
+ * normalized response body — the negative-space twin of `fields`. Each name
180
+ * is searched recursively through the success `result` / error envelope, so
181
+ * a secret column (`password_hash`, `token_hash`) that leaks at any nesting
182
+ * level (top-level, inside a list element) fails the case. Pins "this secret
183
+ * never serializes" on BOTH spines — a serialization regression would
184
+ * otherwise leak identically and silently on each. Non-vacuous only when the
185
+ * body is known non-empty (e.g. a list that always contains the caller);
186
+ * note that in the case.
187
+ */
188
+ absent_fields?: Array<string>;
189
+ /**
190
+ * Per-header expectations on the response. Each key is a header name
191
+ * (case-insensitive); a string value asserts the header is present and
192
+ * equals it exactly, `null` asserts the header is ABSENT. Independent of
193
+ * this, the runner enforces an unconditional no-fingerprint invariant on
194
+ * EVERY response (`Server` / `X-Powered-By` / `WWW-Authenticate` must stay
195
+ * absent on both spines), so a case only needs `headers` to pin a header
196
+ * beyond that always-on floor.
197
+ */
198
+ headers?: Record<string, string | null>;
199
+ /**
200
+ * Tags this case as a member of an indistinguishability group. After all
201
+ * cases run, the runner asserts every member of a group produced a
202
+ * BYTE-IDENTICAL normalized response (`{status, body}`) — checked per impl.
203
+ * This promotes a masked pair (found-but-unauthorized ≡ not-found,
204
+ * wrong-password ≡ account-not-found) from "same status + reason" to
205
+ * "wire-indistinguishable", and holds BOTH impls to it: a prober hitting
206
+ * either spine cannot tell the members apart. A group needs >= 2 members; a
207
+ * member may still set `fields`. The negative-space twin of the positive
208
+ * `output`-schema parity the runner already asserts.
209
+ */
210
+ equivalence_group?: string;
211
+ }
194
212
  /**
195
213
  * Marks a case as a deferred-by-design gap. The runner routes it through
196
214
  * `xfail_until` instead of a normal `test` — visible (distinct from pass)
@@ -198,11 +216,12 @@ export type ConformanceCaseExpectation = z.infer<typeof ConformanceCaseExpectati
198
216
  * marker's removal). Use for declared gaps (e.g. facts), never for
199
217
  * in-scope gaps (those fail loud as a red `test`).
200
218
  */
201
- export declare const ConformanceCaseXfail: z.ZodObject<{
202
- tracking_id: z.ZodString;
203
- reason: z.ZodString;
204
- }, z.core.$strict>;
205
- export type ConformanceCaseXfail = z.infer<typeof ConformanceCaseXfail>;
219
+ export interface ConformanceCaseXfail {
220
+ /** Tracking id for the deferred gap (issue id or tracking slug). */
221
+ tracking_id: string;
222
+ /** Why this case is deferred-by-design. */
223
+ reason: string;
224
+ }
206
225
  /**
207
226
  * A single conformance case. `name` is the assertion; the optional
208
227
  * free-text `note` is printed in the test label / failure output. A
@@ -213,50 +232,13 @@ export type ConformanceCaseXfail = z.infer<typeof ConformanceCaseXfail>;
213
232
  * non-empty-string check never catches a *wrong* citation — the citation
214
233
  * is verified in review.
215
234
  */
216
- export declare const ConformanceCase: z.ZodObject<{
217
- name: z.ZodString;
218
- request: z.ZodObject<{
219
- method: z.ZodString;
220
- params: z.ZodOptional<z.ZodUnknown>;
221
- params_json: z.ZodOptional<z.ZodString>;
222
- as: z.ZodEnum<{
223
- keeper: "keeper";
224
- token: "token";
225
- anonymous: "anonymous";
226
- daemon: "daemon";
227
- invalid_daemon: "invalid_daemon";
228
- daemon_browser: "daemon_browser";
229
- bearer_browser: "bearer_browser";
230
- malformed_bearer: "malformed_bearer";
231
- scoped_token: "scoped_token";
232
- fresh_non_admin: "fresh_non_admin";
233
- role_holder: "role_holder";
234
- wrong_role: "wrong_role";
235
- expired_session: "expired_session";
236
- }>;
237
- acting: z.ZodOptional<z.ZodEnum<{
238
- principal: "principal";
239
- keeper_actor: "keeper_actor";
240
- extra_actor: "extra_actor";
241
- }>>;
242
- verb: z.ZodOptional<z.ZodEnum<{
243
- GET: "GET";
244
- POST: "POST";
245
- }>>;
246
- }, z.core.$strict>;
247
- expect: z.ZodObject<{
248
- status: z.ZodNumber;
249
- error_reason: z.ZodOptional<z.ZodString>;
250
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
251
- absent_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
252
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
253
- equivalence_group: z.ZodOptional<z.ZodString>;
254
- }, z.core.$strict>;
255
- note: z.ZodOptional<z.ZodString>;
256
- xfail: z.ZodOptional<z.ZodObject<{
257
- tracking_id: z.ZodString;
258
- reason: z.ZodString;
259
- }, z.core.$strict>>;
260
- }, z.core.$strict>;
261
- export type ConformanceCase = z.infer<typeof ConformanceCase>;
235
+ export interface ConformanceCase {
236
+ /** The assertion, used as the test label. */
237
+ name: string;
238
+ request: ConformanceCaseRequest;
239
+ expect: ConformanceCaseExpectation;
240
+ /** Free-text note printed in the label / failure output. */
241
+ note?: string;
242
+ xfail?: ConformanceCaseXfail;
243
+ }
262
244
  //# sourceMappingURL=conformance_case.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conformance_case.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/conformance_case.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;EAc/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB;;;;EAAuD,CAAC;AAC7F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8BjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,8DAA8D;AAC9D,eAAO,MAAM,0BAA0B;;;;;;;kBA+DrC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEpF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;kBAK/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAS1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"conformance_case.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/conformance_case.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,MAAM,MAAM,oBAAoB,GAC7B,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,GAChB,OAAO,GACP,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,WAAW,GACX,iBAAiB,GACjB,aAAa,GACb,YAAY,GACZ,iBAAiB,CAAC;AAErB;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEpF,6CAA6C;AAC7C,MAAM,WAAW,sBAAsB;IACtC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,oBAAoB,CAAC;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,0BAA0B;IAC1C,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACxC;;;;;;;;;;OAUG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACpC,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC/B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,sBAAsB,CAAC;IAChC,MAAM,EAAE,0BAA0B,CAAC;IACnC,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC7B"}
@@ -1,114 +1,4 @@
1
1
  import '../assert_dev_env.js';
2
- /**
3
- * Declarative conformance-case schema for the cross-backend behavioral +
4
- * security suite.
5
- *
6
- * A conformance case is a single request → expected-response assertion,
7
- * carried as **data**. The case references a `method` (an RPC method name
8
- * or a REST auth-route suffix); the runner
9
- * (`describe_conformance_table_tests`) resolves the `input` / `output`
10
- * Zod schemas from the live action-spec registry / `RouteSpec` — the case
11
- * never carries a schema. This is the opinionated behavioral/security
12
- * layer on top of the spec-derived auto-enumeration
13
- * (`describe_rpc_round_trip_tests` / `describe_rpc_attack_surface_tests`):
14
- * the same case definition runs in-process (fast, every `gro test`) and
15
- * cross-process (the conformance gate) against each impl's real auth
16
- * resolution.
17
- *
18
- * The table is for single-request matrices (credential-type ceiling,
19
- * privilege gates, IDOR masks, enumeration-equivalence, validation).
20
- * Multi-step flows stay imperative in their own `describe_*` suites,
21
- * sharing assertion primitives — there is deliberately no declarative
22
- * setup DSL.
23
- *
24
- * @module
25
- */
26
- import { z } from 'zod';
27
- /**
28
- * Closed enum of fixture-provisioned principals a case runs `as`. Each
29
- * value maps to a `TestFixture` accessor (or a seeded `extra_accounts`
30
- * entry) in the runner's `resolve_conformance_principal` — there is **no** inline
31
- * credential minting in a case (that would be the setup-DSL trap).
32
- *
33
- * - `keeper` — the per-test bootstrapped keeper (holds `ROLE_KEEPER` +
34
- * `ROLE_ADMIN`), session credential.
35
- * - `daemon` — the keeper authenticated via the daemon-token header.
36
- * - `invalid_daemon` — a *malformed/invalid* `X-Daemon-Token` carried
37
- * alongside the keeper's session cookie, over a non-browser (no-Origin)
38
- * transport. The middleware soft-fail-discards the invalid daemon token
39
- * (matching the Rust spine's `None`), so auth falls through to the session
40
- * leg: the request authenticates as the keeper-via-session and a
41
- * daemon-gated action then refuses the session credential with
42
- * `credential_type_required` — not a hard `invalid_daemon_token` 401. The
43
- * no-Origin transport keeps the daemon token on the invalid-token path
44
- * rather than the browser-context discard; the session base credential is
45
- * what makes the credential-type gate (not the auth gate) the refusing
46
- * layer (without it the discard would 401 anonymous).
47
- * - `daemon_browser` — a *valid* `X-Daemon-Token` carried in a browser
48
- * context (default `Origin` present) alongside the keeper's session cookie.
49
- * Browsers attach `Origin` automatically; the daemon-token middleware
50
- * discards a header-bearing daemon token as browser context (mirroring the
51
- * bearer guard and the Rust spine's `is_browser_context`), so the *valid*
52
- * token is dropped and auth falls through to the session leg → a daemon-gated
53
- * action then refuses the session credential with `credential_type_required`.
54
- * Distinct from `invalid_daemon`: here the token is well-formed and current,
55
- * so a 403 (not a 400 confirm-guard hit like `daemon`) proves the
56
- * browser-context discard fired — a valid daemon token does NOT authenticate
57
- * when an `Origin` is present. `Origin` is deliberately NOT suppressed; its
58
- * presence is the signal under test.
59
- * - `token` — the keeper authenticated via a bearer api-token (non-browser
60
- * context; the runner suppresses `Origin` so the token isn't discarded).
61
- * - `bearer_browser` — a *valid* bearer api-token carried in a browser context
62
- * (default `Origin` present), fresh jar so NO session rides alongside. The
63
- * bearer middleware discards the token as browser context (mirroring the
64
- * daemon guard + the Rust spine's `is_browser_context`), so the request
65
- * arrives anonymous and an authed action 401s. Proves a stolen bearer cannot
66
- * be replayed from a browser — wire-indistinguishable from sending no
67
- * credential (the `token` principal is the honored counterpart: it suppresses
68
- * `Origin`, so the same token authenticates).
69
- * - `malformed_bearer` — the keeper's bearer api-token with its last character
70
- * dropped, non-browser context, fresh jar. A value that cannot be a token
71
- * fails each spine's shape precheck and soft-fails before any database work,
72
- * so the request arrives anonymous — wire-indistinguishable from sending no
73
- * credential.
74
- * - `scoped_token` — the keeper authenticated via a bearer api-token minted
75
- * with a **narrowed** `TokenScope` (`{kind: 'methods', methods:
76
- * [SCOPED_TOKEN_ADMITTED_METHOD]}`), non-browser context. Minted through the
77
- * production `account_token_create` path over the keeper's session, not
78
- * seeded — `_testing_reset` deliberately seeds a `full` token, and a harness
79
- * that narrowed the seed would silently re-scope every other bearer case.
80
- * The scope gate sits between the credential gate and the role gate, so this
81
- * principal is what distinguishes `token_scope_required` from the
82
- * credential-type and role denials on either side of it.
83
- * - `anonymous` — no credential, fresh cookie jar.
84
- * - `fresh_non_admin` — a freshly minted account with no roles, session
85
- * credential (via the production invite → signup → login flow).
86
- * - `role_holder` — a seeded `extra_accounts` principal holding a specific
87
- * role; the runner reads it by the username named in
88
- * `ConformanceTableOptions.principals.role_holder`.
89
- * - `wrong_role` — a seeded `extra_accounts` principal holding a role
90
- * other than the one a route requires; named via
91
- * `ConformanceTableOptions.principals.wrong_role`.
92
- * - `expired_session` — the keeper account presented via an *expired
93
- * server-side session* cookie (minted by `fixture.mint_expired_session()`:
94
- * a backdated `auth_session` row behind a still-valid signed cookie
95
- * payload, so the authoritative DB-row expiry gate is what refuses it).
96
- */
97
- export const ConformancePrincipal = z.enum([
98
- 'keeper',
99
- 'daemon',
100
- 'invalid_daemon',
101
- 'daemon_browser',
102
- 'token',
103
- 'bearer_browser',
104
- 'malformed_bearer',
105
- 'scoped_token',
106
- 'anonymous',
107
- 'fresh_non_admin',
108
- 'role_holder',
109
- 'wrong_role',
110
- 'expired_session'
111
- ]);
112
2
  /**
113
3
  * The single RPC method the `scoped_token` principal's narrowed token admits.
114
4
  *
@@ -120,149 +10,3 @@ export const ConformancePrincipal = z.enum([
120
10
  * scope gate and nothing else.
121
11
  */
122
12
  export const SCOPED_TOKEN_ADMITTED_METHOD = 'account_verify';
123
- /**
124
- * Which actor the runner writes into a case's `params.acting` at run time.
125
- *
126
- * An actor id exists only once a fixture has seeded it, so a case names the
127
- * actor by its relation to the fixture and the runner fills in the id:
128
- *
129
- * - `principal` — the actor of the account the principal's credential names:
130
- * the keeper's bootstrap actor for the keeper-credential principals
131
- * (`keeper`, `daemon`, `token`, `scoped_token`, …), the account's one actor
132
- * for `fresh_non_admin` / `role_holder` / `wrong_role`. Binding it makes a
133
- * row hold whether the account has one actor or several: a single-actor
134
- * account resolves the same actor with or without the selector, a
135
- * multi-actor one needs it.
136
- * - `extra_actor` — the keeper's first seeded extra actor
137
- * (`fixture.extra_actors[0]`); the fixture must declare `extra_actors`.
138
- * With a keeper-credential principal, the request acts as a sibling actor
139
- * on the keeper's own account that holds none of the keeper's roles.
140
- * - `keeper_actor` — the keeper's bootstrap actor whatever the principal, so
141
- * a principal on another account names a real actor that is not its own.
142
- *
143
- * Unavailable for principals that present no account (`anonymous`,
144
- * `bearer_browser`, `malformed_bearer`) — the runner throws.
145
- */
146
- export const ConformanceActingBinding = z.enum(['principal', 'extra_actor', 'keeper_actor']);
147
- /** The request a conformance case issues. */
148
- export const ConformanceCaseRequest = z.strictObject({
149
- method: z.string().meta({
150
- description: 'RPC method name (e.g. `admin_account_list`) or a REST auth-route suffix ' +
151
- '(e.g. `/login`). A leading `/` selects the REST branch; otherwise the ' +
152
- 'runner resolves the RPC action from the spec registry.'
153
- }),
154
- params: z
155
- .unknown()
156
- .optional()
157
- .meta({ description: 'Request params / body. Omit for nullary methods.' }),
158
- params_json: z
159
- .string()
160
- .optional()
161
- .meta({
162
- description: 'RPC params as raw JSON text, sent verbatim in place of `params` — for a ' +
163
- 'spelling `JSON.stringify` loses (`5.0`, `1e1`, `-0`). Exclusive with ' +
164
- '`params` and `acting`; RPC methods only.'
165
- }),
166
- as: ConformancePrincipal,
167
- acting: ConformanceActingBinding.optional().meta({
168
- description: 'Bind `params.acting` at run time to the named actor (`ConformanceActingBinding`). ' +
169
- 'Params must be an object or omitted, and must not carry `acting` themselves.'
170
- }),
171
- verb: z
172
- .enum(['POST', 'GET'])
173
- .optional()
174
- .meta({ description: 'HTTP verb. Defaults to POST; use GET for `side_effects: false` reads.' })
175
- });
176
- /** The expected response shape a conformance case asserts. */
177
- export const ConformanceCaseExpectation = z.strictObject({
178
- status: z.number().int().meta({ description: 'Expected HTTP status code.' }),
179
- error_reason: z
180
- .string()
181
- .optional()
182
- .meta({
183
- description: 'Expected error reason — pass the IMPORTED `ERROR_*` constant from ' +
184
- '`http/error_schemas.ts`, never a string literal. Asserted against the RPC ' +
185
- '`error.data.reason` (when the denial carries one) or the REST flat-body ' +
186
- '`error` field. The pre-authorization 401 carries `data.reason` too; a denial ' +
187
- 'that genuinely omits it falls back to the `status` assertion to pin the class.'
188
- }),
189
- fields: z
190
- .record(z.string(), z.unknown())
191
- .optional()
192
- .meta({
193
- description: 'Specific field-value assertions on the success `result` (2xx) or the error ' +
194
- '`error.data` (non-2xx). Each key must deep-equal the corresponding response field.'
195
- }),
196
- absent_fields: z
197
- .array(z.string())
198
- .optional()
199
- .meta({
200
- description: 'Sensitive field names that must NOT appear ANYWHERE (at any depth) in the ' +
201
- 'normalized response body — the negative-space twin of `fields`. Each name is ' +
202
- 'searched recursively through the success `result` / error envelope, so a ' +
203
- 'secret column (`password_hash`, `token_hash`) that leaks at any nesting level ' +
204
- '(top-level, inside a list element) fails the case. Pins "this secret never ' +
205
- 'serializes" on BOTH spines — a serialization regression would otherwise leak ' +
206
- 'identically and silently on each. Non-vacuous only when the body is known ' +
207
- 'non-empty (e.g. a list that always contains the caller); note that in the case.'
208
- }),
209
- headers: z
210
- .record(z.string(), z.string().nullable())
211
- .optional()
212
- .meta({
213
- description: 'Per-header expectations on the response. Each key is a header name ' +
214
- '(case-insensitive); a string value asserts the header is present and equals ' +
215
- 'it exactly, `null` asserts the header is ABSENT. Independent of this, the ' +
216
- 'runner enforces an unconditional no-fingerprint invariant on EVERY response ' +
217
- '(`Server` / `X-Powered-By` / `WWW-Authenticate` must stay absent on both ' +
218
- 'spines), so a case only needs `headers` to pin a header beyond that ' +
219
- 'always-on floor.'
220
- }),
221
- equivalence_group: z
222
- .string()
223
- .optional()
224
- .meta({
225
- description: 'Tags this case as a member of an indistinguishability group. After all cases ' +
226
- 'run, the runner asserts every member of a group produced a BYTE-IDENTICAL ' +
227
- 'normalized response (`{status, body}`) — checked per impl. This promotes a ' +
228
- 'masked pair (found-but-unauthorized ≡ not-found, wrong-password ≡ ' +
229
- 'account-not-found) from "same status + reason" to "wire-indistinguishable", ' +
230
- 'and holds BOTH impls to it: a prober hitting either spine cannot tell the ' +
231
- 'members apart. A group needs >= 2 members; a member may still set `fields`. ' +
232
- 'The negative-space twin of the positive `output`-schema parity the runner ' +
233
- 'already asserts.'
234
- })
235
- });
236
- /**
237
- * Marks a case as a deferred-by-design gap. The runner routes it through
238
- * `xfail_until` instead of a normal `test` — visible (distinct from pass)
239
- * and self-cleaning (flips red when the impl starts passing, forcing the
240
- * marker's removal). Use for declared gaps (e.g. facts), never for
241
- * in-scope gaps (those fail loud as a red `test`).
242
- */
243
- export const ConformanceCaseXfail = z.strictObject({
244
- tracking_id: z
245
- .string()
246
- .meta({ description: 'Tracking id for the deferred gap (issue id or tracking slug).' }),
247
- reason: z.string().meta({ description: 'Why this case is deferred-by-design.' })
248
- });
249
- /**
250
- * A single conformance case. `name` is the assertion; the optional
251
- * free-text `note` is printed in the test label / failure output. A
252
- * security case's `note` should reference a **public** fuz_app doc
253
- * property (`security.md` / `architecture.md` / module TSDoc), since the
254
- * table ships in a public package — not an internal planning doc. The note
255
- * is documentation, not a gate: it stays free-text by design because a
256
- * non-empty-string check never catches a *wrong* citation — the citation
257
- * is verified in review.
258
- */
259
- export const ConformanceCase = z.strictObject({
260
- name: z.string().meta({ description: 'The assertion, used as the test label.' }),
261
- request: ConformanceCaseRequest,
262
- expect: ConformanceCaseExpectation,
263
- note: z
264
- .string()
265
- .optional()
266
- .meta({ description: 'Free-text note printed in the label / failure output.' }),
267
- xfail: ConformanceCaseXfail.optional()
268
- });
@@ -60,7 +60,7 @@ import '../assert_dev_env.js';
60
60
  import { describe, assert } from 'vitest';
61
61
  import { object } from '@fuzdev/fuz_schema/schema.ts';
62
62
  import { fact_hash_bytes } from '@fuzdev/fuz_util/fact_hash.ts';
63
- import { FactHashSchema } from '../../primitive_schemas_fuz.js';
63
+ import { FactHashSchema } from '../../primitive_schemas.js';
64
64
  import { CellCreateOutput } from '../../auth/cell_action_specs.js';
65
65
  import { FACT_CACHE_CONTROL, FACT_CONTENT_SECURITY_POLICY, FACT_X_CONTENT_TYPE_OPTIONS } from '../../server/fact_security_headers.js';
66
66
  import { test_if } from './capabilities.js';
@@ -1,5 +1,5 @@
1
1
  import '../assert_dev_env.js';
2
- import { Uuid } from '../../primitive_schemas_fuz.js';
2
+ import { Uuid } from '../../primitive_schemas.js';
3
3
  import { type ValidationOutput, type ValidationSchema } from '../../schema_issues.js';
4
4
  import type { TestAccount } from '../app_server.js';
5
5
  import type { BackendCapabilities } from './capabilities.js';
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/setup.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA4B9B,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,gBAAg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B,GACnC,QAAQ,sCAAsC,EAC9C,UAAS;IAAE,cAAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAAO,KACtD,OAAO,CAAC,cAAc,CAcxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,gBAAgB,EAC9D,QAAQ,MAAM,EACd,QAAQ,CAAC,EACT,KAAK,OAAO,KACV,gBAAgB,CAAC,CAAC,CAMpB,CAAC;AA8BF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GACnC,QAAQ,sCAAsC,KAC5C,OAAO,CAAC,cAAc,CAC8C,CAAC;AAExE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,GACrC,QAAQ,sCAAsC,KAC5C,OAAO,CAAC,gBAAgB,CACgD,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAoVlD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,2BAA2B,GACvC,QAAQ,sCAAsC,EAC9C,UAAU,wBAAwB,KAChC,SAsIF,CAAC"}
@@ -22,8 +22,7 @@ import '../assert_dev_env.js';
22
22
  * @module
23
23
  */
24
24
  import { array, literal, parse, string, strip_object } from '@fuzdev/fuz_schema/schema.ts';
25
- import { USERNAME_LENGTH_MAX } from '../../primitive_schemas.js';
26
- import { Uuid } from '../../primitive_schemas_fuz.js';
25
+ import { USERNAME_LENGTH_MAX, Uuid } from '../../primitive_schemas.js';
27
26
  import { format_issues, parse_any } from '../../schema_issues.js';
28
27
  import { DAEMON_TOKEN_HEADER } from '../../auth/daemon_token.js';
29
28
  import { DEFAULT_TEST_PASSWORD } from '../test_credentials.js';
@@ -180,7 +179,7 @@ const rpc_via_transport = async (transport, rpc_path, method, params, backend_na
180
179
  */
181
180
  export const capture_schema_snapshot = async (handle, options = {}) => {
182
181
  const raw = await rpc_via_transport(handle.keeper_daemon_transport, handle.config.rpc_path, '_testing_schema_snapshot', { exclude_tables: [...(options.exclude_tables ?? [])] }, handle.config.name, { [DAEMON_TOKEN_HEADER]: handle.daemon_token });
183
- // TODO: cast, not parse — `SchemaSnapshot.parse(raw)` would validate the wire
182
+ // TODO: cast, not parse — `parse(SchemaSnapshot, raw)` would validate the wire
184
183
  // against the schema (the `capture_action_manifest` twin parses + uses a
185
184
  // strict object); parsing here may surface a latent schema-model gap to
186
185
  // reconcile first, so it's left as a follow-up.
@@ -212,7 +211,7 @@ export const parse_capture_answer = (method, schema, raw) => {
212
211
  * daemon-token channel, then `parse_capture_answer`.
213
212
  *
214
213
  * (`capture_schema_snapshot` deliberately stays separate: it *casts* rather
215
- * than parses — narrowing a large snapshot to the Zod model would silently
214
+ * than parses — narrowing a large snapshot to the schema model would silently
216
215
  * drop unmodeled fields the parity diff should still see — and it takes an
217
216
  * `exclude_tables` param.)
218
217
  */