Skip to content

Commit db10b9d

Browse files
author
faresrafat3
committed
fix(l2): _route_experts accepts ProjectSpec OR raw domain value
The test fixture calls _route_experts(dummy_spec.domain.value), passing a bare string. The previous fix only handled ProjectSpec inputs. Now: - if arg has .domain, use it (ProjectSpec) - otherwise treat arg as the domain value - if it has .value, unwrap (enum) Same routing logic, three input shapes supported.
1 parent 893320a commit db10b9d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

epistemic_forge/pipeline/l2_conductor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ def __init__(self):
2424
self.experts: list[EpistemicExpert] = []
2525

2626
def _route_experts(self, spec) -> list[EpistemicExpert]:
27-
"""Determines which experts are required based on the domain."""
28-
domain = spec.domain.value if hasattr(spec.domain, "value") else spec.domain
27+
"""Determines which experts are required based on the domain.
28+
Accepts either a ProjectSpec or a domain string/enum directly."""
29+
if hasattr(spec, "domain"):
30+
domain = spec.domain
31+
else:
32+
domain = spec
33+
if hasattr(domain, "value"):
34+
domain = domain.value
2935
active_experts = [ClaimLatticeExpert()]
3036

3137
# 🧬 ADAS: Inject a dynamically generated expert specific to this domain!

0 commit comments

Comments
 (0)