Expose authoritative lifecycle deletion through capability bindings
This commit is contained in:
@@ -44,16 +44,11 @@ export function compileKernelProgram(plan: ExecutionPlan): unknown {
|
||||
});
|
||||
} else {
|
||||
const endpoints = storage.endpoints.map((endpoint) => {
|
||||
if (
|
||||
endpoint.ordered ||
|
||||
endpoint.keyType ||
|
||||
endpoint.retainOther ||
|
||||
(endpoint.onDelete && endpoint.onDelete !== "restrict")
|
||||
)
|
||||
if (endpoint.ordered || endpoint.keyType || endpoint.retainOther)
|
||||
throw new ExecutionPlanError(
|
||||
"UNSUPPORTED_GRAPH_FEATURE",
|
||||
storage.id,
|
||||
"Ordered/keyed/deletion policies require LF-18",
|
||||
"Ordered/keyed relations and automatic retention are not implemented",
|
||||
);
|
||||
return {
|
||||
projection: endpoint.projectionId,
|
||||
@@ -65,6 +60,7 @@ export function compileKernelProgram(plan: ExecutionPlan): unknown {
|
||||
: endpoint.constraint.interfaceRevisionId,
|
||||
},
|
||||
cardinality: endpoint.cardinality,
|
||||
...(endpoint.onDelete ? { onDelete: endpoint.onDelete } : {}),
|
||||
};
|
||||
});
|
||||
edges.push({ id: storage.id, owner: owner.id, a: endpoints[0], b: endpoints[1] });
|
||||
@@ -97,7 +93,8 @@ export function compileKernelProgram(plan: ExecutionPlan): unknown {
|
||||
const binding = operation.binding;
|
||||
let target: unknown;
|
||||
let unsupported: string | null = null;
|
||||
if (binding.kind === "state")
|
||||
if (binding.kind === "lifecycle") target = { kind: "lifecycle", primitive: binding.primitive };
|
||||
else if (binding.kind === "state")
|
||||
target = { kind: "state", owner: slotOwner(binding.slotId), slot: binding.slotId, primitive: binding.primitive };
|
||||
else if (binding.kind === "edge")
|
||||
target = {
|
||||
|
||||
Reference in New Issue
Block a user