The arrow on a lane came from the OSM turn:lanes tag with no way to change it,
and a lane the tag skipped got no arrow at all. lane-maneuver is a v1 override
that sets it.
v1 rather than a v2 constraint, because "which arrow" is a discrete attribute of
a lane with no station to anchor to, while every v2 anchor is positional. The
existing road override already covers OSM-derived values this way — laneCount,
width, sidewalks — and this is the same kind of thing. Arrow *placement* is the
positional half and stays out; it also still has an open question about whether
a group is a lane or a single arrow.
Three behaviours, each measured against compiled output: an override replaces
the tag's maneuver, it adds arrows to a lane the tag never marked, and '' removes
one the tag asked for. The empty string is therefore distinguished from "no
override" rather than falling through to the tag. An empty override set leaves
the arrows byte-identical and the fixtures untouched.
Validation lists the accepted maneuvers and rejects anything else, including
correctly-spelled components in the wrong order. It cannot be left to
normalizeManeuver(), which returns unrecognised input unchanged — a typo would
otherwise reach the template lookup and silently produce no arrow.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every zebra was six stripes at 3m by 0.45m on a 0.9m pitch, all literals. Depth
and stripe count are now a constraint, junction-crosswalk-size, and the loop
reads them.
The span across the road stays derived rather than stored: it is count times
pitch, and pitch is fixed because stripe and gap widths are standardised while
the road they cross is not. Widening a crossing means adding stripes, which is
what a real one does, and it is why the span quantises in 0.9m steps.
That also fixes a span pinned at 4.95m regardless of the street. Measured, every
crossing sat on a 6.50m carriageway and covered under four fifths of it. The
default now follows the segment width — both directions, since a crossing spans
the carriageway — giving eight stripes and 6.74m, reaching the kerb rather than
stopping short. Fixture baselines move for exactly two entries on the one area
with crossings; the area without them is untouched.
No handle is published yet. design.md requires proving compileGeometry() consumes
a parameter before any grip is drawn — the rule left over from profile.interval
shipping a handle that did nothing — so the grips come next, on a value already
known to work.
Adding the kind made the client's exhaustive scalar switch fail to compile, which
is the check working: size is a pair and has no dragged-scalar form, so that case
now says so and throws rather than writing half a value.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every junction-crosswalk-inset handle advertised max 8. Sweeping the real
response across eight groups, the ceiling ran 1.0 to 4.5 and varied per
approach, so 44-88% of the declared range moved nothing and returned no
diagnostic. Two approaches had a ceiling at or below the 1.5 default, meaning
dragging outward there did nothing at all — which is what made direct editing
look broken rather than limited.
crossingJunctionInset() stops responding once the inset reaches the cutback, and
sooner still when the crossing sits beyond the 4m cap, giving
cutback - max(0, junctionDistance - 4). Predicted ceilings matched all eight
measurements within the 0.5m sweep step, and the published max now matches them
8/8 where it used to be a flat 8.
The distance needs to know which crossing an approach serves, which lived only
inside compileControlMarkings(). crossing-approach.js now holds that rule at road
level, which is model-only and so usable from the solver. Behaviour is
unchanged: every lane of a road shares its junction distance, so the compiler's
(road, lane) ordering already grouped by road — fixtures confirm the geometry is
byte-identical.
Both directional roads of a segment can meet at one junction serving different
crossings; taking the first match published one road's ceiling on the other's
handle. The road that ends at this node wins, which is the same rule the client
uses to find the handle and the same one crossingJunctionInset() applies.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Handles for the two control-marking kinds, completing what step 1 made solvable.
They drag along the approach tangent and reuse the whole existing chain — hit
test, projection, clamp, ghost, debounce, arbitration, preview, save, undo —
without changes to any of it. That reuse is the point of having modelled edits as
kind + anchor + axis + value.
Ownership: design.md gives junction reserve interiors to JunctionTools, but that
rule is about junction *shape* — width, cutback, corner. Placement of the zebra
and the stop line is offered nowhere else, so the main map takes it. A segment
selection therefore returns its cross-section handles plus the control markings
at its ends, and shape kinds stay out so the two editors never offer the same
edit. The test that asserted "road kinds only" now states this rule instead.
The default placements move to the solver, which owns the editable bounds and is
the module a test keeps free of fs/path; native-road.js imports them rather than
the reverse, so the IO-free property survives.
Deliberately not done: the handle-target generalisation this task's PRD listed as
step 2. These kinds persist exactly like the existing junction constraints, so
there is no second write target to abstract over yet. Building the discriminator
now would be designing for one hypothetical case; the signal pose work will
provide the real second case.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>