fix retriever hardMinScore after decay#766
Conversation
|
Please rebase this branch on current The fix is still valuable, but the branch is behind current |
8278a38 to
68fb179
Compare
rwmjhb
left a comment
There was a problem hiding this comment.
PR #766 Review: fix retriever hardMinScore after decay
Verdict: APPROVE | 6 rounds completed | Value: 51% | Size: MEDIUM | Author: TurboTheTurtle
Value Assessment
Problem: The retriever currently applies hardMinScore before time/lifecycle decay, allowing final returned scores to fall below the configured floor. This makes strict negative-query suppression and diagnostics misleading for users tuning retrieval quality.
| Dimension | Assessment |
|---|---|
| Value Score | 51% |
| Value Verdict | review |
| Issue Linked | true |
| Project Aligned | true |
| Duplicate | false |
| AI Slop Score | 0/6 |
| User Impact | medium |
| Urgency | medium |
Scope Drift: 3 flag(s)
- index.ts: exporting isLayer1CircuitOpen appears unrelated to issue #699 and adds public API surface for a testability concern
- test/issue606_sdk-migration.test.mjs: jiti-based loading and plugin SDK aliasing are not justified by the hardMinScore-after-decay problem statement
- src/decay-engine.ts: including ds.recency in searchFloor changes lifecycle decay scoring semantics beyond enforcing hardMinScore as a final floor
Open Questions:
- Should isLayer1CircuitOpen become public API, or should the test avoid exporting an internal helper?
- Is the src/decay-engine.ts recency-floor change intentionally part of fixing #699, or should it be separated into its own PR?
- The PR is marked stale_base=true; maintainers should confirm the branch has been rebased on current master before merge.
Summary
The retriever currently applies hardMinScore before time/lifecycle decay, allowing final returned scores to fall below the configured floor. This makes strict negative-query suppression and diagnostics misleading for users tuning retrieval quality.
Evaluation Signals
| Signal | Value |
|---|---|
| Blockers | 0 |
| Warnings | 0 |
| PR Size | MEDIUM |
| Verdict Floor | approve |
| Risk Level | high |
| Value Model | codex |
| Primary Model | codex |
| Adversarial Model | claude |
Nice to Have
- F1: Raw recency bypasses lifecycle weighting
- F2: Regression test misses lifecycle and BM25-tag paths
- MR1: Diagnostic dropSummary stage names shifted at fixed
orderpositions — breaking change for consumers keyed by order - MR2:
isLayer1CircuitOpenexported as public API solely for a test that the test itself flags as 'internal' - MR4: Stale-base flag is true but build was skipped — no confirmation the post-rebase tree compiles
Recommended Action
Ready to merge.
Reviewed at 2026-05-12T16:05:10Z | 6 rounds | Value: codex | Primary: codex | Adversarial: claude
Summary
Fix
hardMinScoreso it acts as a final returned-score floor after time/lifecycle decay instead of only as a pre-decay gate.time_decay/decay_boostin vector, BM25-only tag, and hybrid retrieval paths.timeDecayfeedshardMinScore, andnoiseFilterreceives already hard-filtered results.hardMinScore, decays below it, and must be dropped.Fixes #699
Validation
node test/retriever-rerank-regression.mjsnode --test test/query-expander.test.mjsgit diff --checkNotes
node --test test/retriever-decay-recency-double-boost.mjsstill fails on currentmasterbecause the test constructsMemoryRetrieverwith{ decayEngine }as the fourth constructor arg, but the class expects the decay engine object directly. This appears unrelated to this change.