feat(retrieval): entity-persist demotion lane onto production retrieve() (#1107 phase 3, #1096) - #1115
Conversation
…n retrieve() (#1107 phase 3, #1096) The #1096 entity-persistence demotion lane (the #1086 junk-percolation sink) was default-ON in retrieve_v2 since v4.0 but inert on the live hook path, which called the legacy retrieve(). Pass use_entity_persist_demote=None in the #1107 shim instead of hard-off, so production retrieve() honours is_entity_persist_demote_enabled (env -> TOML -> default-ON). Single-step graduation: the default was already True (G2-cleared #1103), so exposing it makes the demotion live on every host's retrieve()/context_rebuilder/ mcp_server. Tests: equivalence SHIM_LANES gains use_entity_persist_demote=None (mirrors the shim); test_shim_runs_temporal_spine_lane_others_off -> test_shim_runs_graduated_lanes_others_off, now proving BOTH graduated lanes (spine + entity-persist) live and the remaining four off non-vacuously (a durable-vs-coordination tie corpus where demotion reorders). AC2 byte-identity regression test pins AELFRICE_ENTITY_PERSIST_DEMOTE=0 to isolate the posterior_weight=0 -> BM25-only contract from the now-default-on demotion, mirroring its existing use_bm25f_anchors=False pin.
#1107 phase 3, #1096) CONFIG.md: the use_entity_persist_demote lane is default-ON on the production retrieve() path since the #1107 Phase-3 cutover (was retrieve_v2-only), so the live UserPromptSubmit hook / context_rebuilder / mcp_server run the #1086 junk-percolation demotion; note the lean shim takes no per-call kwarg (opt out via env/TOML). CHANGELOG: Phase-3 graduation entry + amend the Phase-2 entry's now-stale lane count.
|
Warning Review limit reached
Next review available in: 17 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 |
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
|
[claim:review:Setr:2026-07-07T16:30:50Z] |
|
Review: approve. Verified:
Adding |
|
merge-train: merged dc95c59 → |
|
[release:review:Setr:2026-07-07T16:33:29Z] |
What
#1107 Phase 3 — graduate the entity-persist demotion lane onto the production
retrieve()path. Operator-directed ("take the next lane"). The #1096 demotion (the #1086 junk-percolation sink) was default-ON inretrieve_v2since v4.0 but inert on the live hook path, which called the legacyretrieve(). This exposes it on production.Why this lane is next
Of the five staged lanes still hard-off after Phase 2, entity-persist is the clear next graduate:
True, so this is a single-step graduation (expose via shim; no separate flip).belief_entitiesquery, no candidate expansion) — unlike the pack-reordering clustering/HRR lanes.(The other four stay off: origin-tiebreak is a contested BM25-recall problem rerank can't reach (#1013); HRR-expand is recall-neutral (#1001); clustering / HRR-structural reorder the L1 pack and each need their own decision.)
Commits (atomic)
feat(retrieval): shim passesuse_entity_persist_demote=None(resolver-driven, default-ON) instead of hard-off. Tests: equivalenceSHIM_LANESgainsuse_entity_persist_demote=None;test_shim_runs_temporal_spine_lane_others_off → test_shim_runs_graduated_lanes_others_off, now proving both graduated lanes (spine + entity-persist) live and the remaining four off, non-vacuously (durable-vs-coordination tie corpus where demotion reorders). The AC2 byte-identity regression test pinsAELFRICE_ENTITY_PERSIST_DEMOTE=0to isolate theposterior_weight=0 → BM25-onlycontract from the now-default-on demotion — mirroring its existinguse_bm25f_anchors=Falsepin.docs: CONFIG.md (lane live on productionretrieve(), not justretrieve_v2) + CHANGELOG.Verification
benchmarks/entity_persist_ablation.py): entity-persistence AUC 1.000 vs 0.500 posterior-only (durable/ephemeral separation) — signal intact.tests/bench_gate/test_entity_persist_g2_mixed_corpus.py) already cleared; the lane adds one batched query, no candidate expansion.Scope
Refs #1096, #1107 (Phase 3). Does not close the #1107 epic — origin-tiebreak / HRR-expand / clustering / HRR-structural remain, each a separate gated decision.
Opt-out
AELFRICE_ENTITY_PERSIST_DEMOTE=0or[retrieval] use_entity_persist_demote = false.