FeedbackStore.record_evidence()

Records one pair’s code evidence, idempotently, under the full generation key.

Usage

Source

FeedbackStore.record_evidence(
    key,
    evidence,
    *,
    refine_version,
    refine_model,
    pair_index,
    enrich_version,
    enrich_model,
    extractor_version,
    source
)

Keyed by (dedup_key, refine_version, refine_model, pair_index, enrich_version, enrich_model, extractor_version) with INSERT OR IGNORE, so re-running over an enriched corpus is a no-op and bumping any version in the key re-derives. pair_index=-1 encodes the no-code sentinel covering every pair of the refine generation.

Parameters

key: DedupKey

The enriched event’s dedup key.

evidence: CodeEvidence

The code evidence to persist.

refine_version: int

The refine prompt version of the annotated pair.

refine_model: str

The resolved refine model of the annotated pair.

pair_index: int

The annotated pair’s index, or -1 for the sentinel.

enrich_version: int

The enrich prompt version that produced the evidence.

enrich_model: str

The resolved model name that produced it.

extractor_version: int

The platform’s deterministic-extraction version.

source: Source | None
Where the correction came from, or None when there is none.