Problem
Resource and route resolution uses naming heuristics and first-match fallbacks, which can produce an executable action sequence for the wrong device or route.
Concrete code evidence
unilabos/compile/evacuateandrefill_protocol.py:40-123 searches gas sources by names and falls back to the first default gas source.
unilabos/compile/evacuateandrefill_protocol.py:179-238 searches valves by connectivity/name and can continue without an exact valve binding.
unilabos/compile/stir_protocol.py:15-44 returns the first stirrer or stirrer_1 if no exact connection is found.
unilabos/compile/dissolve_protocol.py:333-382 returns the first heater/stirrer candidate.
unilabos/compile/separate_protocol.py:604-689 falls back to the first separator/stirrer.
unilabos/devices/workstation/workflow_executors.py:559-568 returns the first available tip rack when the requested set is unavailable.
Design gap
A graph path is treated as sufficient evidence of a safe executable route. It does not encode valve state, isolation, pressure, reservation, interlocks, or ambiguity.
Expected behavior
Resource and route resolution must return an explicit resolution record or a fail-closed diagnostic. First-match selection must not be used for outcome-relevant resources.
Acceptance criteria
- Missing, ambiguous, stale, or disconnected bindings block compilation.
- Resolved routes include nodes, handles, state transitions, and required interlocks.
- Unsafe valve/pump ordering is rejected before execution.
- Tests cover multiple candidates, disconnected paths, stale reservations, and an allowed alternate route.
- Resource ownership remains aligned with the existing authority/reservation work rather than adding a parallel authority.
Problem
Resource and route resolution uses naming heuristics and first-match fallbacks, which can produce an executable action sequence for the wrong device or route.
Concrete code evidence
unilabos/compile/evacuateandrefill_protocol.py:40-123searches gas sources by names and falls back to the first default gas source.unilabos/compile/evacuateandrefill_protocol.py:179-238searches valves by connectivity/name and can continue without an exact valve binding.unilabos/compile/stir_protocol.py:15-44returns the first stirrer orstirrer_1if no exact connection is found.unilabos/compile/dissolve_protocol.py:333-382returns the first heater/stirrer candidate.unilabos/compile/separate_protocol.py:604-689falls back to the first separator/stirrer.unilabos/devices/workstation/workflow_executors.py:559-568returns the first available tip rack when the requested set is unavailable.Design gap
A graph path is treated as sufficient evidence of a safe executable route. It does not encode valve state, isolation, pressure, reservation, interlocks, or ambiguity.
Expected behavior
Resource and route resolution must return an explicit resolution record or a fail-closed diagnostic. First-match selection must not be used for outcome-relevant resources.
Acceptance criteria