feat(dream): autoDream 连续失败退避(#292)+ docs: 配置说明一页(#290) - #322
Merged
Merged
Conversation
#89 的最小间隔闸对失败 run 也生效,但间隔恒定——恒定失败的模型(#135 空体面)按固定节奏连发刷配额。新增 opt-in 键 autoDreamFailureBackoff (默认关 = 行为逐字节不变):有效最小间隔 = dreamMinIntervalMinutes × 2^连续失败数,封顶 30 分钟(只拦增长,不把用户配得更大的基数压小); 成功一次清零,重启归零(跨重启冷却归 #291 的 lastRunAtSeed)。被退避 推迟的触发没有调用发生,不写审计行(与 #89 间隔内跳过同口径)。 config.js schema 与 settings.js 白名单成对注册;api.test.js 旗标计数锁 按累加口径 +1 并补 effective 断言;新增 test/dream-failure-backoff.test.js 5 例(注入时钟,同 dream-peak-hours 房型):默认关间隔不变 / 连败 2 次 第 3 次推迟 / 成功清零恢复 / 连败 10 次封顶 30 分钟 / 0 基数不产生间隔。
新增 dsh-mneme/docs/CONFIGURATION.md:以 src/config.js schema 为唯一 正本,按功能面分组(全局与存储 / scope 隔离 / 蒸馏 / 注入 / 巩固 / 睡眠 / 反思与冲突 / 实体 / 检索 / 热度 / API 与工具面 / 运行时),每键给默认、 作用与开启后果/冲突;lightMode 联动键逐行标注并附 LIGHT_MODE_OFF 完整 清单;与 settings.js 白名单的对应关系在页首一句话交代。反向核对确认 schema 顶层 147 键无遗漏。两个 README 的文档索引各加一行链接。
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: slow-stack/mneme/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches📝 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! |
modusensus
added a commit
that referenced
this pull request
Sep 26, 2026
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
两件发版前收尾(issue #290 / #292,交接单
.worktrees/HANDOFF-290-292.md全项验收通过):#292 autoDream 连续失败退避(d2df61d)
autoDreamFailureBackoff(默认关 = 行为与现状逐字节一致),config.js schema + settings.js 白名单成对注册,api.test.js 旗标锁累加口径 +1(…+ 2 + 1)并补 effective 默认值断言。dreamMinIntervalMinutes× 2^连续失败数,成功清零恢复,封顶 30 分钟(封顶只拦指数增长,不把用户配得更大的基数压小;2^N 溢出由 Math.min 兜住)。基数 0 时无闸可翻倍,本键不自己产生间隔。ok:false与抛错计入连败;degraded 走ok:true(LLM 成功)算成功清零;no-op 桩(无返回结果)不动计数。计数为调度器内存变量,跨重启冷却由 fix(dream): 节流与冷却时刻跨重启持久化——审计表恢复 lastRunAt 种子(#89 连发根因) #291 的 lastRunAt 持久化负责,两者不重叠。#290 配置说明一页(809b3ea)
docs/CONFIGURATION.md(238 行):以src/config.jsschema 为唯一正本,147 键全覆盖(反向核对脚本抓漏后补齐),按功能面分组成表——键 | 默认 | 作用 | 开启后果/冲突;lightMode 联动键逐行标注并附LIGHT_MODE_OFF完整清单。两个 README 文档索引各加一行。验证
npm test:1404 tests / 1402 pass / 1 fail / 1 skip——唯一失败为tools.test.jsmemory_runtime provision 断言,干净 origin/main(ecfa5d0)主树复测 29/29 全过,仅 worktree+junction 环境复现,与本 PR 无关(CI 即权威判定)。npm run sync+ check-sync 平价 ✓;badge:sync被非绿套件按设计拒绝,合并后补跑(1389 → 1404)。Summary by CodeRabbit