Commit 047e784
committed
fix(sdk): prevent ORB scheduler config dict from being absorbed as string override
SDKConfig.from_dict maps known dataclass field names from the input dict.
The top-level "scheduler" key in an ORB config.json is a nested config
object ({"type": "hostfactory", "config_root": "..."}), not the plain
string that SDKConfig.scheduler expects (e.g. "hostfactory").
When from_file() parsed a real config.json the dict was stored in
SDKConfig.scheduler, the truthy dict triggered the override branch in
ORBClient.initialize(), and ConfigurationManager.override_scheduler_strategy
stored the dict. Downstream, _create_scheduler_strategy() retrieved the
dict as scheduler_type and passed it to SchedulerRegistry.create_strategy()
which attempted to use it as a dict key, raising "unhashable type: 'dict'",
surfacing as FactoryError on TemplateConfigurationPort in all 32
test_sdk_full_cycle_default and 7 test_cleanup_e2e live tests.
Fix: when from_dict encounters a "scheduler" value that is a dict, treat it
as an opaque ORB config object (move to custom_config) rather than setting
the string-override field. Plain string values ("default", "hostfactory")
continue to work unchanged.
Adds two regression tests to test_sdk_config.py.1 parent ff9cb25 commit 047e784
2 files changed
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
105 | 129 | | |
106 | 130 | | |
107 | 131 | | |
| |||
0 commit comments