shopstack / Docs /FEATURES_STATUS.md
pranaysuyash's picture
Sync ShopStack 2026-06-15: corrections panel, empty-state rewrite, market-source suppression
8294cde verified
|
Raw
History Blame Contribute Delete
18 kB
# 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 -q` for 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):
1. **Fix test timeout** β€” diagnose which test(s) hang, fix isolation
2. **Resolve supersession conflicts** β€” `household.py` vs `other.py`, `price.py` vs `other.py`
3. **Wire semantic search** β€” enable BGE-M3 for inventory prefix search fallback
4. **Add receipt scanning pipeline** β€” connect OCR output β†’ purchase creation
5. **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` |