rulvar API reference / @rulvar/plan / assertPlanHead
Function: assertPlanHead()
ts
function assertPlanHead(
plan,
expectedPlanHash,
context?): void;Defined in: packages/plan/src/plan-hash.ts:75
The append-time head assertion: planHashBefore of the entry being appended MUST equal the current fold head. A failure is an engine bug and raises the typed PlanInvariantError; the run finishes with outcome error, never a silent brick.
Parameters
| Parameter | Type |
|---|---|
plan | TaskPlan |
expectedPlanHash | string |
context? | { entryRef?: number; operation?: string; } |
context.entryRef? | number |
context.operation? | string |
Returns
void