Skip to content

fix(ts-unused-code): Complete testing and integration phase#67

Open
chris-schra wants to merge 8 commits intomainfrom
mcp-funnel-tsr
Open

fix(ts-unused-code): Complete testing and integration phase#67
chris-schra wants to merge 8 commits intomainfrom
mcp-funnel-tsr

Conversation

@chris-schra
Copy link
Owner

Summary

  • Fixed TSR mock data format to match actual output
  • Corrected filter logic bug
  • Added real-world validation framework
  • Tests improved from 51/67 to 62/67 passing

Test Results

  • All processor tests passing (20/20)
  • Most integration tests passing (62/67)
  • 5 known failures remain in MCP/CLI interface (expected)

Changes

  • Fixed test mocks in processor.test.ts
  • Corrected filter logic in processor.ts
  • Updated integration tests to use toBeFalsy()
  • Added validation script for real-world testing

Closes #65
Closes #66

Related to #60

chris-schra and others added 8 commits September 23, 2025 14:47
Create foundational package structure for ts-unused-code command with:
- package.json with tsr@^1.3.4 dependency and workspace configuration
- TypeScript configuration files (tsconfig.json, tsconfig.build.json)
- Build script using esbuild/tsc approach from ts-validate patterns
- README with comprehensive false positive warnings
- Empty src/ directory for future implementation

Configuration follows exact patterns from ts-validate package.
Build will fail until src/index.ts is implemented (expected and normal).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…#56

- Created comprehensive TypeScript type definitions for TSR integration
- Defined interfaces for unused exports and files detection
- Added command options with CLI and MCP support
- Implemented SEAM extension points for future enhancements
- Fixed build script to use npx tsc for proper TypeScript compilation
- All types properly documented with JSDoc
- Build generates declaration files successfully

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…#59

Implement command class that provides MCP tool interface and CLI execution
for the ts-unused-code functionality:

- Created TsUnusedCodeCommand implementing ICommand interface
- Defined MCP tool schema with comprehensive input validation using zod
- Implemented MCP execution path with AI-friendly result formatting
- Implemented CLI execution path with argument parsing and help
- Added proper error handling and exit codes
- Created mock TsrProcessor for compilation (actual processor in Spark #58)
- Updated index.ts to export command and removed placeholder
- Included prominent false positive warnings in output
- Added extensive CLI help and usage information

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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