Skip to content

Update standalone-SSE test for filtered-tool error - #5958

Merged
JAORMX merged 1 commit into
mainfrom
fix-standalone-sse-filtered-tool-test
Jul 24, 2026
Merged

Update standalone-SSE test for filtered-tool error#5958
JAORMX merged 1 commit into
mainfrom
fix-standalone-sse-filtered-tool-test

Conversation

@JAORMX

@JAORMX JAORMX commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why: main's required Tests / Test Go Code check is currently red on every PR. TestStandaloneSSE_ListChangedRefiltersThroughExistingMiddleware (pkg/transport/proxy/streamable/dispatcher_standalone_sse_integration_test.go:468) asserts that a tools/call for a filtered tool returns HTTP 400 — but #5944 changed the tool-call filter to return a JSON-RPC error over HTTP 200 (a filtered tool is now indistinguishable from a nonexistent one). The test was added by #5934; #5934 and #5944 landed close together, so each was green in isolation but their combination is a semantic merge collision that leaves the unit-test suite deterministically failing on main.

What:

  • Update step (3) of the test to assert the current behavior: HTTP 200 with a JSON-RPC error body containing "tool not found". The tool is still blocked (never forwarded to the backend); only the response envelope changed.

Verified locally: the test failed deterministically before this change and passes after; task lint clean.

Type of change

  • Bug fix

Test plan

  • Unit tests — go test -race -run TestStandaloneSSE_ListChangedRefiltersThroughExistingMiddleware ./pkg/transport/proxy/streamable/ passes (failed before the change).
  • Linting — task lint 0 issues.

Does this introduce a user-facing change?

No. Test-only change aligning an assertion with the behavior shipped in #5944.

Special notes for reviewers

Generated with Claude Code

TestStandaloneSSE_ListChangedRefiltersThroughExistingMiddleware asserted
that a tools/call for a filtered tool returns HTTP 400. That is no longer
true: #5944 changed the tool-call filter to return a JSON-RPC error over
HTTP 200 (a filtered tool is now indistinguishable from a nonexistent
one). This test was added by #5934 and the two PRs landed close together,
so each was green in isolation but the combination left the Tests check
red on main (a semantic merge collision) — deterministically failing every
subsequent PR's required unit-test job.

Update step (3) to assert the current behavior: HTTP 200 with a JSON-RPC
error body ("tool not found"). The tool is still blocked (never forwarded);
only the response envelope changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Jul 24, 2026
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.83%. Comparing base (c007e6a) to head (c1eabb0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5958      +/-   ##
==========================================
+ Coverage   71.80%   71.83%   +0.03%     
==========================================
  Files         708      708              
  Lines       72767    72798      +31     
==========================================
+ Hits        52250    52296      +46     
+ Misses      16778    16764      -14     
+ Partials     3739     3738       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JAORMX
JAORMX merged commit 00b8159 into main Jul 24, 2026
59 of 60 checks passed
@JAORMX
JAORMX deleted the fix-standalone-sse-filtered-tool-test branch July 24, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants