chore: dev-loop cleanup — go fmt and go mod tidy at 2026-05-14 22:53 UTC
CI / test (push) Successful in 17s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (push) Has been skipped
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (push) Has been skipped
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (push) Has been skipped
CI / test (push) Successful in 17s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (push) Has been skipped
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (push) Has been skipped
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (push) Has been skipped
This commit is contained in:
@@ -157,7 +157,6 @@ func TestFit_PreservesNoteInOutput(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestFit_HugeUserMeta(t *testing.T) {
|
func TestFit_HugeUserMeta(t *testing.T) {
|
||||||
// UserMeta so large that base alone exceeds limit
|
// UserMeta so large that base alone exceeds limit
|
||||||
// Use a unique marker past the truncation point
|
// Use a unique marker past the truncation point
|
||||||
|
|||||||
@@ -901,5 +901,3 @@ func shouldSkipStaleReview(evaluatedSHA, currentSHA string) bool {
|
|||||||
}
|
}
|
||||||
return evaluatedSHA != currentSHA
|
return evaluatedSHA != currentSHA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestValidateReviewerName(t *testing.T) {
|
func TestValidateReviewerName(t *testing.T) {
|
||||||
@@ -820,8 +819,8 @@ func TestExtractSentinelName_EdgeCases(t *testing.T) {
|
|||||||
{"<!-- review-bot:sonnet --> rest", "sonnet"},
|
{"<!-- review-bot:sonnet --> rest", "sonnet"},
|
||||||
{"<!-- review-bot:gpt-review --> rest", "gpt-review"},
|
{"<!-- review-bot:gpt-review --> rest", "gpt-review"},
|
||||||
{"no sentinel here", "unknown"},
|
{"no sentinel here", "unknown"},
|
||||||
{"<!-- review-bot:", "unknown"}, // prefix but no suffix
|
{"<!-- review-bot:", "unknown"}, // prefix but no suffix
|
||||||
{"prefix <!-- review-bot:abc --> end", "abc"}, // embedded in text
|
{"prefix <!-- review-bot:abc --> end", "abc"}, // embedded in text
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range tests {
|
for _, tc := range tests {
|
||||||
|
|||||||
@@ -971,6 +971,7 @@ func TestDoGet_RespectsContextCancellation(t *testing.T) {
|
|||||||
t.Errorf("attempts = %d, expected 1 before context cancel during backoff", attempts)
|
t.Errorf("attempts = %d, expected 1 before context cancel during backoff", attempts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// mockTransport is a test helper that returns errors for the first N calls,
|
// mockTransport is a test helper that returns errors for the first N calls,
|
||||||
// then delegates to a real server.
|
// then delegates to a real server.
|
||||||
type mockTransport struct {
|
type mockTransport struct {
|
||||||
|
|||||||
@@ -69,11 +69,11 @@ func TestIsBlockedIP(t *testing.T) {
|
|||||||
{"public 8.8.8.8", "8.8.8.8"},
|
{"public 8.8.8.8", "8.8.8.8"},
|
||||||
{"public 1.1.1.1", "1.1.1.1"},
|
{"public 1.1.1.1", "1.1.1.1"},
|
||||||
{"public 198.51.100.1", "198.51.100.1"}, // RFC5737 TEST-NET-2 — a documentation-only range;
|
{"public 198.51.100.1", "198.51.100.1"}, // RFC5737 TEST-NET-2 — a documentation-only range;
|
||||||
// not assigned to any real host, but intentionally left unblocked here because
|
// not assigned to any real host, but intentionally left unblocked here because
|
||||||
// it has no special routing treatment (unlike RFC1918/loopback/link-local) and
|
// it has no special routing treatment (unlike RFC1918/loopback/link-local) and
|
||||||
// blocking it would require tracking every RFC5737 range without meaningful
|
// blocking it would require tracking every RFC5737 range without meaningful
|
||||||
// security benefit (no server should ever listen on a TEST-NET address).
|
// security benefit (no server should ever listen on a TEST-NET address).
|
||||||
{"public 151.101.1.1", "151.101.1.1"}, // Fastly
|
{"public 151.101.1.1", "151.101.1.1"}, // Fastly
|
||||||
{"public IPv6 2001:4860:4860::8888", "2001:4860:4860::8888"}, // Google DNS
|
{"public IPv6 2001:4860:4860::8888", "2001:4860:4860::8888"}, // Google DNS
|
||||||
{"public IPv6 2606:4700:4700::1111", "2606:4700:4700::1111"}, // Cloudflare DNS
|
{"public IPv6 2606:4700:4700::1111", "2606:4700:4700::1111"}, // Cloudflare DNS
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -463,9 +463,9 @@ type ChangedFile struct {
|
|||||||
type ReviewComment struct {
|
type ReviewComment struct {
|
||||||
ID int64 `json:"id,omitempty"`
|
ID int64 `json:"id,omitempty"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Position int64 `json:"position,omitempty"` // GitHub diff hunk position
|
Position int64 `json:"position,omitempty"` // GitHub diff hunk position
|
||||||
Line int64 `json:"line,omitempty"` // GitHub absolute line number (alternative to position)
|
Line int64 `json:"line,omitempty"` // GitHub absolute line number (alternative to position)
|
||||||
Side string `json:"side,omitempty"` // "RIGHT" or "LEFT"
|
Side string `json:"side,omitempty"` // "RIGHT" or "LEFT"
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -207,11 +207,11 @@ func (c *Client) completeOpenAI(ctx context.Context, messages []Message) (string
|
|||||||
|
|
||||||
type anthropicRequest struct {
|
type anthropicRequest struct {
|
||||||
AnthropicVersion string `json:"anthropic_version,omitempty"`
|
AnthropicVersion string `json:"anthropic_version,omitempty"`
|
||||||
Model string `json:"model,omitempty"`
|
Model string `json:"model,omitempty"`
|
||||||
MaxTokens int `json:"max_tokens"`
|
MaxTokens int `json:"max_tokens"`
|
||||||
System string `json:"system,omitempty"`
|
System string `json:"system,omitempty"`
|
||||||
Messages []anthropicMsg `json:"messages"`
|
Messages []anthropicMsg `json:"messages"`
|
||||||
Temperature float64 `json:"temperature,omitempty"`
|
Temperature float64 `json:"temperature,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type anthropicMsg struct {
|
type anthropicMsg struct {
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ func TestWithTimeout(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestComplete_Anthropic_Success(t *testing.T) {
|
func TestComplete_Anthropic_Success(t *testing.T) {
|
||||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.URL.Path != "/messages" {
|
if r.URL.Path != "/messages" {
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ func TestCapitalizeFirst(t *testing.T) {
|
|||||||
{"HELLO", "HELLO"},
|
{"HELLO", "HELLO"},
|
||||||
{"a", "A"},
|
{"a", "A"},
|
||||||
{"", ""},
|
{"", ""},
|
||||||
{"日本語", "日本語"}, // Non-ASCII: Japanese doesn't have case
|
{"日本語", "日本語"}, // Non-ASCII: Japanese doesn't have case
|
||||||
{"über", "Über"}, // German umlaut
|
{"über", "Über"}, // German umlaut
|
||||||
{"élève", "Élève"}, // French accent
|
{"élève", "Élève"}, // French accent
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ func TestBuildUserPrompt_WithoutFileContext(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestBuildSystemBase(t *testing.T) {
|
func TestBuildSystemBase(t *testing.T) {
|
||||||
result := BuildSystemBase()
|
result := BuildSystemBase()
|
||||||
if result == "" {
|
if result == "" {
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import (
|
|||||||
|
|
||||||
func TestParsePersonaBytes(t *testing.T) {
|
func TestParsePersonaBytes(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
data string
|
data string
|
||||||
source string
|
source string
|
||||||
wantName string
|
wantName string
|
||||||
wantErr string
|
wantErr string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "valid yaml",
|
name: "valid yaml",
|
||||||
@@ -38,8 +38,8 @@ focus:
|
|||||||
wantErr: "parse",
|
wantErr: "parse",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "json format by extension",
|
name: "json format by extension",
|
||||||
data: `{"name": "jsontest", "identity": "json identity"}`,
|
data: `{"name": "jsontest", "identity": "json identity"}`,
|
||||||
source: "test.json",
|
source: "test.json",
|
||||||
wantName: "jsontest",
|
wantName: "jsontest",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user