issue #124: 情感态 energy 昼夜节律 nudge(读时施加) #129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/124-circadian-energy-nudge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #124
实现
read_delay.py内的circadian_energy_adjustment(issue #123 占位版本)——本片发现它与 ADR-0017/ADR-0005 的"新 gate 不单独读墙钟,只读 energy"边界冲突:字面上没让read_delay_window读钟,但技术上绕开了 ADR-0017"拒绝了"节点否决的形状。经 Forgejo issue 评论核实评估会话裁决,撤掉本地实现,改为读时统一施加。affective_state.circadian_energy_nudge(纯函数,昼夜区间判定)+affective_state.get_effective_fast_state(全仓唯一读口:读原始存储值、叠加 nudge、clamp、不落库)。get_effective_fast_state:门控默认取值(gate_pipeline.py)、已读延迟窗(entry_reactive.py)、打字节奏与 mood_congruence 召回评分(runtime_loop.py)。arise_circadian_energy_nudge_{start_hour,end_hour,amount},复用 issue #123 的 config 分类先例。read_delay.py撤回原有circadian_energy_adjustment及datetimeimport,模块归属边界收紧为"全程不读墙钟",新增 AST 守卫测试锁定。两轴 review 发现与修正(5 项,全部确认)
/why_query是第5个未接线消费点,仍直接读 storage 原始值,展示坐标与真实召回排序脱节——entry_admin.py改走get_effective_fast_state,新增排序翻转回归测试。RuntimeLoop一个方法读,按 issue #105 既有标准应收进RuntimeLoopConfig——重构runtime_loop.py/loop_factory.py/runtime_loop_helpers.py。datetime模块,漏了time.time()等价读钟方式——扩展守卫覆盖datetime+time。get_effective_fast_state文档声称"决策快照全覆盖"过度宽泛,忽略 Callback 送回路径(ADR-0029 定死的真无门控路径)的合法例外——收窄措辞。文档
docs/adr/0005-affective-state.md新增更新节,记录 #123 违规诊断、方案形状、语义变化、四个消费点、AST 守卫、config 复用。docs/adr/0017-reactive-timing-and-coverage.md新增简短更新节,指向 ADR-0005 详情。docs分支按规矩不推送,仅本地提交)测试
/why_query生效值消费的排序翻转回归测试。ty check对本片改动文件扫描出的 18 条诊断经核实为既有的_event()测试辅助函数返回类型宽松(-> object)导致的噪音,与本片改动无关(同款诊断在 issue #123 的 ty check 中已被判定为既有噪音)。Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com