@astrale-os/kernel-dsl 1.0.0-beta.27 → 1.0.0-beta.29

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 (91) hide show
  1. package/dist/v1/addressing/ordering.d.ts +2 -2
  2. package/dist/v1/addressing/ordering.js +2 -4
  3. package/dist/v1/builder/index.d.ts +2 -0
  4. package/dist/v1/builder/index.js +1 -0
  5. package/dist/v1/builder/schema/projection/identity.d.ts +15 -0
  6. package/dist/v1/builder/schema/projection/property.d.ts +3 -3
  7. package/dist/v1/builder/schema/projection/resolved-class.d.ts +3 -3
  8. package/dist/v1/builder/schema/rule.d.ts +316 -0
  9. package/dist/v1/builder/schema/rule.js +192 -0
  10. package/dist/v1/bundle/index.d.ts +2 -0
  11. package/dist/v1/bundle/index.js +1 -0
  12. package/dist/v1/bundle/rule.d.ts +14 -0
  13. package/dist/v1/bundle/rule.js +41 -0
  14. package/dist/v1/compiled/admission/diagnostic.d.ts +14 -0
  15. package/dist/v1/compiled/admission/diagnostic.js +6 -0
  16. package/dist/v1/compiled/admission/semantics/policy/callable.js +2 -3
  17. package/dist/v1/compiled/admission/semantics/policy/parity.js +8 -13
  18. package/dist/v1/compiled/admission/semantics/policy/pattern.js +3 -5
  19. package/dist/v1/compiled/admission/wire/policy.js +16 -11
  20. package/dist/v1/compiled/index.d.ts +2 -0
  21. package/dist/v1/compiled/index.js +1 -0
  22. package/dist/v1/compiled/rule.d.ts +49 -0
  23. package/dist/v1/compiled/rule.js +169 -0
  24. package/dist/v1/domain/namespace/member-collection.js +4 -1
  25. package/dist/v1/language/callable/admission.js +2 -1
  26. package/dist/v1/language/class/resolved.d.ts +9 -4
  27. package/dist/v1/language/policy/analysis/branches.js +6 -7
  28. package/dist/v1/language/policy/analysis/budgets.js +8 -6
  29. package/dist/v1/language/policy/analysis/checks.js +5 -4
  30. package/dist/v1/language/policy/analysis/composition.js +2 -2
  31. package/dist/v1/language/policy/analysis/typing.js +3 -2
  32. package/dist/v1/language/policy/model/policy.d.ts +22 -0
  33. package/dist/v1/language/policy/model/policy.js +28 -4
  34. package/dist/v1/language/policy/normalization/normalize.js +33 -56
  35. package/dist/v1/language/value/evaluate/assertions.d.ts +2 -2
  36. package/dist/v1/language/value/evaluate/assertions.js +4 -34
  37. package/dist/v1/language/value/evaluate/evaluator.js +10 -15
  38. package/dist/v1/language/value/evaluate/validity.optimization.js +9 -14
  39. package/dist/v1/language/value/files.js +2 -1
  40. package/dist/v1/language/value/model/blob.d.ts +6 -0
  41. package/dist/v1/language/value/model/blob.js +8 -0
  42. package/dist/v1/language/value/ordering.js +1 -3
  43. package/dist/v1/language/value/profile/canonicalize.js +1 -3
  44. package/dist/v1/language/value/syntax/walk.d.ts +2 -0
  45. package/dist/v1/language/value/syntax/walk.js +4 -0
  46. package/dist/v1/schema/compatibility/api.d.ts +2 -0
  47. package/dist/v1/schema/compatibility/api.js +1 -0
  48. package/dist/v1/schema/compatibility/rule.d.ts +13 -0
  49. package/dist/v1/schema/compatibility/rule.js +23 -0
  50. package/dist/v1/schema/enforcement/changes.d.ts +590 -0
  51. package/dist/v1/schema/enforcement/changes.js +566 -0
  52. package/dist/v1/schema/enforcement/derived.d.ts +236 -0
  53. package/dist/v1/schema/enforcement/derived.js +243 -0
  54. package/dist/v1/schema/enforcement/dispose.d.ts +308 -0
  55. package/dist/v1/schema/enforcement/dispose.js +275 -0
  56. package/dist/v1/schema/enforcement/facts.d.ts +89 -0
  57. package/dist/v1/schema/enforcement/facts.js +70 -0
  58. package/dist/v1/schema/enforcement/fields.d.ts +65 -0
  59. package/dist/v1/schema/enforcement/fields.js +36 -0
  60. package/dist/v1/schema/enforcement/index.d.ts +39 -0
  61. package/dist/v1/schema/enforcement/index.js +10 -0
  62. package/dist/v1/schema/enforcement/install.d.ts +1634 -0
  63. package/dist/v1/schema/enforcement/install.js +1223 -0
  64. package/dist/v1/schema/enforcement/lifecycle.d.ts +87 -0
  65. package/dist/v1/schema/enforcement/lifecycle.js +91 -0
  66. package/dist/v1/schema/enforcement/model.d.ts +253 -0
  67. package/dist/v1/schema/enforcement/model.js +1 -0
  68. package/dist/v1/schema/enforcement/obligations.d.ts +248 -0
  69. package/dist/v1/schema/enforcement/obligations.js +240 -0
  70. package/dist/v1/schema/enforcement/write.d.ts +1314 -0
  71. package/dist/v1/schema/enforcement/write.js +1017 -0
  72. package/dist/v1/schema/index.d.ts +1 -0
  73. package/dist/v1/schema/index.js +1 -0
  74. package/dist/v1/schema/resolution/origins.js +4 -7
  75. package/dist/v1/schema/rule.d.ts +4 -5
  76. package/dist/v1/schema/rule.js +19 -13
  77. package/dist/v1/schema/validation/policy/references.js +5 -11
  78. package/dist/v1/schema/validation/policy/uses.js +3 -8
  79. package/dist/v1/schema/validation/value-api.d.ts +1 -1
  80. package/dist/v1/schema/validation/value-api.js +1 -1
  81. package/dist/value/accept.d.ts +6 -0
  82. package/dist/value/accept.js +25 -1
  83. package/dist/value/canonical.d.ts +16 -1
  84. package/dist/value/canonical.js +90 -33
  85. package/dist/value/immutable.optimization.d.ts +2 -0
  86. package/dist/value/immutable.optimization.js +4 -0
  87. package/dist/value/index.d.ts +3 -1
  88. package/dist/value/index.js +2 -1
  89. package/dist/value/rule.d.ts +12 -0
  90. package/dist/value/rule.js +50 -0
  91. package/package.json +5 -1
@@ -0,0 +1,1223 @@
1
+ import { deepFreeze } from '../../language/freeze.js';
2
+ const plan = (code) => ({ error: 'plan', code });
3
+ const projection = (code) => ({ error: 'projection', code });
4
+ const UPGRADE = { code: 'SCHEMA_UPGRADE_INCOMPATIBLE', details: { phase: 'upgrade' } };
5
+ const INPUT = { code: 'SCHEMA_INPUT_INVALID', details: { phase: 'input' } };
6
+ const NOTHING_TO_DO = {
7
+ code: 'SCHEMA_INPUT_INVALID',
8
+ details: { phase: 'input', path: '/domains', issue: 'invalid' },
9
+ };
10
+ const GUARD = { code: 'SCHEMA_REVISION_CONFLICT', details: { phase: 'guard' } };
11
+ const REGISTRY = { code: 'SCHEMA_REVISION_CONFLICT', details: { phase: 'registry' } };
12
+ const BACKEND = { code: 'SCHEMA_BACKEND_FAILED' };
13
+ const ACTIVATION = { code: 'SCHEMA_ACTIVATION_FAILED' };
14
+ const INTEGRITY = { code: 'SCHEMA_INTEGRITY_ERROR' };
15
+ const ARTIFACT = { code: 'SCHEMA_ARTIFACT_INVALID' };
16
+ const UNAVAILABLE = { code: 'SCHEMA_ARTIFACT_UNAVAILABLE' };
17
+ /**
18
+ * Every way the Kernel refuses a schema change, other than the data it stores: `OBLIGATIONS` states
19
+ * those. A refusal of a cutover plan, of a projection or of an installation does not compile without
20
+ * naming its row here, and every other failure of the path maps its code to a row.
21
+ */
22
+ export const INSTALL = deepFreeze({
23
+ // ─── What a request states ───
24
+ REQUEST_UNDECODABLE: {
25
+ phase: 'install',
26
+ layer: 'limit',
27
+ subjects: ['install.request'],
28
+ does: 'refuse',
29
+ refusal: INPUT,
30
+ statement: 'A request decodes: its operation, its Domain entries, its mode and its validation options.',
31
+ laws: ['SY-SCHEMA-INPUT-DECODED'],
32
+ },
33
+ DOMAIN_REPEATED: {
34
+ phase: 'install',
35
+ layer: 'identity',
36
+ subjects: ['install.request'],
37
+ does: 'refuse',
38
+ refusal: INPUT,
39
+ statement: 'A request names one Domain once.',
40
+ laws: ['INSTALL-FINGERPRINT-CANONICAL'],
41
+ },
42
+ CONSENT_UNUSED: {
43
+ phase: 'install',
44
+ layer: 'identity',
45
+ subjects: ['install.identity'],
46
+ does: 'refuse',
47
+ refusal: INPUT,
48
+ statement: 'A Domain which changes no installed issuer takes no issuer consent.',
49
+ laws: ['INSTALLATION-CONSENTED-ISSUER-CHANGE'],
50
+ },
51
+ SESSION_NO_CHANGE: {
52
+ phase: 'install',
53
+ layer: 'lifecycle',
54
+ subjects: ['install.session'],
55
+ does: 'refuse',
56
+ refusal: NOTHING_TO_DO,
57
+ statement: 'A repair session changes something on its source.',
58
+ laws: ['SESSION-WORKFLOW-OPEN-FAILURE'],
59
+ },
60
+ OPERATION_CONFLICT: {
61
+ phase: 'install',
62
+ layer: 'identity',
63
+ subjects: ['install.request'],
64
+ does: 'refuse',
65
+ refusal: { code: 'SCHEMA_OPERATION_CONFLICT' },
66
+ statement: 'One principal and operation id name exactly one schema operation: another request answers FUNCTION_CONFLICT, its reason SCHEMA_OPERATION_CONFLICT.',
67
+ laws: ['INSTALL-OPERATION-SCOPE', 'INSTALL-REPLAY-INTENT'],
68
+ },
69
+ NO_CHANGE: {
70
+ phase: 'install',
71
+ layer: 'lifecycle',
72
+ subjects: ['install.request'],
73
+ does: 'refuse',
74
+ refusal: INTEGRITY,
75
+ raised: plan('CUTOVER_NO_CHANGE'),
76
+ statement: 'Roots which already match the active Registry plan no change: an install answers it as a no-op, unless `INSTALL.INSTANCE_UNCERTIFIED` holds, and any other path which reaches it is incoherent.',
77
+ laws: ['INSTALL-NOOP-INERT'],
78
+ },
79
+ VALIDATION_QUESTIONS_EXCEEDED: {
80
+ phase: 'install',
81
+ layer: 'limit',
82
+ subjects: ['install.validation'],
83
+ does: 'refuse',
84
+ refusal: NOTHING_TO_DO,
85
+ statement: 'One schema change plans at most MAXIMUM_VALIDATION_OBLIGATIONS questions of the store, refused before any read.',
86
+ laws: ['VAL-PLAN-BOUNDED', 'INSTALL-WORKFLOW-PLAN-BOUNDED'],
87
+ },
88
+ // ─── What a Domain serves ───
89
+ SOURCE_INVALID: {
90
+ phase: 'install',
91
+ layer: 'source',
92
+ subjects: ['install.source'],
93
+ does: 'refuse',
94
+ refusal: ARTIFACT,
95
+ statement: 'An install names a source, each one a portable record of a known kind. A local artifact meets its requirements and selects the stored Bundle it names; a token goes only to an authenticated endpoint; a stored release is canonical and within its bound. A release a token cannot fetch for a deterministic reason ends the run with that refusal. A transient or unknown failure of that fetch, or a local artifact whose renewal fails, fails the dispatch and starts no run.',
96
+ laws: ['INSTALLATION-RELEASE-REQUEST', 'INSTALLATION-DOMAIN-VIEWS', 'SB-LOCAL-REQUIREMENTS'],
97
+ },
98
+ SOURCE_ADDRESS_NOT_PUBLIC: {
99
+ phase: 'install',
100
+ layer: 'source',
101
+ subjects: ['install.source'],
102
+ does: 'refuse',
103
+ refusal: { code: 'SCHEMA_DOMAIN_ADDRESS_NOT_PUBLIC' },
104
+ statement: 'The Kernel fetches a remote source only at a public address.',
105
+ laws: ['NET-ADDRESS-SCOPE-ENFORCED'],
106
+ },
107
+ SOURCE_UNAVAILABLE: {
108
+ phase: 'install',
109
+ layer: 'source',
110
+ subjects: ['install.source'],
111
+ does: 'refuse',
112
+ refusal: UNAVAILABLE,
113
+ statement: 'The material a root names is retrievable or retained.',
114
+ laws: ['INSTALL-PINNED-RETAINED', 'SESSION-WORKFLOW-TARGET-UNAVAILABLE', 'SB-RESTORE-EXACT'],
115
+ },
116
+ SOURCE_POLICY_INCOHERENT: {
117
+ phase: 'install',
118
+ layer: 'defect',
119
+ subjects: ['kernel'],
120
+ does: 'refuse',
121
+ refusal: INTEGRITY,
122
+ statement: 'The Kernel resolves sources under a coherent retrieval policy.',
123
+ },
124
+ SOURCE_FETCH_FAILED: {
125
+ phase: 'install',
126
+ layer: 'engine',
127
+ subjects: ['install.source'],
128
+ does: 'refuse',
129
+ refusal: BACKEND,
130
+ statement: 'A fetch that fails at transport proves nothing of the source: the install retries.',
131
+ laws: ['INSTALL-WORKFLOW-FAILURES'],
132
+ },
133
+ SOURCE_AUTHENTICATION_REQUIRED: {
134
+ phase: 'install',
135
+ layer: 'source',
136
+ subjects: ['install.source'],
137
+ does: 'refuse',
138
+ refusal: ARTIFACT,
139
+ statement: 'A source which requires credentials is requested with them.',
140
+ laws: ['SB-TOKEN'],
141
+ },
142
+ SOURCE_AUTHENTICATION_DENIED: {
143
+ phase: 'install',
144
+ layer: 'source',
145
+ subjects: ['install.source'],
146
+ does: 'refuse',
147
+ refusal: ARTIFACT,
148
+ statement: 'A source accepts the credentials it is requested with.',
149
+ laws: ['SB-TOKEN'],
150
+ },
151
+ SOURCE_RESPONSE_OUT_OF_LIMITS: {
152
+ phase: 'install',
153
+ layer: 'source',
154
+ subjects: ['install.source'],
155
+ does: 'refuse',
156
+ refusal: ARTIFACT,
157
+ statement: 'What a source answers stays within the limits of the protocol.',
158
+ laws: ['SB-LIMITS', 'SB-RELEASE-FIRST', 'SB-PUBLICATION-VERSION'],
159
+ },
160
+ SOURCE_RELEASE_DRIFT: {
161
+ phase: 'install',
162
+ layer: 'source',
163
+ subjects: ['install.source'],
164
+ does: 'refuse',
165
+ refusal: ARTIFACT,
166
+ statement: 'A source serves the same release to each of the reads of one install.',
167
+ laws: ['INSTALLATION-RELEASE-PIN'],
168
+ },
169
+ SOURCE_ATTESTATION_UNVERIFIED: {
170
+ phase: 'install',
171
+ layer: 'source',
172
+ subjects: ['install.source'],
173
+ does: 'refuse',
174
+ refusal: ARTIFACT,
175
+ statement: 'A release carries an attestation which verifies under its issuer.',
176
+ laws: ['SB-ATTESTATION'],
177
+ },
178
+ SOURCE_ROOT_REPEATED: {
179
+ phase: 'install',
180
+ layer: 'source',
181
+ subjects: ['install.source'],
182
+ does: 'refuse',
183
+ refusal: ARTIFACT,
184
+ statement: 'Two sources of one request resolve to two Domains.',
185
+ laws: ['SB-BATCH-COHERENCE'],
186
+ },
187
+ SOURCE_RETIRED: {
188
+ phase: 'install',
189
+ layer: 'source',
190
+ subjects: ['install.source'],
191
+ does: 'refuse',
192
+ refusal: UNAVAILABLE,
193
+ statement: 'A retired deployment is not installed, and retrying it does not help.',
194
+ laws: ['INSTALLATION-RETIRED-SOURCE', 'SB-DEPLOYMENT-RETIRED'],
195
+ },
196
+ BUNDLE_INVALID: {
197
+ phase: 'install',
198
+ layer: 'source',
199
+ subjects: ['install.core'],
200
+ does: 'refuse',
201
+ refusal: { code: 'SCHEMA_ARTIFACT_INVALID', details: { phase: 'bundle' } },
202
+ statement: 'The Core graph a release carries decodes against its own Schema, and a Core Node whose Class satisfies Identity authors no `iss` or `sub`.',
203
+ laws: ['KS-CORE-IDENTITY-AUTHENTICATION'],
204
+ },
205
+ RELEASE_INVALID: {
206
+ phase: 'install',
207
+ layer: 'source',
208
+ subjects: ['install.source'],
209
+ does: 'refuse',
210
+ refusal: ARTIFACT,
211
+ raised: plan('CUTOVER_RELEASE_INVALID'),
212
+ statement: 'The release a root is read from is admitted as a release of that Domain.',
213
+ laws: ['CP-GUARDS'],
214
+ },
215
+ RELEASE_GUARD_MISMATCH: {
216
+ phase: 'install',
217
+ layer: 'concurrency',
218
+ subjects: ['install.source'],
219
+ does: 'refuse',
220
+ refusal: GUARD,
221
+ raised: plan('CUTOVER_RELEASE_DIGEST_CONFLICT'),
222
+ statement: 'A release guard equals the digest of the release the root was read from.',
223
+ laws: ['CP-GUARDS'],
224
+ },
225
+ ARTIFACT_INVALID: {
226
+ phase: 'install',
227
+ layer: 'source',
228
+ subjects: ['install.source'],
229
+ does: 'refuse',
230
+ refusal: ARTIFACT,
231
+ statement: 'The artifact an install selects binds its target to the snapshot it carries.',
232
+ laws: ['SG-SNAPSHOT', 'INSTALLATION-READINESS-ADMITTED-ONCE'],
233
+ },
234
+ // ─── How Domains depend on each other ───
235
+ DEPENDENCY_CYCLE: {
236
+ phase: 'install',
237
+ layer: 'structure',
238
+ subjects: ['install.dependency'],
239
+ does: 'refuse',
240
+ refusal: { code: 'SCHEMA_DEPENDENCY_MISSING' },
241
+ statement: 'The dependencies a request resolves form no cycle.',
242
+ },
243
+ DEPENDENCY_UNPROVEN: {
244
+ phase: 'install',
245
+ layer: 'structure',
246
+ subjects: ['install.dependency'],
247
+ does: 'refuse',
248
+ refusal: { code: 'SCHEMA_DEPENDENCY_MISSING' },
249
+ statement: 'A Domain resolves each dependency to one proven ready Installation.',
250
+ laws: ['CP-COHERENCE'],
251
+ },
252
+ DEPENDENCY_INCOHERENT: {
253
+ phase: 'install',
254
+ layer: 'structure',
255
+ subjects: ['install.dependency'],
256
+ does: 'refuse',
257
+ refusal: { code: 'SCHEMA_DEPENDENCY_MISSING' },
258
+ raised: plan('CUTOVER_DEPENDENCY_MISSING'),
259
+ statement: 'The roots of a request produce one dependency-coherent Registry.',
260
+ laws: ['CP-COHERENCE'],
261
+ },
262
+ REGISTRY_DEPENDENCY_MISSING: {
263
+ phase: 'install',
264
+ layer: 'structure',
265
+ subjects: ['install.dependency'],
266
+ does: 'refuse',
267
+ refusal: { code: 'SCHEMA_DEPENDENCY_MISSING' },
268
+ statement: 'Every Registration of a Registry finds each of its dependencies in it.',
269
+ laws: ['CP-COHERENCE'],
270
+ },
271
+ DEPENDENCY_CAPABILITY_UNDEFINED: {
272
+ phase: 'install',
273
+ layer: 'source',
274
+ subjects: ['install.dependency'],
275
+ does: 'refuse',
276
+ refusal: { code: 'SCHEMA_ARTIFACT_INVALID', details: { phase: 'bundle' } },
277
+ statement: 'A capability a Domain declares on a dependency is one that dependency defines.',
278
+ laws: ['INSTALLATION-DEPENDENCY-MEANING'],
279
+ },
280
+ DEPENDENCY_INCOMPATIBLE: {
281
+ phase: 'install',
282
+ layer: 'structure',
283
+ subjects: ['install.dependency'],
284
+ does: 'refuse',
285
+ refusal: { code: 'SCHEMA_DEPENDENCY_INCOMPATIBLE' },
286
+ statement: 'The dependency a Domain binds still means what the Domain was resolved against, by the structural comparison of the DSL.',
287
+ laws: ['INSTALLATION-DEPENDENCY-MEANING'],
288
+ },
289
+ DEPENDENTS_PRESENT: {
290
+ phase: 'install',
291
+ layer: 'structure',
292
+ subjects: ['install.dependency'],
293
+ does: 'refuse',
294
+ refusal: { code: 'SCHEMA_DEPENDENTS_PRESENT' },
295
+ raised: plan('CUTOVER_DEPENDENTS_PRESENT'),
296
+ statement: 'An uninstall removes no Domain another active Domain depends on.',
297
+ laws: ['CP-UNINSTALL'],
298
+ },
299
+ DEPENDENTS_INCOMPATIBLE: {
300
+ phase: 'install',
301
+ layer: 'structure',
302
+ subjects: ['install.dependency'],
303
+ does: 'refuse',
304
+ refusal: { code: 'SCHEMA_DEPENDENTS_INCOMPATIBLE' },
305
+ raised: plan('CUTOVER_DEPENDENTS_INCOMPATIBLE'),
306
+ statement: 'An upgrade keeps the meaning each unrequested dependent uses, or names that dependent at a revised root.',
307
+ laws: ['CP-CARRIED-DEPENDENTS'],
308
+ },
309
+ // ─── What stays one thing across a replacement ───
310
+ DOMAIN_NOT_INSTALLED: {
311
+ phase: 'install',
312
+ layer: 'identity',
313
+ subjects: ['install.request'],
314
+ does: 'refuse',
315
+ refusal: { code: 'SCHEMA_NOT_FOUND' },
316
+ raised: plan('CUTOVER_DOMAIN_NOT_INSTALLED'),
317
+ statement: 'What an uninstall or an introspection names is installed.',
318
+ laws: ['CP-UNINSTALL'],
319
+ },
320
+ KERNEL_RESERVED: {
321
+ phase: 'install',
322
+ layer: 'protection',
323
+ subjects: ['install.request'],
324
+ does: 'refuse',
325
+ refusal: UPGRADE,
326
+ raised: plan('CUTOVER_KERNEL_RESERVED'),
327
+ statement: 'Install and uninstall never name the Kernel: only Boot upgrades it.',
328
+ laws: ['CP-KERNEL-ROUTE'],
329
+ },
330
+ IDENTITY_CHANGED: {
331
+ phase: 'install',
332
+ layer: 'identity',
333
+ subjects: ['install.identity'],
334
+ does: 'refuse',
335
+ refusal: UPGRADE,
336
+ raised: plan('CUTOVER_UPGRADE_INCOMPATIBLE'),
337
+ statement: 'A replacement keeps the Domain principal and its subject.',
338
+ laws: ['CP-IDENTITY'],
339
+ },
340
+ ISSUER_CHANGED: {
341
+ phase: 'install',
342
+ layer: 'identity',
343
+ subjects: ['install.identity'],
344
+ does: 'refuse',
345
+ refusal: {
346
+ code: 'SCHEMA_UPGRADE_INCOMPATIBLE',
347
+ details: { phase: 'upgrade', issue: 'issuer-changed' },
348
+ },
349
+ raised: plan('CUTOVER_UPGRADE_INCOMPATIBLE'),
350
+ statement: 'A replacement keeps its issuer, unless a consent names exactly the installed issuer and the served one, neither of them the Kernel issuer.',
351
+ laws: ['CP-ISSUER-CONSENT', 'CHECKPOINT-KERNEL-ISSUER-FIXED', 'INSTALLATION-ISSUER-CONSENT'],
352
+ },
353
+ ISSUERS_IN_FLIGHT_EXCEEDED: {
354
+ phase: 'install',
355
+ layer: 'limit',
356
+ subjects: ['install.identity'],
357
+ does: 'refuse',
358
+ refusal: {
359
+ code: 'SCHEMA_UPGRADE_INCOMPATIBLE',
360
+ details: { phase: 'upgrade', issue: 'in-flight-limit' },
361
+ },
362
+ raised: plan('CUTOVER_UPGRADE_INCOMPATIBLE'),
363
+ statement: 'A Domain keeps at most MAXIMUM_IN_FLIGHT_ISSUERS replaced issuers draining.',
364
+ laws: ['CP-IN-FLIGHT-CARRIED', 'SG-IN-FLIGHT'],
365
+ },
366
+ IDENTITY_CLASS_REMOVED: {
367
+ phase: 'install',
368
+ layer: 'structure',
369
+ subjects: ['class.extends'],
370
+ does: 'refuse',
371
+ refusal: UPGRADE,
372
+ raised: plan('CUTOVER_UPGRADE_INCOMPATIBLE'),
373
+ statement: 'A Node Class which extends Identity keeps extending it: an Identity never stops being one.',
374
+ laws: ['CP-IDENTITY', 'KU-EXECUTABLE-INVARIANTS'],
375
+ },
376
+ CORE_CHANGES_CLASS: {
377
+ phase: 'install',
378
+ layer: 'structure',
379
+ subjects: ['install.core', 'fact.node'],
380
+ does: 'refuse',
381
+ refusal: UPGRADE,
382
+ raised: projection('PROJECTION_NODE_CLASS_CHANGE_UNSUPPORTED'),
383
+ statement: 'A stored Node never changes Class: a plan gives a Core Node under another Class another id, and a Core Node retained by its id keeps the Class it has.',
384
+ laws: ['SP-RECONCILIATION', 'MUT-NODE-CLASS'],
385
+ },
386
+ CORE_OWNERSHIP_CHANGED: {
387
+ phase: 'install',
388
+ layer: 'structure',
389
+ subjects: ['install.core'],
390
+ does: 'refuse',
391
+ refusal: UPGRADE,
392
+ raised: projection('PROJECTION_SCOPE_MISMATCH'),
393
+ statement: 'A Node a Domain owns stays owned across an upgrade, and a Node it only points at stays so.',
394
+ laws: ['SP-RECONCILIATION'],
395
+ },
396
+ CORE_CONFLICT: {
397
+ phase: 'install',
398
+ layer: 'structure',
399
+ subjects: ['install.core'],
400
+ does: 'refuse',
401
+ refusal: UPGRADE,
402
+ raised: projection('PROJECTION_CORE_CONFLICT'),
403
+ statement: 'The change a target states on a Core fact does not conflict with the change the live graph made to it.',
404
+ laws: ['SP-RECONCILIATION'],
405
+ },
406
+ CORE_WRITE_REFUSED: {
407
+ phase: 'install',
408
+ layer: 'structure',
409
+ subjects: ['install.core', 'fact.schema'],
410
+ does: 'refuse',
411
+ refusal: UPGRADE,
412
+ raised: projection('PROJECTION_MUTATION_REFUSED'),
413
+ statement: 'The Core of a target is written under the rules of a projection, which keep a stored value and read no write-once rule: a refusal of its write ends the install for good.',
414
+ divergence: 'No planned Mutation reaches a Core value: every Schema-owned Node and the Schema-managed Edges of the scoped revisions are excluded. A plan below the planner does, and then a recovery keeps the changed value on PostgreSQL and rewrites it on Reference.',
415
+ laws: ['SP-MUTATION-REFUSED', 'POSTGRES-SCHEMA-CORE'],
416
+ },
417
+ CORE_KEY_CONFLICT: {
418
+ phase: 'install',
419
+ layer: 'structure',
420
+ subjects: ['install.core', 'class.unique'],
421
+ does: 'refuse',
422
+ refusal: UPGRADE,
423
+ statement: 'The projection of a target writes no two facts with one key under a uniqueness tuple of the target, refused before any read.',
424
+ laws: ['VAL-UNIQUE'],
425
+ },
426
+ UNIQUE_FORM_UNSUPPORTED: {
427
+ phase: 'install',
428
+ layer: 'engine',
429
+ subjects: ['class.unique'],
430
+ does: 'refuse',
431
+ refusal: { code: 'BACKEND_FEATURE_UNSUPPORTED' },
432
+ statement: 'A target declares only uniqueness tuples of a form the store enforces: refused when the activation prepares, before it asks the store to write. The store was read by then, so refuted data answers first. A store without every lifecycle method, or with a malformed declaration, fails at construction, before any install.',
433
+ laws: ['SA-UNIQUENESS-ENFORCED', 'SA-PROVIDER-CAPTURE'],
434
+ },
435
+ DROPPED_VOCABULARY_OCCUPIED: {
436
+ phase: 'install',
437
+ layer: 'structure',
438
+ subjects: ['install.session', 'class.ref'],
439
+ does: 'refuse',
440
+ refusal: BACKEND,
441
+ statement: 'A repair session ends only when no fact of a vocabulary it drops remains: an activation answers TRANSITION_REJECTED, a break-glass release a `refused` result naming at most `MAINTENANCE_OCCUPIED_CLASSES` of the Classes in key order, and a session row transition this row.',
442
+ laws: [
443
+ 'MAINTENANCE-VOCABULARY-DROPPED',
444
+ 'SESSION-WORKFLOW-BREAK-GLASS',
445
+ 'MUT-SESSION-VOCABULARY',
446
+ ],
447
+ divergence: 'At a break-glass release PostgreSQL tracks a staged Class by its kind, so a fact of the kind a Class changes to is occupied. Reference subtracts every Class key the serving Registry holds, so that fact is not.',
448
+ },
449
+ // ─── What the stored data owes: the questions are `OBLIGATIONS` ───
450
+ INSTANCE_UNCERTIFIED: {
451
+ phase: 'install',
452
+ layer: 'structure',
453
+ subjects: ['store', 'install.validation'],
454
+ does: 'refuse',
455
+ refusal: { code: 'DATA_MIGRATION_REQUIRED' },
456
+ statement: 'While a break-glass release leaves an Instance uncertified, every install validates all of the stored data whatever scope it asks, one that changes nothing included, and is refused where a rule does not hold. Only a full validation lifts the mark.',
457
+ laws: [
458
+ 'INSTALL-NOOP-INERT',
459
+ 'SESSION-WORKFLOW-MARK',
460
+ 'INSTALL-WORKFLOW-ACTIVATION',
461
+ 'INSTALL-UNCERTIFIED-FULL',
462
+ ],
463
+ },
464
+ DATA_MIGRATION_REQUIRED: {
465
+ phase: 'install',
466
+ layer: 'structure',
467
+ subjects: ['store'],
468
+ does: 'refuse',
469
+ refusal: { code: 'DATA_MIGRATION_REQUIRED' },
470
+ raised: projection('PROJECTION_DATA_MIGRATION_REQUIRED'),
471
+ statement: 'A schema change activates only when each question it asks of the store holds; else it names every requirement its validation found, within MIGRATION_REPORT_LIMITS and with each truncation marked, and nothing changed. A question no read could decide never holds by default: it is a requirement as `validate-existing` and `budget-exceeded`.',
472
+ laws: [
473
+ 'SP-DATA-SAFETY',
474
+ 'INSTALL-WORKFLOW-REFUSAL-COMPLETE',
475
+ 'VAL-NO-SILENT-PASS',
476
+ 'SP-BOUNDS',
477
+ 'VAL-PLAN-CALCULUS',
478
+ 'VAL-BOUNDED-REPORT',
479
+ 'VAL-MIGRATION-MESSAGE',
480
+ 'SP-RETAINED-OBLIGATIONS-EXACT',
481
+ ],
482
+ },
483
+ RECOVERY_BOUND_EXCEEDED: {
484
+ phase: 'install',
485
+ layer: 'limit',
486
+ subjects: ['install.activation'],
487
+ does: 'refuse',
488
+ refusal: INTEGRITY,
489
+ raised: projection('PROJECTION_BOUND_EXCEEDED'),
490
+ statement: 'A recovery observes within the bound the Host configures: past it Boot fails and a settling cutover keeps retrying, and no caller is refused.',
491
+ divergence: 'PostgreSQL holds the bound while it observes and answers ACTIVATION_PLAN_REJECTED. Reference measures what it observed and raises this row.',
492
+ laws: ['SP-RECOVERY', 'SP-BOUNDS'],
493
+ },
494
+ // ─── Who may: the rules are those of the authority layer ───
495
+ REQUIREMENTS_UNSATISFIED: {
496
+ phase: 'install',
497
+ layer: 'authority',
498
+ subjects: ['fact.authority'],
499
+ does: 'refuse',
500
+ refusal: { code: 'SCHEMA_REQUIREMENTS_UNSATISFIED' },
501
+ statement: 'The installer of a change holds the authority the change newly poses or removes. An install that changes nothing asks none: whoever the install Function admits lifts a break-glass mark, once all of the stored data holds.',
502
+ laws: ['RS-AUTHORITY', 'RS-AUTHORITY-EDGES', 'INSTALL-NOOP-INERT'],
503
+ },
504
+ CORE_AUTHORITY_EDGE_AUTHORED: {
505
+ phase: 'install',
506
+ layer: 'authority',
507
+ subjects: ['install.core', 'fact.authority'],
508
+ does: 'refuse',
509
+ refusal: UPGRADE,
510
+ raised: projection('PROJECTION_DESIRED_INVALID'),
511
+ statement: 'A Core a Domain authors holds no scope or meta-authority Edge: only an installation derives one.',
512
+ },
513
+ AUTHORITY_COLLIDES_WITH_CORE: {
514
+ phase: 'install',
515
+ layer: 'authority',
516
+ subjects: ['fact.authority'],
517
+ does: 'refuse',
518
+ refusal: UPGRADE,
519
+ raised: projection('PROJECTION_DESIRED_INVALID'),
520
+ statement: 'The authority an installation derives does not collide with a Core fact.',
521
+ },
522
+ AUTHORITY_HOLDER_UNRESOLVED: {
523
+ phase: 'install',
524
+ layer: 'authority',
525
+ subjects: ['fact.authority'],
526
+ does: 'refuse',
527
+ refusal: UPGRADE,
528
+ raised: projection('PROJECTION_DESIRED_INVALID'),
529
+ statement: 'A holder is the principal of the installing Domain, or resolves to one Core Identity with a projected id. A holder of a dependency holds only Roles of the installed Domain.',
530
+ laws: ['RS-ROLE-HOLDERS'],
531
+ },
532
+ AUTHORITY_ROLE_UNRESOLVED: {
533
+ phase: 'install',
534
+ layer: 'authority',
535
+ subjects: ['fact.authority'],
536
+ does: 'refuse',
537
+ refusal: UPGRADE,
538
+ raised: projection('PROJECTION_DESIRED_INVALID'),
539
+ statement: 'A Role resolves to one Core Node of a Role Class with a projected id.',
540
+ laws: ['KS-AUTHORITY-VOCABULARY', 'RS-ROLE-HOLDERS'],
541
+ },
542
+ AUTHORITY_TARGET_UNPROJECTED: {
543
+ phase: 'install',
544
+ layer: 'authority',
545
+ subjects: ['fact.authority'],
546
+ does: 'refuse',
547
+ refusal: UPGRADE,
548
+ raised: projection('PROJECTION_DESIRED_INVALID'),
549
+ statement: 'What a scope grants on has a projected id.',
550
+ laws: ['KS-AUTHORITY-VOCABULARY'],
551
+ },
552
+ AUTHORITY_CAPABILITY_UNRESOLVED: {
553
+ phase: 'install',
554
+ layer: 'authority',
555
+ subjects: ['fact.authority'],
556
+ does: 'refuse',
557
+ refusal: UPGRADE,
558
+ raised: projection('PROJECTION_DESIRED_INVALID'),
559
+ statement: 'A capability of the legacy form names a Core Identity, and a target with a projected id.',
560
+ laws: ['KS-AUTHORITY-VOCABULARY'],
561
+ },
562
+ // ─── What moved under the change ───
563
+ REVISION_GUARD_MISMATCH: {
564
+ phase: 'install',
565
+ layer: 'concurrency',
566
+ subjects: ['install.revision'],
567
+ does: 'refuse',
568
+ refusal: GUARD,
569
+ raised: plan('CUTOVER_REVISION_CONFLICT'),
570
+ statement: 'A target revision equals the revision the Domain serves, and a current revision the active revision of the Domain it names.',
571
+ laws: ['CP-GUARDS'],
572
+ },
573
+ REVISION_MOVED: {
574
+ phase: 'install',
575
+ layer: 'concurrency',
576
+ subjects: ['install.revision'],
577
+ does: 'refuse',
578
+ refusal: REGISTRY,
579
+ statement: 'A change activates on the Registry it was decided on: if another moved it, the install ends and is requested again. The record of an unchanged install and a session whose source moved are retried by their run instead.',
580
+ laws: ['INSTALL-WORKFLOW-BASE'],
581
+ },
582
+ GATE_ACTIVE: {
583
+ phase: 'install',
584
+ layer: 'concurrency',
585
+ subjects: ['install.revision'],
586
+ does: 'refuse',
587
+ refusal: { code: 'SCHEMA_REVISION_CONFLICT', details: { phase: 'gate', state: 'active' } },
588
+ statement: 'A process holds one change of its snapshot at a time. A request queues only behind another with the same desired Domains and the same dependency meaning, whoever sends it and in whatever order, and judges its guards, readiness and authority against the generation it finds after waiting. A request for another set is refused at once.',
589
+ laws: ['SC-RESERVATION', 'SC-CONVERGENCE-RESERVATION', 'INSTALLATION-CONVERGENCE-IDENTITY'],
590
+ },
591
+ GATE_STALE: {
592
+ phase: 'install',
593
+ layer: 'concurrency',
594
+ subjects: ['install.revision'],
595
+ does: 'refuse',
596
+ refusal: { code: 'SCHEMA_REVISION_CONFLICT', details: { phase: 'gate', state: 'stale' } },
597
+ statement: 'A change of the snapshot starts from the snapshot the process serves.',
598
+ laws: ['SG-PUBLICATION'],
599
+ },
600
+ CHANGE_ACTIVE: {
601
+ phase: 'install',
602
+ layer: 'concurrency',
603
+ subjects: ['install.revision'],
604
+ does: 'refuse',
605
+ refusal: { code: 'SCHEMA_CHANGE_ACTIVE' },
606
+ statement: 'One schema change runs at a time: while a session owns the Instance, another change runs, or an uninstall purges, a new one is refused.',
607
+ laws: [
608
+ 'INSTALL-WORKFLOW-SERIAL',
609
+ 'INSTALL-HOLD-AT-DISPATCH',
610
+ 'UNINSTALL-WORKFLOW-PURGE-LOCK',
611
+ 'INSTALLATION-UNINSTALL-SESSION',
612
+ ],
613
+ },
614
+ PLANNER_INPUT_MALFORMED: {
615
+ phase: 'install',
616
+ layer: 'defect',
617
+ subjects: ['kernel'],
618
+ does: 'refuse',
619
+ refusal: REGISTRY,
620
+ raised: plan('CUTOVER_PLAN_INVALID'),
621
+ statement: 'The workflow hands the cutover planner canonical origins, roots and an allocator, a consent only where the issuer changes, and for a drain the in-flight entry of the issuer it replaces.',
622
+ laws: ['CP-PURE'],
623
+ },
624
+ ROOT_REPEATED: {
625
+ phase: 'install',
626
+ layer: 'defect',
627
+ subjects: ['kernel'],
628
+ does: 'refuse',
629
+ refusal: REGISTRY,
630
+ raised: plan('CUTOVER_ROOT_DUPLICATE'),
631
+ statement: 'The workflow hands the cutover planner each root once.',
632
+ laws: ['CP-EXACT-ROOTS'],
633
+ },
634
+ CHANGE_SET_INVALID: {
635
+ phase: 'install',
636
+ layer: 'defect',
637
+ subjects: ['kernel'],
638
+ does: 'refuse',
639
+ refusal: REGISTRY,
640
+ raised: plan('CUTOVER_CHANGE_SET_INVALID'),
641
+ statement: 'An install only adds or replaces, an uninstall removes at least one Domain, and a bootstrap adds one to an empty Registry.',
642
+ laws: ['CP-EXACT-ROOTS', 'CP-UNINSTALL'],
643
+ },
644
+ ID_ALLOCATION_INVALID: {
645
+ phase: 'install',
646
+ layer: 'defect',
647
+ subjects: ['kernel'],
648
+ does: 'refuse',
649
+ refusal: REGISTRY,
650
+ raised: plan('CUTOVER_ID_ALLOCATION_INVALID'),
651
+ statement: 'The allocator gives each new Installation an id no Installation and no projected Path holds.',
652
+ laws: ['CP-PURE'],
653
+ },
654
+ REGISTRY_INVALID: {
655
+ phase: 'install',
656
+ layer: 'defect',
657
+ subjects: ['kernel'],
658
+ does: 'refuse',
659
+ refusal: INTEGRITY,
660
+ statement: 'A Registry holds one Registration per origin, each with its own principal and ids.',
661
+ },
662
+ RECORD_UNAVAILABLE: {
663
+ phase: 'install',
664
+ layer: 'engine',
665
+ subjects: ['store'],
666
+ does: 'refuse',
667
+ refusal: BACKEND,
668
+ statement: 'While the system store does not answer, answers outside its contract or declines a terminal record with a refusal every provider shares, nothing is decided: the request is retried. A call that reads a record or the Instance row before it starts hears BACKEND_UNAVAILABLE, or CAPACITY_EXHAUSTED when the store refused for capacity.',
669
+ laws: ['INSTALL-WORKFLOW-FAILURES', 'SESSION-WORKFLOW-REPORT-BOUND', 'RT-ERROR-INSTALL-RECORD'],
670
+ },
671
+ RECORD_INCOHERENT: {
672
+ phase: 'install',
673
+ layer: 'defect',
674
+ subjects: ['store'],
675
+ does: 'refuse',
676
+ refusal: INTEGRITY,
677
+ statement: 'A lifecycle record holds what its Execution wrote, once and for ever.',
678
+ laws: ['INSTALL-WORKFLOW-RECORD', 'INSTALL-RECORDS-RETAINED', 'LIFECYCLE-RECORD-ONCE'],
679
+ },
680
+ // ─── What the store answers while a change activates ───
681
+ ACTIVATION_REFUSED: {
682
+ phase: 'install',
683
+ layer: 'engine',
684
+ subjects: ['install.activation'],
685
+ does: 'refuse',
686
+ refusal: ACTIVATION,
687
+ statement: 'A provider refuses with proof of no effect: CONTINUITY_BROKEN when an observed witness moved and no difference proves its question; TRANSITION_REJECTED when the live checkpoint, a receipt, the installation authority, an owner of a Core fact or the post-state refuses, when the Mutations of the plan state effects that conflict, when a repair finds a target fact held by another owner or Class, a retiring one included, or when another Node holds the issuer and subject a retained principal moves to; REVISION_STALE when the Instance row moved. It also answers the refusals every provider shares: PLAN_UNSUPPORTED when it cannot run what the plan states; RESOURCE_EXHAUSTED when an activation passes a bound of the store, what it carries apart from its plan past SCHEMA_ARTIFACT_LIMITS among them; SNAPSHOT_STALE when another snapshot serves; MAINTENANCE_STALE when the Instance row no longer admits the stamp of the plan; CAPACITY_EXHAUSTED, UNAVAILABLE, CANCELLED and DEADLINE_EXCEEDED when it could not take or finish the work. A preparation or an observation refused in another shape is read as INSTALL.ACTIVATION_STEP_FAILED, an activation as INSTALL.ACTIVATION_RESULT_MISMATCH. An inspection of another plan, or a recovery closure of another checkpoint, is refused here too. PLAN_UNSUPPORTED, RESOURCE_EXHAUSTED and TRANSITION_REJECTED end an install as a refusal. CONTINUITY_BROKEN sends an install or a session to catch up, while an uninstall ends on it. Any other leaves the run to retry and then pause, and a retry after MAINTENANCE_STALE reads the Instance row again, so it runs under the admission the row holds or answers what the row says. The record of an install that changes nothing is decided the same way, REVISION_STALE and a RETIREMENT_PENDING no retirement in the Catalog explains among the refusals that pass by themselves. After the retiring activation of an uninstall, its final record and its purge batches retry and then pause on every refusal: a RETIREMENT_PENDING of the final record purges again, and a MAINTENANCE_STALE is sent again under the row read then.',
688
+ divergence: 'A Domain principal whose stored pair moved answers CONTINUITY_BROKEN on PostgreSQL and TRANSITION_REJECTED on Reference. A replay of a committed activation once the checkpoint moved on answers CONTINUITY_BROKEN on PostgreSQL and TRANSITION_REJECTED on Reference. A recovery of a non-serving checkpoint answers CONTINUITY_BROKEN on both. A question held at a witness that moved commits on PostgreSQL when the difference of a caught-up pre-copy proves it, a count local to one fact or a `values` question, and answers CONTINUITY_BROKEN on Reference, which keeps no difference. A disposal watches the extents of its Node Classes on PostgreSQL, and on Reference only its Edge Classes and the facts it read: a Node of such a Class written since, and at no Edge, answers CONTINUITY_BROKEN on PostgreSQL alone. A recovery that would delete a Node holding an Edge outside what it deletes answers TRANSITION_REJECTED on PostgreSQL, the Node kept, and completes on Reference, the Edge left dangling. PostgreSQL refuses a projection claiming a fact another Domain owns, and Reference reads no owner. A source cannot reach this one: a Core Edge names only Definitions of its own Domain. PostgreSQL alone keeps a target proof, and answers TRANSITION_REJECTED before any effect to an activation whose previous proof holds no entry for a Registration the activation carries unchanged.',
689
+ laws: [
690
+ 'SA-REFUSAL-EVIDENCE',
691
+ 'SCHEMA-ACTIVATION-ADMIT',
692
+ 'SCHEMA-CONTINUITY-UNCHANGED',
693
+ 'VAL-WITNESS-ACTIVATION',
694
+ 'SEXEC-INSPECT-BEFORE-CRITICAL',
695
+ 'SCHEMA-ACTIVATION-IDENTITY-KEY',
696
+ 'POSTGRES-SCHEMA-IDENTITY-KEY',
697
+ 'SCHEMA-ARTIFACT-LIMITS',
698
+ 'POSTGRES-SCHEMA-ACTIVATION-LIMITS',
699
+ 'MNT-STAMP',
700
+ 'INSTALL-WORKFLOW-FAILURES',
701
+ 'UNINSTALL-WORKFLOW-PURGE',
702
+ ],
703
+ },
704
+ ACTIVATION_STEP_FAILED: {
705
+ phase: 'install',
706
+ layer: 'engine',
707
+ subjects: ['install.activation'],
708
+ does: 'refuse',
709
+ refusal: ACTIVATION,
710
+ statement: 'A preparation or an observation that fails answers at once, nothing settled. An activation that throws proves nothing: settlement retries discovery and recovery, whatever fails them and whatever checkpoint of neither generation they prove, unstoppable by its caller, with no new lease until it selects a generation or the Runtime closes.',
711
+ laws: [
712
+ 'SA-SINGLE-SUBMISSION',
713
+ 'SC-FAILURE',
714
+ 'SCHEMA-SETTLEMENT-DETACHED',
715
+ 'SCHEMA-SETTLEMENT-PROOF-SELECTION',
716
+ ],
717
+ },
718
+ ACTIVATION_CHECKPOINT_MALFORMED: {
719
+ phase: 'install',
720
+ layer: 'engine',
721
+ subjects: ['install.activation'],
722
+ does: 'refuse',
723
+ refusal: ACTIVATION,
724
+ statement: 'A checkpoint a provider discovers carries a well-formed ticket and artifact. Discovery compares it with no plan.',
725
+ laws: ['SA-PREPARATION-TARGET'],
726
+ },
727
+ ACTIVATION_RESULT_MISMATCH: {
728
+ phase: 'install',
729
+ layer: 'engine',
730
+ subjects: ['install.activation'],
731
+ does: 'refuse',
732
+ refusal: ACTIVATION,
733
+ statement: 'An outcome names the ticket, state and snapshots of its plan. An activation answering otherwise is read as an unknown outcome, settled on the checkpoint.',
734
+ laws: ['SA-RESULT'],
735
+ },
736
+ ACTIVATION_OUTCOME_UNKNOWN: {
737
+ phase: 'install',
738
+ layer: 'engine',
739
+ subjects: ['install.activation'],
740
+ does: 'refuse',
741
+ refusal: ACTIVATION,
742
+ statement: 'A record with an unknown outcome, or a refused one, is settled by reading the record, never assumed. A purge batch with an unknown outcome is sent again, never taken for a refusal.',
743
+ laws: [
744
+ 'INSTALL-RECORD-IN-COMMIT',
745
+ 'UNINSTALL-WORKFLOW-STORE-UNANSWERED',
746
+ 'INSTALL-WORKFLOW-ACTIVATION',
747
+ 'UNINSTALL-WORKFLOW-PURGE',
748
+ ],
749
+ },
750
+ ACTIVATION_WITNESS_LOST: {
751
+ phase: 'install',
752
+ layer: 'engine',
753
+ subjects: ['install.validation'],
754
+ does: 'refuse',
755
+ refusal: ACTIVATION,
756
+ statement: 'An install forced to validate from scratch by a lost witness gives up after a bounded number of losses.',
757
+ laws: ['INSTALL-WORKFLOW-INTERRUPTIONS'],
758
+ },
759
+ ACTIVATION_OUTPACED: {
760
+ phase: 'install',
761
+ layer: 'limit',
762
+ subjects: ['install.validation'],
763
+ does: 'refuse',
764
+ refusal: ACTIVATION,
765
+ statement: 'An online install whose validation cannot catch up with writes within its bound ends, and is requested in maintenance mode.',
766
+ laws: ['INSTALL-WORKFLOW-CATCH-UP'],
767
+ },
768
+ GATE_UNAVAILABLE: {
769
+ phase: 'install',
770
+ layer: 'engine',
771
+ subjects: ['install.activation'],
772
+ does: 'refuse',
773
+ refusal: ACTIVATION,
774
+ statement: 'A snapshot gate which closed or timed out draining decides nothing of the change.',
775
+ laws: ['SC-SHUTDOWN', 'SC-FAILURE'],
776
+ },
777
+ STORE_REFUSED: {
778
+ phase: 'install',
779
+ layer: 'engine',
780
+ subjects: ['store'],
781
+ does: 'refuse',
782
+ refusal: BACKEND,
783
+ statement: 'A store which refuses to claim the change or to give it back leaves the run to retry, whichever refusal every provider shares it answers.',
784
+ laws: ['INSTALL-WORKFLOW-FAILURES'],
785
+ },
786
+ // ─── What the store answers while a change is judged ───
787
+ PROJECTION_RESULT_INVALID: {
788
+ phase: 'install',
789
+ layer: 'engine',
790
+ subjects: ['install.validation'],
791
+ does: 'refuse',
792
+ refusal: BACKEND,
793
+ raised: projection('PROJECTION_RESULT_INVALID'),
794
+ statement: 'An inspection answers once per item, with its continuity witness.',
795
+ laws: ['SP-COMPLETE-RESULT'],
796
+ },
797
+ PROJECTION_EVIDENCE_INVALID: {
798
+ phase: 'install',
799
+ layer: 'engine',
800
+ subjects: ['install.validation'],
801
+ does: 'refuse',
802
+ refusal: BACKEND,
803
+ raised: projection('PROJECTION_EVIDENCE_INVALID'),
804
+ statement: 'What a provider observes carries evidence of the item it answers.',
805
+ laws: ['SP-COMPLETE-RESULT'],
806
+ },
807
+ PROJECTION_OBSERVATION_INVALID: {
808
+ phase: 'install',
809
+ layer: 'engine',
810
+ subjects: ['install.validation'],
811
+ does: 'refuse',
812
+ refusal: BACKEND,
813
+ raised: projection('PROJECTION_OBSERVATION_INVALID'),
814
+ statement: 'What a provider observes decodes as a Graph within the scope it was asked.',
815
+ laws: ['SP-COMPLETE-RESULT'],
816
+ },
817
+ VALIDATION_EVIDENCE_INVALID: {
818
+ phase: 'install',
819
+ layer: 'engine',
820
+ subjects: ['install.validation'],
821
+ does: 'refuse',
822
+ refusal: BACKEND,
823
+ statement: 'A validation page is well-formed evidence for the request it answers.',
824
+ laws: ['VAL-NO-SILENT-PASS'],
825
+ },
826
+ VALIDATION_REFUSED: {
827
+ phase: 'install',
828
+ layer: 'engine',
829
+ subjects: ['install.validation'],
830
+ does: 'refuse',
831
+ refusal: ACTIVATION,
832
+ statement: 'A provider which refuses a read proves that read wrote nothing, and no verdict. Of the refusals every provider shares, PLAN_UNSUPPORTED ends the run as a refusal, RESOURCE_EXHAUSTED ends it too unless a page answers it, which leaves that question undecided, as QUESTION_UNDECIDED says, while SNAPSHOT_STALE, CAPACITY_EXHAUSTED, UNAVAILABLE, CANCELLED, DEADLINE_EXCEEDED and MAINTENANCE_STALE leave it to retry and then pause. The data mark a repair session opens on is such a read: a refusal of it that would come again, WITNESS_UNKNOWN among them, ends the run and reopens the Instance, and one that passes by itself keeps the row `draining`.',
833
+ laws: [
834
+ 'VAL-NO-SILENT-PASS',
835
+ 'SA-REFUSAL-EVIDENCE',
836
+ 'VAL-STAGED-CLASS-SERVED',
837
+ 'SESSION-WORKFLOW-OPEN-FAILURE',
838
+ ],
839
+ },
840
+ VALIDATION_READ_FAILED: {
841
+ phase: 'install',
842
+ layer: 'engine',
843
+ subjects: ['install.validation'],
844
+ does: 'refuse',
845
+ refusal: ACTIVATION,
846
+ statement: 'A provider read which throws proves nothing.',
847
+ laws: ['VAL-NO-SILENT-PASS', 'SA-REFUSAL-EVIDENCE'],
848
+ },
849
+ VALIDATION_CLOSURE_EXCEEDED: {
850
+ phase: 'install',
851
+ layer: 'limit',
852
+ subjects: ['install.validation'],
853
+ does: 'refuse',
854
+ refusal: { code: 'VALIDATION_CLOSURE_EXCEEDED', internal: true },
855
+ statement: 'The validation closed inside a cutover stays within its budget: past it the activation keeps the CONTINUITY_BROKEN it was closing, which is INSTALL.ACTIVATION_REFUSED, and no caller receives this row.',
856
+ laws: ['INSTALL-CUTOVER-BUDGET'],
857
+ },
858
+ VALIDATION_FENCED: {
859
+ phase: 'install',
860
+ layer: 'concurrency',
861
+ subjects: ['install.validation'],
862
+ does: 'refuse',
863
+ refusal: ACTIVATION,
864
+ statement: 'One driver holds a validation run: a later one takes it, and the former stops.',
865
+ laws: ['VAL-RESUME'],
866
+ },
867
+ VALIDATION_PAUSED: {
868
+ phase: 'install',
869
+ layer: 'limit',
870
+ subjects: ['install.validation'],
871
+ does: 'refuse',
872
+ refusal: ACTIVATION,
873
+ statement: 'A durable run stops between two pages when its window ends, its progress saved.',
874
+ laws: ['VAL-PAUSE-ADVANCES', 'INSTALL-WORKFLOW-WINDOW'],
875
+ },
876
+ VALIDATION_DEFECT: {
877
+ phase: 'install',
878
+ layer: 'defect',
879
+ subjects: ['kernel'],
880
+ does: 'refuse',
881
+ refusal: { code: 'VALIDATION_PLAN_INVALID', internal: true },
882
+ statement: 'The Runtime uses a validation plan, policy and run within their contract.',
883
+ },
884
+ // ─── The Kernel's own composition ───
885
+ PROJECTION_POLICY_INVALID: {
886
+ phase: 'install',
887
+ layer: 'defect',
888
+ subjects: ['kernel'],
889
+ does: 'refuse',
890
+ refusal: UPGRADE,
891
+ raised: projection('PROJECTION_POLICY_INVALID'),
892
+ statement: 'The Kernel composes a projection under a valid policy.',
893
+ laws: ['SP-ARTIFACT-OBSERVATION-LIMITS'],
894
+ },
895
+ PROJECTION_PLAN_INVALID: {
896
+ phase: 'install',
897
+ layer: 'defect',
898
+ subjects: ['kernel'],
899
+ does: 'refuse',
900
+ refusal: UPGRADE,
901
+ raised: projection('PROJECTION_PLAN_INVALID'),
902
+ statement: 'An inspection matches its plan exactly, and a change which narrows retained data has a validation provider.',
903
+ laws: ['SP-INSPECTION-LIMITS', 'SP-SESSION-OBSERVATION', 'SP-VALIDATION-DELEGATED'],
904
+ },
905
+ PROJECTION_TARGET_INVALID: {
906
+ phase: 'install',
907
+ layer: 'defect',
908
+ subjects: ['kernel'],
909
+ does: 'refuse',
910
+ refusal: UPGRADE,
911
+ raised: projection('PROJECTION_TARGET_INVALID'),
912
+ statement: 'A target and its Installation artifact are coherent, and within their limits.',
913
+ laws: ['SP-TARGET'],
914
+ },
915
+ PROJECTION_BINDING_INVALID: {
916
+ phase: 'install',
917
+ layer: 'defect',
918
+ subjects: ['kernel'],
919
+ does: 'refuse',
920
+ refusal: UPGRADE,
921
+ raised: projection('PROJECTION_BINDING_INVALID'),
922
+ statement: 'Every Node a projection writes has a Mutation binding and a target id.',
923
+ },
924
+ PROJECTION_WITNESS_INVALID: {
925
+ phase: 'install',
926
+ layer: 'defect',
927
+ subjects: ['kernel'],
928
+ does: 'refuse',
929
+ refusal: UPGRADE,
930
+ raised: projection('PROJECTION_WITNESS_INVALID'),
931
+ statement: 'A completeness witness was minted by this Runtime for this scope and this Graph.',
932
+ laws: ['SP-DELETION-WITNESS'],
933
+ },
934
+ PROJECTION_AUTO_EVIDENCE_INVALID: {
935
+ phase: 'install',
936
+ layer: 'defect',
937
+ subjects: ['kernel'],
938
+ does: 'refuse',
939
+ refusal: UPGRADE,
940
+ raised: projection('PROJECTION_AUTO_EVIDENCE_INVALID'),
941
+ statement: 'A projection target authors no automatic Property, and an observation binds the automatic values of its contract.',
942
+ laws: ['SP-AUTO-MUTATION', 'SP-AUTO-RECOVERY'],
943
+ },
944
+ PROJECTION_DESIRED_INVALID: {
945
+ phase: 'install',
946
+ layer: 'defect',
947
+ subjects: ['kernel'],
948
+ does: 'refuse',
949
+ refusal: UPGRADE,
950
+ raised: projection('PROJECTION_DESIRED_INVALID'),
951
+ statement: 'A desired projection equals its scope, and binds each locator it writes to one Node of its Registry.',
952
+ laws: ['SP-READS'],
953
+ },
954
+ PROJECTION_SCOPE_MISMATCH: {
955
+ phase: 'install',
956
+ layer: 'defect',
957
+ subjects: ['kernel'],
958
+ does: 'refuse',
959
+ refusal: UPGRADE,
960
+ raised: projection('PROJECTION_SCOPE_MISMATCH'),
961
+ statement: 'What is observed covers exactly the scope of the same Domain.',
962
+ laws: ['SP-DELETION-WITNESS'],
963
+ },
964
+ RECORDED_STATE_INCOHERENT: {
965
+ phase: 'install',
966
+ layer: 'defect',
967
+ subjects: ['kernel'],
968
+ does: 'refuse',
969
+ refusal: INTEGRITY,
970
+ statement: 'What the Kernel recorded is coherent: its Registry, its Catalog, its checkpoints, its tombstones and its Service generations, and the target a session plans again is the one it declared.',
971
+ laws: ['SESSION-WORKFLOW-INTEGRITY-REASON'],
972
+ },
973
+ // ─── A repair session ───
974
+ SESSION_CLOSED: {
975
+ phase: 'install',
976
+ layer: 'lifecycle',
977
+ subjects: ['install.session'],
978
+ does: 'refuse',
979
+ refusal: { code: 'SESSION_CLOSED' },
980
+ statement: 'A session runs while the Instance row names it.',
981
+ laws: ['SESSION-WORKFLOW-RELEASED'],
982
+ },
983
+ SESSION_EXIT_REFUSED: {
984
+ phase: 'install',
985
+ layer: 'lifecycle',
986
+ subjects: ['install.session'],
987
+ does: 'refuse',
988
+ refusal: { code: 'EXECUTION_EXIT_REFUSED' },
989
+ statement: 'A forced cancel or a delete of the Execution of a live session changes nothing: it leaves by a validated apply, a cooperative cancel, its idle expiry or the Host operator release. A run restarted on another release opens again while the row names it and waits for the next command of Root: what stops that opening is reported `interrupted`, or waited on, with the row in `repair`, and never reopens the Instance; an engine cancellation attempts the return to the source; a store fence behind its terminal record answers that record, and the row keeps naming the session until the Host operator releases it. An attempt that a restarted run finds in progress is reported `interrupted` under the reason SESSION_REHOMED. A forced exit of a run which holds no session writes its terminal record first, as cancelled, so its later writes are fenced, the change it held goes stale and its session can no longer open; a run which already ended keeps its record. A session whose opening from `draining` is refused never lived: the Instance reopens, and the run ends with that refusal.',
990
+ laws: [
991
+ 'SESSION-WORKFLOW-NO-PUBLIC-BREAK-GLASS',
992
+ 'SESSION-WORKFLOW-REHOMED',
993
+ 'SESSION-WORKFLOW-ROW-MOVES',
994
+ 'SESSION-WORKFLOW-OPEN-FAILURE',
995
+ 'WORKFLOWS-SYSTEM-FORCED-EXIT-RECORDED',
996
+ 'SESSION-WORKFLOW-EXIT',
997
+ 'SESSION-WORKFLOW-CANCEL',
998
+ ],
999
+ },
1000
+ MAINTENANCE_CALLER_NOT_ROOT: {
1001
+ phase: 'install',
1002
+ layer: 'lifecycle',
1003
+ subjects: ['install.session'],
1004
+ does: 'refuse',
1005
+ refusal: { code: 'FUNCTION_DENIED' },
1006
+ statement: 'Only Root opens a maintenance session: a delegated call is not Root.',
1007
+ laws: ['INSTALL-MAINTENANCE-ROOT-AT-DISPATCH'],
1008
+ },
1009
+ SESSION_RELEASED: {
1010
+ phase: 'install',
1011
+ layer: 'lifecycle',
1012
+ subjects: ['install.session'],
1013
+ does: 'refuse',
1014
+ refusal: { code: 'SESSION_RELEASED' },
1015
+ statement: 'A session a break-glass release closed ends as the record of the release says, `cancelled`, and a run that wakes on a command or its idle bound before that record is written ends with this code. A release retries four times while the Instance row moves, and answers WORKFLOWS_UNAVAILABLE after them, as for any answer which proves no release. A release whose record the store refused is finished by the next release asked for that session or for any, under the operator of the first.',
1016
+ laws: ['SESSION-WORKFLOW-RELEASED', 'SESSION-WORKFLOW-BREAK-GLASS'],
1017
+ },
1018
+ SESSION_EXPIRED: {
1019
+ phase: 'install',
1020
+ layer: 'lifecycle',
1021
+ subjects: ['install.session'],
1022
+ does: 'refuse',
1023
+ refusal: { code: 'SESSION_EXPIRED' },
1024
+ statement: 'A session no command reaches within its idle bound attempts the return to its source. Held, it ends with this code. Refuted, it stays in `repair` and writes its report, and no bound applies any more: only a command of Root moves it.',
1025
+ laws: ['SESSION-WORKFLOW-IDLE', 'SESSION-WORKFLOW-RETURN'],
1026
+ },
1027
+ SESSION_LIMIT_EXCEEDED: {
1028
+ phase: 'install',
1029
+ layer: 'limit',
1030
+ subjects: ['install.session'],
1031
+ does: 'refuse',
1032
+ refusal: { code: 'SESSION_LIMIT_EXCEEDED' },
1033
+ statement: "A session opens within the bounds of the system store, and a command of Root keeps its mark within them. A refuted attempt removes, in the change that stores its report, every attempt report past the latest 30, so its `state` and `mark` reports and those stay within the bound of 32 whatever the number of attempts. A session that had not opened and whose report a bound refuses ends with this code naming the bound and reopens the Instance. An attempt a deterministic refusal interrupts ends `interrupted` with the row back in `repair` and Root's next command heard, under this code, or under its own reason without a summary when that summary is what the bound refused. A run restarted on another release publishes its `awaiting` without its last report when that report is what the bound refused, and keeps the last one that fit when its declaration alone is refused, with the row in `repair` and Root's next command heard. A request within about 250 bytes of `reportBytes` meets two more answers, against SESSION-WORKFLOW-REPORT-BOUND, its later reports outgrowing the bound once the row left `draining`: a refused `attempting` leaves the row in `attempt` naming the session and ends the run with this code; a refused `awaiting` of a refuted, aborted or cancelled attempt, or of a command the session skips, is retried until the run pauses with the row in `repair`. Only the Host operator release frees either. Past retention a report loses its samples and keeps its summary, on each engine.",
1034
+ laws: ['SESSION-WORKFLOW-ATTEMPT-REPORTS', 'SESSION-WORKFLOW-REPORT-BOUND', 'LIFECYCLE-LIMITS'],
1035
+ },
1036
+ RECORD_ENDED: {
1037
+ phase: 'install',
1038
+ layer: 'lifecycle',
1039
+ subjects: ['install.session'],
1040
+ does: 'refuse',
1041
+ refusal: { code: 'EXECUTION_TERMINAL' },
1042
+ statement: 'An Execution which holds its terminal record does not run: its record answers.',
1043
+ laws: [
1044
+ 'INSTALL-WORKFLOW-RECORD',
1045
+ 'LIFECYCLE-RECORD-ONCE',
1046
+ 'LIFECYCLE-RECORD-ENDS-EXECUTION',
1047
+ 'MAINTENANCE-SESSION-ENDED',
1048
+ 'INSTALL-WORKFLOW-REHOMED',
1049
+ ],
1050
+ },
1051
+ // ─── The trusted paths: no request reaches them ───
1052
+ BOOTSTRAP_NOT_EMPTY: {
1053
+ phase: 'install',
1054
+ layer: 'protection',
1055
+ subjects: ['store'],
1056
+ does: 'refuse',
1057
+ refusal: { code: 'BOOTSTRAP_PREVIOUS_NOT_EMPTY', internal: true },
1058
+ statement: 'A bootstrap starts from an empty Registry.',
1059
+ laws: ['SN-EMPTY-BASIS'],
1060
+ },
1061
+ BOOTSTRAP_KERNEL_INVALID: {
1062
+ phase: 'install',
1063
+ layer: 'defect',
1064
+ subjects: ['kernel'],
1065
+ does: 'refuse',
1066
+ refusal: { code: 'BOOTSTRAP_KERNEL_INVALID', internal: true },
1067
+ statement: 'An Edge of the built-in Kernel ends at Nodes the bootstrap creates.',
1068
+ },
1069
+ BOOTSTRAP_ID_ALLOCATION_INVALID: {
1070
+ phase: 'install',
1071
+ layer: 'defect',
1072
+ subjects: ['kernel'],
1073
+ does: 'refuse',
1074
+ refusal: { code: 'BOOTSTRAP_ID_ALLOCATION_INVALID', internal: true },
1075
+ statement: 'A bootstrap allocates each Node an id of its own.',
1076
+ },
1077
+ BOOTSTRAP_TARGET_INVALID: {
1078
+ phase: 'install',
1079
+ layer: 'defect',
1080
+ subjects: ['kernel'],
1081
+ does: 'refuse',
1082
+ refusal: { code: 'BOOTSTRAP_TARGET_INVALID', internal: true },
1083
+ statement: 'The Registry a bootstrap targets is one the Registry accepts, and it names the Kernel alone.',
1084
+ laws: ['SN-SINGLETON'],
1085
+ divergence: 'At the port, for a plan the Runtime never builds: Reference refuses a target other than the Kernel alone, and PostgreSQL holds no such check.',
1086
+ },
1087
+ BOOTSTRAP_REFUSED: {
1088
+ phase: 'install',
1089
+ layer: 'identity',
1090
+ subjects: ['kernel'],
1091
+ does: 'refuse',
1092
+ refusal: { code: 'BOOT_RECOVERY_FAILED', internal: true },
1093
+ statement: 'A store that refuses the first install ends Boot, with no effect and no second attempt, whatever it answers: it holds other state, its substrate is not the expected one, it refuses the transition or the plan, the plan exceeds a bound, or the request was cancelled or past its deadline. Boot ends with that refusal as its cause.',
1094
+ divergence: 'Boot submits once, over a store it found pristine, so no Boot reaches these, at the port: PostgreSQL matches the Properties of a projected Node exactly and Reference as a subset; an exact plan repeated after a Trust replacement is NOT_PRISTINE on PostgreSQL and replayed on Reference; only PostgreSQL answers SUBSTRATE_MISMATCH.',
1095
+ laws: ['BOOT-SCHEMA-BOOTSTRAP-REOBSERVED'],
1096
+ },
1097
+ BOOTSTRAP_INPUT_ABSENT: {
1098
+ phase: 'install',
1099
+ layer: 'identity',
1100
+ subjects: ['kernel'],
1101
+ does: 'refuse',
1102
+ refusal: { code: 'BOOT_BOOTSTRAP_REQUIRED', internal: true },
1103
+ statement: 'A store with no checkpoint boots only from explicit trusted bootstrap input.',
1104
+ laws: ['BOOT-SCHEMA-PRISTINE-PROOF'],
1105
+ },
1106
+ BOOTSTRAP_INPUT_REFUSED: {
1107
+ phase: 'install',
1108
+ layer: 'identity',
1109
+ subjects: ['kernel'],
1110
+ does: 'refuse',
1111
+ refusal: { code: 'BOOT_INPUT_INVALID', internal: true },
1112
+ statement: 'A bootstrap its input cannot plan ends Boot before any effect, with the refusal of its plan as its cause: Boot answers every BOOTSTRAP_ code this way.',
1113
+ laws: ['BOOT-SCHEMA-PRISTINE-PROOF'],
1114
+ },
1115
+ BOOTSTRAP_OUTCOME_UNKNOWN: {
1116
+ phase: 'install',
1117
+ layer: 'engine',
1118
+ subjects: ['kernel'],
1119
+ does: 'refuse',
1120
+ refusal: { code: 'BOOT_RECOVERY_FAILED', internal: true },
1121
+ statement: 'A first install whose outcome is unknown is settled by discovery, with no second submission: Boot goes on from the exact checkpoint of its plan, and without one it ends.',
1122
+ laws: ['BOOT-SCHEMA-BOOTSTRAP-REOBSERVED', 'BOOT-SCHEMA-UNCERTAIN-FAILS-CLOSED'],
1123
+ },
1124
+ BOOT_EVIDENCE_UNPROVEN: {
1125
+ phase: 'install',
1126
+ layer: 'defect',
1127
+ subjects: ['kernel', 'store'],
1128
+ does: 'refuse',
1129
+ refusal: { code: 'BOOT_RECOVERY_FAILED', internal: true },
1130
+ statement: 'A stored state, checkpoint, Trust, artifact or bundle that Boot cannot prove ends Boot, and a recovered Registry names exactly one built-in Kernel.',
1131
+ laws: ['BOOT-SCHEMA-RECOVERED-KERNEL', 'CHECKPOINT-SCHEMA-ADMISSION'],
1132
+ },
1133
+ BOOT_MAINTENANCE_ACTIVE: {
1134
+ phase: 'install',
1135
+ layer: 'lifecycle',
1136
+ subjects: ['kernel', 'install.session'],
1137
+ does: 'refuse',
1138
+ refusal: { code: 'BOOT_MAINTENANCE_ACTIVE', internal: true },
1139
+ statement: 'A Boot which must write ends while a maintenance session owns the Instance, having activated nothing. One with nothing to converge goes on.',
1140
+ laws: ['MNT-BOOT-RESTORE'],
1141
+ },
1142
+ BOOT_IDENTITY_MISMATCH: {
1143
+ phase: 'install',
1144
+ layer: 'identity',
1145
+ subjects: ['kernel'],
1146
+ does: 'refuse',
1147
+ refusal: { code: 'BOOT_IDENTITY_MISMATCH', internal: true },
1148
+ statement: 'Before any effect, the recovered Kernel principal is the thumbprint of the configured key, its issuer is the configured one or the source of a declared transition, and a transition finds no other Domain on the configured issuer.',
1149
+ laws: ['BOOT-KERNEL-IDENTITY'],
1150
+ },
1151
+ BOOT_ISSUER_TRANSITION_FAILED: {
1152
+ phase: 'install',
1153
+ layer: 'identity',
1154
+ subjects: ['kernel'],
1155
+ does: 'refuse',
1156
+ refusal: { code: 'BOOT_IDENTITY_TRANSITION_FAILED', internal: true },
1157
+ statement: 'A declared issuer transition ends Boot before any effect while the workflow engine holds an unfinished run of this Kernel or does not answer, or when a Service on the previous issuer runs a stored artifact, and it ends Boot when it does not reach its exact target. A later Boot takes it once the runs have ended.',
1158
+ laws: ['BOOT-KERNEL-ISSUER-TRANSITION', 'BOOT-KERNEL-ISSUER-QUIESCENT'],
1159
+ },
1160
+ BOOT_KERNEL_UPGRADE_FAILED: {
1161
+ phase: 'install',
1162
+ layer: 'identity',
1163
+ subjects: ['kernel'],
1164
+ does: 'refuse',
1165
+ refusal: { code: 'BOOT_KERNEL_UPGRADE_FAILED', internal: true },
1166
+ statement: 'An upgrade of the Kernel that does not reach its exact recovered target ends Boot: Boot answers each refusal of INSTALL.KERNEL_UPGRADE_SOURCE_INVALID, INSTALL.KERNEL_UPGRADE_TARGET_MISMATCH and INSTALL.KERNEL_UPGRADE_PLAN_INVALID this way.',
1167
+ laws: ['BOOT-SCHEMA-KERNEL-VALIDATED-UPGRADE'],
1168
+ },
1169
+ BOOT_SERVICE_TRANSITION_UNSUPPORTED: {
1170
+ phase: 'install',
1171
+ layer: 'identity',
1172
+ subjects: ['kernel', 'install.request'],
1173
+ does: 'refuse',
1174
+ refusal: { code: 'BOOT_SERVICE_TRANSITION_UNSUPPORTED', internal: true },
1175
+ statement: 'The required Services close to one admitted cutover before the first effect: the Kernel is present, each source has the provenance of a Schema, a replacement names the active revision, no dependency cycles, each dependency is ready or required with them, and this Kernel realizes each on its issuer.',
1176
+ laws: ['BOOT-SERVICE-ONE-PLAN', 'BOOT-SERVICE-LOCAL-REPLACEMENT'],
1177
+ },
1178
+ BOOT_SERVICE_MIGRATION_REQUIRED: {
1179
+ phase: 'install',
1180
+ layer: 'structure',
1181
+ subjects: ['kernel', 'store'],
1182
+ does: 'refuse',
1183
+ refusal: { code: 'BOOT_SERVICE_MIGRATION_REQUIRED', internal: true },
1184
+ statement: 'A required Service whose cutover needs a migration of application data ends Boot, which runs none.',
1185
+ laws: ['BOOT-SERVICE-ONE-PLAN'],
1186
+ },
1187
+ BOOT_SERVICE_GENERATION_FAILED: {
1188
+ phase: 'install',
1189
+ layer: 'engine',
1190
+ subjects: ['kernel', 'store'],
1191
+ does: 'refuse',
1192
+ refusal: { code: 'BOOT_SERVICE_GENERATION_FAILED', internal: true },
1193
+ statement: 'A cutover of required Services that does not reach its exact recovered target ends Boot.',
1194
+ laws: ['BOOT-SERVICE-ONE-PLAN'],
1195
+ },
1196
+ KERNEL_UPGRADE_SOURCE_INVALID: {
1197
+ phase: 'install',
1198
+ layer: 'defect',
1199
+ subjects: ['kernel'],
1200
+ does: 'refuse',
1201
+ refusal: { code: 'KERNEL_UPGRADE_SOURCE_INVALID', internal: true },
1202
+ statement: 'Boot upgrades the Kernel from a source which holds its canonical Registration, another revision, and its Identity Class.',
1203
+ laws: ['CP-KERNEL-ROUTE'],
1204
+ },
1205
+ KERNEL_UPGRADE_TARGET_MISMATCH: {
1206
+ phase: 'install',
1207
+ layer: 'structure',
1208
+ subjects: ['class.extends'],
1209
+ does: 'refuse',
1210
+ refusal: { code: 'KERNEL_UPGRADE_TARGET_MISMATCH', internal: true },
1211
+ statement: 'A Kernel upgrade targets the built-in revision, and takes Identity from no Node Class.',
1212
+ laws: ['CP-KERNEL-ROUTE', 'KU-EXECUTABLE-INVARIANTS'],
1213
+ },
1214
+ KERNEL_UPGRADE_PLAN_INVALID: {
1215
+ phase: 'install',
1216
+ layer: 'defect',
1217
+ subjects: ['kernel'],
1218
+ does: 'refuse',
1219
+ refusal: { code: 'KERNEL_UPGRADE_PLAN_INVALID', internal: true },
1220
+ statement: 'A Kernel upgrade yields one canonical target Registry plan.',
1221
+ laws: ['CP-KERNEL-ROUTE', 'KU-PLAN'],
1222
+ },
1223
+ });