fix(glossary): 修复历史 V1 漂移并建立 V2 迁移
bat-rust / Build and test Rust (push) Waiting to run
bat-rust / Build and test Go API (push) Waiting to run

This commit is contained in:
2026-09-17 21:25:29 +08:00
parent 7f7d757f15
commit e486f1aaaa
13 changed files with 679 additions and 86 deletions
+5 -2
View File
@@ -180,8 +180,11 @@ count,任何一页不一致都会丢弃整个候选快照。
覆盖。
- `glossary.sqlite`:跨 release 的项目级 Glossary,不位于 `versions/<id>`,也不与
`translation-tasks.sqlite` 或 TM 共用;记录 term、alias、推荐/允许译法、scope、
priority、review 状态、source provenance完整 source/review history;当前
schema version 为 V1,正式 schema evolution 不再通过 `ensure_column` 隐式修复。
priority、review 状态、source provenance完整 source/review history 和 deletion
audit;当前 schema version 为 V2。V2 正式吸收历史上未升版本的
`glossary_term_deletions` drift,打开时通过 fingerprint 和 writer transaction
区分 V1-A/V1-B 并 fail closed;正式 schema evolution 不再通过 `ensure_column`
隐式修复。
默认路径为
`<output>/glossary.sqlite`,可由 `BAT_GLOSSARY_PATH``[translation.worker].glossary_path`
或 CLI 覆盖。