# Fix Complex Junction Interior Line for cluster-8005332807 ## Goal Prevent a white lane marking from crossing the zebra crossing and extending into the interior of a complex junction. The visible result must match the user's screenshot for `cluster-8005332807` and must not regress ordinary-junction markings. ## Confirmed Facts - The reported line is white in the workbench screenshot, so it is a road marking layer rather than the dark/magenta signal or connector overlays. - The affected geometry is in the complex-junction cluster containing node `8005332807`; the screenshot shows the marking continuing inward past a zebra crossing toward the central pavement region. - Complex lane separators are generated separately from ordinary road separators in `src/compile/native-road.js` and are expected to stop at complex-junction controls and boundaries. - `trimLineBeforeFirstControl` assumes its input starts at the exterior and proceeds toward the junction. Complex preview/center lines can be supplied in the opposite direction, so the current code can preserve the interior segment instead of the approach segment. - The screenshot's white line is specifically published as `native-road-complex-lane-separator/v1` by `compileComplexLaneSeparators`, not as a signal or center-line overlay. That path clips against controls but does not independently enforce the complex core boundary. - Existing worktree changes are unrelated user work and must be preserved. ## Requirements - R1. In a complex-junction view, the affected white lane marking must stop before it crosses the zebra crossing or enters the configured junction interior region. - R2. The fix must be derived from the actual complex-junction geometry, crossing controls, or their stable published boundary, not from a cluster-specific coordinate or screenshot-only special case. - R3. Lane markings outside the affected complex-junction segment, including ordinary-junction markings, must remain unchanged. - R4. Add a regression covering `cluster-8005332807` and a control case proving ordinary-junction marking generation remains unchanged. ## Technical Decision Orient complex marking lines by distance from the cluster center before applying the existing first-control trim, then enforce the published complex approach/core boundary before restoring their original direction. This keeps the fix geometry-driven and leaves ordinary road trimming untouched. ## Acceptance Criteria - [ ] The reported white marking no longer crosses the zebra crossing or enters the complex-junction interior in the workbench image. - [ ] No affected white marking segment published for the complex cluster lies inside its configured crossing/interior boundary; geometry remains finite and stable. - [ ] Existing signal, marking, and complex-junction behavior remains intact, including the affected real OSM fixture. ## Scope Boundary - In scope: complex-junction white lane-marking geometry and its regression. - Out of scope: traffic-signal phase logic, OSM source editing, free signal creation/deletion, vehicle simulation, and unrelated road or island geometry.