Public Access
docs: Sprint 16 — fix kimi-k2.6:cloud latent bug across all 6 running docs
Sprint 16 (commit 25e29c7) is a 2-line fix that switches
OLLAMA_MODEL from kimi-k2.6:cloud to gpt-oss:20b and bumps
max_tokens from 800 to 4000. The Sprint 13 LLM endpoint has
returned picked_count=0 silently since 2026-06-05 because
kimi-k2.6 is a reasoning model that burns the token budget
on internal reasoning and never produces the JSON answer.
The library fill (Sprint 6+) silently took over. Discovered
while answering the user's "is there anything else to refine?"
question.
Live verification: 5/5 test weeks return picked_count 15-21
(was 0/5 before). 11/11 vitest cases pass (4 new from S16 +
7 from S14). npm run build green. No new runtime deps. No
schema change. No UI change.
This commit updates the 6 running docs that track sprints:
- .agent/plan.md — Sprint 16 section (S16.1-S16.4 + Done
when + Out of scope) added after the Sprint 15 sections.
Documents the diagnosis (kimi-k2.6 reasoning model), the
fix (gpt-oss:20b + max_tokens=4000), the 4-case Vitest
contract test, and the live verification commands.
- .agent/context.md — Sprint 16 decisions (D1-D5), open Q1,
and file:line references added.
- Review/sprint16-verification.md — NEW: full diagnosis +
2-line fix + 4-test contract + live verification (5/5
test weeks return picks, table) + 5-risk table + 4
follow-up tickets.
- Review/ui-nielsen-audit.md — Sprint 16 status block added
after the Sprint 15 Round 3 block.
- fix-ui-audit.md — Sprint 16 section (T9.1-T9.5) added
after the Sprint 15 section. T9.1 documents the 2-line
fix in detail (config.py + llm_plan.py + .env). T9.5
surfaces 3 follow-up tickets.
- Review/handoff-ui-audit.md — Batch L line in the deploy
list, Sprint 16 section after the Sprint 15 section, TL;DR
Sprint 16 line, Last-updated footer updated.
- docs/HANDOFF.md — Sprint 16 section after Sprint 15, Last-
updated footer updated. Notes the corrected model choice
and the 4 follow-up tickets.
All 6 docs now reflect Sprint 16. The Sprint 13 LLM endpoint
now works as designed. Every future "Ask the LLM" click
will actually use the LLM to pick meals from the 77-recipe
library (was silently using the library fill instead). The
_ask_llm helper is still the single F9-full seam.
This commit is contained in:
+20
-1
@@ -302,7 +302,7 @@ Trust the tests. Trust the live runs. Don't trust prose claims that something is
|
||||
**Current open proposals:**
|
||||
- `docs/proposals/2026-05-23-feedback-driven-recipe-discovery.md` — pending user approval. No code yet (per the 2026-05-23 section below).
|
||||
|
||||
**Last updated: 2026-06-07** — UI/UX audit & fix cycle (Sprints 1, 2, 3, 4, 5, 6, 7, 8, 9) complete. 20 findings closed (5 P0 + 6 P1 + 3 P2 + 6 §Future), code committed across 13 commits, build green. Sprint 1 deployed; Sprints 2-9 awaiting deploy. **Sprint 7 (`09c7525`, awaiting user deploy)** aligns "this week" to the upcoming Monday. **Sprint 8 (`efd1fc6`, awaiting user deploy)** implements the user's "Deny" semantics decision. **Sprint 9 (committed 2026-06-05, awaiting user deploy)** ships the F1 Onboarding Tour. **Sprint 10 (committed 2026-06-05, awaiting user deploy)** ships the "Deny Forever" on Recipes. **Sprint 11 (committed 2026-06-05, awaiting user deploy)** wires the dead "Generate Meal Plan" CTA. **Sprint 12 (committed 2026-06-05, awaiting user deploy)** ships the F8 Spoonacular search. **Sprint 13 (committed 2026-06-05, awaiting user deploy)** ships the F9-lite Ollama Cloud plan synthesis. **Sprint 14 (committed 2026-06-05, awaiting user push)** ships Vitest for `useOnboarding` (Q4) — 7/7 tests green. **Sprint 15 (committed 2026-06-06, awaiting user push)** seeds 18 family-friendly recipes (free-tier 50-pt cap hit; 32 more to seed on later days) and fixes the Sprint 12 latent-bug (`main.py` mount order). **Sprint 15 Round 2 (committed 2026-06-07, awaiting user push)** +18 recipes via `scripts/seed_recipes_round2.py`; library at 67 total. **Sprint 15 Round 3 (committed 2026-06-07, awaiting user push)** +10 recipes via re-running `scripts/seed_recipes.py`; library at 77 total — well past the 4-week coverage threshold. See Sprint 7 + Sprint 8 + Sprint 9 + Sprint 10 + Sprint 11 + Sprint 12 + Sprint 13 + Sprint 14 + Sprint 15 sections below. Full UI-audit handoff at `Review/handoff-ui-audit.md`.
|
||||
**Last updated: 2026-06-08** — UI/UX audit & fix cycle (Sprints 1, 2, 3, 4, 5, 6, 7, 8, 9) complete. 20 findings closed (5 P0 + 6 P1 + 3 P2 + 6 §Future), code committed across 13 commits, build green. Sprint 1 deployed; Sprints 2-9 awaiting deploy. **Sprint 7 (`09c7525`, awaiting user deploy)** aligns "this week" to the upcoming Monday. **Sprint 8 (`efd1fc6`, awaiting user deploy)** implements the user's "Deny" semantics decision. **Sprint 9 (committed 2026-06-05, awaiting user deploy)** ships the F1 Onboarding Tour. **Sprint 10 (committed 2026-06-05, awaiting user deploy)** ships the "Deny Forever" on Recipes. **Sprint 11 (committed 2026-06-05, awaiting user deploy)** wires the dead "Generate Meal Plan" CTA. **Sprint 12 (committed 2026-06-05, awaiting user deploy)** ships the F8 Spoonacular search. **Sprint 13 (committed 2026-06-05, awaiting user deploy)** ships the F9-lite Ollama Cloud plan synthesis. **Sprint 14 (committed 2026-06-05, awaiting user push)** ships Vitest for `useOnboarding` (Q4) — 7/7 tests green. **Sprint 15 (committed 2026-06-06, awaiting user push)** seeds 18 family-friendly recipes and fixes the Sprint 12 latent-bug (`main.py` mount order). **Sprint 15 Round 2 (committed 2026-06-07, awaiting user push)** +18 recipes; library at 67 total. **Sprint 15 Round 3 (committed 2026-06-07, awaiting user push)** +10 recipes; library at 77 total. **Sprint 16 (code complete 2026-06-08, awaiting user commit + push)** switches `OLLAMA_MODEL` from `kimi-k2.6:cloud` to `gpt-oss:20b` + bumps `max_tokens` to 4000; 11/11 tests green; live 5/5 test weeks return `picked_count` 15-21 (was 0/5 before). See Sprint 7 + Sprint 8 + Sprint 9 + Sprint 10 + Sprint 11 + Sprint 12 + Sprint 13 + Sprint 14 + Sprint 15 + Sprint 16 sections below. Full UI-audit handoff at `Review/handoff-ui-audit.md`.
|
||||
|
||||
---
|
||||
|
||||
@@ -482,6 +482,25 @@ Trust the tests. Trust the live runs. Don't trust prose claims that something is
|
||||
|
||||
**Sprint 15 Round 3 (2026-06-07):** +10 recipes via re-running `scripts/seed_recipes.py` (idempotent — 37 duplicates skipped). Library at 77 total. Imports: 2 Asian leftovers (Pho With Zucchini Noodles, Kung Pao Chicken With Peanuts) + 8 American comfort dishes (Superbowl Chili, Veggie Meatloaf, Crab Mac and Cheese, BBQ Chicken, Classic Pot Roast, Lean Shepherd's Pie, Amazing Chicken Pot Pie, Slow Cooker Beef Stew). LLM test for week 2026-08-03: `picked_count=0 / filled_count=21 / failed_count=0`. **Library well past the 4-week coverage threshold (77 unique vs 84 picks needed).** Tracking: appended to `Review/sprint15-verification.md`.
|
||||
|
||||
### Sprint 16 — Fix Sprint 13 LLM-model latent bug (user-driven) — CODE COMPLETE 2026-06-08
|
||||
|
||||
**Triggered by:** user asked "is there anything else to refine?" While digging into the LLM endpoint, I discovered that every `/api/llm/plan` call has returned `picked_count=0` since 2026-06-05 because `kimi-k2.6:cloud` is a reasoning model that burns the entire `max_tokens=800` budget on internal `reasoning` and never produces the JSON answer. The library fill (Sprint 6+) silently took over every call. Every "Ask the LLM" click paid Ollama costs for nothing.
|
||||
|
||||
**Scope (3 boxes):**
|
||||
1. **`backend/app/config.py:38`** — `OLLAMA_MODEL: str = "gpt-oss:20b"` (was `"kimi-k2.6:cloud"`). gpt-oss:20b is OpenAI's open-source 20B non-reasoning model available on Ollama Cloud. Same `chat/completions` endpoint, same `messages` format, no API change needed.
|
||||
2. **`backend/app/api/llm_plan.py:117`** — `max_tokens: 4000` (was 800). 21 picks × ~100 chars + reasoning + boilerplate ≈ 2100+ chars. 4000 gives 2x headroom.
|
||||
3. **`backend/.env`** (or `docker-compose` env) — `OLLAMA_MODEL=gpt-oss:20b`. Pydantic settings read env first; the `.env` change is what actually fixed the running container.
|
||||
|
||||
Plus `frontend/src/api/llm.test.ts` (NEW, 4 cases) — Vitest contract test on the LLM response shape. Locks `plan_id` (UUID), counts (non-negative integers summing to ≤ 21), and `reasoning` (string|null).
|
||||
|
||||
**No pre-existing WIP files touched.** No new runtime dependencies. No schema change. No UI change.
|
||||
|
||||
**Live verification:** 5/5 test weeks return `picked_count` 15-21 (was 0/5 before). The 5 test weeks were 2026-10-21 through 2026-10-25, prompt "Italian vegetarian, 30 min". The library fill still supplements slots the LLM omits (per the "OMIT" instruction in the prompt), but the LLM is now doing the work it was designed to do.
|
||||
|
||||
**§Future backlog status after Sprint 16:** F1 ✓, F8 ✓, F9-lite ✓, Q4 ✓. Only F9-full (local Ollama model pull) remains — opt-in based on cloud-billing feedback. The `_ask_llm` helper is still the single seam: F9-full only needs to swap the URL + model name.
|
||||
|
||||
**Tracking docs:** `Review/sprint16-verification.md` (full diagnosis + 2-line fix + 4-test contract + live verification + 5-risk table + 4 follow-up tickets), `Review/ui-nielsen-audit.md` Sprint 16 status block, `fix-ui-audit.md` T9.1-T9.5, `Review/handoff-ui-audit.md` Sprint 16 section + Batch L, this file.
|
||||
|
||||
---
|
||||
|
||||
## New session: 2026-06-05 (early)
|
||||
|
||||
Reference in New Issue
Block a user