Fixes #21960: Allow cable trace to continue through multi-position FrontPorts without position context#22083
Fixes #21960: Allow cable trace to continue through multi-position FrontPorts without position context#22083attoba wants to merge 1 commit into
Conversation
|
@claude /review Only report on issues of potential concern; we don't need commentary on anything that doesn't require further consideration. |
|
Claude finished @jeremystretch's task in 2m 36s —— View job ReviewPotential concern: No test coverage for the fixed scenario The removed code path (multi-position Subtle behavioral concern: all positions pushed when stack is empty After the fix, when port_mappings = PortMapping.objects.filter(front_port__in=remote_terminations)This returns all if any(t.positions > 1 for t in terminations):
position_stack.append([mapping.rear_port_position for mapping in port_mappings])All The underlying asymmetry with |
jeremystretch
left a comment
There was a problem hiding this comment.
@attoba could you please include tests to ensure that this change doesn't introduce a breaking change to existing behavior?
|
This PR has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further action is taken. |
Fixes: #21960
When tracing encounters a multi-position FrontPort with an empty
position_stack, the current logic treats it as a split condition and aborts the trace early.For FrontPorts, valid
PortMappingentries may still exist and can be followed without requiring positional disambiguation at this stage.This change removes the early-abort condition for FrontPorts by allowing traversal to continue using non-positional
PortMappingresolution. Split detection is deferred to later stages of the trace, where it is already evaluated based on the actual topology.The existing behavior for RearPorts is preserved, as multi-position RearPorts can fan out to multiple FrontPorts connected to different paths. Without positional context, continuing traversal in this case could produce incorrect results.