tentative→confirmed 自动晋升通道实现(issue #175 grill) #175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Parent
issue #175 grill(2026-08-20 拍板:现在实现);ADR 更新见 PR #177(ADR-0009 更新节 + CONTEXT.md
「画像」词条同步)
What to build
正式实现 ADR-0009 2026-07-08 更新节 ADOPTED、此前从未落地的 tentative→confirmed 自动晋升通道。
原文(
docs/adr/0009-memory-engineering.md「更新(2026-08-20,issue #175 grill)」节):Acceptance criteria
ProfileFact/ProfileCandidate(profile.py)新增source: Literal["user_confirmed", "auto_promoted"] | None字段;update_profile工具写入路径(write_confirmed_fact)显式传source="user_confirmed"ProfileFactModel(storage.py)新增列以支持晋升判定:至少需要"独立命中日期计数"+"最近命中日期"两个信息(具体列设计/是否合并成一列自定,只要能正确实现"同一天多次命中只
加一次计数"这条语义)
_upsert_fact(或其调用方write_tentative_facts)在写入 tentative 分支时:若本次命中日期与该行已存的"最近命中日期"不同,计数 +1 并更新该日期;相同则不计数、只按既有逻辑覆盖
value/updated_at
arise_profile_promotion_threshold(新增静态 config,默认2,按 ADR-0011阈值三层分类声明)时,原地把该行
status改成confirmed、source写"auto_promoted"——不新增行,不触碰其它字段
confirmed/tentative现有的"同 key 可并存"这条既有行为不因本票改变——本票只处理tentative 行自身何时被原地转正,不影响它与另一条已存在的 confirmed 行(若有)的共存关系
source="auto_promoted";同一天内多次命中 → 不提前转正(计数不超前累加);晋升后再次命中同一 key 的 tentative 写入
路径行为不因"这行已经不是 tentative 了"而报错(新的 tentative 候选应该开始一轮新的计数,
不是复用已转正那行的历史计数)
Not in scope
update_profile显式纠正路径的既有行为recall.py只处理事件记忆)confirmed/tentative同 key 并存这条既有存储设计本身评估:tentative→confirmed 自动晋升通道要不要实现(ADR-0009)to tentative→confirmed 自动晋升通道实现(issue #175 grill)