Skip to content

bd-ko1 Part B: detail-page enrichment for min_contract_months - #66

Merged
MukhammadIbrokhimov merged 13 commits into
mainfrom
feat/bd-ko1-part-b-detail-enrich
May 20, 2026
Merged

bd-ko1 Part B: detail-page enrichment for min_contract_months#66
MukhammadIbrokhimov merged 13 commits into
mainfrom
feat/bd-ko1-part-b-detail-enrich

Conversation

@MukhammadIbrokhimov

Copy link
Copy Markdown
Owner

Summary

  • New enrich pipeline stage between scrape and match. Fetches detail pages for canonical WG-Gesucht / Kleinanzeigen flats missing min_contract_months, parses the field, and persists it so filter_contract (filters.py:120-128) actually fires.
  • Adds flats.available_until (forward-migration column) and extends filter_short_term to use the structured available_from/available_until span before falling back to the bd-33h title/description heuristic.
  • Caps per-pass detail fetches via --budget (default 30) and sleeps 2 s between requests. Fetch failures are logged and the flat row is left untouched so the cheap keyword filter remains the safety net.

Test plan

  • pytest tests/test_matcher_filters.py tests/test_pipeline_enrich.py tests/test_wg_gesucht_scraper.py tests/test_kleinanzeigen_scraper.py -v — green
  • pytest -q — full suite green (589 passed)
  • ruff check on touched files — no errors
  • Manual: flatpilot enrich --budget 3 against a real DB with at least one new WG-Gesucht flat; verify the row's min_contract_months is populated.

Closes FlatPilot-k1v.

Copilot AI review requested due to automatic review settings May 20, 2026 20:33
@MukhammadIbrokhimov
MukhammadIbrokhimov merged commit 36eddc7 into main May 20, 2026
7 checks passed
@MukhammadIbrokhimov
MukhammadIbrokhimov removed the request for review from Copilot May 20, 2026 20:54
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