dsh-memu-memory 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +8 -6
- package/README.md +50 -5
- package/README.zh.md +49 -5
- package/docs/active-memory-ab.md +385 -0
- package/docs/binding-lifecycle.md +99 -0
- package/docs/contributing.md +6 -4
- package/docs/emotion-model-spec.md +281 -0
- package/docs/env-and-commands.md +13 -0
- package/docs/host-api.md +35 -3
- package/docs/memory-semantics.md +40 -11
- package/docs/recall-benchmark.md +238 -0
- package/docs/troubleshooting.md +395 -366
- package/lib/active-memory.js +165 -0
- package/lib/activity-log.js +190 -0
- package/lib/backup.js +1103 -0
- package/lib/binding-diagnostics.js +635 -0
- package/lib/client.js +728 -58
- package/lib/consolidation-ledger.js +347 -0
- package/lib/consolidation-receipt.js +284 -0
- package/lib/consolidation-snapshot.js +274 -0
- package/lib/consolidation-worker.js +115 -0
- package/lib/curator.js +81 -37
- package/lib/cycle.js +43 -6
- package/lib/embedding-catalog.js +763 -0
- package/lib/embedding-download.js +407 -0
- package/lib/embedding-runtime.js +710 -0
- package/lib/engine.js +2 -2
- package/lib/index.js +36 -0
- package/lib/inject.js +232 -103
- package/lib/local-embedding-entry.js +145 -0
- package/lib/local-embedding-manager.js +267 -0
- package/lib/local-embedding-protocol.js +173 -0
- package/lib/local-embedding-worker.js +652 -0
- package/lib/local-vector-service.js +283 -0
- package/lib/memory.js +599 -57
- package/lib/memu-config.js +10 -22
- package/lib/memu.js +53 -19
- package/lib/mood.js +268 -39
- package/lib/paths.js +24 -0
- package/lib/preset-scope.js +1 -1
- package/lib/private.js +450 -29
- package/lib/prompts/private-consolidation.coding.md +1 -0
- package/lib/prompts/private-consolidation.md +1 -0
- package/lib/prompts/private-consolidation.mixed.md +1 -0
- package/lib/prompts/private-consolidation.rp.md +1 -0
- package/lib/prompts.js +4 -4
- package/lib/remote-summary.js +51 -25
- package/lib/rpc.js +54 -5
- package/lib/state.js +137 -172
- package/lib/tools.js +58 -7
- package/lib/vector-migration.js +878 -0
- package/lib/vector-profile.js +968 -0
- package/package.json +4 -2
- package/scripts/acceptance-local.mjs +7 -5
- package/scripts/active-memory-ab-live.mjs +655 -0
- package/scripts/active-memory-ab.mjs +1302 -0
- package/scripts/chain-matrix.mjs +537 -0
- package/scripts/check-all.mjs +29 -1
- package/scripts/check-doc-drift.mjs +353 -0
- package/scripts/diagnose-bindings.mjs +176 -0
- package/scripts/local-runtime-install.mjs +142 -0
- package/scripts/local-runtime-verify.mjs +56 -0
- package/scripts/local-vector-verify.mjs +93 -0
- package/scripts/recall-bench.mjs +813 -0
- package/scripts/repetition-ab-scenarios.mjs +93 -0
- package/scripts/repetition-detector-snapshot.mjs +314 -0
- package/scripts/repetition-eval-live.mjs +360 -0
- package/scripts/repetition-eval.mjs +702 -0
- package/tests/activation.test.mjs +89 -0
- package/tests/active-memory-ab.test.mjs +745 -0
- package/tests/active-memory.test.mjs +129 -0
- package/tests/activity-log.test.mjs +126 -0
- package/tests/activity-wiring.test.mjs +103 -0
- package/tests/appendix-b.test.mjs +212 -0
- package/tests/appendix-b2.test.mjs +166 -0
- package/tests/audit-regression.test.mjs +272 -0
- package/tests/audit-safety.test.mjs +227 -0
- package/tests/backend-compensation.test.mjs +272 -0
- package/tests/backup.test.mjs +793 -0
- package/tests/binding-diagnostics.test.mjs +720 -0
- package/tests/browser.test.mjs +366 -0
- package/tests/client-render.test.mjs +892 -0
- package/tests/coalesce.test.mjs +113 -0
- package/tests/config.test.mjs +159 -0
- package/tests/consolidation-credential.test.mjs +320 -0
- package/tests/consolidation-fork.test.mjs +357 -0
- package/tests/consolidation-ledger.test.mjs +298 -0
- package/tests/consolidation-snapshot.test.mjs +321 -0
- package/tests/consolidation-value.test.mjs +89 -0
- package/tests/context-scope.test.mjs +40 -0
- package/tests/cue.test.mjs +44 -0
- package/tests/curator-probe.test.mjs +433 -0
- package/tests/curator.test.mjs +150 -0
- package/tests/cycle.test.mjs +411 -0
- package/tests/disclosure.test.mjs +231 -0
- package/tests/doc-drift.test.mjs +222 -0
- package/tests/embedding-catalog.test.mjs +266 -0
- package/tests/embedding-download.test.mjs +391 -0
- package/tests/embedding-runtime.test.mjs +389 -0
- package/tests/emotion-chain.test.mjs +84 -0
- package/tests/emotion-contract.test.mjs +445 -0
- package/tests/engine.test.mjs +35 -0
- package/tests/fixtures/active-memory-ab/README.md +56 -0
- package/tests/fixtures/active-memory-ab/cases/01-clean-dense-turn.json +351 -0
- package/tests/fixtures/active-memory-ab/cases/02-clean-thin-turn.json +122 -0
- package/tests/fixtures/active-memory-ab/cases/03-clean-starved-small.json +125 -0
- package/tests/fixtures/active-memory-ab/cases/04-clean-large-thin.json +137 -0
- package/tests/fixtures/active-memory-ab/cases/05-clean-half-step.json +166 -0
- package/tests/fixtures/active-memory-ab/cases/06-clean-duplicate-reread.json +197 -0
- package/tests/fixtures/active-memory-ab/cases/07-clean-recent-recall.json +125 -0
- package/tests/fixtures/active-memory-ab/cases/08-global-relevant.json +111 -0
- package/tests/fixtures/active-memory-ab/cases/09-global-irrelevant-conflict.json +158 -0
- package/tests/fixtures/active-memory-ab/cases/10-no-human-turn.json +97 -0
- package/tests/fixtures/active-memory-ab/cases/11-clean-scale-100.json +137 -0
- package/tests/fixtures/active-memory-ab/cases/12-clean-scale-1000.json +137 -0
- package/tests/fixtures/active-memory-ab/cases/13-clean-scale-5000.json +137 -0
- package/tests/fixtures/active-memory-ab/cases/14-clean-scale-20000.json +137 -0
- package/tests/fixtures/active-memory-ab/lead-ai-reviewed-reference.json +191 -0
- package/tests/fixtures/active-memory-ab/manifest.json +199 -0
- package/tests/fixtures/recall-bench/01-paraphrase.json +184 -0
- package/tests/fixtures/recall-bench/02-exact.json +153 -0
- package/tests/fixtures/recall-bench/03-negation.json +173 -0
- package/tests/fixtures/recall-bench/04-no-answer.json +162 -0
- package/tests/fixtures/recall-bench/05-conflict.json +194 -0
- package/tests/fixtures/recall-bench/06-boundary.json +273 -0
- package/tests/fixtures/recall-bench/07-secret.json +191 -0
- package/tests/fixtures/recall-bench/08-coding.json +164 -0
- package/tests/fixtures/recall-bench-gold-candidates/01-paraphrase.json +193 -0
- package/tests/fixtures/recall-bench-gold-candidates/02-exact.json +197 -0
- package/tests/fixtures/recall-bench-gold-candidates/03-negation.json +244 -0
- package/tests/fixtures/recall-bench-gold-candidates/04-no-answer.json +189 -0
- package/tests/fixtures/recall-bench-gold-candidates/05-conflict.json +245 -0
- package/tests/fixtures/recall-bench-gold-candidates/06-boundary.json +279 -0
- package/tests/fixtures/recall-bench-gold-candidates/07-secret.json +224 -0
- package/tests/fixtures/recall-bench-gold-candidates/08-coding.json +218 -0
- package/tests/fixtures/repetition-eval/01-zh-rp.json +93 -0
- package/tests/fixtures/repetition-eval/02-en.json +97 -0
- package/tests/fixtures/repetition-eval/03-code.json +91 -0
- package/tests/fixtures/repetition-eval/04-names.json +116 -0
- package/tests/fixtures/repetition-eval/05-user-quote.json +96 -0
- package/tests/fixtures/repetition-eval/06-agreement.json +86 -0
- package/tests/graph-view.test.mjs +187 -0
- package/tests/graph.test.mjs +77 -0
- package/tests/hook-order.test.mjs +72 -0
- package/tests/humanlike.test.mjs +232 -0
- package/tests/hybrid-recall.test.mjs +92 -0
- package/tests/inbound.test.mjs +393 -0
- package/tests/inject-guide.test.mjs +364 -0
- package/tests/inject.test.mjs +222 -0
- package/tests/injection-budget-settings.test.mjs +35 -0
- package/tests/injection-budget.test.mjs +64 -0
- package/tests/injection-chain.test.mjs +191 -0
- package/tests/loader-register.mjs +3 -0
- package/tests/loader.mjs +12 -0
- package/tests/local-embedding-entry.test.mjs +95 -0
- package/tests/local-embedding-manager.test.mjs +476 -0
- package/tests/local-embedding-protocol.test.mjs +95 -0
- package/tests/local-embedding-worker.test.mjs +346 -0
- package/tests/managed-memory.test.mjs +536 -0
- package/tests/managed-runtime.test.mjs +40 -0
- package/tests/media.test.mjs +132 -0
- package/tests/migration-payload.test.mjs +42 -0
- package/tests/mood.test.mjs +109 -0
- package/tests/multiprocess.test.mjs +29 -0
- package/tests/new-session-gate.test.mjs +361 -0
- package/tests/package-shipping.test.mjs +84 -0
- package/tests/preset-scope.test.mjs +212 -0
- package/tests/prompts.test.mjs +250 -0
- package/tests/react-snapshot.test.mjs +23 -0
- package/tests/recall-bench.test.mjs +306 -0
- package/tests/remote.test.mjs +140 -0
- package/tests/rename.test.mjs +30 -0
- package/tests/repetition-detector-snapshot.test.mjs +231 -0
- package/tests/repetition-eval-live.test.mjs +177 -0
- package/tests/repetition-eval.test.mjs +373 -0
- package/tests/salient-date.test.mjs +142 -0
- package/tests/settings-beat.test.mjs +221 -0
- package/tests/short-term.test.mjs +166 -0
- package/tests/sidebar-beat.test.mjs +208 -0
- package/tests/sidebar-refresh.test.mjs +123 -0
- package/tests/sidebar.test.mjs +70 -0
- package/tests/snippet.test.mjs +47 -0
- package/tests/source-kind.test.mjs +52 -0
- package/tests/state.test.mjs +150 -0
- package/tests/stats.test.mjs +112 -0
- package/tests/storage.test.mjs +125 -0
- package/tests/stubs/dsh-llm.js +5 -0
- package/tests/stubs/dsh-session.js +7 -0
- package/tests/stubs/dsh-tools.js +101 -0
- package/tests/tool-schema.test.mjs +73 -0
- package/tests/tools.test.mjs +184 -0
- package/tests/ui-defaults.test.mjs +57 -0
- package/tests/update-fields.test.mjs +138 -0
- package/tests/vector-migration.test.mjs +733 -0
- package/tests/vector-profile.test.mjs +425 -0
- package/tests/visibility-migration.test.mjs +152 -0
- package/tests/webui-auth.test.mjs +454 -0
- package/tests/webui.test.mjs +164 -0
- package/tests/windows-env.test.mjs +89 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "active-memory-ab-case",
|
|
4
|
+
"id": "clean-large-thin",
|
|
5
|
+
"draft": true,
|
|
6
|
+
"notGold": true,
|
|
7
|
+
"gold": false,
|
|
8
|
+
"review": "pending",
|
|
9
|
+
"annotationSource": "synthetic-proxy",
|
|
10
|
+
"interference": "off",
|
|
11
|
+
"title": "大 transcript 薄回合:不吃饥饿豁免",
|
|
12
|
+
"annotationNotes": "合成代理标注:padding 是确定性工具轮询,文本完全相同,去重后只算 1 个工作单元;两个标签分别落在首回合与末尾薄回合。",
|
|
13
|
+
"snapshot": {
|
|
14
|
+
"domain": "coding",
|
|
15
|
+
"idleAtSnapshotEndMinutes": 20,
|
|
16
|
+
"lastInjectedAt": null,
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"type": "turn/start",
|
|
20
|
+
"at": "2026-10-30T02:00:00.000Z"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "user/message",
|
|
24
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
25
|
+
"data": {
|
|
26
|
+
"source": {
|
|
27
|
+
"kind": "user"
|
|
28
|
+
},
|
|
29
|
+
"content": [
|
|
30
|
+
{
|
|
31
|
+
"type": "text",
|
|
32
|
+
"text": "先按计划把迁移脚本跑通,日志我看产出就行。"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "assistant/message",
|
|
39
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
40
|
+
"data": {
|
|
41
|
+
"message": {
|
|
42
|
+
"content": [
|
|
43
|
+
{
|
|
44
|
+
"type": "text",
|
|
45
|
+
"text": "开始跑。"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "step/end",
|
|
53
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
54
|
+
"step": 1
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "turn/end",
|
|
58
|
+
"at": "2026-10-30T02:00:30.000Z"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "padding",
|
|
62
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
63
|
+
"startAt": "2026-10-30T02:01:00.000Z",
|
|
64
|
+
"count": 520,
|
|
65
|
+
"intervalMs": 1000,
|
|
66
|
+
"tool": "read",
|
|
67
|
+
"text": "polling: no change"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "turn/start",
|
|
71
|
+
"at": "2026-10-30T02:10:00.000Z"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "user/message",
|
|
75
|
+
"at": "2026-10-30T02:10:00.000Z",
|
|
76
|
+
"data": {
|
|
77
|
+
"source": {
|
|
78
|
+
"kind": "user"
|
|
79
|
+
},
|
|
80
|
+
"content": [
|
|
81
|
+
{
|
|
82
|
+
"type": "text",
|
|
83
|
+
"text": "继续"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "assistant/message",
|
|
90
|
+
"at": "2026-10-30T02:10:00.000Z",
|
|
91
|
+
"data": {
|
|
92
|
+
"message": {
|
|
93
|
+
"content": [
|
|
94
|
+
{
|
|
95
|
+
"type": "text",
|
|
96
|
+
"text": "还在跑。"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "step/end",
|
|
104
|
+
"at": "2026-10-30T02:10:00.000Z",
|
|
105
|
+
"step": 520
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "turn/end",
|
|
109
|
+
"at": "2026-10-30T02:10:00.000Z"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"labels": {
|
|
114
|
+
"expected": [
|
|
115
|
+
{
|
|
116
|
+
"id": "mem-ab-large-plan-scope",
|
|
117
|
+
"class": "decision",
|
|
118
|
+
"sourceSeq": 1,
|
|
119
|
+
"note": "迁移脚本先跑通,日志以产出为准"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "mem-ab-large-thin-tail",
|
|
123
|
+
"class": "promise",
|
|
124
|
+
"sourceSeq": 7,
|
|
125
|
+
"note": "末尾薄回合(“继续”)本身没有新事实,用于量漏记"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"mainProactive": [],
|
|
129
|
+
"userReminders": []
|
|
130
|
+
},
|
|
131
|
+
"expect": {
|
|
132
|
+
"maxBackgroundChecks": 0,
|
|
133
|
+
"blockedReasons": [
|
|
134
|
+
"large-transcript-thin"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "active-memory-ab-case",
|
|
4
|
+
"id": "clean-half-step",
|
|
5
|
+
"draft": true,
|
|
6
|
+
"notGold": true,
|
|
7
|
+
"gold": false,
|
|
8
|
+
"review": "pending",
|
|
9
|
+
"annotationSource": "synthetic-proxy",
|
|
10
|
+
"interference": "off",
|
|
11
|
+
"title": "半步边界:tool/call 没有结果就 deferred,不推进游标",
|
|
12
|
+
"annotationNotes": "合成代理标注:throughSeq 停在 tool/call 上,之后的事件属于“尚未到达”,必须被排除在固定快照之外。",
|
|
13
|
+
"snapshot": {
|
|
14
|
+
"domain": "coding",
|
|
15
|
+
"throughSeq": 3,
|
|
16
|
+
"pendingCheck": true,
|
|
17
|
+
"idleAtSnapshotEndMinutes": 20,
|
|
18
|
+
"lastInjectedAt": null,
|
|
19
|
+
"events": [
|
|
20
|
+
{
|
|
21
|
+
"type": "turn/start",
|
|
22
|
+
"at": "2026-10-30T02:00:00.000Z"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "user/message",
|
|
26
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
27
|
+
"data": {
|
|
28
|
+
"source": {
|
|
29
|
+
"kind": "user"
|
|
30
|
+
},
|
|
31
|
+
"content": [
|
|
32
|
+
{
|
|
33
|
+
"type": "text",
|
|
34
|
+
"text": "这条要记住:写记忆前必须重新核对父 binding 的 domain 和开关,父会话切库时剩余提交一律拒绝。"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "assistant/message",
|
|
41
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
42
|
+
"data": {
|
|
43
|
+
"message": {
|
|
44
|
+
"content": [
|
|
45
|
+
{
|
|
46
|
+
"type": "text",
|
|
47
|
+
"text": "先读一下 binding 现状。"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "tool-call",
|
|
51
|
+
"toolCallId": "c1",
|
|
52
|
+
"name": "read",
|
|
53
|
+
"arguments": {
|
|
54
|
+
"path": "lib/state.js"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "tool/call",
|
|
63
|
+
"at": "2026-10-30T02:00:12.000Z",
|
|
64
|
+
"toolCallId": "c1",
|
|
65
|
+
"name": "read",
|
|
66
|
+
"arguments": {
|
|
67
|
+
"path": "lib/state.js"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "tool/result",
|
|
72
|
+
"at": "2026-10-30T02:00:24.000Z",
|
|
73
|
+
"toolCallId": "c1",
|
|
74
|
+
"data": {
|
|
75
|
+
"message": {
|
|
76
|
+
"isError": false,
|
|
77
|
+
"content": [
|
|
78
|
+
{
|
|
79
|
+
"type": "text",
|
|
80
|
+
"text": "binding: domain=coding,私有层开启,全局只读。"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "assistant/message",
|
|
88
|
+
"at": "2026-10-30T02:00:24.000Z",
|
|
89
|
+
"data": {
|
|
90
|
+
"message": {
|
|
91
|
+
"content": [
|
|
92
|
+
{
|
|
93
|
+
"type": "text",
|
|
94
|
+
"text": "读到绑定信息了。"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "step/end",
|
|
102
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
103
|
+
"step": 1
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "turn/end",
|
|
107
|
+
"at": "2026-10-30T02:00:36.000Z"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "turn/start",
|
|
111
|
+
"at": "2026-10-30T02:01:00.000Z"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "user/message",
|
|
115
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
116
|
+
"data": {
|
|
117
|
+
"source": {
|
|
118
|
+
"kind": "user"
|
|
119
|
+
},
|
|
120
|
+
"content": [
|
|
121
|
+
{
|
|
122
|
+
"type": "text",
|
|
123
|
+
"text": "先停一下,等我确认。"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "assistant/message",
|
|
130
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
131
|
+
"data": {
|
|
132
|
+
"message": {
|
|
133
|
+
"content": [
|
|
134
|
+
{
|
|
135
|
+
"type": "text",
|
|
136
|
+
"text": "好,停在这里。"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "turn/end",
|
|
144
|
+
"at": "2026-10-30T02:01:30.000Z"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"labels": {
|
|
149
|
+
"expected": [
|
|
150
|
+
{
|
|
151
|
+
"id": "mem-ab-half-rebind-check",
|
|
152
|
+
"class": "decision",
|
|
153
|
+
"sourceSeq": 1,
|
|
154
|
+
"note": "写入前重验父 binding,切库就拒绝剩余提交"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"mainProactive": [],
|
|
158
|
+
"userReminders": []
|
|
159
|
+
},
|
|
160
|
+
"expect": {
|
|
161
|
+
"deferredAtLeast": 1,
|
|
162
|
+
"uncoveredLabelIds": [
|
|
163
|
+
"mem-ab-half-rebind-check"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "active-memory-ab-case",
|
|
4
|
+
"id": "clean-duplicate-reread",
|
|
5
|
+
"draft": true,
|
|
6
|
+
"notGold": true,
|
|
7
|
+
"gold": false,
|
|
8
|
+
"review": "pending",
|
|
9
|
+
"annotationSource": "synthetic-proxy",
|
|
10
|
+
"interference": "off",
|
|
11
|
+
"title": "重复读与已写条目:整段前缀重放会再次提议同一条",
|
|
12
|
+
"annotationNotes": "合成代理标注:主模型已自己写入一条,后台检查再遇到它只能算重复,不能算新增覆盖;两次相同轮询结果去重后只算 1 个工作单元。",
|
|
13
|
+
"snapshot": {
|
|
14
|
+
"domain": "coding",
|
|
15
|
+
"idleAtSnapshotEndMinutes": 20,
|
|
16
|
+
"lastInjectedAt": null,
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"type": "turn/start",
|
|
20
|
+
"at": "2026-10-30T02:00:00.000Z"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "user/message",
|
|
24
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
25
|
+
"data": {
|
|
26
|
+
"source": {
|
|
27
|
+
"kind": "user"
|
|
28
|
+
},
|
|
29
|
+
"content": [
|
|
30
|
+
{
|
|
31
|
+
"type": "text",
|
|
32
|
+
"text": "我把滚动窗口那个想法否掉了:宿主 seed 必须从 0 连续,窗口化不是改个计数能做到的。这条记一下。"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "assistant/message",
|
|
39
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
40
|
+
"data": {
|
|
41
|
+
"message": {
|
|
42
|
+
"content": [
|
|
43
|
+
{
|
|
44
|
+
"type": "text",
|
|
45
|
+
"text": "记下了:不做窗口化 seed,等宿主给官方 windowed seed 再说。"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "tool-call",
|
|
49
|
+
"toolCallId": "c1",
|
|
50
|
+
"name": "memu_remember",
|
|
51
|
+
"arguments": {
|
|
52
|
+
"memoryId": "mem-ab-dup-no-window"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "tool/call",
|
|
61
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
62
|
+
"toolCallId": "c1",
|
|
63
|
+
"name": "memu_remember",
|
|
64
|
+
"arguments": {
|
|
65
|
+
"memoryId": "mem-ab-dup-no-window"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "tool/result",
|
|
70
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
71
|
+
"toolCallId": "c1",
|
|
72
|
+
"data": {
|
|
73
|
+
"message": {
|
|
74
|
+
"isError": false,
|
|
75
|
+
"content": [
|
|
76
|
+
{
|
|
77
|
+
"type": "text",
|
|
78
|
+
"text": "saved: mem-ab-dup-no-window"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "step/end",
|
|
86
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
87
|
+
"step": 1
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "turn/end",
|
|
91
|
+
"at": "2026-10-30T02:00:30.000Z"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "turn/start",
|
|
95
|
+
"at": "2026-10-30T02:01:00.000Z"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "user/message",
|
|
99
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
100
|
+
"data": {
|
|
101
|
+
"source": {
|
|
102
|
+
"kind": "user"
|
|
103
|
+
},
|
|
104
|
+
"content": [
|
|
105
|
+
{
|
|
106
|
+
"type": "text",
|
|
107
|
+
"text": "另外,检查凭证里要带上 snapshot 摘要和 scope generation,不然重启后没法判断是不是同一份快照。"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "assistant/message",
|
|
114
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
115
|
+
"data": {
|
|
116
|
+
"message": {
|
|
117
|
+
"content": [
|
|
118
|
+
{
|
|
119
|
+
"type": "text",
|
|
120
|
+
"text": "明白,凭证固定带四样:fromSeq、throughSeq、snapshotSha256、scopeGeneration。"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "tool/result",
|
|
128
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
129
|
+
"toolCallId": "c2",
|
|
130
|
+
"data": {
|
|
131
|
+
"message": {
|
|
132
|
+
"isError": false,
|
|
133
|
+
"content": [
|
|
134
|
+
{
|
|
135
|
+
"type": "text",
|
|
136
|
+
"text": "polling: no change"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "tool/result",
|
|
144
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
145
|
+
"toolCallId": "c3",
|
|
146
|
+
"data": {
|
|
147
|
+
"message": {
|
|
148
|
+
"isError": false,
|
|
149
|
+
"content": [
|
|
150
|
+
{
|
|
151
|
+
"type": "text",
|
|
152
|
+
"text": "polling: no change"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"type": "step/end",
|
|
160
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
161
|
+
"step": 2
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "turn/end",
|
|
165
|
+
"at": "2026-10-30T02:20:00.000Z"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"labels": {
|
|
170
|
+
"expected": [
|
|
171
|
+
{
|
|
172
|
+
"id": "mem-ab-dup-no-window",
|
|
173
|
+
"class": "decision",
|
|
174
|
+
"sourceSeq": 1,
|
|
175
|
+
"note": "不做窗口化 seed,等宿主支持"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "mem-ab-dup-credential-fields",
|
|
179
|
+
"class": "decision",
|
|
180
|
+
"sourceSeq": 7,
|
|
181
|
+
"note": "凭证必须带快照摘要与 scope generation"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"mainProactive": [
|
|
185
|
+
"mem-ab-dup-no-window"
|
|
186
|
+
],
|
|
187
|
+
"userReminders": []
|
|
188
|
+
},
|
|
189
|
+
"expect": {
|
|
190
|
+
"minBackgroundChecks": 1,
|
|
191
|
+
"duplicatesReproposedAtLeast": 1,
|
|
192
|
+
"coveredLabelIds": [
|
|
193
|
+
"mem-ab-dup-no-window",
|
|
194
|
+
"mem-ab-dup-credential-fields"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "active-memory-ab-case",
|
|
4
|
+
"id": "clean-recent-recall",
|
|
5
|
+
"draft": true,
|
|
6
|
+
"notGold": true,
|
|
7
|
+
"gold": false,
|
|
8
|
+
"review": "pending",
|
|
9
|
+
"annotationSource": "synthetic-proxy",
|
|
10
|
+
"interference": "off",
|
|
11
|
+
"title": "刚注入过记忆:抑制而不是检查",
|
|
12
|
+
"annotationNotes": "合成代理标注:抑制是调度结果,不是 no_value;这条用来验证抑制不会被记成“检查过且没东西”。",
|
|
13
|
+
"snapshot": {
|
|
14
|
+
"domain": "coding",
|
|
15
|
+
"idleAtSnapshotEndMinutes": 20,
|
|
16
|
+
"lastInjectedAt": "2026-10-30T01:58:00.000Z",
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"type": "turn/start",
|
|
20
|
+
"at": "2026-10-30T02:00:00.000Z"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "user/message",
|
|
24
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
25
|
+
"data": {
|
|
26
|
+
"source": {
|
|
27
|
+
"kind": "user"
|
|
28
|
+
},
|
|
29
|
+
"content": [
|
|
30
|
+
{
|
|
31
|
+
"type": "text",
|
|
32
|
+
"text": "刚注入过记忆的回合不要再 fork 一次,这条抑制规则保留。"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "assistant/message",
|
|
39
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
40
|
+
"data": {
|
|
41
|
+
"message": {
|
|
42
|
+
"content": [
|
|
43
|
+
{
|
|
44
|
+
"type": "text",
|
|
45
|
+
"text": "保留:距上次注入不到召回冷却时间就不检查。"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "step/end",
|
|
53
|
+
"at": "2026-10-30T02:00:00.000Z",
|
|
54
|
+
"step": 1
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "turn/end",
|
|
58
|
+
"at": "2026-10-30T02:00:30.000Z"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "turn/start",
|
|
62
|
+
"at": "2026-10-30T02:01:00.000Z"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "user/message",
|
|
66
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
67
|
+
"data": {
|
|
68
|
+
"source": {
|
|
69
|
+
"kind": "user"
|
|
70
|
+
},
|
|
71
|
+
"content": [
|
|
72
|
+
{
|
|
73
|
+
"type": "text",
|
|
74
|
+
"text": "嗯,其余照旧。"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "assistant/message",
|
|
81
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
82
|
+
"data": {
|
|
83
|
+
"message": {
|
|
84
|
+
"content": [
|
|
85
|
+
{
|
|
86
|
+
"type": "text",
|
|
87
|
+
"text": "好。"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "step/end",
|
|
95
|
+
"at": "2026-10-30T02:01:00.000Z",
|
|
96
|
+
"step": 2
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "turn/end",
|
|
100
|
+
"at": "2026-10-30T02:03:00.000Z"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"labels": {
|
|
105
|
+
"expected": [
|
|
106
|
+
{
|
|
107
|
+
"id": "mem-ab-recall-suppress-rule",
|
|
108
|
+
"class": "decision",
|
|
109
|
+
"sourceSeq": 1,
|
|
110
|
+
"note": "距上次注入不足冷却时间就抑制检查"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"mainProactive": [],
|
|
114
|
+
"userReminders": []
|
|
115
|
+
},
|
|
116
|
+
"expect": {
|
|
117
|
+
"maxBackgroundChecks": 0,
|
|
118
|
+
"blockedReasons": [
|
|
119
|
+
"recent-recall"
|
|
120
|
+
],
|
|
121
|
+
"uncoveredLabelIds": [
|
|
122
|
+
"mem-ab-recall-suppress-rule"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|