Skip to content

backend/fix:added osrm precheck#1334

Open
MustafaAsad198 wants to merge 1 commit into
mainfrom
osrm-pre-check
Open

backend/fix:added osrm precheck#1334
MustafaAsad198 wants to merge 1 commit into
mainfrom
osrm-pre-check

Conversation

@MustafaAsad198
Copy link
Copy Markdown

@MustafaAsad198 MustafaAsad198 commented Jun 7, 2026

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

Additional Changes

  • This PR modifies the database schema (database migration added)
  • This PR modifies dhall configs/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code and addressed linter errors ./dev/format-all-files.sh
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

Summary by CodeRabbit

  • Bug Fixes
    • Consistently applied map-data threshold validation across all providers, ensuring previously-exempt provider now follows the same checks.
    • Clarified fallback behavior: other services retain their default pass-through when threshold checks aren't applicable.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d88dfb47-13c9-4318-b9f1-8c859fe1ca0d

📥 Commits

Reviewing files that changed from the base of the PR and between 4297cef and 46d7460.

📒 Files selected for processing (1)
  • lib/mobility-core/src/Kernel/External/Maps/Interface.hs
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/mobility-core/src/Kernel/External/Maps/Interface.hs

Walkthrough

runPreCheck now precomputes snippetCheckPassed (based on req.points and droppedPointsThreshold) and uses it for Google, MMI, and OSRM. OSRM no longer bypasses the snippet check; other/unmatched services still default to True.

Changes

Standardized Pre-Check Logic

Layer / File(s) Summary
Shared snippet check across map services
lib/mobility-core/src/Kernel/External/Maps/Interface.hs
runPreCheck precomputes snippetCheckPassed from req.points and droppedPointsThreshold, applying it to Google, MMI, and OSRM; previous OSRM bypass removed, fallback remains True.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I hopped through code with careful knack,

Found OSRM skipping a little hack.
Now snippets check, no more adrift,
Three maps aligned — a tidy gift.
🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes the main change: adding OSRM precheck to the backend, which aligns with the code modifications that add snippet point threshold checking to OSRM.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osrm-pre-check

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant