fix(feedback): make retrieval-exposure audit-only by default (#1086) - #1091
Conversation
There was a problem hiding this comment.
Sorry @robotrocketscience, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR-size soft capThis PR is over the advisory size threshold:
Bigger PRs collide with more open work, which under the parallel-session workflow tends to produce repeated This is advisory only — nothing is blocked. If the size is intentional (large refactor, module removal, generated code), apply the |
|
[claim:review:kulili:2026-07-05T06:43:29Z] |
|
[claim:review:Garsecg:2026-07-05T06:44:17Z] |
|
[release:review:Garsecg:2026-07-05T06:44:22Z] |
|
[release:review:kulili:2026-07-05T06:45:15Z] |
|
merge-train: blocked branch is not fast-forward on The |
A hook retrieval was treated as positive evidence (+0.1 to alpha via apply_feedback). But a retrieval is exposure, not endorsement: counting every surfacing as truth let whatever recurs float above genuine knowledge. Measured on a real 24,883-belief store, junk (session scaffolding, fragments) accumulated ~3x the exposure of clean beliefs and scored higher (junk mean mu 0.554 > clean 0.446); the top junk beliefs were recurring prompts surfaced ~240x each. Add `update_posterior: bool` to apply_feedback: when False, the event is still written to feedback_history (so exposure frequency stays recoverable for the recurrence axis) but the Bayesian posterior and valence propagation are skipped. record_retrieval passes this through, gated by AELFRICE_EXPOSURE_UPDATES_POSTERIOR (default off = the fix; set to 1 to restore the pre-#1086 behaviour for benchmark A/B and rollback). Controlled check: a belief retrieved 50x no longer outranks a once-seen belief (both stay at prior mu=0.5); under the legacy flag the recurred belief inflates to mu=0.857. Two tests that encoded the old behaviour are updated to the new default + given legacy-flag coverage. Full suite green. First step of #1086; the #191 deferred-feedback sweep applies the same exposure-as-evidence pattern (currently inactive) and should follow.
9aa39e2 to
4630116
Compare
|
merge-train: merged 4630116 → |
First step of #1086 (belief scoring is one-directional). Fixes the dominant driver: retrieval-exposure was treated as positive evidence.
Problem
A hook retrieval bumped the belief's Bayesian posterior (
+0.1to α viaapply_feedback). But a retrieval is exposure, not endorsement — its own module docstring said so. Counting every surfacing as truth-evidence let whatever recurs float above genuine knowledge, with no counter-signal (all decay/demote sinks are dead or default-off).Evidence (measured on a real 24,883-belief store)
Fix
apply_feedbackgainsupdate_posterior: bool. WhenFalse, the event is still written tofeedback_history(exposure frequency stays recoverable for the recurrence axis, #1086 fix #3) but the posterior update and valence propagation are skipped.record_retrievalpasses it through, gated byAELFRICE_EXPOSURE_UPDATES_POSTERIOR— default off = the fix; set to1to restore the pre-#1086 behaviour (benchmark A/B and rollback).Verification
Controlled: a belief retrieved 50× no longer outranks a once-seen belief — both stay at prior μ=0.5 (gap +0.000); under the legacy flag the recurred belief inflates to μ=0.857 (gap +0.333). The built fix reproduces the counterfactual prediction.
Tests
Two tests that encoded the old behaviour (exposure moves α) are updated to the new default and given legacy-flag coverage; three focused
apply_feedback(update_posterior=False)unit tests added (posterior untouched, audit row still written, no propagation). Full suite: 5,649 passed.Scope
#191deferred-feedback sweep applies the same exposure-as-evidence pattern (currently inactive — 0 rows) and should get the same treatment in a follow-up.