@xemahq/biome-database-nest 7.3.0 → 8.1.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/LICENSE +175 -176
- package/README.md +59 -0
- package/bin/xema-org-erasure-graph.cjs +3 -0
- package/dist/bin/xema-org-erasure-graph.js +0 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/biome-database-url-from-env.d.ts +4 -0
- package/dist/lib/biome-database-url-from-env.d.ts.map +1 -0
- package/dist/lib/biome-database-url-from-env.js +27 -0
- package/dist/lib/biome-database-url-from-env.js.map +1 -0
- package/dist/lib/biome-migrations.d.ts +2 -0
- package/dist/lib/biome-migrations.d.ts.map +1 -1
- package/dist/lib/biome-migrations.js +3 -1
- package/dist/lib/biome-migrations.js.map +1 -1
- package/dist/lib/bootstrap.d.ts +2 -0
- package/dist/lib/bootstrap.d.ts.map +1 -1
- package/dist/lib/bootstrap.js +4 -3
- package/dist/lib/bootstrap.js.map +1 -1
- package/dist/lib/ledger-rows.d.ts +1 -0
- package/dist/lib/ledger-rows.d.ts.map +1 -1
- package/dist/lib/ledger-rows.js +9 -0
- package/dist/lib/ledger-rows.js.map +1 -1
- package/dist/lib/nest/biome-database.module.d.ts +2 -0
- package/dist/lib/nest/biome-database.module.d.ts.map +1 -1
- package/dist/lib/nest/biome-database.module.js +5 -0
- package/dist/lib/nest/biome-database.module.js.map +1 -1
- package/dist/lib/nest/org-erasure.module.d.ts.map +1 -1
- package/dist/lib/nest/org-erasure.module.js +2 -0
- package/dist/lib/nest/org-erasure.module.js.map +1 -1
- package/dist/lib/nest/prisma-service-factory.d.ts +2 -0
- package/dist/lib/nest/prisma-service-factory.d.ts.map +1 -1
- package/dist/lib/nest/prisma-service-factory.js +29 -14
- package/dist/lib/nest/prisma-service-factory.js.map +1 -1
- package/dist/lib/org-quiesce/org-erasure-isolation-error.d.ts +6 -0
- package/dist/lib/org-quiesce/org-erasure-isolation-error.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-erasure-isolation-error.js +16 -0
- package/dist/lib/org-quiesce/org-erasure-isolation-error.js.map +1 -0
- package/dist/lib/org-quiesce/org-erasure-transaction.d.ts +2 -0
- package/dist/lib/org-quiesce/org-erasure-transaction.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-erasure-transaction.js +16 -0
- package/dist/lib/org-quiesce/org-erasure-transaction.js.map +1 -0
- package/dist/lib/org-quiesce/org-quiesce-marks.d.ts +2 -2
- package/dist/lib/org-quiesce/org-quiesce-marks.d.ts.map +1 -1
- package/dist/lib/org-quiesce/org-quiesce-marks.js +13 -9
- package/dist/lib/org-quiesce/org-quiesce-marks.js.map +1 -1
- package/dist/lib/org-quiesce/org-quiesce-marks.migrations.d.ts +1 -0
- package/dist/lib/org-quiesce/org-quiesce-marks.migrations.d.ts.map +1 -1
- package/dist/lib/org-quiesce/org-quiesce-marks.migrations.js +26 -3
- package/dist/lib/org-quiesce/org-quiesce-marks.migrations.js.map +1 -1
- package/dist/lib/org-quiesce/org-quiesce-refusal-mapping.d.ts +13 -0
- package/dist/lib/org-quiesce/org-quiesce-refusal-mapping.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-quiesce-refusal-mapping.js +63 -0
- package/dist/lib/org-quiesce/org-quiesce-refusal-mapping.js.map +1 -0
- package/dist/lib/org-quiesce/org-quiesce-refusal.d.ts +26 -1
- package/dist/lib/org-quiesce/org-quiesce-refusal.d.ts.map +1 -1
- package/dist/lib/org-quiesce/org-quiesce-refusal.js +34 -3
- package/dist/lib/org-quiesce/org-quiesce-refusal.js.map +1 -1
- package/dist/lib/org-quiesce/org-write-fence-apply.d.ts +10 -0
- package/dist/lib/org-quiesce/org-write-fence-apply.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-apply.js +55 -0
- package/dist/lib/org-quiesce/org-write-fence-apply.js.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-coverage.d.ts +18 -0
- package/dist/lib/org-quiesce/org-write-fence-coverage.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-coverage.js +51 -0
- package/dist/lib/org-quiesce/org-write-fence-coverage.js.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-token.sql.d.ts +2 -0
- package/dist/lib/org-quiesce/org-write-fence-token.sql.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-token.sql.js +80 -0
- package/dist/lib/org-quiesce/org-write-fence-token.sql.js.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-triggers.d.ts +48 -0
- package/dist/lib/org-quiesce/org-write-fence-triggers.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence-triggers.js +171 -0
- package/dist/lib/org-quiesce/org-write-fence-triggers.js.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence.sql.d.ts +2 -0
- package/dist/lib/org-quiesce/org-write-fence.sql.d.ts.map +1 -0
- package/dist/lib/org-quiesce/org-write-fence.sql.js +132 -0
- package/dist/lib/org-quiesce/org-write-fence.sql.js.map +1 -0
- package/dist/lib/sdk-owned-migrations.d.ts.map +1 -1
- package/dist/lib/sdk-owned-migrations.js +5 -1
- package/dist/lib/sdk-owned-migrations.js.map +1 -1
- package/dist/lib/service-migration-scan.d.ts +2 -1
- package/dist/lib/service-migration-scan.d.ts.map +1 -1
- package/dist/lib/service-migration-scan.js +7 -2
- package/dist/lib/service-migration-scan.js.map +1 -1
- package/dist/lib/tenant-isolation/authored-resource-org-erasure.d.ts.map +1 -1
- package/dist/lib/tenant-isolation/authored-resource-org-erasure.js +22 -19
- package/dist/lib/tenant-isolation/authored-resource-org-erasure.js.map +1 -1
- package/dist/lib/tenant-isolation/org-erasure.d.ts.map +1 -1
- package/dist/lib/tenant-isolation/org-erasure.js +8 -7
- package/dist/lib/tenant-isolation/org-erasure.js.map +1 -1
- package/package.json +23 -20
- package/xema-peer-facts.json +105 -14
package/LICENSE
CHANGED
|
@@ -1,176 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
the Work
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
the
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
and
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Work
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
1
|
+
Xema Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
|
|
4
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
5
|
+
|
|
6
|
+
-----------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
Parameters
|
|
9
|
+
|
|
10
|
+
Licensor: Neuralchowder Inc.
|
|
11
|
+
|
|
12
|
+
Licensed Work: Xema. The Licensed Work is (c) 2026 Neuralchowder Inc.
|
|
13
|
+
|
|
14
|
+
The Licensed Work includes, without limitation, Xema Core, Xema Runtime,
|
|
15
|
+
Xema Kernel, Xema control plane, Xema application runtime, Xema biome
|
|
16
|
+
runtime, Xema biome registry, Xema store services, Xema orchestration
|
|
17
|
+
services, Xema agents, Xema skills, Xema memory services, Xema APIs, Xema
|
|
18
|
+
user interfaces, Xema command-line tools, Xema deployment artifacts, Xema
|
|
19
|
+
templates, Xema specifications, Xema schemas, Xema manifests, Xema
|
|
20
|
+
documentation, Xema examples, and all source code, object code, binaries,
|
|
21
|
+
packages, modules, configuration files, manifests, schemas, examples,
|
|
22
|
+
templates, documentation, and derivative works included in or distributed
|
|
23
|
+
as part of the Xema software project.
|
|
24
|
+
|
|
25
|
+
The Licensed Work does not include any third-party software, libraries,
|
|
26
|
+
dependencies, packages, assets, or components that are distributed with the
|
|
27
|
+
Licensed Work but are governed by their own separate license terms. Such
|
|
28
|
+
third-party materials remain subject to their respective licenses.
|
|
29
|
+
|
|
30
|
+
A specific file, package, component, or directory may state that it is
|
|
31
|
+
governed by a different license. In that case, that specific file, package,
|
|
32
|
+
component, or directory is governed by the license expressly stated therein.
|
|
33
|
+
|
|
34
|
+
Additional Use Grant:
|
|
35
|
+
|
|
36
|
+
You may make production use of the Licensed Work, provided that your use
|
|
37
|
+
does not include offering, providing, making available, distributing,
|
|
38
|
+
hosting, managing, embedding, reselling, white-labeling, sublicensing,
|
|
39
|
+
commercializing, or otherwise making the Licensed Work, or any modified
|
|
40
|
+
version or derivative work of the Licensed Work, available to Third Parties
|
|
41
|
+
as part of a Competitive Offering.
|
|
42
|
+
|
|
43
|
+
The following definitions and clarifications form part of, and govern
|
|
44
|
+
the interpretation of, the Additional Use Grant set out above.
|
|
45
|
+
|
|
46
|
+
1. "Production Use" means any use of the Licensed Work other than for
|
|
47
|
+
development, testing, evaluation, demonstration, experimentation,
|
|
48
|
+
benchmarking, or other non-production purposes.
|
|
49
|
+
|
|
50
|
+
2. "Affiliate" means any entity that, directly or indirectly,
|
|
51
|
+
controls, is controlled by, or is under common control with you,
|
|
52
|
+
where "control" means ownership of more than fifty percent (50%) of
|
|
53
|
+
the voting interests of the entity, or the power to direct its
|
|
54
|
+
management.
|
|
55
|
+
|
|
56
|
+
3. "Third Party" means any natural person or legal entity other than
|
|
57
|
+
you and your Affiliates.
|
|
58
|
+
|
|
59
|
+
4. "Competitive Offering" means any product or service, made available
|
|
60
|
+
to one or more Third Parties for a fee or other consideration
|
|
61
|
+
(including without limitation on a paid, subscription,
|
|
62
|
+
advertising-supported, hosted, or managed-service basis), that is
|
|
63
|
+
offered or marketed as, or that competes with, a software platform,
|
|
64
|
+
runtime, orchestration system, agent or automation system,
|
|
65
|
+
extension or distribution marketplace, or other software system
|
|
66
|
+
that provides, in substantial part, the same or substantially
|
|
67
|
+
similar capabilities as those provided by the Licensed Work. A
|
|
68
|
+
product or service is a Competitive Offering whether the Licensed
|
|
69
|
+
Work is provided in whole or in part, alone or bundled with other
|
|
70
|
+
software, and whether modified or unmodified.
|
|
71
|
+
|
|
72
|
+
5. Providing, hosting, or managing the Licensed Work for a Third Party,
|
|
73
|
+
or otherwise making the Licensed Work available to a Third Party as
|
|
74
|
+
a hosted or managed service such that the Third Party obtains the
|
|
75
|
+
principal value or functionality of the Licensed Work, is a
|
|
76
|
+
Competitive Offering and is not permitted by the Additional Use
|
|
77
|
+
Grant.
|
|
78
|
+
|
|
79
|
+
6. Subject to the foregoing, the Additional Use Grant permits you to
|
|
80
|
+
make Production Use of the Licensed Work for your own internal
|
|
81
|
+
business purposes and to build, operate, and provide your own
|
|
82
|
+
products and services to Third Parties, provided that the Licensed
|
|
83
|
+
Work itself (whether modified or unmodified) is not the product or
|
|
84
|
+
service, and is not a Competitive Offering, made available to those
|
|
85
|
+
Third Parties.
|
|
86
|
+
|
|
87
|
+
7. You may modify the Licensed Work and create derivative works for
|
|
88
|
+
any purpose permitted by this License. Any Production Use of such
|
|
89
|
+
modified or derivative works remains subject to the same
|
|
90
|
+
restrictions as the Licensed Work, including the prohibition on
|
|
91
|
+
Competitive Offerings.
|
|
92
|
+
|
|
93
|
+
8. Use of the Licensed Work by your own employees, contractors, and
|
|
94
|
+
agents, acting on your behalf and for your benefit, is not by
|
|
95
|
+
itself making the Licensed Work available to a Third Party.
|
|
96
|
+
|
|
97
|
+
9. Embedding or distributing the Licensed Work as a component of your
|
|
98
|
+
own product or service is permitted only where the Licensed Work
|
|
99
|
+
does not constitute the principal value of that product or service
|
|
100
|
+
and the product or service is not a Competitive Offering.
|
|
101
|
+
|
|
102
|
+
10. Nothing in this Additional Use Grant grants any right to use any
|
|
103
|
+
name, trademark, service mark, or logo of the Licensor or its
|
|
104
|
+
Affiliates, except as reasonably required for customary
|
|
105
|
+
attribution.
|
|
106
|
+
|
|
107
|
+
11. The rights stated in this Additional Use Grant are the maximum
|
|
108
|
+
rights granted for Production Use prior to the Change Date. Any
|
|
109
|
+
Production Use not expressly permitted requires a separate
|
|
110
|
+
commercial license from the Licensor.
|
|
111
|
+
|
|
112
|
+
12. If any provision of this Additional Use Grant is held invalid or
|
|
113
|
+
unenforceable, that provision shall be limited or eliminated to
|
|
114
|
+
the minimum extent necessary so that the remainder of this
|
|
115
|
+
Additional Use Grant, and of this License, remains in full force
|
|
116
|
+
and effect. The Licensor reserves all rights not expressly granted
|
|
117
|
+
by this License.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
Change Date: Four years from the date the specific version of the Licensed
|
|
121
|
+
Work is first publicly released by Licensor.
|
|
122
|
+
|
|
123
|
+
Change License: Mozilla Public License, Version 2.0
|
|
124
|
+
|
|
125
|
+
For information about alternative licensing arrangements, commercial
|
|
126
|
+
licensing, enterprise licensing, OEM licensing, appliance licensing, managed
|
|
127
|
+
service licensing, cloud provider licensing, or other commercial use of the
|
|
128
|
+
Licensed Work, please contact: licensing@neuralchowder.com
|
|
129
|
+
|
|
130
|
+
-----------------------------------------------------------------------------
|
|
131
|
+
|
|
132
|
+
Notice
|
|
133
|
+
|
|
134
|
+
Business Source License 1.1
|
|
135
|
+
|
|
136
|
+
Terms
|
|
137
|
+
|
|
138
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
139
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
140
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
141
|
+
production use.
|
|
142
|
+
|
|
143
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
144
|
+
available distribution of a specific version of the Licensed Work under this
|
|
145
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
146
|
+
the terms of the Change License, and the rights granted in the paragraph above
|
|
147
|
+
terminate.
|
|
148
|
+
|
|
149
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
150
|
+
currently in effect as described in this License, you must purchase a
|
|
151
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
152
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
153
|
+
|
|
154
|
+
All copies of the original and modified Licensed Work, and derivative works of
|
|
155
|
+
the Licensed Work, are subject to this License. This License applies separately
|
|
156
|
+
for each version of the Licensed Work and the Change Date may vary for each
|
|
157
|
+
version of the Licensed Work released by Licensor.
|
|
158
|
+
|
|
159
|
+
You must conspicuously display this License on each original or modified copy
|
|
160
|
+
of the Licensed Work. If you receive the Licensed Work in original or modified
|
|
161
|
+
form from a third party, the terms and conditions set forth in this License
|
|
162
|
+
apply to your use of that work.
|
|
163
|
+
|
|
164
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
165
|
+
terminate your rights under this License for the current and all other
|
|
166
|
+
versions of the Licensed Work.
|
|
167
|
+
|
|
168
|
+
This License does not grant you any right in any trademark or logo of Licensor
|
|
169
|
+
or its affiliates, provided that you may use a trademark or logo of Licensor
|
|
170
|
+
as expressly required by this License.
|
|
171
|
+
|
|
172
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
|
|
173
|
+
"AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
|
|
174
|
+
OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
175
|
+
FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
|
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ Mount it beside `XemaServiceModule.forBiome(...)`, which publishes the connectio
|
|
|
53
53
|
| `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD`, `DB_NAME`, `DB_SCHEMA`, `DB_SSL_PARAMS`, `DB_POOLER_HOST`, `DB_POOLER_PORT`, `DB_POOLER_SSL_PARAMS` | Local development connection override; refused when `NODE_ENV=production`. |
|
|
54
54
|
| `DATABASE_URL` | Connection string for operator migrations when none is passed. |
|
|
55
55
|
|
|
56
|
+
`createBiomePrismaService` accepts an optional `transactionOptions` (`maxWait`, `timeout`, `isolationLevel`), passed to the PrismaClient constructor, so interactive transactions that start while the host is stalled are not cut off by Prisma's defaults. When omitted Prisma's defaults apply, and options passed to an individual `$transaction` still win.
|
|
57
|
+
|
|
56
58
|
Every Postgres session must run in UTC. The package verifies this and refuses to start otherwise; it never sets the zone.
|
|
57
59
|
|
|
58
60
|
## Org-data erasure coverage
|
|
@@ -91,6 +93,63 @@ createBiomePrismaService(PrismaClient, {
|
|
|
91
93
|
|
|
92
94
|
The org-erasure graph generator and the `prisma generate` client generator must always run together: a client-only regenerate after an `onDelete` change leaves a stale graph that the graph-to-client check cannot detect.
|
|
93
95
|
|
|
96
|
+
## Org write fence
|
|
97
|
+
|
|
98
|
+
While an org is being erased, nothing may write new rows for it. The fence lives in the database: SDK-owned migrations (shipped by `OrgQuiesceMarksModule`, which `OrgErasureModule` imports) create the marks table `org_quiesce_marks`, a concurrency token table `org_write_fence_rows` (an org id and a counter, never a mark, retained like the marks) and the `xema_org_*` SQL functions. A trigger on a guarded table refuses a write for a marked org with SQLSTATE `XQ409` (`ORG_QUIESCING`, the org in DETAIL).
|
|
99
|
+
|
|
100
|
+
### Declare the guarded tables
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
BiomeDatabaseModule.forRoot({
|
|
104
|
+
// ...
|
|
105
|
+
orgWriteFenceTables: [
|
|
106
|
+
{ table: 'sessions', orgColumn: 'org_id' }, // column form
|
|
107
|
+
{
|
|
108
|
+
table: 'session_items', // parent form: the org lives on the parent row
|
|
109
|
+
parent: { fkColumn: 'session_id', table: 'sessions', key: 'id', orgColumn: 'org_id' },
|
|
110
|
+
},
|
|
111
|
+
{ table: 'outbox_events', orgColumn: 'org_id', events: 'insert' }, // outbox or drain table
|
|
112
|
+
],
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This is the one place. The SDK's migration phase creates, re-applies, repairs and drops the triggers after the biome's own Prisma tables exist, and records the applied declaration in the operator-migration ledger as `sdk-org-quiesce-write-fence-triggers` (one replaceable row). Table and column names are the database names, so they must be lowercase `[a-z_][a-z0-9_]*`: use `@@map` and `@map` for a model or field whose database name is not. Declaring tables without `OrgQuiesceMarksModule` in the migration phase fails with `ORG_WRITE_FENCE_FUNCTIONS_MISSING`. A biome's test harness gets the same triggers through `orgWriteFenceTables` on `createTestMigrator` and `provisionTestDatabase` of `@xemahq/biome-database-nest-testing`.
|
|
117
|
+
|
|
118
|
+
- Column form: the trigger reads the org from `orgColumn`. A NULL org is not fenced.
|
|
119
|
+
- Parent form: the trigger reads the org from `parent.orgColumn` on the row `parent.key = fkColumn`. It reaches ONE level only: a grandchild must name its own parent that carries the org column, or be declared against the table that does. A row whose parent is missing is refused with `XQ404` (`ORG_FENCE_PARENT_MISSING`, the foreign key in DETAIL). The parameter is cast to the parent key's own type, so a uuid or int key keeps its index.
|
|
120
|
+
- `events: 'all'` (default) fences every INSERT, UPDATE and DELETE. `events: 'insert'` is for outbox and drain tables whose later UPDATEs and DELETEs only advance delivery state: it fences INSERT, and an UPDATE only when the org (or, in the parent form, the foreign key) changes, which covers the UPDATE half of `INSERT ... ON CONFLICT DO UPDATE`. A drain-state UPDATE stays unfenced.
|
|
121
|
+
- Every declared table also refuses TRUNCATE (`XQ410`, `ORG_FENCE_TRUNCATE_REFUSED`, the table in DETAIL), for everyone including the eraser: a TRUNCATE cannot be attributed to an org. A test suite that TRUNCATEs a declared table must DELETE instead.
|
|
122
|
+
|
|
123
|
+
Prove the declaration from a spec with `assertOrgWriteFenceTriggers(db, tables)` (checks every trigger exactly), and prove it covers the erasure sweep with `assertOrgWriteFenceCoversErasureGraph(graph, tables, exempt, { tableOfModel })`. The second is a pure function for a biome spec, not a migration-time check: the erasure graph carries model and field names only, so the biome states each model's table. A swept table must be fenced or listed in `exempt` with a reason (for example a payload-free dead-letter table that must stay writable after the mark); otherwise it throws, naming every gap.
|
|
124
|
+
|
|
125
|
+
### Errors
|
|
126
|
+
|
|
127
|
+
`XQ409` becomes `OrgQuiescingRefusedError` (HTTP 409), `XQ404` becomes `OrgFenceParentMissingError` (`code` `ORG_FENCE_PARENT_MISSING`, `fkValue`), `XQ410` becomes `OrgFenceTruncateRefusedError`, for model, raw and interactive-transaction operations of a client from `createBiomePrismaService` (`orgFenceRefusalFrom` maps a database error by hand). Each keeps the database error as `cause`. `XQ404` replaces the foreign-key violation (Prisma `P2003`) a caller may have mapped before. `OrgFenceParentMissingError` extends `Error`, not `HttpException`, so unmapped it is a 500: an adopter must map it where it mapped `P2003`. A serialization failure (`40001`, Prisma `P2034`) from the fence is passed through untouched.
|
|
128
|
+
|
|
129
|
+
### Erasers
|
|
130
|
+
|
|
131
|
+
`beginOrgErasureWithinTx(tx, orgId)` takes the org's exclusive lock and marks the org; the triggers let a transaction that holds that lock write. The generic sweep (`eraseOrgData`) and `eraseOwnedAuthoredResourceGraph` call it, and a biome-owned eraser must call it in each of its erasure transactions. Adopter-visible changes:
|
|
132
|
+
|
|
133
|
+
- Both SDK erasers now mark the org permanently, and need the `xema_org_*` functions: without `OrgQuiesceMarksModule` the erasure fails with `42883` (undefined function). `OrgErasureModule` now imports `OrgQuiesceMarksModule`, so a service that mounts it gets them.
|
|
134
|
+
- `inOrgErasureTransaction(client, orgId, work)` opens its own interactive transaction, always READ COMMITTED whatever the session's `default_transaction_isolation` is, so it refuses a transaction client (one without `$transaction`). `beginOrgErasureWithinTx` checks its transaction is READ COMMITTED and otherwise throws `OrgErasureIsolationError` (`code` `ORG_ERASURE_ISOLATION`): under a fixed snapshot the eraser would not see a row a Read Committed writer commits while it waits for the org lock, and that row would survive the erasure. A biome-owned eraser that opens its own transaction must open it READ COMMITTED.
|
|
135
|
+
- Every client from `createBiomePrismaService` is now a Prisma `$extends` client carrying the refusal extension. `$on` is restored on it (an `$extends` client drops it); `$connect`, `$disconnect`, `$transaction`, `$queryRaw` and the model delegates work as before. A generated Prisma 7 client is not `instanceof PrismaClient` even when raw, so nothing changes there. No consumer in the xema repositories uses `$on`, `$use`, `$extends` or `instanceof PrismaClient`.
|
|
136
|
+
|
|
137
|
+
### The eraser's exemption
|
|
138
|
+
|
|
139
|
+
`beginOrgErasureWithinTx` marks the org and declares the erasure in the transaction-local setting `xema.org_erasure = '<org>:<txid>'`. For a marked org the fence trusts it only when the org and the txid match, verifies once against `pg_locks` that this backend holds the org's exclusive lock, and records that in `xema.org_erasure_verified`; the rest of the transaction's rows skip the `pg_locks` scan (which takes every lock-manager partition lock). Without a declaration (a biome-owned eraser that took the lock itself) the fence checks `pg_locks` on every row. Both settings are transaction-local and bound to the txid, so they cannot carry to another transaction. Threat model: the fence orders concurrent APPLICATION writers against an erasure; it is not a defence against a client running arbitrary SQL in its own transaction, which could just as well delete the marks. Measured: deleting 5000 rows of a marked org in one erasure transaction cost about 0.4 ms per row before and about 0.1 ms per row after.
|
|
140
|
+
|
|
141
|
+
### Isolation levels
|
|
142
|
+
|
|
143
|
+
Under Read Committed each statement has a fresh snapshot, so the fence reads the mark after the shared lock and sees every mark committed before it. Under Repeatable Read and Serializable the snapshot is fixed, so a writer also runs `INSERT ... ON CONFLICT DO NOTHING` on the org's `org_write_fence_rows` row (no row lock); the marker upserts that row in the same transaction as the mark. A writer whose snapshot predates the mark gets `40001`; its retry reads the mark and is refused with `XQ409`. A retry stays Serializable, so refusing non-Read-Committed transactions outright would fail forever; instead only a writer racing a mark ever sees `40001`, and callers already retry it. Two writers of a fresh org's first write under Repeatable Read can see one spurious `40001`, and two such writers creating the first token rows of two orgs in opposite order can deadlock once (`40P01`); both are retried. A READ ONLY transaction needs no token and takes none. A writing role needs SELECT and INSERT on `org_write_fence_rows` (checked live: INSERT alone gives 42501), and only for writes outside Read Committed; it needs SELECT on `org_quiesce_marks` in every case.
|
|
144
|
+
|
|
145
|
+
### Cost and limits
|
|
146
|
+
|
|
147
|
+
The hot path is one shared advisory lock and one indexed read per guarded row write; the `pg_locks` scan that recognises an eraser runs only for a marked org. Measured on a local PostgreSQL, one org, 5000 single-row INSERTs in one transaction: about 0.9 ms per row with no trigger, 1.3 ms with the fence at Read Committed, 1.5 ms at Repeatable Read or Serializable (client round trip included).
|
|
148
|
+
|
|
149
|
+
One shared advisory lock is held per DISTINCT org a transaction writes, until commit, and each counts against `max_locks_per_transaction` (default 64 times `max_connections` lock slots in total). A transaction that writes rows of thousands of orgs can exhaust the lock table: batch per org, or keep cross-org batches small.
|
|
150
|
+
|
|
151
|
+
Every `xema_org_*` function pins `search_path` to the one the migration ran with (`SET search_path FROM CURRENT`), so the fence behaves the same whatever the calling connection's `search_path`.
|
|
152
|
+
|
|
94
153
|
## Testing
|
|
95
154
|
|
|
96
155
|
Test helpers (the biome migrator for `@xemahq/pg-test-harness` and the prefix-migration fixture) live in the separate `@xemahq/biome-database-nest-testing` package, so this runtime package never references the test harness. Install that package as a `devDependency`.
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { DEFAULT_BIOME_DB_KEY, deriveBiomeSchemaName } from './lib/schema-name';
|
|
2
2
|
export { acquireSchemaScopedXactAdvisoryLock, acquireSchemaScopedXactAdvisoryLockShared, acquireXactAdvisoryLock, releaseAdvisoryLock, tryAcquireAdvisoryLock, tryAcquireXactAdvisoryLock, type AdvisoryLockClient, type AdvisoryLockKey, } from './lib/advisory-lock';
|
|
3
|
+
export { BIOME_DATABASE_URL_BOOT_ENV, biomeDatabaseUrlFromEnv, } from './lib/biome-database-url-from-env';
|
|
3
4
|
export { BIOME_DB_SESSION_TIMEZONE, composeBiomeDatabaseUrl, composeBiomeDatabaseUrlFromEnv, ensureBiomeDbSearchPath, type BiomeDatabaseUrlParts, } from './lib/database-url';
|
|
4
5
|
export { assertIdempotencyRecordPrismaModel, IDEMPOTENCY_CLAIMS_MIGRATION_NAME, IDEMPOTENCY_CLAIMS_MIGRATION_SQL, IDEMPOTENCY_RECORD_CREATE_SQL, IdempotencyRecordConventionError, idempotencyRecordPrismaModel, } from './lib/idempotency-record-schema';
|
|
5
6
|
export { assertReleaseIntentPrismaModel, ReleaseIntentConventionError, } from './lib/release-intent-schema';
|
|
@@ -50,8 +51,13 @@ export { eraseOwnedAuthoredResourceGraph, type AuthoredResourceGraphErasureClien
|
|
|
50
51
|
export { OrgErasureModule, type OrgErasureModuleOptions, } from './lib/nest/org-erasure.module';
|
|
51
52
|
export { assertOrgNotProtected, IdentityOrgProtectionProbe, ORG_DATA_ERASURE_CAPABILITY, ORG_ERASURE_ROUTE_PATH, ORG_ERASURE_RUNNER, ORG_PROTECTION_GRANT, ORGANIZATION_PROTECTED_ERROR_CODE, OrgErasureController, OrgProtectionGuard, OrgProtectionUnavailableError, ProtectedOrgErasureRefusedError, type OrgErasureReport, type OrgErasureRunner, type OrgProtectionGrant, type OrgProtectionProbe, } from '@xemahq/org-erasure-nest';
|
|
52
53
|
export { BiomeDatabaseBootMode, biomeDatabaseBootModeFromEnv, } from './lib/boot-mode';
|
|
53
|
-
export { isOrgQuiescing, isOrgQuiescingWithinTx, markOrgQuiescingWithinTx, orgNotQuiescingSql, assertOrgNotQuiescingWithinTx, } from './lib/org-quiesce/org-quiesce-marks';
|
|
54
|
+
export { beginOrgErasureWithinTx, isOrgQuiescing, isOrgQuiescingWithinTx, markOrgQuiescingWithinTx, orgNotQuiescingSql, assertOrgNotQuiescingWithinTx, } from './lib/org-quiesce/org-quiesce-marks';
|
|
54
55
|
export { orgQuiesceMarksMigrations } from './lib/org-quiesce/org-quiesce-marks.migrations';
|
|
56
|
+
export { OrgErasureIsolationError } from './lib/org-quiesce/org-erasure-isolation-error';
|
|
55
57
|
export { OrgQuiesceMarksModule } from './lib/org-quiesce/org-quiesce-marks.module';
|
|
56
|
-
export { OrgQuiesceRefusal, OrgQuiescingRefusedError, } from './lib/org-quiesce/org-quiesce-refusal';
|
|
58
|
+
export { OrgFenceFailure, OrgFenceParentMissingError, OrgFenceSqlState, OrgFenceTruncateRefusedError, OrgQuiesceRefusal, OrgQuiescingRefusedError, } from './lib/org-quiesce/org-quiesce-refusal';
|
|
59
|
+
export { assertOrgWriteFenceCoversErasureGraph, OrgWriteFenceCoverageError, type OrgWriteFenceCoverageOptions, type OrgWriteFenceExemption, } from './lib/org-quiesce/org-write-fence-coverage';
|
|
60
|
+
export { orgFenceRefusalFrom, orgQuiescingRefusalFrom } from './lib/org-quiesce/org-quiesce-refusal-mapping';
|
|
61
|
+
export { OrgWriteFenceFunctionsMissingError } from './lib/org-quiesce/org-write-fence-apply';
|
|
62
|
+
export { OrgWriteFenceDuplicateTableError, OrgWriteFenceIdentifierError, OrgWriteFenceTriggersMissingError, assertOrgWriteFenceTriggers, type OrgWriteFenceColumnTable, type OrgWriteFenceEvents, type OrgWriteFenceParentTable, type OrgWriteFenceTable, } from './lib/org-quiesce/org-write-fence-triggers';
|
|
57
63
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,C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