fix(tracker): sanitize the Behaviour factory misparse before 6.1 mapping
Pinokio's 6.1 factory parse attributes every type to CMC_Behaviour; the constructor-runner walk ran before that known failure was discarded and gave INTEGER the BEHAVIOUR runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f8178a08f3
commit
a3a572c9db
@@ -266,14 +266,18 @@ def test_shared_runner_methods_follow_per_type_verdicts(tmp_path):
|
||||
|
||||
def test_class_constructor_runners_map_piklib61_types(tmp_path):
|
||||
snap = Snapshot({"binary": {"name": "p61.dll", "sha256": SHA},
|
||||
"types": [{"script_name": "INTEGER", "cpp_class": None}, {"script_name": "CONDITION", "cpp_class": None}],
|
||||
"types": [{"script_name": "INTEGER", "cpp_class": "CMC_Behaviour"}, # Pinokio's factory misparse
|
||||
{"script_name": "CONDITION", "cpp_class": None}],
|
||||
"methods": [{"owner": "CMC_Variable", "runner": "CMC_Variable_Runner", "name": "inc", "id": None},
|
||||
{"owner": "CMC_BasicCondition", "runner": "CMC_BasicCondition_Runner", "name": "check", "id": None}],
|
||||
{"owner": "CMC_BasicCondition", "runner": "CMC_BasicCondition_Runner", "name": "check", "id": None},
|
||||
{"owner": "CMC_Behaviour", "runner": "CMC_Behaviour_Runner", "name": "run", "id": None}],
|
||||
"field_inheritance": [{"class": "CMC_Integer", "base_class": "CMC_Variable"},
|
||||
{"class": "CMC_Condition", "base_class": "CMC_BasicCondition"}],
|
||||
"runner_map": {"by_class": [{"class": "CMC_Variable", "runner": "CMC_Variable_Runner"},
|
||||
{"class": "CMC_Behaviour", "runner": "CMC_Behaviour_Runner"},
|
||||
{"class": "CMC_BasicCondition", "runner": "CMC_BasicCondition_Runner"}]}})
|
||||
result = build_tracker([snap], emulator(tmp_path))
|
||||
assert row(result, "INTEGER", "INC")["original"][0]["mapping"] == "class_constructor"
|
||||
assert row(result, "CONDITION", "CHECK")["original"]
|
||||
assert "RUN" not in {m["name"] for m in typ(result, "INTEGER")["methods"]}
|
||||
assert not {"VARIABLE", "BASICCONDITION"} & {t["name"] for t in result["types"]}
|
||||
|
||||
Reference in New Issue
Block a user