Spaces:
Running
Running
Sync ShopStack 2026-06-15: corrections panel, empty-state rewrite, market-source suppression
8294cde verified A newer version of the Gradio SDK is available: 6.20.0
ShopStack Features: Built vs. Pending
Last updated: 2026-06-15 Test count: 3571 tests collected (verified 2026-06-15; previous 3134/2906/2651/2898 counts are stale). Run
pytest tests/ --collect-only -qfor the latest. Test result: 3550 passed, 21 skipped, 0 failed (serial run, 2026-06-15). Verification tier: Tier 3 (full test suite plus HF provider tests pass)
π’ BUILT β ShopStock (Inventory)
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| SQLite database (10 tables, WAL mode) | β Complete | database.py β full CRUD for all tables |
Tier 3 (32 tests pass) |
| 18 hierarchical household locations | β Complete | database.py β seeded on init |
Tier 3 |
| Add inventory item | β Complete | tools/registry.py β add_inventory_item |
Tier 3 |
| Update inventory item (partial fields) | β Complete | tools/registry.py β update_inventory_item |
Tier 3 |
| Consume inventory (partial/full, auto-status) | β Complete | tools/registry.py β consume_inventory_item |
Tier 3 |
| Move item between locations (with tracking) | β Complete | tools/registry.py β move_inventory_item |
Tier 3 |
| Find item by prefix search | β Complete | tools/registry.py β find_item |
Tier 3 |
| Inventory lot ID prefix resolution | β Complete | database.py β resolve_inventory_lot_id |
Tier 3 |
| Inventory view/search UI | β Complete | screens/inventory.py |
Tier 3 |
Batch consume items (lot_id: qty) |
β Complete | screens/inventory.py β consume_items_batch |
Tier 3 |
| Use Soon / expiration alerts (3-day default) | β Complete | tools/registry.py β get_use_soon_items |
Tier 3 |
| Seed demo inventory | β Complete | screens/inventory.py β seed_demo_inventory |
Tier 3 |
| Data portability (JSON/CSV export/import) | β Complete | portability.py |
Tier 3 |
π’ BUILT β ShopBasket (Shopping List)
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Create/update active shopping list | β Complete | tools/registry.py β create_or_update_shopping_list |
Tier 3 |
| Shopping list with items, priorities, reasons | β Complete | schemas/models.py β ShoppingList, ShoppingListItem |
Tier 3 |
| Complete list β add items to inventory | β Complete | services/shopping.py β complete_shopping_list_service |
Tier 3 |
| Mark items as purchased (per-item) | β Complete | services/shopping.py β mark_items_purchased_service |
Tier 3 |
| Classify items (buy/skip/use-soon) | β Complete | services/shopping.py β classify_shopping_items |
Tier 3 |
| Enrich items with Swiggy market prices | β Complete | services/shopping.py β enrich_items_with_swiggy |
Tier 3 |
| Shopping list UI with cards | β Complete | screens/shopping.py |
Tier 3 |
| Shopper share summary | β Complete | screens/shopping.py β _shopping_list_share_text/html |
Tier 2 |
| Trace recording for shopping workflows | β Complete | screens/shopping.py β _record_shopping_trace |
Tier 2 |
π’ BUILT β ShopCompare (Price Intelligence)
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Price history per item | β Complete | database.py β get_price_history |
Tier 3 |
| Unit price normalization (kg/g/L/mL) | β Complete | market/normalization.py |
Tier 3 |
| Price intelligence view (best store, drops) | β Complete | screens/price_compare.py β price_intelligence_view |
Tier 3 |
| Price memory view with plots | β Complete | screens/price_memory.py β price_memory_view |
Tier 3 |
| Record price observations via tool | β Complete | tools/registry.py β record_price_observation |
Tier 3 |
π’ BUILT β ShopLens (Scanning)
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Barcode decoding (pyzbar + zbarimg fallback) | β Complete | scanner.py β decode_barcode |
Tier 2 |
| Barcode type inference (EAN-13, EAN-8, CODE128, QR) | β Complete | scanner.py β _infer_barcode_type |
Tier 2 |
| Product code from barcode inference | β Complete | scanner.py β infer_product_from_code |
Tier 2 |
| Market Lens full pipeline (image + audio) | β Complete | services/market_lens.py β analyze_market_lens |
Tier 2 |
| Detect visible items + compare to inventory | β Complete | services/market_lens.py β analyze_visible_items |
Tier 2 |
| Audio transcription for voice input | β Complete | services/market_lens.py β transcribe_audio |
Tier 2 |
| Swiggy price enrichment in Market Lens | β Complete | services/market_lens.py β enrich_market_prices |
Tier 2 |
| Market Lens UI (scan, confirm buy, skip, save) | β Complete | screens/market_lens.py |
Tier 2 |
| Barcode add to inventory | β Complete | screens/market_lens.py β market_lens_barcode_add |
Tier 2 |
π’ BUILT β ShopMemory
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Price history, trends, best-store intelligence | β Complete | screens/price_memory.py, screens/price_compare.py |
Tier 3 |
| Field notes markdown editor | β Complete | screens/field_notes.py |
Tier 3 |
| Price memory view with chart data | β Complete | ui/views.py β PriceMemoryView |
Tier 3 |
| Purchase cadence detection | β Complete | decisions/rules.py β detect_purchase_cadence |
Tier 2 |
| Waste pattern detection | β Complete | decisions/rules.py β detect_waste_patterns |
Tier 2 |
| Price drop alerts | β Complete | screens/price_compare.py β price intelligence view |
Tier 2 |
π’ BUILT β ShopAgent (Reasoning)
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Decision engine (7-class buy/skip/use-soon) | β Complete | decisions/rules.py β classify_all |
Tier 3 |
| DecisionSet with filtered views (buy, skip, etc.) | β Complete | decisions/types.py β DecisionSet |
Tier 3 |
| Decision rendering (badges, cards, panels) | β Complete | decisions/__init__.py β render_* functions |
Tier 2 |
| Planner engine (complete β parse β execute) | β Complete | planner/engine.py β PlannerEngine |
Tier 3 |
| Tool-call prompt builder | β Complete | planner/prompts.py |
Tier 3 |
| JSON/XML parser for LLM output | β Complete | planner/parser.py |
Tier 3 |
| Trace system (creation, export, PII redaction) | β Complete | traces/export.py |
Tier 3 |
| Trace UI (list, detail, search, filter, export) | β Complete | screens/traces.py |
Tier 3 |
| Ask ShopStack UI (text + voice) | β Complete | screens/ask.py β ask_shopstack, ask_shopstack_from_audio |
Tier 2 |
| Voice add command parsing | β Complete | screens/ask.py β _handle_add_command |
Tier 2 |
| Dashboard state assembly | β Complete | services/dashboard.py β build_dashboard_state |
Tier 3 |
| Today dashboard UI (stats, decisions, cadence) | β Complete | screens/dashboard.py β today_dashboard |
Tier 3 |
| Swiggy availability check for shopping items | β Complete | decisions/rules.py β check_swiggy_availability |
Tier 2 |
π’ BUILT β Sources (Swiggy Instamart)
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Swiggy snapshot loader (CSV + JSON) | β Complete | market/sources/swiggy.py |
Tier 3 |
| Normalization pipeline (size, price, canonical) | β Complete | market/normalization.py |
Tier 3 |
| Market analytics (stats, cheapest, category) | β Complete | market/analytics.py |
Tier 3 |
| Basket builder (canonical matching) | β Complete | market/basket.py |
Tier 3 |
| Produce metadata (~80 items: shelf-life, waste-risk) | β Complete | market/metadata.py |
Tier 3 |
| Swiggy market view in UI | β Complete | screens/other.py β swiggy_market_view |
Tier 2 |
| Swiggy basket estimator | β Complete | screens/other.py β swiggy_basket_estimate |
Tier 2 |
| Swiggy price seeding to Price Memory | β Complete | screens/other.py β seed_swiggy_prices |
Tier 2 |
| Swiggy import script | β Complete | scripts/import_swiggy_snapshot.py |
Tier 2 |
π’ BUILT β Runtime & Model Stack
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Model registry (16 candidate entries) | β Complete | model_registry.py |
Tier 3 |
| Parameter budget enforcement (β€32B) | β Complete | model_registry.py β validate_active_model_budget |
Tier 3 |
| Provider factory with mock fallback | β Complete | providers/registry.py |
Tier 3 |
| Runtime diagnostics (provider status badge) | β Complete | screens/model_stack.py |
Tier 2 |
| Local provider (MLX + llama.cpp) | β Complete | providers/local_provider.py |
Tier 3 |
| OpenAI provider (cloud fallback) | β Complete | providers/openai_provider.py |
Tier 2 |
| Local Whisper provider | β Complete | providers/local_whisper_provider.py |
Tier 2 |
| Mock providers for all 11 interfaces | β Complete | providers/mock_providers.py |
Tier 3 |
π’ BUILT β Infrastructure
| Feature | Status | Evidence | Verification Tier |
|---|---|---|---|
| Gradio Blocks UI (13 tabs) | β Complete | app.py β build_app() |
Tier 3 (5 app smoke tests) |
| Module registry with canonical names | β Complete | module_registry.py |
Tier 3 |
Error boundary decorator (@safe_render) |
β Complete | screens/_utils.py |
Tier 3 |
| CI pipeline (GitHub Actions) | β Complete | .github/workflows/ci.yml |
Tier 2 |
| Pre-commit test count sync | β Complete | tools/sync-readme-stats |
Tier 2 |
| Portability (JSON/CSV export/import) | β Complete | portability.py |
Tier 3 |
| Test suite (2906 tests as of 2026-06-14) | β Complete | tests/ |
Tier 3 |
π‘ PARTIAL β Needs Attention
| Feature | Status | Gap | Blast Radius |
|---|---|---|---|
| Test suite timeout | β Fixed | Tests run deterministically in ~70-83s | No longer a blocker. Parallel test runs possible. |
| Benchmark tests | β οΈ May be stale | Actually benchmark count unknown | 2 benchmark files, 0 known runs in this session |
| Receipt scanning pipeline | π‘ Partial | OCR provider exists, no receiptβpurchase flow | UI only. No pipeline wiring. |
| Household map UI | π‘ Duplicate | Both screens/other.py and screens/household.py define household_map_view |
Supersession needed. household.py may be pending. |
| Price memory view | π‘ Duplicate | Both screens/other.py and screens/price.py define price_memory_view |
price.py is the newer/canonical path. |
| Field notes screen | π‘ Duplicate | field_notes.py and other.py both define field_notes_view/save |
field_notes.py imported; other.py version may be dead. |
| Swiggy freshness labels | π‘ Verification | "point-in-time" labels exist, no staleness logic | UI display only, no functional impact. |
π΄ NOT BUILT β Pending
| Feature | Priority | Notes | Depends On |
|---|---|---|---|
| Containerization | P1 | No Dockerfile or deployment config | β |
| Production deployment | P1 | No hosting setup | Containerization |
| Semantic inventory search | P1 | BGE-M3 model registered (candidate), no wiring to search path | embeddings provider activation |
| HF Inference API provider | β Complete | providers/huggingface_provider.py β 26 tests cover init/complete/plan/retry/registry wiring |
β |
| Modal cloud GPU provider | P1 | Documented in MODEL_CATALOG, not implemented | β |
| Multi-retailer sources | P1 | Only Swiggy; no Blinkit, Zepto, DMart adapters | Source adapter pattern established |
| Receipt β purchase pipeline | P1 | OCR provider can extract text, no pipeline to create PurchaseEvent | OCR provider |
| Multi-user auth | P2 | user_id columns exist, no login/routing | β |
| Purchase cadence dashboard widget | P2 | detect_purchase_cadence exists, not wired to dashboard |
β |
| Waste prevention dashboard widget | P2 | detect_waste_patterns exists, not wired to dashboard |
β |
| Load testing / performance | P2 | No benchmark data yet | β |
| Demo data seed scripts | P2 | seed_demo_inventory exists; no walkthrough script | β |
| TTS provider (real) | P3 | MockTTSProvider only; kokoro-82m candidate | Model download |
| STT provider (high quality) | P3 | LocalWhisperProvider active (tiny); qwen3-asr-1.7b candidate | Model download |
| Image generation (item cards) | P3 | Flux.2-4b candidate only | Model download |
| Fine-tuned command parser | P4 | shopstack-parser-lora planned | Training data |
| Nutrition tracking | P4 | ItemCatalog.nutrition_reference exists in schema, no UI |
β |
| Weather/trip context | P4 | TripWeatherContext model exists, not used |
β |
| Detection events pipeline (vision) | P4 | DetectionEvent model, MockVisionProvider; no real model wired | Vision model |
| Segmentation (item cards) | P4 | RMBG-1.4 candidate; MockSegmentationProvider only | Model download |
Priority Summary
| Priority | Count | Key Items |
|---|---|---|
| P0 | 0 | (All critical features built) |
| P1 | 6 | Containerization, Deployment, Semantic search, HF provider, Modal provider, Multi-retailer sources, Receipt pipeline |
| P2 | 4 | Cadence widget, Waste widget, Load testing, Demo walkthrough |
| P3 | 4 | TTS, STT (high quality), Image gen, Full dashboard integration |
| P4 | 4 | Fine-tuned parser, Nutrition, Weather context, Detection pipeline |
Immediate Next Work (recommended):
- Fix test timeout β diagnose which test(s) hang, fix isolation
- Resolve supersession conflicts β
household.pyvsother.py,price.pyvsother.py - Wire semantic search β enable BGE-M3 for inventory prefix search fallback
- Add receipt scanning pipeline β connect OCR output β purchase creation
- Containerize app β add Dockerfile for deployment readiness
Status Update (2026-06-10) β Actual Codebase Reality vs Doc Claims
This section was added by an audit pass. See the parent conversation for full evidence.
Test Count
| Doc Claim | Actual |
|---|---|
| Doc Claim | Actual |
| ----------- | -------- |
| "375+" / "558+" / "619" / "974" / "2651" / "2898" / "2903" | 2906 tests collected (2026-06-14) |
π΄ NOT BUILT β Reclassified Items
Items marked NOT BUILT that are actually BUILT or PARTIAL:
| Doc Claim | Actual Status |
|---|---|
| Containerization P1: "No Dockerfile or deployment config" | β
BUILT β Dockerfile, docker-compose.yml, .dockerignore all exist and functional |
| Multi-retailer sources P1: "Only Swiggy; no Blinkit, Zepto, DMart adapters" | β
BUILT β All 3 adapters exist in shopstack/market/sources/ |
| HF Inference API provider: "Complete" | β Already marked correct in original |
| Purchase cadence dashboard widget P2: "not wired to dashboard" | β
WIRED β detect_purchase_cadence(db) is called in build_dashboard_state() |
| Waste prevention dashboard widget P2: "not wired to dashboard" | β
WIRED β detect_waste_patterns(db) is called in build_dashboard_state() |
| Demo data seed scripts P2: "no walkthrough script" | β
DONE β scripts/demo_walkthrough.py exists |
| Weather/trip context P4: "TripWeatherContext model exists, not used" | β
BUILT β shopstack/services/weather.py and trip_context.py are fully implemented and used in dashboard |
| Nutrition tracking P4: "no UI" | π‘ PARTIAL β shopstack/ui/screens/nutrition.py and shopstack/services/nutrition.py exist; enrichment may be pending |
| Receipt β purchase pipeline P1: "no pipeline to create PurchaseEvent" | β
BUILT β confirm_receipt() in receipt.py creates InventoryLot + PurchaseEvent + PriceObservation |
| Semantic inventory search P1: "not wired to search path" | π‘ PARTIAL β semantic_find_item tool exists in tools/registry.py; BGE-M3 activation pending |
Items Still Truly PENDING
| Feature | Priority | Status |
|---|---|---|
| Semantic search (BGE-M3 full wiring) | P1 | Tool exists but embeddings not fully activated |
| Modal cloud GPU provider | P1 | Not implemented |
| Multi-user auth | P2 | user_id columns exist, no login/routing |
| Dark mode | Phase 3 | Design tokens exist; no CSS toggle |
| Keyboard shortcuts | Phase 3 | Not implemented |
| WCAG 2.1 AA full audit | Phase 3 | Partial |
| Mobile capture PWA | Phase 3 | Not started |
| Offline backup/restore | Phase 3 | Not started |
| Nutrition enrichment / brand matching | Phase 4 | Screen exists; data enrichment pending |
| Fine-tuned command parser | Phase 4 | Needs dataset |
| Vision model integration | Phase 4 | Models registered but not wired |
| Community price map | Phase 4 | Not started |
| Load testing / performance | P2 | Benchmark files exist but not consistently run |
π‘ PARTIAL β Updated Reclassification
| Feature | Old Status | New Status | Notes |
|---|---|---|---|
| Benchmark tests | β οΈ May be stale | π‘ Partial | benchmarks/ exist; need to run for current baselines |
| Household map UI | π‘ Duplicate | β Resolved | Supersession resolved per ACCEPTANCE_CONTRACT |
| Price memory view | π‘ Duplicate | β Resolved | price.py is canonical; other.py is shim |
| Field notes screen | π‘ Duplicate | β Resolved | field_notes.py is canonical |
| Swiggy freshness labels | π‘ Verification | π‘ Ongoing | Labels exist; staleness logic in _freshness_for() in rules.py |