system/receipt_intake_procedure.md
+ attached block) and confirmed live in her context.
Every step below was run for real on a scanned Walmart receipt (an HP OfficeJet 8122e printer + HP 923 ink), not just designed on paper:
tools/run_scan_image.sh (WIA 300dpi → scan.jpg).tools/open_scan_jpg.sh /
dashboard "Show Image" so EG confirms the correct document.classify_scan.py (Gemini
Flash) returns receipt / bank_statement / tax_document / other.parse_and_categorize.py,
now extracting merchant_city / merchant_state as
separate fields.investigate_item.py
uses Gemini google_search grounding to identify SKU-like
descriptions (e.g. 4KOT3LN → HP 923 ink) with sources.vendor_key — via VendorCategoryStore;
No Vendor Key = failure (red-tab in report.html, exit).| Artifact | What it does | Status |
|---|---|---|
tools/classify_scan.py | Cheap Gemini-Flash document-type classifier (route before parsing) | New |
receipt_parsing_tools/investigate_item.py | Gemini Google-Search grounding to resolve cryptic/OCR-garbled line items + category hint | New |
receipt_engine.py + models | Added merchant_city/merchant_state to the receipt schema & parsing prompt | Extended |
| Dashboard Scanners "Start Scan" | Greys out while the scanner needs a power-cycle ("Restart the Scanner Please") | Fixed |
Authored the proper file-first way and verified live:
system/receipt_intake_procedure.md to Mazda's state.git.system/receipt_intake_procedure
(~2,900 chars) attached to Mazda./context now contains the
procedure, the "No Vendor Key" rule, and classify_scan.memfs authoring had been blocked by a recurring Docker "ghost": two Docker
engines (native dockerd + Docker Desktop) ran in parallel, and
Desktop hijacked the docker socket so the live fleet was invisible to the CLI and
letta-memfs lost its network. This was diagnosed and resolved to a
single native engine with all services healthy (letta, memfs git, bridge,
logger php+mysql, executor); the live DB was backed up first
(~/ghost_migration/). See memory
ghost-container-root-cause-docker-desktop-2026-06-24.
docker info --format '{{.Name}}' should read DESKTOP-SHDBATI,
not docker-desktop.
POST /api/process-document: the deterministic
facade (classify → parse) renders inline within seconds; Mazda is dispatched
fire-and-forget for investigate → categorize → store. No polling.
GoF: DocumentPipelineController (Command) + DomDocumentPipelineView
(Strategy), both injected so unit-testable. 194 JS + 101 Python tests pass.
Done 2026-06-25.receipt is fully wired).investigate_item.py resolves a cryptic SKU, persist the mapping
(vendor-key learning log) so repeat items skip the web-search cost.system_message.xml so the dashboard Agent Card
reflects her current role.ghost-container-root-cause-docker-desktop-2026-06-24,
procedure source of truth: memfs system/receipt_intake_procedure.md.