Repository navigation
fix(core): 非 dict 空间坐标写入即拒 + v1.7 迁移跳过新格式节点 - #1151
Closed
STARDUSTLC666 wants to merge 3 commits into
Closed
STARDUSTLC666 wants to merge 3 commits into
STARDUSTLC666 wants to merge 3 commits into
Conversation
- STNode.to_row / add_perception:spatial_coordinates 必须是 dict 或 None; list/标量/字符串列表不再原样落库(旧形态会随 export_all 扩散,重启迁移虽 已容错跳过,但坏数据面仍在)。 - add_perception 给带坐标的新节点打内部标签 v17_native;migrate_v17_coordinates 的候选筛与全表循环都跳过该标签——新写入的合法 neural_* 轴不再被下次启动 搬进 semantic_coordinates(FuRongJun-1999#279 的 D 面)。候选筛用 COALESCE(tags,'') 兜住 旧行的 NULL tags。 - 真实迁移完成后写 _v17_migrated 标记;空库/仅新格式节点不写,保持与 test_issue691_v17_bad_row_guard 的「构造后补写旧格式仍迁移」语义一致。 - 新增 tests/test_issue279_v17_migration.py:11 断言 + 3 定点变异;基线 2/11、 修复后 11/11;FuRongJun-1999#279 既有 7 + FuRongJun-1999#691 4 + core 相关共 36 passed。
Owner
维护侧处置(值守第 143 轮):契约已被合并工作满足,关闭指向本件修的缺陷(#279:每次构造对全表跑 migrate_v17_coordinates)——维护侧复核:当前 main 的 本端实测:你的守卫 净 diff 说明:直接合并会回退已合工作(对本件 base 的 diff 含 #1138/#1143/#1146 系删除)。若你的实现与现行实现有行为差异想讨论(如候选筛的子串口径),欢迎带 A/B 读数另开。 关闭指向 #691 修复批( |
Owner
|
契约已被 #691 修复批先行满足(你的守卫 7 条在 main 全绿)——关闭指向,避免回退已合工作。感谢贡献。 |
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.
修复 #279(P1,
core/启动·迁移)的剩余面:非 dict 坐标写入不校验 + v1.7 迁移每次构造都把新写入的合法neural_*轴搬走。改了什么 / 为什么
STNode.to_row/add_perception:spatial_coordinates必须是dict或None;list/ 标量 / 字符串列表在写入前抛TypeError(旧形态会原样落库并随export_all扩散;重启迁移虽已容错跳过,但坏数据面仍在)。add_perception给带坐标的新节点打内部标签v17_native;migrate_v17_coordinates的候选筛与全表循环都跳过该标签——新写入的合法neural_*轴不再被下次启动搬进semantic_coordinates([core/启动·迁移] 引擎每次构造都对全表跑 migrate_v17_coordinates:一条 spatial_coordinates 不是 dict 的记忆(如 add_perception 传入坐标向量 [x,y,z])写入时一切正常,重启后 SpacetimeMemoryEngine 构造即抛异常——整库永久无法启动,PRIMARY/SUB 全部实例同崩,备份恢复后新库同样起不来 #279 的 D 面)。COALESCE(tags, '')兜住旧行的NULLtags(否则instr(NULL, ...) = 0为 NULL,候选筛会漏掉所有无 tags 的旧行)。_v17_migrated标记;空库/仅新格式节点不写,保持与test_issue691_v17_bad_row_guard的「构造后补写旧格式仍迁移」语义一致。验证方式与读数
3552ec3add_perception(list)/add_node(5)TypeError(fail-closed)neural_gain后重启_v17_migratedtest_issue691_v17_bad_row_guardtest_issue279_startup_migration_shortcircuit_guard具名反面对照(--mutate)
add_perception校验 ⇒ A01 红。to_row校验 ⇒ A02/A03 + E02 红。v17_native候选排除 + 循环跳过 ⇒ B02 红(新轴被搬走)。三条变异各自恰好命中期望红集;变异后源码字节级还原。
边界与不做项
add_perception/store.add_node的非 dict 坐标从「静默落库」改为「写入前拒绝」;带坐标的新节点多一个内部标签v17_native。_v17_migrated只在真实迁移后写;空库/仅新格式节点不写,保留「构造后补写旧格式仍迁移」的既有回归语义。Fixes #279