Skip to content

fix: don't prune real highways that also carry a proposed=* tag#7415

Merged
DennisOSRM merged 2 commits intomasterfrom
fix/proposed-tag-prunes-real-highways
Mar 20, 2026
Merged

fix: don't prune real highways that also carry a proposed=* tag#7415
DennisOSRM merged 2 commits intomasterfrom
fix/proposed-tag-prunes-real-highways

Conversation

@DennisOSRM
Copy link
Copy Markdown
Collaborator

@DennisOSRM DennisOSRM commented Mar 20, 2026

Issue

Fixes #7413 — roads with a real highway=* type plus an additional proposed=* tag (e.g. highway=tertiary + proposed=secondary indicating 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.lua

The WayHandlers.blocked_ways() check for the proposed=* key previously blocked any way carrying that key, regardless of the highway value. The fix adds a guard so the block only fires when data.highway is absent or literally "proposed" (the road does not exist yet). A way with a real highway type (e.g. tertiary) is routed normally — the proposed key is implicitly ignored.

Cucumber tests

New rows added to existing scenarios in features/car/construction.feature, features/bicycle/pushing.feature, and features/foot/way.feature:

Tags Expected
highway=proposed not routable (unchanged)
highway=proposed, proposed=secondary not routable (unchanged)
highway=primary, proposed=yes routable (was broken)
highway=tertiary, proposed=secondary routable (was broken — exact case from the issue)
highway=footway, proposed=yes routable (was broken)

Requirements / Relations

Closes #7413

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>
@DennisOSRM DennisOSRM requested a review from Copilot March 20, 2026 08:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=proposed or missing highway).
  • 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.

@DennisOSRM DennisOSRM merged commit 844dc29 into master Mar 20, 2026
23 checks passed
@DennisOSRM DennisOSRM deleted the fix/proposed-tag-prunes-real-highways branch March 20, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposed=* tag is not interpreted correctly. Not all highways should be pruned

2 participants