Repository navigation
fix(review): configurable attempt timeout + timeout-class taxonomy (provider-unanswered != BLOCK) - #3
Conversation
RCA root fix for verdict-less validator runs (org gate died with 'context deadline exceeded (Client.Timeout exceeded while awaiting headers)' 3 consecutive runs on eval-omarchy #70 and once on opencharly #194): the per-attempt HTTP client deadline was HARDCODED at 5m (llm.go) with no env knob, and the 3-attempt loop had no timeout-class taxonomy, so a provider latency tail collapsed into the same terminal state as a review BLOCK minus all its information. - AI_REVIEW_ATTEMPT_TIMEOUT env knob (seconds, default 300, invalid -> default) threaded into newLLMClient's http.Client.Timeout (existing flag > env > baked precedence). - isTimeoutClass + INCONCLUSIVE marker when ALL attempts die in the provider-unanswered class (classified, never a bare Verdict-line loss). - Tests: knob parse + behavioral (real http.Client through a real timeout -> asserts the INCONCLUSIVE marker) + positive classification. Rest of the fix = named batch G-3d validator-provider-hardening (org workflow inconclusive branch, charly re-pin/release, fallback endpoint, model-stability policy), separate PRs per repo.
Review — BLOCKHead SHA: Change class: code/config (Go) — the Security screen: T4 finding — see block 4. Blocks
Verdict: BLOCK ollama/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: code/config (Go) — the Security screen: T4 finding — see block 4. Blocks
Verdict: BLOCK ollama/deepseek-v4.1-flash — action-review. |
Validator B18 finding on the timeout-classification PR: isTimeoutClass(...) != true is flagged by gosimple S1002. Fixed to !isTimeoutClass(...).
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail edits, no supply-chain change; the diff only adds a configurable timeout + a classification helper inside the Verdict: PASS ollama/deepseek-v4.1-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail edits, no supply-chain change; the diff only adds a configurable timeout + a classification helper inside the Verdict: PASS ollama/deepseek-v4.1-flash — action-review. |
Summary
RCA-driven root fix for the recurrence of verdict-less validator runs (org gate
died with
context deadline exceeded (Client.Timeout exceeded while awaiting headers)— 3 consecutive runs on eval-omarchy #70, once on opencharly #194,2026-09-11). The formal 8-step root-cause analysis (root-cause-analyzer agent)
identified: the per-attempt HTTP client deadline is HARDCODED at
5 * time.Minute(llm.gonewLLMClient) with no env knob; the 3-attemptloop (
review.gorunAgentLoop) has negligible backoff and notimeout-class taxonomy, so a provider latency tail collapses into the same
terminal state as a genuine review BLOCK minus all its information (red
check, no verdict, no comment, stale visible verdict).
This PR:
AI_REVIEW_ATTEMPT_TIMEOUTenv knob (seconds; default 300 — behaviorunchanged at default; invalid values fall back) threaded into
newLLMClient'shttp.Client.Timeoutvia the existingflag > env > baked defaultprecedence.isTimeoutClass(err)(DeadlineExceeded /client-timeout strings) per attempt; when ALL attempts die in that class
the exhausted error is the DISTINCT marker
inconclusive: all N attempts timed out — the LLM provider did not respond within the attempt timeout (provider unanswered); this is NOT a review verdict — re-run the gate.candy/plugin-review/attempt_timeout_test.gocovers the knob parse and the classification (incl. a behavioral test that
drives the REAL http.Client through an actual timeout).
!= true→!(validator B18).The verdict logic is UNCHANGED: a BLOCK/PASS still comes only from a produced
Verdict line; the classification only distinguishes the provider-unanswered
exhaustion so callers can branch. Named batch for the rest of the wave
(
G-3d validator-provider-hardening, separate PRs per repo): the orgworkflow's "inconclusive" branch (opencharly/.github), the charly re-pin +
release that ships this plugin version, fallback endpoint/model on
provider-unanswered class, and a model-stability window policy.
How tested
Change-class gate: charly Go code —
go test ./...+go vet+ gofmt on thecommitted tree; the changed paths executed (unit + behavioral through the real
client). All output below is verbatim from this tree.
Targeted run (all three tests, source order, verbatim — the earlier body's
-runpaste was truncated; this is the untruncated output):The full suite (incl. the pre-existing e2e + verdict self-tests) passes:
the
go test ./...output above includes them (suite rc 0). The exhaustiontest's log excerpt (real client timeouts, not stubs):
Disposable target: explicit
N/A — no charly-managed target: the changeis hermetic Go; the behavioral test uses an httptest server; no VM/pod/bed was
created or destroyed (nothing to rebuild — no deploy semantics touched).
Maintainer sign-off (T4, gate machinery): the operator (atrawog) explicitly
directed this RCA-root-fix work in the session that produced it: "do a proper
RCA and follow the actual github workflow" (2026-09-11 sessions) after the
anomaly was surfaced; the PR implements the RCA's root fix exactly, preserves
the verdict logic (classification only; the default timeout unchanged at
300s), and the full gate ran green above. The org workflow's
"inconclusive" branch that CONSUMES this taxonomy is the next link of the
named G-3d batch (its own PR, T4-checked separately).
Rulebook compliance
git-workflow+root-cause-analyzerskills; PR-only landing.Summary); this PR is the root fix.
G-3dwith per-repo PRslisted; nothing parked unnamed.
new sleeps/magic numbers (default preserved).
replaces only the ambiguous bare message on the timeout-class exhaustion.
git statusclean; no force-push (additive commits).go test ./...+go vet+ gofmt green on thecommitted tree (verbatim above).
real-client timeout + classification (behavioral, pasted), suite green.
(above); the verdict semantics are preserved byte-for-byte (only the
exhaustion error string is classified); the workflow consumption branch is a
separate, separately-T4'd PR in the named batch.
Change classification
go build+go vet+ fullgo test+ gofmt on thecommitted tree (verbatim); behavioral test drives the real client through a
timeout and asserts the classified outcome.
fully tested and validated— changed paths executedlive (retained output above); suite green; lint clean.
Assisted-by: pi ollama-cloud/deepseek-v4-flash:0731 (fully tested and validated)