feat(config): configurable agent preflight timeout#203
feat(config): configurable agent preflight timeout#203Mitch515 wants to merge 2 commits intosubsy:mainfrom
Conversation
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
@QMTCHL is attempting to deploy a commit to the plgeek Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe PR introduces a configurable preflight timeout feature throughout the system by adding a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Wizard as Setup Wizard
participant Config as StoredConfig
participant GetAgent as getAgent()
participant Command as Command (run/doctor)
participant Agent as Agent Preflight
User->>Wizard: Run setup wizard
Wizard->>User: Prompt for preflight timeout (ms)
User->>Wizard: Provide timeout value
Wizard->>Config: Save preflightTimeoutMs to StoredConfig
User->>Command: Execute command (run/doctor/create-prd)
Command->>GetAgent: Request agent
GetAgent->>Config: Load StoredConfig
GetAgent-->>Command: Return LoadedAgent {agent, storedConfig}
Command->>Agent: Call preflight with storedConfig.preflightTimeoutMs
Agent-->>Command: Return preflight result
Command->>User: Display result
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@Mitch515 Nice work....A few things I'd like addressed:
getAgent() was a clean function that returned an agent. Bundling storedConfig into its return type makes it responsible for two things. Since loadStoredConfig is already imported in create-prd.tsx, just call it directly in runChatMode() - same as doctor.ts and run.tsx already do. This keeps getAgent() single-purpose and avoids the new interface entirely.
preflightTimeoutMs: z.number().int().min(0).optional(), iterationDelay has .max(300000). This field should have .max(3600000) (matching the wizard's cap) to prevent nonsensical values from hand-edited config files.
Most users won't need to change this - the 30s default works for nearly all agents. Adding another numeric prompt increases setup friction for everyone to solve a niche problem. Instead, drop it from the wizard and leave it as an advanced option users can set manually in config.toml. The fallback of ?? 30000 at each call site already handles the undefined case cleanly. Cheers! |
|
@Mitch515 is this still an issue on later versions of ralph-tui ? I implemented some other fixes in recent versions that should have addressed the underlying issue. |
Adds StoredConfig.preflightTimeoutMs (ms, 0 = no timeout) and uses it for agent preflight checks in setup, doctor, run --verify, and create-prd --chat. This prevents slow/large models from failing verification due to the previous hardcoded 30s timeout.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.