From cda113317f1416df6b13420c1ce06b537c20649f Mon Sep 17 00:00:00 2001 From: song <22676124+songoow@users.noreply.github.com> Date: Wed, 16 Sep 2026 11:45:35 -0400 Subject: [PATCH] fix(turn-driver): import the Turn result owner from its generated module M2 (#4499) moved `LoopXTurnResultKind` to `turn_contract_generated.py` and kept `transaction.py` as a compatibility re-export. The Python producer scanner attributes a site only when the owner class is imported from the owner's own module (`python_production._qualified_bindings`), so every `LoopXTurnResultKind.*` production site in `executor.py` became "not proven safe" although executor.py did not change in M2. Import the enum from the generated owner. It is the same enum object through both paths, so behavior is unchanged; the compatibility export stays for external readers. `examples/semantic-vocabulary-drift-smoke.py --report` on main vs this change: unresolved_producer_sites 52 -> 42 (distinct sites 34 -> 32), resolving `_host_result_stage` (2), `_run_task_validator` (7) and `_task_validation_stage` (1); no site becomes newly unresolved; smoke still reports ok. Refs #4447 (Track B, B2 producer pilot for the Turn kernel vocabularies). Signed-off-by: song <22676124+songoow@users.noreply.github.com> Co-Authored-By: Claude Fable 5.1 --- loopx/control_plane/turn_driver/executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopx/control_plane/turn_driver/executor.py b/loopx/control_plane/turn_driver/executor.py index 2fb091ec86..7928194563 100644 --- a/loopx/control_plane/turn_driver/executor.py +++ b/loopx/control_plane/turn_driver/executor.py @@ -70,10 +70,10 @@ LOOPX_TURN_RESULT_SCHEMA_VERSION, STOP_RESULT_KINDS as STOP_HOST_RESULT_KINDS, TRANSACTION_PHASES, - LoopXTurnResultKind, build_loopx_turn_transaction_plan, validate_loopx_turn_receipt, ) +from .turn_contract_generated import LoopXTurnResultKind __all__ = [ "build_loopx_turn_command_validator",