fix(db): register auto-memory tables in _OR_REPLACE_PK

Postgres 翻译层对未登记主键的表把 INSERT OR REPLACE 退化为
ON CONFLICT DO NOTHING,致使 memory_settings、task_memory_flags、
memory_extraction_log 首写之后的所有更新静默丢弃(2026-10-28
生产实测:提取日志永远停在首写原因)。补三张表主键登记,并
在翻译层加回归测试(SQLite 原生 OR REPLACE 测不出来)。
This commit is contained in:
host committed 2026-10-28 22:49:06 +08:00
1 parent ce83dcf586
commit 5d8403e756
2 files changed
+34

No files matched your search

+7
View File
@@ -415,6 +415,13 @@ _OR_REPLACE_PK = {
"project_members": ("project_id", "user_id"),
"slack_users": ("slack_id",),
"github_app_config": ("id",),
# 自动记忆三张表:主键登记缺失时 Postgres 翻译退化为
# ON CONFLICT DO NOTHING,首写之后的所有更新静默丢弃
# (2026-10-28 生产实测:提取日志永远停在首写原因,
# 改设置同理;SQLite 原生 OR REPLACE 测不出来)。
"memory_settings": ("user_id",),
"task_memory_flags": ("task_id",),
"memory_extraction_log": ("task_id",),
}
_IDENTITY_TABLES = frozenset(