From 28df789745d924059b6157843e0a0fda4bfa6777 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Mar 2026 04:56:37 -0500 Subject: [PATCH] Fix runaway experiments: cap at 50 trials, fix DB permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bugs fixed: - Ratchet loop had no trial cap — experiment #1 ran 3762 trials unchecked. Now capped at max_trials=50 per start cycle. - meta_pipelines, meta_runs, self_reports tables had no GRANT for kbuser — fixed permissions for all tables and sequences. All 4 running experiments auto-paused on restart. Stress test confirms all tables accessible, all models responding, meta-pipeline creation working, self-report save/retrieve working. Co-Authored-By: Claude Opus 4.6 (1M context) --- llm_team_ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llm_team_ui.py b/llm_team_ui.py index db4ff0d..34f4b75 100644 --- a/llm_team_ui.py +++ b/llm_team_ui.py @@ -6339,8 +6339,9 @@ def _ratchet_loop(exp_id): # Pick meta-model (largest in pool) meta_model = models_pool[-1] if models_pool else "qwen2.5:latest" judge_model = models_pool[0] if models_pool else "llama3.2:latest" + max_trials = 50 # safety cap — prevents runaway experiments - while True: + while trial_num < max_trials: # Check if still running with get_db() as conn: with conn.cursor() as cur: