Skip to content

fix(search): require complete business location evidence - #432

Merged
Medformatik merged 1 commit into
mainfrom
fix/business-location-intent
Oct 7, 2026
Merged

Medformatik merged 1 commit into
mainfrom
fix/business-location-intent

Conversation

@Medformatik

@Medformatik Medformatik commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • A business query such as MediaMarkt Alexa previously treated Alexa in the remote street word Alexander as exact location intent. Require complete normalized address words for the exact upgrade, retaining weaker prefix autocomplete matches and existing score weights.
  • Preserve explicit remote city/address queries, primary-name prefixes, aliases/codes and station behavior. Plain Enter on the weak captured query follows the existing NLP/area-search path; explicitly choosing either branch still opens it.
  • Add deterministic captured-response and real SearchBar regressions, update existing search documentation, and add a core patch changeset. Retrieval, provider parameters/cache policy, admin configuration and Preserve distinct nearby businesses during autocomplete deduplication #429 deduplication are unchanged.

Related issues

Fixes #428

How was this tested?

  • Baseline: three existing core/SearchBar suites, 141 tests passed. Regression-first run reproduced eight expected failures (weak-prefix intent, row order and actual dropdown order). Final focused run: four files, 160 tests passed. Shuffled SearchBar execution with seed 428: 77 tests passed after resetting shared zoom/category state between cases.
  • Complete remote city/street/number/postcode evidence; mixed complete/partial suffixes; normalized Friedrichstr. addresses; partial primary names; exact aliases/codes; station abbreviation and same-name proximity controls. Real SearchBar options use the fixture, independently remote-first forward results, plain Enter area fallback, ArrowDown + Enter selection and explicit remote-city Enter.
  • Independent final review found no production blockers. Its test zoom-cleanup finding was corrected; no review findings remain deferred.
  • pnpm lint, pnpm check-types (30 workspace tasks plus discovery-eval), pnpm check:policy, git diff --check, docs production build, and pnpm check-openapi (384 operations) passed.
  • Default full suite did not pass locally under host load. Two complete runs: 1,617 files / 17,804 tests passed, 30 files / 141 tests skipped, three failures in unchanged OIDC/IntegrationList tests (15-second timeouts and a duplicate render after the timed-out async import); then 1,618 files / 17,747 tests passed, 30 files / 201 tests skipped, with the unchanged places API suite exceeding its 10-second setup limit and teardown finding no app. The earlier failing files passed in the second run; places passed in the first.
  • Single-worker retries at normal limits: OIDC/IntegrationList 8 tests passed; OpenAPI freshness 3 tests passed. Places API passed all 63 tests with a temporary config outside Git that only raised project test/hook timeouts to 60 seconds. Diagnostic broad reruns were stopped after timing failures recurred, including OpenAPI's explicit 30-second limit. No test timing/configuration changes are committed. A final isolated places run at normal limits also passed all 63 tests. Final verification on e9e7b7ed0: all CI checks passed, including 14,181 node tests, 3,630 web tests, mobile/database tests, lint, types, docs, production build, all six Docker builds, CodeQL, dependency review, title validation and CLA verification. The auto-merge and release-publication jobs were skipped as expected for this PR. Final self-review found no further changes needed; a fresh pre-merge run of the four search regression files passed all 160 tests with the unchanged repository configuration.

Controlled browser evidence

The live hosted adapted autocomplete was re-read on 2026-10-07 and still returned Rijswijk first, Berlin second. Its six returned rows are the committed regression fixture, not raw MapTiler output. The actual local Next.js app replayed those responses through the unmodified hooks, SearchBar and dropdown. Forward geocoding also replayed the captured Rijswijk-first response. Final controls returned empty aggregate/brand/preset results. Camera [13.416, 52.5194], zoom 15, English, 1280 × 800 viewport.

Observation Before After
Adapted server candidate order Rijswijk, Berlin Rijswijk, Berlin
Rijswijk text score / location intent for MediaMarkt Alexa 1 / true 0.5 / false
Rijswijk / Berlin combined ranking score 1.0832 / 0.9602 0.5832 / 0.9602
Berlin text score 0.15 0.15
Dropdown order Rijswijk (621 km), Berlin (97 m) Berlin (97 m), Rijswijk (621 km)
Plain Enter, MediaMarkt Alexa Selected maptiler:poi.15539884 (Rijswijk) Visible-area search; no place selected
ArrowDown + Enter, MediaMarkt Alexa — Selected maptiler:poi.15422100 (Berlin)
Plain Enter, MediaMarkt Rijswijk — Selected maptiler:poi.15539884 (Rijswijk)

Browser NLP was unavailable in the read-only fixture proxy, so its existing empty/error fallback reached area search. The automated plain-Enter regression also verifies the direct area path with AI search disabled. No NLP/provider completeness improvement is claimed. The local self-hosted tile endpoint /tiles/data/openmapx.json returned 404; the screenshots verify readable dropdown order and distance labels, not basemap rendering. Deployment revision and upstream/cache state are unknown; no deployment was changed.

Screenshots

Same captured autocomplete fixture, query, camera and viewport. Personally inspected both; review images are GitHub attachments and are not committed.

Before:

Before: Rijswijk above Berlin for MediaMarkt Alexa

After:

After: Berlin above Rijswijk for MediaMarkt Alexa

Checklist

  • Conventional Commits title
  • pnpm lint && pnpm check-types && pnpm test pass locally — default full-suite timing limitations documented above; scoped regressions pass
  • Core patch changeset added
  • Existing search documentation updated
  • Code lands in the existing license tier
  • No secrets, real API keys, .env files or review images committed
  • Contributor License Agreement (bot verification)

@Medformatik Medformatik added bug Something isn't working documentation Improvements or additions to documentation labels Oct 7, 2026
@Medformatik Medformatik self-assigned this Oct 7, 2026
@Medformatik
Medformatik merged commit fe6b796 into main Oct 7, 2026
26 checks passed
@Medformatik
Medformatik deleted the fix/business-location-intent branch October 7, 2026 21:58
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent partial address prefixes from falsely establishing remote business intent

1 participant