fix: 存储分类识别 ID 规范化前的裸 ObjectId 路径 - #196
Merged
Merged
Conversation
历史用户/会话的 OSS 路径段是裸 ObjectId(无 u_/ps_ 前缀), managed_category 把它们误判为 legacy-practice-path,导致 Attempt v3 迁移后的 cleanup 收敛自检(wrongReferenced=0)无法通过。 结构符合 v3(attempts/pa_ 段齐全)的旧 ID 路径应识别为 attempt-v3。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Attempt v3 迁移(
migrate_attempt_entities.py --execute)已在生产执行:99 个嵌入 attempt 全部独立化,111 个 OSS 对象复制并逐字节校验通过,双读业务字段零差异。但迁移后审计发现
wrongReferenced=194:ID 规范化(u_/ps_前缀)之前创建的历史用户/会话,其 v3 目标路径的用户/会话段是裸 ObjectId,managed_category将其误判为legacy-practice-path。影响
wrongReferenced=0否则 RuntimeError)永远无法通过,阻塞三阶段迁移收口。变更
managed_category对用户/会话段同时接受u_/ps_前缀与 24 位 hex ObjectId;结构校验(月份段、attempts/pa_/recordings|speech段)不变;attempt-v3;裸 ObjectId 但缺attempts/pa_段仍为legacy-practice-path。验收
attempt-v3,wrongReferenced仅剩嵌入数组的旧引用(cleanup 删除嵌入后归 0)。