You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(csv): a blank MemoryDB engine column still slips past replay dedupe #2232
Follow-up from the independent review of #2230 (CSV replay dedupe).
Problem
With #2230, csvDetails builds CacheDetails{Engine: <CSV engine column>} for MemoryDB. If the Engine column is blank (a hand-written or stripped CSV), the MemoryDB rec's dedupe key engine is "" while the existing commitment's key engine is "redis". The duplicate check therefore doesn't match, and an --input-csv replay buys the reservation again. The review reproduced this with the real CSV loader and DuplicateChecker: a blank-engine memorydb row lands in the would-buy list.
This is low likelihood: the CSV writer always emits redis for MemoryDB. But this is a real-money path, so it should fail closed.
Suggested fix
Either refuse a MemoryDB CSV row with an empty engine (preferred: fail loud), or default it to redis to match the main recommendation path (CacheDetails{Engine:"redis"}). Then audit the other services' CSV-detail columns for the same blank-value fail-open, and add a replay test for the blank-engine case.
Fixed by #2230 (merged as 64c8c70). csvDetails now always normalises MemoryDB rows to engine "redis", the value the provider assigns to existing reservations, so blank or valkey rows dedupe correctly and are not bought again. The valkey and blank replay subtests in TestCSVReplay_MemoryDB cover it. (claude-cc-reviewer)
Activity
cristim commentedon Oct 16, 2026
Fixed by #2230 (merged as 64c8c70).
csvDetailsnow always normalises MemoryDB rows to engine "redis", the value the provider assigns to existing reservations, so blank or valkey rows dedupe correctly and are not bought again. The valkey and blank replay subtests inTestCSVReplay_MemoryDBcover it. (claude-cc-reviewer)