Repository navigation
Commit 258b619
authored
* feat(scope): sleep 冲突阶段跨 scope 分流——同内容跨归属对停车人工裁决(issue #170 第 2 步)
- scopeKeyOf 从 service.js 上提为 scope.js 共享定义(去重键与配对同钥匙)
- lang.js 新增 scopeCandidateReason 双语 reason 模板
- sleep.phaseConflicts:跨 scope 相似对(任一维标注键不等,含 NULL vs 已标注)
一律停车到 conflict_pending(专属 reason),绝不自动裁决——freeze 模式沿用
停车但换 scope reason;非 freeze 模式先停车跨 scope 对、同 scope 对才走 LLM
(LLM prompt 里不再出现跨 scope 对);run 摘要带 scopeCandidates 计数
- 复用 #166 冲突待确认队列,不新造界面;同对跨轮去重天然防重复入队
- 测试 +4(scope-candidates.test.js),全量 1007(1006 过 + 1 既有 skip)
* fix(scope): 人工已裁决的冲突对不再反复入队——内容变了才重新评审(issue #170 复核项 4)
- store.saveConflictPending:同对存在已裁决行且两侧 updated_at 均未晚于
resolved_at 时抑制重报(返回 undefined)——否则跨 scope 对每轮 sleep
原样回来,『保留双方』的决定变成噪声
- sleep.parkPair 与 dream 冻结路径尊重返回值,抑制不计入停车数/摘要
- updated_at 是宽松代理:任何字段更新都会触发重新评审,宁可多看一眼
不静音真冲突
- 测试 +1(裁决后不再入队/改后重入);顺带修正 mock embed 的契约形状
(按输入条数返回等长数组——update 失效缓存后 sleep 回填走 embed())
* test(conflict-freeze): 重写「已解决对再次 pending」用例到新语义(issue #170 复核项 4)
跟随 store 抑制行为:真实记忆行 + 裁决后未变化被抑制 + 内容变化后重入。
旧用例用不存在的假 id,撞上抑制路径返回 undefined(CI 实抓)。
* fix(scope): 普通 dream 的跨 scope conflict 决策停车人工裁决(issue #170 复核项 3)
- sleep 路径(scope-candidate-queue)拦截了跨 scope 相似对,但普通 dream 的
LLM 看得到全部记忆、可直接 conflict 归档别的 scope 的唯一副本——保护缺位
- dream.js:conflict 决策按 winner/loser 的 scope 键分流——跨 scope 对两种
模式都停车 conflict_pending(scopeConflictParkReason 专属 reason + 模型
裁决理由),绝不进 applyDecisions;同 scope 对照旧(freeze 停车/非 freeze
自动裁决)
- 测试 +2:跨 scope 停车(loser 不归档/winner 无批注)+ 同 scope 照常裁决回归
* feat(scope): strictScope 硬过滤只认显式声明——自动标注降为纯软加权(issue #170 第 3 步,4.3 已确认)
- service.isVisibleInScope:硬墙条件收窄为「该维有标注且来源=explicit」;
auto 与 v0.8.0 存量 NULL 来源行不进硬过滤(A2 foreign ×0.5 软加权保留可见)
- store.list/count 两处 visibility SQL 同口径收窄(IS NOT 为 NULL 安全比较);
fail-closed 语义随之收窄:匿名会话只挡 explicit 行,不误杀软标注
- 面板 strictScope hint 双语对齐新语义(只对显式声明生效;物理隔离仍指
sensitivity)——回应 heptaspirit 对「严格隔离」命名易误读的意见
- scope-strict.test.js 重写到新语义(10 项:三态硬/软、混合来源、fail-closed
收窄、无存在性泄漏),全量 1008(1007 过 + 1 既有 skip)
* docs(readme): strictScope 口径对齐 explicit-only 语义(issue #170 复核项 1)
- 内层 README:特性表与 strictScope 配置行改为「显式声明收窄的归属硬隔离;
载体自动标注只降权;物理隔离请用 sensitivity」;配置行标注 v0.8.1 起语义
- 根 README 中英:特性段与快速配置表同步(explicit hard blocking only)
- 历史 changelog/路线图行保持原样(如实描述 v0.8.0 已发布行为,0.8.1 变化
留待发版说明)
- conflict-freeze.test.js:重写「已解决对再次 pending」用例到新语义
(裁决后未变化被抑制,内容变化后重入)
* fix(scope): memory_update/memory_delete 补 strictScope 可见性校验——与 memory_get 对齐(issue #170 复核项 4)
- get 按「不存在」拒绝他 scope 的 explicit 行,update/delete 却能凭 id 直改
直删——补齐同款无存在性泄漏:strictScope 下不可见行 update 抛 not found、
delete 视作不存在;auto/存量行不构成硬墙照常可操作(与 get 同口径)
- 工具层实现为 createTools 闭包内共享 guard(update 以「展开恒为 undefined」
形态前置校验);strictScope 关时零行为变化
- 测试 +1:explicit 拒改拒删/auto 可改/owner 可改/flag 关回归
1 parent 79eb8a5 commit 258b619
10 files changed
Lines changed: 229 additions & 85 deletions
File tree
- dsh-mneme
- lib
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
701 | | - | |
| 701 | + | |
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
776 | 779 | | |
777 | | - | |
| 780 | + | |
778 | 781 | | |
779 | 782 | | |
780 | | - | |
| 783 | + | |
781 | 784 | | |
782 | 785 | | |
783 | | - | |
| 786 | + | |
784 | 787 | | |
785 | 788 | | |
786 | | - | |
| 789 | + | |
787 | 790 | | |
788 | 791 | | |
789 | 792 | | |
| |||
1122 | 1125 | | |
1123 | 1126 | | |
1124 | 1127 | | |
1125 | | - | |
1126 | | - | |
1127 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1128 | 1132 | | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1129 | 1136 | | |
1130 | | - | |
| 1137 | + | |
1131 | 1138 | | |
1132 | 1139 | | |
1133 | | - | |
| 1140 | + | |
1134 | 1141 | | |
1135 | 1142 | | |
1136 | | - | |
| 1143 | + | |
1137 | 1144 | | |
1138 | 1145 | | |
1139 | | - | |
| 1146 | + | |
1140 | 1147 | | |
1141 | 1148 | | |
1142 | 1149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
| |||
336 | 356 | | |
337 | 357 | | |
338 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
339 | 362 | | |
340 | 363 | | |
341 | 364 | | |
| |||
358 | 381 | | |
359 | 382 | | |
360 | 383 | | |
361 | | - | |
362 | | - | |
363 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
364 | 388 | | |
365 | 389 | | |
366 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| |||
0 commit comments