You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ai): make prompt drift a cache miss, bound the Ollama context, and attribute votes to the producing model (#9477, #9478)
getCachedAiReview reuses a cacheable row with NO maxAgeMs and replays its findings verbatim,
including a severity:critical ai_consensus_defect. AI_REVIEW_CACHE_INPUT_VERSION was hand-bumped
and last moved for #8364, but #8789, #8791, #8833, #8845, #8961, #9035, #9074, #9087, #9114,
#9145 and #9445 all changed prompt text or verdict logic without one -- so a PR closed or held
under the pre-#9074 false-consensus rule re-gated at the same head to the SAME stale finding and
the corrected logic never ran. The fingerprint now folds in REVIEW_PROMPT_VERSION and a digest of
the canonical judge prompt, both pure and available before the call, so drift is an automatic
miss rather than something a human must remember. Bumped to v7 to kill rows written under the
incomplete fingerprint.
Ollama silently left-truncates past num_ctx (typically 4k-8k by default) and then answers
confidently over whatever survived -- the TAIL of the prompt, i.e. the context sections rather
than the diff. The review path sends up to 120k chars of diff plus a 240k-char context budget,
so on the fallback provider a review could come from a fraction of the change while carrying the
same blocker authority and confidence semantics as the primary. An explicit num_ctx is now sent
for the ollama provider only, since other OpenAI-compatible servers may reject an unknown
options key, and an explicit caller providerOptions still wins.
runWorkersOpinion iterates [primary, fallback] internally and its outcome carried no model
identity, so a fallback-produced review was recorded as a PRIMARY vote -- poisoning the
reviewer_vote audit events, #8229's routing track records, and scoreJudgmentAgreement's
contribution to decision-record confidence. The doc's claim that slot-to-model is unambiguous by
construction holds for the tie-break swap, not for in-slot fallback.
0 commit comments