fix: don't prune real highways that also carry a proposed=* tag#7415
Merged
DennisOSRM merged 2 commits intomasterfrom Mar 20, 2026
Merged
fix: don't prune real highways that also carry a proposed=* tag#7415DennisOSRM merged 2 commits intomasterfrom
DennisOSRM merged 2 commits intomasterfrom
Conversation
When a way has a proper highway type (e.g. highway=tertiary) together with a proposed=* tag (e.g. proposed=secondary, indicating a planned upgrade), OSRM was incorrectly treating it as a non-routable proposed road and pruning it from the routing graph. The fix tightens the proposed-tag check in WayHandlers.blocked_ways() so that it only blocks a way when the highway value itself is 'proposed' (meaning the road does not physically exist yet). If the way has any other highway value, the proposed=* key is silently ignored and routing proceeds according to the actual highway type. Roads that are *only* proposed (highway=proposed, or highway=proposed combined with proposed=<value>) continue to be pruned as before. Fixes #7413 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes routing pruning behavior so that ways with a real highway=* value are no longer dropped from the routing graph just because they also carry a proposed=* tag (e.g. indicating an upgrade).
Changes:
- Restricts
proposed=*blocking to truly unbuilt “proposed highways” (highway=proposedor missinghighway). - Adds/extends Cucumber coverage for car, bicycle, and foot profiles around
highway=*+proposed=*combinations. - Documents the fix in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| profiles/lib/way_handlers.lua | Adjusts blocked_ways() logic to avoid pruning real highways that also have proposed=*. |
| features/foot/way.feature | Adds test rows ensuring real highways with proposed=* remain routable for foot. |
| features/car/construction.feature | Adds test rows covering highway=proposed vs real highway=* with proposed=* for car. |
| features/bicycle/pushing.feature | Adds test rows ensuring bicycle routing allows real highways with proposed=* while blocking unbuilt proposed ways. |
| CHANGELOG.md | Adds a FIXED entry describing the corrected pruning behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #7413 — roads with a real
highway=*type plus an additionalproposed=*tag (e.g.highway=tertiary+proposed=secondaryindicating a planned upgrade) were incorrectly pruned from the routing graph for the car, bicycle, and foot profiles.This PR was primarily generated with the assistance of GitHub Copilot (claude-sonnet-4.6).
Tasklist
What changed
profiles/lib/way_handlers.luaThe
WayHandlers.blocked_ways()check for theproposed=*key previously blocked any way carrying that key, regardless of thehighwayvalue. The fix adds a guard so the block only fires whendata.highwayis absent or literally"proposed"(the road does not exist yet). A way with a real highway type (e.g.tertiary) is routed normally — theproposedkey is implicitly ignored.Cucumber tests
New rows added to existing scenarios in
features/car/construction.feature,features/bicycle/pushing.feature, andfeatures/foot/way.feature:highway=proposedhighway=proposed, proposed=secondaryhighway=primary, proposed=yeshighway=tertiary, proposed=secondaryhighway=footway, proposed=yesRequirements / Relations
Closes #7413