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
Analysis of the latest commit (8d77398) found 2 significant duplication patterns in the Go source files. Both are in the internal/server/ package and relate to MCP session handling.
Maintainability Risk: Medium — the same env-var key and default appear in two places; a future change to the default or key name must be applied in two spots.
Refactoring Priority: Medium
Next Steps
Review the two sub-issues for details.
Have transport.go call getRoutedSessionTimeout() (already defined in routed.go) instead of repeating the envutil.GetEnvDuration call.
Consider extracting a shared newStreamableHTTPHandler(logger, sessionTimeout, serverFactory) helper that encapsulates the sdk.NewStreamableHTTPHandler + WrapWithSessionAutoInit + wrapWithMiddleware chain.
Analysis Metadata
Analyzed Files: 107 non-test Go files changed in commit 8d77398
Summary
Analysis of the latest commit (
8d77398) found 2 significant duplication patterns in the Go source files. Both are in theinternal/server/package and relate to MCP session handling.Detected Patterns
Overall Impact
internal/server/transport.go,internal/server/routed.goNext Steps
transport.gocallgetRoutedSessionTimeout()(already defined inrouted.go) instead of repeating theenvutil.GetEnvDurationcall.newStreamableHTTPHandler(logger, sessionTimeout, serverFactory)helper that encapsulates thesdk.NewStreamableHTTPHandler+WrapWithSessionAutoInit+wrapWithMiddlewarechain.Analysis Metadata
8d773988d77398d5c51896b9ffa29be3d7bbc34f597a4f2