mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(git): scope fetches, dedicate a git thread pool, raise network timeout + instrument
The panel dev's commit/open_pr verbs timed out. Verified it is NOT chown (node_modules is agent-owned, the walk is sub-second) and the commit even landed locally; the branch never reached origin. The bottleneck is the server-side verb path under concurrent load — git status (a 0.044s op) also timed out, which only happens when the path AROUND git is slow. Defensible fixes + instrumentation to confirm under load: - Scope every all-refs 'git fetch origin' to just the refs the path needs (base/default/branch). An all-refs fetch on a monorepo with dozens of branches is pure network cost on every branch creation/checkout. - Run git subprocesses + the ownership repair in a dedicated bounded thread pool so concurrent agents don't queue behind / starve the event loop's shared default executor. - Give fetch/pull/push a dedicated git_network_timeout_seconds (120s) instead of the 30s local-op default — a push on a large private monorepo can legitimately exceed it. - Log any git subprocess or chown slower than 1s so the next run pinpoints where the time goes (op vs ownership repair) instead of guessing.
This commit is contained in:
@@ -267,6 +267,17 @@ class Settings(BaseSettings):
|
||||
"tree, so the commit choreography uses this longer budget."
|
||||
),
|
||||
)
|
||||
git_network_timeout_seconds: int = Field(
|
||||
default=120,
|
||||
ge=30,
|
||||
description=(
|
||||
"Timeout in seconds for git ops that talk to origin (fetch / pull "
|
||||
"/ push). A push or fetch on a large private monorepo from a "
|
||||
"self-hosted runner can far exceed the sub-second local-op "
|
||||
"default; short-budgeting it is what made open_pr time out before "
|
||||
"the branch reached the remote."
|
||||
),
|
||||
)
|
||||
|
||||
# ==========================================================================
|
||||
# Agent Guardrails (per-session budgets, loop detection, SLAs)
|
||||
|
||||
Reference in New Issue
Block a user