@githolon/dsl 0.107.2 → 0.107.3
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/package.json
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
type Sha256Digest,
|
|
29
29
|
} from "../fields.js";
|
|
30
30
|
import { directive } from "../directive.js";
|
|
31
|
+
import { formerAggregate, retirement } from "../evolution.js";
|
|
31
32
|
import { set, withMarker, addToSet, type PlannedOp } from "../ops.js";
|
|
32
33
|
import { key, relationRef, relationType, self, user } from "../relation_schema.js";
|
|
33
34
|
|
|
@@ -157,6 +158,34 @@ export const ReleaseReceipt = aggregate(RELEASE_RECEIPT_AGGREGATE, {
|
|
|
157
158
|
acceptedAt: t.int().merge(Lww),
|
|
158
159
|
}).public();
|
|
159
160
|
|
|
161
|
+
const counterfactualReleaseReceipt = formerAggregate(RELEASE_RECEIPT_AGGREGATE, [
|
|
162
|
+
"baselineRoot",
|
|
163
|
+
"candidateIntents",
|
|
164
|
+
"candidateRoot",
|
|
165
|
+
"complete",
|
|
166
|
+
"divergenceCount",
|
|
167
|
+
"historyHash",
|
|
168
|
+
"projectionEqual",
|
|
169
|
+
"rawPromotable",
|
|
170
|
+
"replayedIntents",
|
|
171
|
+
"reportHash",
|
|
172
|
+
"reportJson",
|
|
173
|
+
] as const);
|
|
174
|
+
|
|
175
|
+
/** CAP-648 makes promotion a current-frontier transition. These old whole-history
|
|
176
|
+
* report fields are genuine framework retirements, carried by the candidate law. */
|
|
177
|
+
export const baselineRootRetired = retirement(counterfactualReleaseReceipt.fields.baselineRoot);
|
|
178
|
+
export const candidateIntentsRetired = retirement(counterfactualReleaseReceipt.fields.candidateIntents);
|
|
179
|
+
export const candidateRootRetired = retirement(counterfactualReleaseReceipt.fields.candidateRoot);
|
|
180
|
+
export const completeRetired = retirement(counterfactualReleaseReceipt.fields.complete);
|
|
181
|
+
export const divergenceCountRetired = retirement(counterfactualReleaseReceipt.fields.divergenceCount);
|
|
182
|
+
export const historyHashRetired = retirement(counterfactualReleaseReceipt.fields.historyHash);
|
|
183
|
+
export const projectionEqualRetired = retirement(counterfactualReleaseReceipt.fields.projectionEqual);
|
|
184
|
+
export const rawPromotableRetired = retirement(counterfactualReleaseReceipt.fields.rawPromotable);
|
|
185
|
+
export const replayedIntentsRetired = retirement(counterfactualReleaseReceipt.fields.replayedIntents);
|
|
186
|
+
export const reportHashRetired = retirement(counterfactualReleaseReceipt.fields.reportHash);
|
|
187
|
+
export const reportJsonRetired = retirement(counterfactualReleaseReceipt.fields.reportJson);
|
|
188
|
+
|
|
160
189
|
export function domainInstallationAggregateId(domainHash: Sha256Digest): string {
|
|
161
190
|
return `domain-installation:${domainHash}`;
|
|
162
191
|
}
|
package/src/law_graph.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { finishExtremum } from "./extremum.js";
|
|
|
9
9
|
import { finishSum } from "./sum.js";
|
|
10
10
|
import {
|
|
11
11
|
createLawIdentityReconciler,
|
|
12
|
+
LAW_FRAMEWORK_PARENT,
|
|
12
13
|
lawEntityKey,
|
|
13
14
|
mintOwnedLawSid,
|
|
14
15
|
mintStructuralLawSid,
|
|
@@ -2304,9 +2305,14 @@ export function discoverLawGraph(
|
|
|
2304
2305
|
return matches[0]!;
|
|
2305
2306
|
};
|
|
2306
2307
|
const retirements = (module.retirements ?? []).map((declaration): LawRetirement => {
|
|
2308
|
+
const retirementParent = (module.aggregates ?? []).some(
|
|
2309
|
+
(aggregate) => aggregate.id === declaration.aggregate && aggregate.framework === true,
|
|
2310
|
+
)
|
|
2311
|
+
? LAW_FRAMEWORK_PARENT
|
|
2312
|
+
: domainKey;
|
|
2307
2313
|
const [aggregateKey, aggregate] = identityEntity(
|
|
2308
2314
|
"aggregate",
|
|
2309
|
-
|
|
2315
|
+
retirementParent,
|
|
2310
2316
|
declaration.aggregate,
|
|
2311
2317
|
declaration.kind === "aggregate" ? "retired" : undefined,
|
|
2312
2318
|
);
|