cauldron/cauldron
Kayos 30928b482f sterilize: fix finalize WHERE — allow review→applying→done transitions
Bug: my anti-zombie guard from 4707e6a was too strict — WHERE clause
required state IN ('running','applying') to update. But the normal
flow goes running→review→applying→done. Once a job entered review,
NO state transition could fire — including the legitimate apply
sequence triggered by user clicking "apply selected".

Symptom Cobb hit: clicked apply on job 6, the daemon thread did the
work (11 of 13 proposals applied cleanly to Mealie), but the row
stayed at state='review' so the UI never moved off the review screen.
The 11 successful applies are real — Mealie has the updated
recipeIngredient food links. The bookkeeping just didn't follow.

Fix: change WHERE clause from a positive whitelist (running/applying)
to a negative blocklist (NOT IN done/failed/cancelled). This still
prevents the original failure mode (daemon overwriting a user-cancelled
job) — terminal states still can't be overwritten — but lets review
transition to applying when the user approves.

Same fix applied to finalize_consolidate_job since it copy-pasted the
same too-strict guard.
2026-04-30 17:55:13 -07:00
..
data v0.3 step 5: lean shopping list — claude on-demand foods + game strip 2026-04-29 22:02:20 -07:00
templates Step 3: foods consolidator — cluster + merge dupes via Mealie's API 2026-04-30 12:00:20 -07:00
__init__.py v0.1 — backend bones + ingredient sterilizer 2026-04-28 16:59:11 -07:00
aggregator.py Step 2: re-key cauldron's food metadata by mealie_food_id 2026-04-30 11:52:25 -07:00
bulk_sterilize.py sterilize bulk: respect external cancel mid-loop 2026-04-30 10:02:53 -07:00
config.py fix: split MEALIE_API_URL (internal) from MEALIE_PUBLIC_URL (UI link) 2026-04-28 20:26:25 -07:00
consolidate_foods.py Step 3: foods consolidator — cluster + merge dupes via Mealie's API 2026-04-30 12:00:20 -07:00
crypto.py v0.2 foundation — Authentik OIDC + sulkta-mariadb DB + Fernet crypto 2026-04-28 19:47:47 -07:00
db.py sterilize: fix finalize WHERE — allow review→applying→done transitions 2026-04-30 17:55:13 -07:00
foods.py Step 2: re-key cauldron's food metadata by mealie_food_id 2026-04-30 11:52:25 -07:00
forge.py Step 3: foods consolidator — cluster + merge dupes via Mealie's API 2026-04-30 12:00:20 -07:00
mealie.py Step 3: foods consolidator — cluster + merge dupes via Mealie's API 2026-04-30 12:00:20 -07:00
oidc.py v0.2 foundation — Authentik OIDC + sulkta-mariadb DB + Fernet crypto 2026-04-28 19:47:47 -07:00
recipe_index.py search: local fuzzy recipe index — way smarter than Mealie's lexical default 2026-04-28 21:37:12 -07:00
server.py Step 3: foods consolidator — cluster + merge dupes via Mealie's API 2026-04-30 12:00:20 -07:00
sterilizer.py sterilize hot-fixes: 300s timeout + defensive string→dict parsing 2026-04-30 12:41:58 -07:00