Skip to content

rulvar API reference


rulvar API reference / @rulvar/rulvar / evaluateReuse

Function: evaluateReuse()

ts
function evaluateReuse(
   index, 
   spawnKey, 
   config?): 
  | {
  kind: "none";
}
  | {
  kind: "reject_osc_guard";
  oscillationCount: number;
}
  | {
  donor: DonorCandidate;
  kind: "reuse_full";
}
  | {
  donor: DonorCandidate;
  kind: "admit_graft";
}
  | {
  kind: "fresh";
  note: DedupNote;
};

Defined in: packages/core/dist/index.d.ts

The four-outcome verdict evaluation on a SpawnKey match, computed once live at the fold head and embedded into the deciding entry; replay never re-evaluates.

Parameters

ParameterType
indexDedupIndex
spawnKeystring
config?ReuseConfig

Returns

| { kind: "none"; } | { kind: "reject_osc_guard"; oscillationCount: number; } | { donor: DonorCandidate; kind: "reuse_full"; } | { donor: DonorCandidate; kind: "admit_graft"; } | { kind: "fresh"; note: DedupNote; }