From 38774b5547ac84d334e35a12ae88b4f5bed2ac28 Mon Sep 17 00:00:00 2001 From: Patel230 Date: Tue, 9 Jun 2026 11:54:51 +0530 Subject: [PATCH] fix: reconcile CHANGELOG + pin gofumpt v0.10.0 for release readiness Production-readiness fixes: - CHANGELOG: removed the untagged [0.2.1] heading (no such tag) and moved its entries under [Unreleased] in descending order; only v0.1.0 is released. - CI: pinned gofumpt v0.7.0 -> v0.10.0 and reformatted client/callbacks.go, client/moderation_test.go, client/tracing.go. - CI: unified divergent actions/checkout SHAs. Verified: go build/vet/test pass; gofumpt v0.10.0 clean; golangci-lint 0 issues. --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 30 ++++++++++++------------------ client/callbacks.go | 3 ++- client/moderation_test.go | 27 ++++++++++++++++++--------- client/tracing.go | 6 ++++-- 5 files changed, 38 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 865cf59..e7c34c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: cache: true - name: gofumpt run: | - go install mvdan.cc/gofumpt@v0.7.0 + go install mvdan.cc/gofumpt@v0.10.0 out=$(gofumpt -l .) if [ -n "$out" ]; then echo "::error::gofumpt would reformat:" @@ -209,7 +209,7 @@ jobs: name: duplication runs-on: ubuntu-latest steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: '24' diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f64e4..71c289b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,24 +5,6 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · Versioning: --- -## [0.2.1](https://github.com/GrayCodeAI/eyrie/compare/v0.1.0...v0.2.1) (2026-05-16) - - -### Bug Fixes - -* flaky test TestOpenAIStreamChat_MultipleToolCalls order assertion ([f5e7f3b](https://github.com/GrayCodeAI/eyrie/commit/f5e7f3b21d092886971b092027a8184c6fd8a385)) -* gofumpt formatting ([7de54e3](https://github.com/GrayCodeAI/eyrie/commit/7de54e352170e456bbfe9bfee9b79e244210db72)) -* gofumpt formatting + go mod tidy ([8bd58dc](https://github.com/GrayCodeAI/eyrie/commit/8bd58dcea346eb9df8d13d9020d936df2ceba1b5)) -* remaining errcheck issues ([a0a746a](https://github.com/GrayCodeAI/eyrie/commit/a0a746aa95cd9acdf5d29ef836985e13ab864ba1)) -* resolve all lint errors (bodyclose, errcheck, gocritic, noctx, unlambda) ([566980f](https://github.com/GrayCodeAI/eyrie/commit/566980f39bdd7ebba072ce4c17bc19bc0f3cf2a0)) -* syntax errors in test files ([51809bc](https://github.com/GrayCodeAI/eyrie/commit/51809bcb181a27eb344a1493501f59c593b3065b)) -* upgrade Go from 1.26.1 to 1.26.3 to patch stdlib vulnerabilities ([f4a6594](https://github.com/GrayCodeAI/eyrie/commit/f4a65944a6f777947071c9b870a6f2c4f74891be)) - - -### Tests - -* fix flaky TestBackoffDelay by accounting for jitter ([5fa573f](https://github.com/GrayCodeAI/eyrie/commit/5fa573fe3ec8074a84bf81d10ea59837bf40b7bc)) - ## [Unreleased] ### Added — Round 3 ecosystem improvements (2026-06-06) @@ -93,6 +75,18 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · Versioning: GitHub Security Advisories, questions to Discussions, blocks blank issues. +### Fixed (2026-05-16) +- Flaky test `TestOpenAIStreamChat_MultipleToolCalls` order assertion ([f5e7f3b](https://github.com/GrayCodeAI/eyrie/commit/f5e7f3b21d092886971b092027a8184c6fd8a385)) +- gofumpt formatting ([7de54e3](https://github.com/GrayCodeAI/eyrie/commit/7de54e352170e456bbfe9bfee9b79e244210db72)) +- gofumpt formatting + `go mod tidy` ([8bd58dc](https://github.com/GrayCodeAI/eyrie/commit/8bd58dcea346eb9df8d13d9020d936df2ceba1b5)) +- Remaining errcheck issues ([a0a746a](https://github.com/GrayCodeAI/eyrie/commit/a0a746aa95cd9acdf5d29ef836985e13ab864ba1)) +- Resolve all lint errors (bodyclose, errcheck, gocritic, noctx, unlambda) ([566980f](https://github.com/GrayCodeAI/eyrie/commit/566980f39bdd7ebba072ce4c17bc19bc0f3cf2a0)) +- Syntax errors in test files ([51809bc](https://github.com/GrayCodeAI/eyrie/commit/51809bcb181a27eb344a1493501f59c593b3065b)) +- Upgrade Go from 1.26.1 to 1.26.3 to patch stdlib vulnerabilities ([f4a6594](https://github.com/GrayCodeAI/eyrie/commit/f4a65944a6f777947071c9b870a6f2c4f74891be)) + +### Tests (2026-05-16) +- Fix flaky `TestBackoffDelay` by accounting for jitter ([5fa573f](https://github.com/GrayCodeAI/eyrie/commit/5fa573fe3ec8074a84bf81d10ea59837bf40b7bc)) + ## [0.1.0] — 2026-05-12 > Initial release. diff --git a/client/callbacks.go b/client/callbacks.go index 131e03a..25e78cf 100644 --- a/client/callbacks.go +++ b/client/callbacks.go @@ -229,7 +229,8 @@ func (cp *CallbackProvider) safeCall(method string, fn func()) { logger := cp.logger cp.mu.RUnlock() if logger != nil { - logger.Error("eyrie: callback panic recovered", + logger.Error( + "eyrie: callback panic recovered", "method", method, "provider", cp.inner.Name(), "panic", r, diff --git a/client/moderation_test.go b/client/moderation_test.go index 0bc0034..66f7ba2 100644 --- a/client/moderation_test.go +++ b/client/moderation_test.go @@ -9,7 +9,8 @@ import ( func TestModerationProvider_AllowsSafe(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithBlockedPatterns([]string{"(?i)forbidden"}), WithModerationMaxTokens(1000), ) @@ -29,7 +30,8 @@ func TestModerationProvider_AllowsSafe(t *testing.T) { func TestModerationProvider_BlocksPattern(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithBlockedPatterns([]string{`(?i)\bforbidden\b`}), ) @@ -48,7 +50,8 @@ func TestModerationProvider_BlocksPattern(t *testing.T) { func TestModerationProvider_TokenLimit(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithModerationMaxTokens(5), ) @@ -68,7 +71,8 @@ func TestModerationProvider_TokenLimit(t *testing.T) { func TestModerationProvider_TokenLimitAllowsUnderLimit(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithModerationMaxTokens(100), ) @@ -84,7 +88,8 @@ func TestModerationProvider_TokenLimitAllowsUnderLimit(t *testing.T) { func TestModerationProvider_CustomChecker(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithCustomChecker(func(text string) error { if strings.Contains(strings.ToLower(text), "banned") { return errors.New("custom rule: banned word detected") @@ -108,7 +113,8 @@ func TestModerationProvider_CustomChecker(t *testing.T) { func TestModerationProvider_CustomCheckerAllows(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithCustomChecker(func(text string) error { return nil }), @@ -123,7 +129,8 @@ func TestModerationProvider_CustomCheckerAllows(t *testing.T) { func TestModerationProvider_StreamChat(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithBlockedPatterns([]string{`(?i)forbidden`}), WithModerationMaxTokens(1000), ) @@ -152,7 +159,8 @@ func TestModerationProvider_StreamChat(t *testing.T) { func TestModerationProvider_StreamChatBlocked(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithBlockedPatterns([]string{`(?i)forbidden`}), ) @@ -168,7 +176,8 @@ func TestModerationProvider_StreamChatBlocked(t *testing.T) { func TestModerationProvider_ContentParts(t *testing.T) { mock := NewMockProvider(MockModeEcho) - mp := NewModerationProvider(mock, + mp := NewModerationProvider( + mock, WithBlockedPatterns([]string{`(?i)secret`}), ) diff --git a/client/tracing.go b/client/tracing.go index 4806f2e..132ad57 100644 --- a/client/tracing.go +++ b/client/tracing.go @@ -31,7 +31,8 @@ func (tp *TracingProvider) Ping(ctx context.Context) error { } func (tp *TracingProvider) Chat(ctx context.Context, messages []EyrieMessage, opts ChatOptions) (*EyrieResponse, error) { - ctx, span := clientTracer.Start(ctx, "provider.Chat", + ctx, span := clientTracer.Start( + ctx, "provider.Chat", trace.WithSpanKind(trace.SpanKindClient), trace.WithAttributes( attribute.String("provider.name", tp.inner.Name()), @@ -67,7 +68,8 @@ func (tp *TracingProvider) Chat(ctx context.Context, messages []EyrieMessage, op } func (tp *TracingProvider) StreamChat(ctx context.Context, messages []EyrieMessage, opts ChatOptions) (*StreamResult, error) { - ctx, span := clientTracer.Start(ctx, "provider.StreamChat", + ctx, span := clientTracer.Start( + ctx, "provider.StreamChat", trace.WithSpanKind(trace.SpanKindClient), trace.WithAttributes( attribute.String("provider.name", tp.inner.Name()),