test(er): resolv-determinism — match-pairs behöver hard-rule decided_by
CI (SIAX Cloud) / security (pull_request) Successful in 14s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 16s
Security Scan (SIAX Cloud) / security (push) Successful in 17s
CI (SIAX Cloud) / security (push) Successful in 29s
CI (SIAX Cloud) / integration (pull_request) Failing after 31s
CI (SIAX Cloud) / integration (push) Failing after 32s
CI (SIAX Cloud) / quality (pull_request) Successful in 36s
CI (SIAX Cloud) / quality (push) Successful in 38s
Python Engine CI (SIAX Cloud) / python-engine (push) Successful in 9m31s
Python Engine CI (SIAX Cloud) / python-engine (pull_request) Successful in 9m32s
CI (SIAX Cloud) / security (pull_request) Successful in 14s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 16s
Security Scan (SIAX Cloud) / security (push) Successful in 17s
CI (SIAX Cloud) / security (push) Successful in 29s
CI (SIAX Cloud) / integration (pull_request) Failing after 31s
CI (SIAX Cloud) / integration (push) Failing after 32s
CI (SIAX Cloud) / quality (pull_request) Successful in 36s
CI (SIAX Cloud) / quality (push) Successful in 38s
Python Engine CI (SIAX Cloud) / python-engine (push) Successful in 9m31s
Python Engine CI (SIAX Cloud) / python-engine (pull_request) Successful in 9m32s
_apply_matches ignorerar medvetet decided_by=score (defence in depth: score/fuzzy får aldrig skapa canonical identity-länkar) — testernas stub-bridge returnerade score-pairs och förväntade ändå merge → CI-fail var implementationen som hade rätt. Pairs är nu decided_by=stable-identifiers.v3. Verifierat: pytest services/api/tests 6+14 pass, full unit 945/945, typecheck EXIT 0, real-Postgres 5/5.
This commit is contained in:
@@ -70,7 +70,12 @@ async def test_canonical_match_merges_and_stamps_provenance(monkeypatch):
|
||||
assert body["tenant_id"] == "tenant-a"
|
||||
assert body["blocking_fields"] == ["market", "block_initial"]
|
||||
a, b = body["records"][0]["record_id"], body["records"][1]["record_id"]
|
||||
return httpx.Response(200, json={"pairs": [_pair(a, b)], "review_queue": []})
|
||||
# Endast hard-rule-beslut (decided_by != score/None) far skapa en
|
||||
# canonical identity-lank - consumenten ignorerar medvetet score/"match".
|
||||
return httpx.Response(
|
||||
200,
|
||||
json={"pairs": [_pair(a, b, "match", "0pt.company.stable-identifiers.v3", 0.99)], "review_queue": []},
|
||||
)
|
||||
|
||||
route.side_effect = responder
|
||||
result = await resolve(records, tenant_id="tenant-a", project_id="project-a")
|
||||
@@ -123,8 +128,8 @@ async def test_hard_non_match_blocks_transitive_cluster_merge(monkeypatch):
|
||||
200,
|
||||
json={
|
||||
"pairs": [
|
||||
_pair(a, b, "match", "score", 0.98),
|
||||
_pair(b, c, "match", "score", 0.97),
|
||||
_pair(a, b, "match", "0pt.company.stable-identifiers.v3", 0.98),
|
||||
_pair(b, c, "match", "0pt.company.stable-identifiers.v3", 0.97),
|
||||
_pair(a, c, "non_match", "0pt.company.stable-identifiers.v2", 0.0),
|
||||
],
|
||||
"review_queue": [],
|
||||
|
||||
Reference in New Issue
Block a user