Rulvar API reference / @rulvar/core / EvidenceContract
Interface: EvidenceContract
Defined in: packages/core/src/engine/ctx.ts:240
A declared evidence floor (RV303): preflight judges tool caps against it, and under enforce: 'refuse' the runtime refuses an ok settle below it (RV507); see AgentProfile.evidenceContract.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
calibration? | { callsPerEntry: number; source?: string; } | A journal observed prior for the per-entry call estimate (RV3309): the figure toolCalibrationFromJournal folds from a prior run of the same profile (aggregate or a p90 over several), fractional on purpose. Preflight uses the HIGHER of the declared estimate and this prior when it computes the evidence call floor, never the lower, so a stale generous declaration still holds and an optimistic one stops hiding the observed reality: the 2026-08-12 comparison run observed 4.211 calls per entry where the default estimate says 3. When the prior raises the floor, preflight names it in an evidence-estimate-below-observed finding beside the usual floor arithmetic. source is echoed in that finding so a reader knows which journal spoke. | packages/core/src/engine/ctx.ts:261 |
calibration.callsPerEntry | number | - | packages/core/src/engine/ctx.ts:261 |
calibration.source? | string | - | packages/core/src/engine/ctx.ts:261 |
enforce? | "warn" | "refuse" | What the floor does at the child's terminal settle (RV507). The default 'warn' keeps the historical behavior: the contract is a preflight signal only. 'refuse' turns an ok finish whose message window carries fewer successful record_evidence executions (result recorded: true; duplicates and verification errors never count) than minEntries into a typed error terminal (kind 'terminal') whose journaled error data carries the machine-readable evidenceFloor: { recordedEntries, minEntries }; the outcome is memoized, so a resume rolls the refusal forward instead of re-paying the invocation. Non-ok terminals are never re-judged. | packages/core/src/engine/ctx.ts:274 |
estCallsPerEntry? | number | Estimated executed calls per recorded entry; default 3. | packages/core/src/engine/ctx.ts:244 |
minEntries | number | Evidence entries the task must record; positive integer. | packages/core/src/engine/ctx.ts:242 |
overheadCalls? | number | Estimated non-evidence overhead calls; default 8. | packages/core/src/engine/ctx.ts:246 |