admin and Claude Sonnet 4.6
a03152e51a
fix: resolve ingredient names from Ingredient table in email template
...
recipe.ingredients JSONB has ingredient_id but no name field; preload
names in a single bulk query before the per-member loop so ing_rows,
shopping preview, and cost lookup all render real ingredient names.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-09 14:47:48 -07:00
admin and Claude Sonnet 4.6
0739a688dd
feat: enrich proposal email with ingredients, cost, shopping preview
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-09 13:40:05 -07:00
admin
aea47d8365
fix: escape member.name in step_email; add all-voted reminder test
2026-05-08 21:40:00 -07:00
admin and Claude Sonnet 4.6
3b28ad0e1c
fix: html-escape recipe/ingredient names in email templates (#P5-a, #P5-b)
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-08 21:37:19 -07:00
admin
9a484d39c3
feat: wire step_reminder into runner, admin, and scheduler (Fri 16:00 PT)
2026-05-08 21:29:53 -07:00
admin and Claude Sonnet 4.6
d002485c10
feat: step_reminder — 1-hour pre-deadline nudge for non-voters
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-08 18:00:16 -07:00
admin and Claude Sonnet 4.6
5a41402644
feat: wire SendGridEmailBackend with from_email/reply_to settings
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-08 12:12:05 -07:00
admin and Claude Sonnet 4.6
914fdbdb51
fix: close DB session in run_step finally block
...
Wraps the SessionLocal body in try/finally so db.close() is always
called, preventing connection leaks on exception. Updates the
test monkeypatch to use a no-op close() proxy so the transactional
fixture stays live after run_step returns.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-07 06:42:37 -07:00
admin and Claude Sonnet 4.6
e3ca8b7a96
feat: orchestrator runner — run_step / run_week per-family loop
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-07 06:40:36 -07:00
admin and Claude Sonnet 4.6
0a097da18e
feat: orchestrator step_generate
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-07 06:30:50 -07:00
admin and Claude Sonnet 4.6
b2cbdd1533
feat: orchestrator step_scrape with retry + stale-data fallback
...
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com >
2026-05-07 06:27:27 -07:00
admin
0135b74c03
feat: orchestrator package + alerts.send_admin_alert
2026-05-07 06:24:55 -07:00
admin and Claude Opus 4.7
5e0a49e4ae
feat: AM-1 swiftly_auth module — Firebase REST anon-signUp + process cache
...
Replaces the static SWIFTLY_BEARER_TOKEN env-var lookup with a JIT
mint via the Firebase Identity Toolkit signUp endpoint, gated by the
firebaseApiKey published in luckysupermarkets.com/config.json.
- get_token(): returns cached JWT if exp > now+300s, else mints
- mint_anonymous_token(): fetches API key, posts signUp with
Origin/Referer headers, validates iss + exp on the returned JWT
- SwiftlyAuthMintError surfaces verbatim to ScrapeLog.error_message
- Process-local cache only; threading.Lock around mutate
Tests: 4 unit tests covering fresh mint, cache hit, near-expiry
re-mint, and Firebase non-200. Full suite: 92/92 green.
Spec: docs/specs/2026-05-06-swiftly-token-auto-mint.md
Wiring into lucky_ca_scraper deferred to AM-2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-06 15:19:30 -07:00
admin
3f92e1f641
feat: planner orchestrator - load, filter, score, select, persist
2026-05-06 09:11:53 -07:00
admin
63e292a995
feat: planner top-K set enumeration with protein/cuisine diversity penalty
2026-05-06 06:48:26 -07:00
admin
77813cc7d3
feat: planner per-recipe scoring with 5 weighted signals
2026-05-06 06:44:58 -07:00
admin
95396137c6
feat: planner hard-constraint filter for the 6 spec constraints
2026-05-06 06:42:49 -07:00
admin
bf0a327561
feat: planner cost+savings estimator against ingredient_grocery_match
2026-05-06 06:40:33 -07:00
admin
c86321908c
feat: planner config (weights, thresholds, K) and shared types
2026-05-06 06:38:26 -07:00
admin
db4b01337e
feat: run matcher after successful scrape; failures don't flip scrape status
2026-05-06 06:21:54 -07:00
admin
6dfb84310f
feat: rapidfuzz-based ingredient<->grocery matcher with manual-pin preservation
2026-05-06 06:18:18 -07:00
admin and Claude Opus 4.7
8e89f793d5
feat: phase r1+r2 recovery + r3-0 swiftly api ingestion
...
R1 stabilization: pytest harness with transactional db fixture, smoke
+ alembic + auth + scrape + approval + swiftly tests, github actions
ci yaml. Bearer-token admin auth + signed-cookie session for family
ui mutations. Async POST /api/admin/scrape (BackgroundTasks, returns
202). Path canonicalization (no /list, /planned suffixes). DATABASE_URL
fail-fast on empty.
R2 deferred-risk spikes: live lucky california fetch (R2-A), full
email+per-voter approval click round trip with single-use enforcement
(R2-B, console email backend, sendgrid stub).
R3-0 phase 3 redesign: replaced playwright html scraper with requests
based swiftly json api client. 17 categories, ~10k products per scrape,
upsert by (source, external_id). 401 surfaces actionable token-refresh
message via ScrapeLog.error_message.
Pre-existing defects fixed: shopping_list.py syntax error blocking app
import, MealPlan.votes orphan relationship, JSONB(astext=True) invalid
kwarg, missing requests dep, calorie_target schema drift, every SQLEnum
needed values_callable, 0001 had empty downgrade(), seed had duplicate
ingredient rows.
Migrations added: 0003 grocery_item.description, 0004 family_profile.
calorie_target, 0005 grocery_item.external_id + source + composite index.
Verified: 31/31 pytest green, alembic upgrade->downgrade->upgrade clean,
frontend npm run build clean, live scrape 9,960 grocery_item rows in 36s.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-05 14:08:19 -07:00
admin
933a0cc9db
feat: implement Lucky California scraper with Playwright + BeautifulSoup
...
- Add BaseScraper with rate limiting, retries, session management
- Add LuckyCaliforniaScraper with Playwright for dynamic content
- Add ScraperService to save scraped items to grocery_item table
- Connect /api/admin/scrape to ScraperService
- Update ORIENTATION.md phase table
2026-05-04 20:50:27 -07:00