Skip to content

fix(search): preserve distinct nearby businesses - #438

Merged
Medformatik merged 1 commit into
mainfrom
fix/distinct-business-deduplication
Oct 8, 2026
Merged

Medformatik merged 1 commit into
mainfrom
fix/distinct-business-deduplication

Conversation

@Medformatik

@Medformatik Medformatik commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve distinct nearby same-name businesses and co-located tenants in autocomplete. The controlled two-branch REWE fixture now produces two selectable rows with their original IDs, addresses and coordinates.
  • Keep explicit shared identity decisive. Ordinary POIs need independent source-record namespaces and equivalent concrete address evidence; conflicting Wikidata identities, addresses or categories prevent heuristic merging. Preserve city, station/entrance, station-versus-square and captured landmark reconciliation.
  • Add core and real SearchBar regressions, update the existing search/identity policy and architecture docs, and add a core patch changeset. Address matching is deliberately conservative; unsupported formats or same-source records can remain duplicates until explicit identity is available.

Related issues

Fixes #429

#428 was completed by merged #432 before this work. This branch is rebased onto main 5f07b70967319b4b2c86769b542b551b93f98e02 and changes only deduplication, its tests and documentation.

How was this tested?

  • RED/GREEN: reproduced the exact fictional two-branch issue fixture before fixing it. Added negative branch/tenant/address/category/entity cases and positive cross-source/shared-identity controls. One independent final review found postcode-only evidence, catalog contradiction and Eiffel Tower reconciliation defects; each was reproduced in a failing regression and corrected.
  • 266 focused core ranking, captured search-evaluation and actual SearchBar tests pass after rebasing, including click and keyboard selection of both branches and one corroborated cross-source duplicate.
  • pnpm lint, pnpm check-types, pnpm check:policy, pnpm check-openapi, and pnpm -C docs build pass on current main. Lint reports existing non-gating warnings. No API contract changes are included.
  • Full suite: pnpm test --maxWorkers=2 --hookTimeout=30000 passes 17,426 tests / 1,530 files, with 135 tests / 28 files skipped by existing repository conditions. The initial default-concurrency run hit unchanged API setup/publisher timeouts; both suites passed an isolated rerun (81 tests). The final invocation adjusts local concurrency and hook headroom without changing repository configuration or skipping crypto. Publication uses a per-command hook override after these gates to avoid repeating the full suite with the known local 10-second setup deadline.
  • Manual: actual local Next app with the exact controlled fixture, empty aggregate providers and a fixed Berlin camera at zoom 15. Personally inspected readable before/after result-list screenshots; clicked branch B and selected branch A with the keyboard, then verified original IDs, addresses and coordinates. Repeated selections after rebasing in Chromium. This is algorithm/UI evidence using fictional records; it does not verify live provider retrieval, datasets, deployment caches, enrichment or map coverage. The stub serves empty tiles and unavailable unrelated integrations.

Checklist

  • Conventional Commits title (the pr-title check enforces this)
  • pnpm lint && pnpm check-types && pnpm test pass locally — full test invocation and local timeout limitations recorded above
  • Added / updated a changeset if a publishable package changed
  • Docs updated if behavior is user-visible (sources under docs/)
  • New code carries the right license header / lands in the correct license tier (see LICENSING.md)
  • No secrets, real API keys, or .env files committed
  • I agree to the Contributor License Agreement (the CLA bot will prompt on your first PR) — maintainer is allowlisted by the existing CLA workflow

Readable controlled before/after screenshots are attached directly to this PR; no review images are committed.

@Medformatik Medformatik added bug Something isn't working documentation Improvements or additions to documentation javascript Pull requests that update javascript code labels Oct 8, 2026
@Medformatik Medformatik self-assigned this Oct 8, 2026
@Medformatik

Copy link
Copy Markdown
Collaborator Author

Controlled fictional #429 REWE fixture in the actual local SearchBar, at Berlin [13.4, 52.52], zoom 15. Before: only Street A 1 survives. After: Street A 1 and Street B 2 (338 m apart) are separate choices; click/keyboard selection retains each original ID, address and coordinates. The API is a controlled stub with empty tiles, so this does not establish live provider coverage. Both cropped result-list screenshots were personally inspected; no review images are committed.

Before

Before: only REWE at Street A 1

After

After: separate REWE rows at Street A 1 and Street B 2

@Medformatik
Medformatik merged commit 0eccd0d into main Oct 8, 2026
25 checks passed
@Medformatik
Medformatik deleted the fix/distinct-business-deduplication branch October 8, 2026 19:15
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 8, 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 javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve distinct nearby businesses during autocomplete deduplication

1 participant