fix: stop counting eBay's 'Results matching fewer words' padding as sold comps (0.3.1) - #2
Conversation
…omps
A search with few (or no) exact matches is PADDED by eBay: the exact matches,
then a divider reading "Results matching fewer words", then dozens of loosely
related items. RESULT_JS collected every card on the page, so a query whose
headline said "0 results" came back as 54 sold comps with a median — and the
first real re-price run labelled 15 inventory rows "eBay sold comps (N sold)"
on that basis. The tell was identical quartiles across unrelated items.
- RESULT_JS: cards below the divider are excluded from `rows` and counted in
`related_rows_excluded`; `headline_count` is eBay's own match count;
`query_rewritten` flags "Showing results for … / Search instead for …".
- Tools: every eBay result carries `headline_count`, `related_rows_excluded`,
`query_rewritten` (when true) and plain-language `notes` the model must
repeat ("eBay found no listings matching all the words …; 54 loosely related
listings … were excluded. Broaden the query — do not price from those.").
- SKILL.md: how to read the new fields; identical quartiles = padding.
- 135 host-free tests (was 127); ruff clean. 0.3.1.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X1Mou2gxw6Wz9dLCmVocoL
|
Live validation of the new page script (agent-browser 0.27.1, signed-in profile, 2026-09-12):
The exact-match count equals eBay's own headline on the real query, and the first six rows are all rulebooks ($26.51–$65.00). Also observed while validating: Chrome 149's built-in Gemini side panel ("glic") can open in the headed window and agent-browser adopts it as the active page, after which navigations land there and the tools report "could not find the results list … The browser ended up at: https://gemini.google.com/glic". Not addressed in this PR — the error already names where the browser went; closing that panel fixes it. Follow-up: have |
There was a problem hiding this comment.
QA panel review — PASS
code-review-structural · head ffa604cae3b1 · formal
All four LLM finders returned zero findings and the structural pass hard-stopped with no output, so the panel produced no findings to verify. The verifier confirmed the empty array. No prior requests to disposition. The one thing to flag: the structural pass's hard-stop means the panel's coverage is thinner than usual — if this PR touches non-trivial production logic, the silence is a gap, not a clean bill. No panel disagreement (unanimous zero). No verification changes (empty in, empty out).
No findings — the review came back clean.
findings JSON (machine-readable)
[]
Why
The first live sold-comp re-price (45 searches, "no errors") produced rows like "54 sold, median $31.43" for a Bretonnian dice set. Opening that query showed eBay's headline "0 results", two "Shop on eBay" filler cards, the divider "Results matching fewer words", then 54 loosely related items (complete boxes at $123, other teams' dice, $5 sprues, $1.34 transfer sheets).
RESULT_JScollected everyli.s-cardon the page. Five unrelated rows sharing p25 = $20.22 and four sharing p25 ≈ $29.7 were the same padded river. The affected inventory file was restored from its pre-run copy.What
rows, counts them asrelated_rows_excluded; reads eBay's ownheadline_countfrom the count heading; flagsquery_rewrittenon "Showing results for … / Search instead for …". Filler cards were already skipped.ebay_price_check,ebay_search,ebay_price_and_profitand the eBay sources ofcompare_pricescarryheadline_count,related_rows_excluded,query_rewritten(only when true) and anoteslist: zero exact matches → "do not price from those, broaden"; fewer than 5 next to padding → thin, broaden; otherwise a one-line count; rewritten → every number is for eBay's query.notesare part of the answer.Tests
135 host-free (was 127): zero-match page reports no comps and says why; price-and-profit names the padding; thin match next to padding flagged; healthy page with some padding just says so; clean page has no notes and claims no headline; rewritten query called out; compare carries notes per eBay source and not for Amazon; the page script emits the new keys. Live validation against a padded page and a real one is posted as a comment on this PR.
🤖 Generated with Claude Code
https://claude.ai/code/session_01X1Mou2gxw6Wz9dLCmVocoL