fix(library): 目标隔离映射兼容旧计划与真实回归
build / build (push) Successful in 1m41s

空 mode 计划不映射;索引 source_id 按语义映射;relation 按字段表解析。
隔离回归按持久映射 ID 断言,DS02 故障注入真实命中。
This commit is contained in:
姚章浩
2026-11-04 12:40:12 +08:00
parent e0fc2c32b8
commit 0d9091e464
15 changed files with 428 additions and 91 deletions
@@ -97,7 +97,7 @@ func TestR11CatalogBindingIsolated(t *testing.T) {
"trigger": `CREATE FUNCTION r11_noop() RETURNS trigger LANGUAGE plpgsql AS 'BEGIN RETURN NEW; END';CREATE TRIGGER r11_noop BEFORE INSERT ON wiki_pages FOR EACH ROW EXECUTE FUNCTION r11_noop()`,
}
r10Exec(t, fx, statements[mode])
r11Reject(t, fx, snapshot)
r11RejectNatural(t, fx, snapshot)
// An identically extended source/target must not make an unreviewed FK safe.
if strings.Contains(mode, "fk") {
now, _, e := target.migrationCatalog(fx.ctx)
@@ -157,7 +157,7 @@ func TestR11ReferenceAndCursorIsolated(t *testing.T) {
}
})
if mode != "valid" && mode != "linked-valid" && mode != "legacy-pages" && mode != "historical-log" {
r11Reject(t, fx, snapshot)
r11RejectNatural(t, fx, snapshot)
return
}
target := fx.target(t)