MIKE-FIX-LLM-PRODUCTION-01: fix LLM key flow and model picker
From the PR description
What
Fixes all 10 bugs from QA Retest Cycle 3 (issue #188).
P0 - BUG-PROD-CRITICAL-001: PROD answer extraction returns numbers instead of text
- Added
extractProductionAnswer()- text-aware extraction with no number fallback - Added
modefield toLlmCallInputandRunQuestionParams - All 3 flow strategies pass
modethrough tollmCall() - Production engine passes
mode="production"to debate flow + SAS baseline - SAS baseline now uses
extractProductionAnswerinstead ofextractFinalAnswer
P1 - BUG-EXP-PROD-001: questionText empty in PROD JSON export
- Export endpoint now branches on
clashType(like the results endpoint) - Production clashes use
getProductionResults()instead ofgetBenchmarkResults()
P1 - BUG-DASH-001 regression: Dashboard "LOADING MISSION DATA..." on first nav
- Race
bootstrap()with 4s timeout soreadyalways resolves
P1 - DASH-04: TOKENS EXPENDED = "UNKNOWN"
- Added
totalTokensandtotalCostto/clashesAPI response - Dashboard aggregates client-side (same pattern as
bestAccuracy)
P1 - BUG-LIVE-001: Identical timestamps per question
- Added
onEventcallback toRunQuestionParams - All 3 flow strategies emit events in real-time as they happen
- Both engines pass
emitClashEventas the callback - Removed post-hoc event emission loops from engines
P1 - BUG-LIVE-022: No auto-redirect to AAR after completion
- 5-second delayed auto-redirect to
/operations/{id}/report
P2 - BUG-SET-001 + BUG-DET-002: Black screen on Pricing + Units pages
- Added inline style fallback for background/text color during CSS hydration
P2 - BUG-LIVE-016: "Q8/?" instead of "Q8/15"
- Extract
questionCountfrommission_startedevent - Also fetch
questionLimitfrom clash metadata
P2 - BUG-LIVE-017: Intel Feed no auto-scroll
- Use
requestAnimationFramefor DOM-accurate scroll timing
P2 - BUG-EXP-001: flow: null in JSON export
- Fixed by BUG-EXP-PROD-001 (export now uses correct results function per clashType)
Why
QA Retest Cycle 3 identified 10 bugs across PROD mode, dashboard, War Room live, and exports.
How to test
- PROD mode: Create a production operation → agents should return text answers, not numbers
- Dashboard: First navigation should load within 4s; TOKENS EXPENDED should show aggregated count
- War Room live: Events should have distinct timestamps; Q counter shows "Q1/15"; auto-scroll works; auto-redirects to AAR after 5s
- Export PROD JSON: questionText should be populated with the refined question
- Pricing/Units pages: No black screen on navigation
Risk/rollback
- Event emission moved from engines to flow strategies - if a flow doesn't emit correctly, events won't appear in War Room. All 3 flows updated + tested.
modedefaults to"benchmark"for backward compatibility - existing benchmark behavior unchanged.- Revert this PR to rollback all changes.
Our analysis
Stabilize production answers and live operations — read the full analysis →
Think the analysis missed something the PR description covers?
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-10.md from
inside the repo you want the changes in.