Repository navigation
fix(importer): trade-in titles in any order stay new - #1562
Conversation
detectProductCondition read new-device titles such as "Trợ giá lên đời máy cũ", "Lên đời máy cũ trợ giá" or "Hỗ trợ đổi máy cũ" as used, so ingest threw NON_NEW_LISTING on new listings. - The trade-in strip now takes a trade-in verb (thu, thu mua, đổi, lên đời, trợ giá, hỗ trợ) right before "(máy|điện thoại|đt) cũ", with a few filler words allowed, or "cũ" right before "lên đời" or "đổi/lấy/sang mới". - Fixtures: nine trade-in titles stay new, and five real used titles stay used. Refs #1430 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…1430 review) - "Mới" followed by a number or a warranty term ("đổi mới 99%", "đổi mới trong 30 ngày") is not a trade-in, so those used listings stay used or like-new. - A bare "hỗ trợ" is no longer a trade-in verb; "hỗ trợ thu/đổi" still is. - "lại", "giá cao" and an amount ("2 triệu") may sit between the verb and the device, and a hyphen, colon or comma may separate the words. Refs #1430 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fresh-context review (on 5eefd84). It found no P1. Fixed in 11cd677:
Every case above is a fixture now. The importer's The runbook's step 1 SQL was regenerated from this source and sent to the Rate-Services audit session. |
Refs #1430 (follow-up to #1561)
Problem
#1561 rejects a listing at ingest (
NON_NEW_LISTING) whendetectProductCondition(title)is notnew. Its trade-in strip only covered "thu/đổi … cũ lên đời / đổi mới" and "thu (mua) máy cũ". A new device's title that offers a trade-in in another order kept the words "máy cũ", so it read as used and was dropped. Examples:Rate-Services found this before bumping its vendored copy, and it holds that bump until this lands.
Change
TRADE_IN_PHRASE(product-normalizer.ts) now strips two shapes before the condition regexes run:Tests (
entity-matcher.test.ts)new, including the three above, "Thu mua giá cao máy cũ", "Trợ giá 2 triệu cho máy cũ", "Lên-đời máy cũ", "Đổi máy cũ", "Trợ giá máy cũ 1 triệu", "Thu cũ lên đời", "Máy cũ lên đời trợ giá", "Lên đời từ điện thoại cũ" and "Thu đt cũ đổi mới".used, such as "máy cũ đổi mới trong 30 ngày" (a warranty swap), "hỗ trợ máy cũ", "máy cũ đẹp", "Máy cũ giá rẻ bảo hành 3 tháng", "điện thoại cũ đã qua sử dụng", "Thanh lý máy cũ" and "máy cũ zin, trợ giá ship".pnpm test(importer),tscandeslintare clean.Review
🤖 Generated with Claude Code