heat 注入侧拆独立开关 injectHeatEnabled(E5 裁决落地,默认关) - #362
modusensus wants to merge 1 commit into
Conversation
E5 实测 heat 乘进注入排序在真实年龄混合下饿死老约束(现行量级 ≡ 拟合参数, importance-only 遵从 +12.7pp),且 heat 的唯一排序参与点就是 injectCandidates 比较器(召回融合打分不含 heat,sleep 降级联判是独立机制)——自包含摘除: - 新键 injectHeatEnabled 默认关:heatEnabled 开启时注入乘数恒 1,与 heat 关闭逐字节一致(平价锁);显式开启恢复层内乘 heat 旧序(老用户回滚口) - 召回侧时钟(touchLastAccess)与 sleep 降级联判不受影响 - inject-heat.test.js 重写为双断言结构(默认关平价 + 开启恢复旧序 + λ=0 免疫 + 不跨层),计数锁 +1,CONFIGURATION/README 同步
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (11)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthrough新增默认关闭的 Changes注入排序热度开关
EdgeMem 测试结果说明
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change limits heat-based injection ordering to an explicit opt-in and preserves the existing recall and sleep behavior. No material merge-blocking risk is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is bounded and reversible. It separates ranking preferences without changing memory-access controls or granting new privileges. No introduced security issue was established, but deployed API exposure and configuration recovery behavior are not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 8 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
背景
队列计划书(mneme-research notes/queue-plans-2026-10.md)计划一 + 计划二。E5 效用考卷(讨论 #339)裁决:heat 乘进注入排序在真实年龄混合下饿死老约束(现行量级 ≡ 拟合参数,注入集逐条相同,importance-only 遵从 +12.7pp)。
Commit 1:
injectHeatEnabled(opt-in 默认关)探查确认 heat 的唯一排序参与点是
injectCandidates比较器——召回融合打分不含 heat(searchMemories 只用 heat 碰时钟 touchLastAccess),sleep 降级联判(sleep.js)是独立机制。因此这是一次自包含摘除:injectHeatEnabled默认 false:heatEnabled开启时注入乘数恒 1,与 heat 关闭逐字节一致(平价锁测试);显式开启恢复层内乘 heat 旧序(老用户回滚口);inject-heat.test.js重写为双断言结构(默认关平价 / 开启恢复旧序 / λ=0 免疫 / 不跨层),计数锁 +1,CONFIGURATION/README/CHANGELOG 同步。Commit 1 附带:autoSummarize 行补 E10 结论(计划二)
E10 EdgeMem 考卷(#361)实测:对「未来才问的具体值」类细节,零 LLM 原样写入保真 100% 而蒸馏丢 17/120——
autoSummarize的 CONFIGURATION 行补注「并存而非替代」口径。原样写入并存的产品化(宿主事件镜像)按计划书触发条件立项(真实负载出现可归因的丢细节案例),不在本 PR。门禁
全量 1530 tests 全绿;
npm run sync后 check-sync 过。Summary by CodeRabbit