Skip to content

chore: background-launcher wrapper for run_debate_cycle() - #552

Open
essentialbit wants to merge 3 commits into
mainfrom
chore/debate-cycle-background-wrapper
Open

chore: background-launcher wrapper for run_debate_cycle()#552
essentialbit wants to merge 3 commits into
mainfrom
chore/debate-cycle-background-wrapper

Conversation

@essentialbit

Copy link
Copy Markdown
Owner

Summary

  • debate.run_debate_cycle() needs a >=300000ms Bash-tool timeout (Gemini-429/Ollama-fallback retry chains run long) -- documented in fredai.md and inlined in sensor-prompt.md, but forgotten 4 separate times, each silently backgrounding the call.
  • Adds scripts/run_debate_background.py: launches the cycle as a detached background process so the invoking Bash call returns in well under the 120s default regardless of whether a timeout param was set, logs to ~/.claude/fred-sensor/logs/debate_cycle_<ts>.log, and a --check <log> --wait N mode polls that log for the result.
  • Self-directed tooling (no consensus/outcome-recording needed for this class, same precedent as check_sensor_health.py/eligible_backlog.py/etc.) -- pure infrastructure fix for a documented recurring friction, not a debated feature.

Test plan

  • Ran the launcher live: returned in ~1s with a log path.
  • Ran --check <log> --wait 120 in a separate call: correctly polled and printed the completed run_debate_cycle() JSON result (issues_checked: 42, stances_posted: 0, errors: 0) once the background process finished.
  • python3 -c "from main import app" import check unaffected (no changes outside scripts/).

🤖 Generated with Claude Code

Saifodius and others added 3 commits August 2, 2026 00:45
The Bash tool call to run_debate_cycle() needs an explicit >=300000ms
timeout (Gemini-429/Ollama-fallback retries run long) -- forgotten 4
times despite being documented, silently backgrounding the call each
time. This launches the cycle detached so the invoking call returns
immediately regardless, with results read back via --check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant