Skip to content

fix(parser): respect hostname and path boundaries - #38

Merged
stevan-borus merged 1 commit into
mainfrom
fix/label-aware-referrer-matching
Oct 29, 2026
Merged

stevan-borus merged 1 commit into
mainfrom
fix/label-aware-referrer-matching

Conversation

@stevan-borus

Copy link
Copy Markdown
Owner

Unrelated hosts such as netflix.com and notgoogle.com were classified as Twitter or Google because domain matching ignored DNS label boundaries.

Match complete hostname labels through an indexed lookup, with the most specific hostname winning. Within each hostname, prefer matching path rules on whole path segments. This also activates existing path-specific sources and adds 195 explicit Google Images www aliases while preserving Gmail/Gemini priority, search terms, and internal-referral behavior.

Closes #35.

Validation

  • 98 tests pass, including the original 35 and regression coverage for all reported false-positive hosts, path boundaries, normalization, source priority, and aliases.
  • Type checking, Biome and production build pass.
  • All 2,723 dataset rules resolve to their declared source through both built ESM and CommonJS exports; all 195 aliases preserve generic Google and path-boundary fallbacks.
  • Independent Claude Opus 5.5 and GPT-6.1-Sol reviews of the final commit found no blocking issues.
  • Library-only change; no UI surface requires a screen pass.

Includes a patch changeset for 1.1.1. Some matching URLs now report Google Images, Google Product Search or Bing Images instead of their generic source; Inbox.com search URLs now report the search medium rather than email.

Implementation: Claude Opus 5.5 via Claude Code and GPT-6.1-Sol via Codex in T3 Code; reviews by Claude Opus 5.5 and GPT-6.1-Sol.

Prevent unrelated hostnames such as netflix.com from being classified as Twitter. Index hostname and path rules with explicit Google Images aliases so existing source data is recognized while preserving hostname priority and search terms.
@stevan-borus
stevan-borus merged commit 1a53eda into main Oct 29, 2026
1 check passed
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.

Domain matching ignores label boundaries (netflix.com → Twitter, notgoogle.com → Google)

1 participant