[object Object]

← back to Dw Photo Capture

test: fuzzyVendor edge guards + disk-full debug note (cycle 13)

f050ab331da6fd8ef93125ab977697a315197358 · 2026-06-26 05:57:34 -0700 · Steve Abrams

Cycle blocked mid-run by a FULL Data volume (ENOSPC — harness writes cmd stdout to
/tmp on /, so every Bash call failed). Debugged: 460G volume 100% full, home=138G
(Projects 83G, Ollama 45G/16 models), ~250G in sudo-gated areas (surfaced to Steve, NOT
auto-deleted — won't blind-rm his data/models). Free space recovered 124Mi→4.7Gi as
macOS reclaimed purgeable space.

Did a disk-light refinement (pure tests, no server restart, no OCR scratch): 5 fuzzyVendor
edge guards — empty/<4-char/null never throw → null; SCHUMACKER→Schumacher, Phillip
Jefries→Phillip Jeffries resolve. 36→41 tests, lint clean. Logged a GATED backlog item
for Steve to review disk consumers. $0 (local).

Files touched

Diff

commit f050ab331da6fd8ef93125ab977697a315197358
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri Jun 26 05:57:34 2026 -0700

    test: fuzzyVendor edge guards + disk-full debug note (cycle 13)
    
    Cycle blocked mid-run by a FULL Data volume (ENOSPC — harness writes cmd stdout to
    /tmp on /, so every Bash call failed). Debugged: 460G volume 100% full, home=138G
    (Projects 83G, Ollama 45G/16 models), ~250G in sudo-gated areas (surfaced to Steve, NOT
    auto-deleted — won't blind-rm his data/models). Free space recovered 124Mi→4.7Gi as
    macOS reclaimed purgeable space.
    
    Did a disk-light refinement (pure tests, no server restart, no OCR scratch): 5 fuzzyVendor
    edge guards — empty/<4-char/null never throw → null; SCHUMACKER→Schumacher, Phillip
    Jefries→Phillip Jeffries resolve. 36→41 tests, lint clean. Logged a GATED backlog item
    for Steve to review disk consumers. $0 (local).
---
 OVERNIGHT_LEDGER.md | 2 ++
 test-analyze-ocr.js | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/OVERNIGHT_LEDGER.md b/OVERNIGHT_LEDGER.md
index 024b17f..d2d8e4a 100644
--- a/OVERNIGHT_LEDGER.md
+++ b/OVERNIGHT_LEDGER.md
@@ -13,6 +13,7 @@ explicit backlog empties, each cycle BRAINSTORMS fresh refinement ideas (local L
 the single highest-value safe one, the officer executes it, and the loop reschedules — it does NOT stop.
 
 ## Backlog (safe / reversible unless flagged GATED)
+- [ ] GATED/Steve: Data volume ~100% full — review big consumers: ~/.ollama 45G (16 models, prune unused?), ~/Projects 83G (node_modules dupes?), ~250G in sudo-gated system/var areas needs Steve to inspect (`sudo du -xh -d1 /System/Volumes/Data | sort -rh | head`). Loop kept tripping ENOSPC.
 - [x] A-verdict: tighten logo matcher + validate fingerprints + re-harvest  (DTD 3/3)
 - [x] Wire logo fingerprints into /api/identify as a TIEBREAKER (DTD-A, name-match primary)
 - [x] analyzeOcr unit tests — 21 assertions, npm test + selfcheck gate
@@ -54,3 +55,4 @@ the single highest-value safe one, the officer executes it, and the loop resched
 | 10 | brainstorm (qwen3:8b $0) → pick #5 (no fork) | harden analyzeOcr ranking contract with 11 adversarial/degraded-input tests (3-char/no-digit/dashed codes, <4 barcode, two-brand order, lowercase brand, dup dedup, two barcodes) | 21→32 tests pass; lint clean; no behavior change (all pre-verified correct) | $0 |
 | 11 | investigate→pivot | A/B proved Swift low-light pre-pass MOOT (Vision reads 4-level contrast raw); pivoted to UX: tentative "hold steady · CODE" cue when a non-strong read needs a 2nd frame | OCR reads all contrast tiers raw; inline JS+lint+32 tests green; page 200 | $0 |
 | 12 | brainstorm (qwen3:14b $0) → investigate+pick #5 | A/B proved OCR-confidence-threshold MOOT (Vision = 1.000 or no-read); shipped fingerprintVendor edge tests (empty/short→null, punct-normalized, REJECTED logo never matches) | 32→36 tests pass; lint clean | $0 |
+| 13 | DEBUG disk-full + disk-light refine | Data volume was 100% full (ENOSPC blocked all Bash); diagnosed: home=138G (Projects 83G, Ollama 45G/16 models), ~250G in sudo-gated areas (Steve-gated, not auto-deleted); shipped a disk-light pure-test refinement (5 fuzzyVendor edge guards) | df recovered 124Mi→4.7Gi (purgeable reclaimed); 36→41 tests; lint clean; no server restart/scratch | $0 |
diff --git a/test-analyze-ocr.js b/test-analyze-ocr.js
index feae271..a547c17 100644
--- a/test-analyze-ocr.js
+++ b/test-analyze-ocr.js
@@ -110,6 +110,13 @@ const bc = (payload, sym = 'Code128') => `BC\t${payload}\t${sym}`;
 {
   eq(fuzzyVendor('BRUNSWIG & FILS'), 'Brunschwig & Fils', 'fuzzyVendor: misspelling → canonical');
   eq(fuzzyVendor('zzz nonsense brand'), null, 'fuzzyVendor: nonsense → null');
+  // edge cases: empty / too-short / null inputs never throw and return null
+  eq(fuzzyVendor(''), null, 'fuzzyVendor: empty → null');
+  eq(fuzzyVendor('ab'), null, 'fuzzyVendor: <4-char → null');
+  eq(fuzzyVendor(null), null, 'fuzzyVendor: null → null (no throw)');
+  // a few real OCR/VLM misspellings within tolerance resolve to canonical seed vendors
+  eq(fuzzyVendor('SCHUMACKER'), 'Schumacher', 'fuzzyVendor: SCHUMACKER → Schumacher');
+  eq(fuzzyVendor('Phillip Jefries'), 'Phillip Jeffries', 'fuzzyVendor: Phillip Jefries → Phillip Jeffries');
 }
 
 // ── fingerprintVendor: resolves a validated fingerprint, null for unknown ──

← 0801a44 test: fingerprintVendor edge cases + reject OCR-confidence-t  ·  back to Dw Photo Capture  ·  Recognize Pattern: strip -SAMPLE suffix from result SKUs (2, ad48b18 →