@happyvertical/smrt-users 0.40.69 → 0.41.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/AGENTS.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Multi-tenant user management with RBAC, hierarchical tenants, session handling, and SvelteKit integration.
4
4
 
5
+ ## Modules
6
+
7
+ | Module | Scope | Module doc |
8
+ |---|---|---|
9
+ | `src/retention.ts` | expired session/token/CLI-auth reaping and its wiring into the framework retention sweep | [agents/retention.md](agents/retention.md) |
10
+
5
11
  ## Models (14)
6
12
 
7
13
  | Model | Key Pattern |
@@ -295,9 +301,14 @@ the package root).
295
301
  private `oidc_profile_email_reservations.email_key`, `User.emailKey`, and the
296
302
  unique `User.profileId`; local callbacks acquire exact issuer/subject and normalized
297
303
  email locks in deterministic order so changed email claims also serialize.
298
- SQLite and DuckDB callbacks additionally serialize transactions per database
299
- URL because one adapter cannot safely overlap unrelated root transactions;
300
- owner-authorized DuckDB callbacks use that same root-handle serialization;
304
+ SQLite and DuckDB callbacks additionally serialize every root-handle statement
305
+ the coordinator owns per database URL `_smrt_backfills` initialization, the
306
+ transaction, and the post-commit rebind because one adapter multiplexes a
307
+ single native connection and cannot safely overlap unrelated root
308
+ transactions. Never overlap two statements on one such handle, inside a
309
+ transaction or not: rebind and owner/email candidate reads are sequential,
310
+ never `Promise.all`. Owner-authorized DuckDB callbacks use that same
311
+ root-handle serialization;
301
312
  PostgreSQL deadlock and serialization errors use a bounded transaction retry.
302
313
  Newly provisioned Profiles use non-semantic per-profile slugs so equal IdP
303
314
  display names cannot trigger a natural-key upsert;