4 Commits

Author SHA1 Message Date
Claude Agent
b8a9480784 fix(address): numar overflow split, SAT → localitate
In parseaza_adresa_semicolon, text după NR ("5 la non stop", "21 sat
Grozavesti corbii mari") era împins în p_numar și trunchiat brutal la
10 chars ("5 LA NON S", "21 SAT GRO").

Fix: când p_numar > 10 chars, prima componentă rămâne numar; restul se
clasifică:
- "SAT X ..." → p_localitate := "X ..." (satul = localitate, TIER
  L1/L2/L3 existent rezolvă id_loc)
- "COM/ORAS/MUN X" → aruncat (deja în p_localitate din GoMag city)
- altceva (landmark ex "LA NON STOP") → concatenat în p_strada

Semnătura parseaza_adresa_semicolon neschimbată. Zero callers afectați.

Teste: landmark → strada, SAT → localitate, numar normal neschimbat.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 06:13:08 +00:00
Claude Agent
90a4906d87 ADRESE 2026-04-08 22:55:09 +00:00
Claude Agent
f48c2d62c6 fix(address): extract scara/etaj/apartament from comma-less addresses
Oracle parser failed to extract sc/ap/et when GoMag addresses had no
commas. Added REGEXP_REPLACE to insert commas before address keywords
in v_strada before the comma-split, ensuring the token parser always
fires. Also added 5 Oracle integration tests calling
parseaza_adresa_semicolon directly, and improved diacritics handling
in addr_match (Python + JS).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 22:00:17 +00:00
Claude Agent
b2f1687920 test(address): oracle integration tests + verify script for PJ/PF rule
- test_address_rules_oracle.py: E2E tests import synthetic PJ+PF orders
  and verify id_facturare/id_livrare in Oracle; regression tests check
  SQLite orders imported after fix date
- verify_address_rules.py: standalone script to audit PJ/PF address
  compliance on existing SQLite orders (--days N / --all / --status)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 16:36:30 +00:00