Skip to content

fix: MCP validation bugs, panic elimination, and code quality improvements#14

Merged
josephgoksu merged 9 commits intomainfrom
fix/mcp-validation-bugs-and-code-quality
Jan 25, 2026
Merged

fix: MCP validation bugs, panic elimination, and code quality improvements#14
josephgoksu merged 9 commits intomainfrom
fix/mcp-validation-bugs-and-code-quality

Conversation

@josephgoksu
Copy link
Owner

Summary

  • Fix MCP validation-bypass bug: handleTaskNext was validating trimmed sessionID but passing untrimmed params.SessionID to API
  • Add session_id validation: Task next and current actions now validate session_id is required
  • Eliminate panic-on-error: Refactored config/paths.go to return errors instead of panicking
  • Fix JSON marshal errors: Handle marshal errors properly in task_store.go instead of ignoring them
  • Add rollback logging: Transaction rollbacks now log errors (ignoring sql.ErrTxDone)
  • Fix ListPlans placeholder bug: Added TaskCount field to Plan struct instead of creating empty Task slices
  • Remove unused code: Removed unused scannerMock type that was causing lint failures

Test plan

  • go vet ./... passes
  • staticcheck ./... passes
  • All unit tests pass
  • New tests added for paths.go error handling
  • New tests added for ListPlans TaskCount behavior
  • MCP handler validation tests verify field-level error messages

🤖 Generated with Claude Code

@josephgoksu josephgoksu merged commit 6fdacfa into main Jan 25, 2026
3 checks passed
@josephgoksu josephgoksu deleted the fix/mcp-validation-bugs-and-code-quality branch January 25, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments