fix(missing-skus): reconcile stale false positives against Oracle
SKUs mapped externally (via SSH script or direct SQL) never triggered resolve_missing_sku(), leaving them stuck as unresolved=0 indefinitely. New reconcile_unresolved_missing_skus() revalidates ALL unresolved SKUs against Oracle at sync, rescan, and CSV import time. Fail-soft on Oracle down. Clears the 7 prod false positives on next sync or manual rescan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,8 @@ async def scan_and_validate():
|
||||
if tracked:
|
||||
new_missing += 1
|
||||
|
||||
rec = await validation_service.reconcile_unresolved_missing_skus()
|
||||
|
||||
total_skus_scanned = len(all_skus)
|
||||
new_missing_count = len(result["missing"])
|
||||
unchanged = total_skus_scanned - new_missing_count
|
||||
@@ -72,7 +74,7 @@ async def scan_and_validate():
|
||||
# Fields consumed by the rescan progress banner in missing_skus.html
|
||||
"total_skus_scanned": total_skus_scanned,
|
||||
"new_missing": new_missing_count,
|
||||
"auto_resolved": 0,
|
||||
"auto_resolved": rec["resolved"],
|
||||
"unchanged": unchanged,
|
||||
"skus": {
|
||||
"mapped": len(result["mapped"]),
|
||||
|
||||
Reference in New Issue
Block a user