You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same change as gitmoot/gitmoot#2267, which applies to this copy of the client too: a 403 gets exactly one retry after 2 s, and a second 403, 401 or 422 fails as before. Test TestClientRetriesOneForbiddenOnly. Found when OpenRouter/TypeSafe returned a transient RBAC: access denied on 2026-09-26; during it, test-check advice exited 3.
Decision:approved Summary: Executed review at exact head 646e943 (diff 612ee14..646e943: internal/jev/client.go +19/-2, client_test.go +33). Change is correct: a 403 gets exactly one retry with a fixed 2s pause, gated by loop-local forbiddenRetried, and consumes the shared MaxRetries budget (DefaultMaxRetries=2 in production → fail closed after 2 attempts). Verified live: transient 403→200 succeeds on attempt 2; lasting 403 stops at 2 attempts even though a third budget slot exists; a second 403 after a 500 is still final; Retry-After on the 403 is overridden by the 2s wait per documented 'short pause' intent; MaxRetries=1 fits, MaxRetries=0 means no retry (consistent with an explicit no-retry opt-out, noted not defected). Non-APIError paths (encode, cancelled pace/sleep) still break immediately via errors.As guard; wait>maxBackoff cap and ctx cancellation during the forbidden sleep behave correctly. Prior verdicts cover PRs #1/#2/#4 only — none for PR #6.
Tests Run
CGO_ENABLED=0 go build ./... && CGO_ENABLED=0 go vet ./... — clean at head 646e943 (plain go build fails on sandboxed cgo headers /usr/include/stdc-predef.h: Permission denied; toolchain limitation, not the diff)
CGO_ENABLED=0 go test ./... — ok cmd/test-check 0.181s, internal/check 0.004s, internal/jev 0.007s, internal/prove 3.432s, internal/source 0.109s
CGO_ENABLED=0 go test -v -run 'TestClientRetriesOneForbiddenOnly|TestClientDoesNotRetryAuthFailureAndRedactsKey|TestClientRetriesServerErrorsThenSucceeds|TestClientCapsRetryAfterAtMaxBackoff' ./internal/jev/ — all 4 PASS
Throwaway probes in $TMPDIR/jevcheck copy: TestProbeForbiddenAfterServerError, TestProbeForbiddenIgnoresRetryAfter, TestProbeSecondForbiddenIsFinal, TestProbeForbiddenWithOneBudget, TestProbeForbiddenNoBudget — all 5 PASS (go test -count=1 -run TestProbe ./internal/jev/)
go test -race ./internal/jev/ — not runnable: race detector requires cgo, blocked by sandbox; acceptable since the change adds only loop-local state
Raw runtime output was retained in local Gitmoot state and is not posted here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same change as gitmoot/gitmoot#2267, which applies to this copy of the client too: a 403 gets exactly one retry after 2 s, and a second 403, 401 or 422 fails as before. Test
TestClientRetriesOneForbiddenOnly. Found when OpenRouter/TypeSafe returned a transientRBAC: access deniedon 2026-09-26; during it,test-checkadvice exited 3.