Skip to content

Commit 893320a

Browse files
author
faresrafat3
committed
fix(l2): _route_experts accepts both enum and string for domain
The test fixture passes dummy_spec.domain = 'research' (string), while ArsenalRun passes spec.domain = Domain.RESEARCH (enum). The function compared domain to string literals in a list, so it would silently never match an enum. Use hasattr(value) to handle both shapes; this also makes the function not blow up on strings.
1 parent 46abf85 commit 893320a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

epistemic_forge/pipeline/l2_conductor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def __init__(self):
2323
# Register available experts
2424
self.experts: list[EpistemicExpert] = []
2525

26-
def _route_experts(self, spec: ProjectSpec) -> list[EpistemicExpert]:
26+
def _route_experts(self, spec) -> list[EpistemicExpert]:
2727
"""Determines which experts are required based on the domain."""
28-
domain = spec.domain
28+
domain = spec.domain.value if hasattr(spec.domain, "value") else spec.domain
2929
active_experts = [ClaimLatticeExpert()]
3030

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

0 commit comments

Comments
 (0)