Skip to content

Fix build failures and address architecture gaps#1

Open
dubthree wants to merge 1 commit intomainfrom
build-fixes
Open

Fix build failures and address architecture gaps#1
dubthree wants to merge 1 commit intomainfrom
build-fixes

Conversation

@dubthree
Copy link
Owner

Summary

Fixes 3 compilation errors and 6 test failures to get a green build (102 tests passing).

Build Fixes

  • Fixed Anthropic SDK API usage in TestImprover.java
  • Fixed Jackson XML deserialization in PitReportParser.java
  • Result: clean uber-jar build, all 102 tests pass

Architecture Fixes

  • Fixed StringIndexOutOfBoundsException for default-package classes
  • Fixed NullPointerException in TestImprovement.createNewTestFile()
  • Fixed mvnw script
  • Sanitized tokens from git error messages
  • Config toString() excludes API key
  • Renamed --github-token to --token with GIT_TOKEN env var
  • Extracted DEFAULT_MODEL constant (was duplicated 3x)
  • Deduplicated findMutationsXml() and extractRepoName()
  • Added response status checking to addComment() in all git providers
  • Added ServicesResourceTransformer and signature filters to shade plugin
  • Synced version string, removed emoji from output

Remaining

See TODO.md for 30+ documented issues across security, retry logic, rate limiting, resource leaks, config file support, and multi-module projects.

Compilation fixes:
- Fix Anthropic SDK API usage in TestImprover (ContentBlock.isText/asText
  instead of instanceof TextBlock)
- Fix PitReportParser XML deserialization by configuring Jackson field
  visibility and disabling fail-on-unknown-properties

Bug fixes:
- Fix StringIndexOutOfBoundsException in MutantAnalyzer.findTestFile()
  and TestImprovement.createNewTestFile() for default-package classes
- Fix TestImprovement.createNewTestFile() null parent path from
  sourceFile (was using simple filename as a path)
- Fix mvnw script to use correct MavenWrapperMain class invocation
  instead of broken -jar flag

Security improvements:
- Sanitize git tokens from error messages in RepositoryManager
- Override MutantKillerConfig.toString() to exclude API key
- Rename --github-token to --token with GIT_TOKEN env var support
  (backwards compatible, --github-token still works)

Code quality:
- Extract DEFAULT_MODEL constant to MutantKillerConfig, eliminating
  triple duplication across KillCommand, RunCommand, and Builder
- Deduplicate findMutationsXml() by moving to parent BuildExecutor
- Deduplicate extractRepoName() by making RepositoryManager's public
- Add response status checking to addComment() in all three git providers
- Add ServicesResourceTransformer and signature exclusion filters to
  shade plugin for correct uber-jar packaging
- Add warning log when custom prompt file cannot be read
- Sync version string between pom.xml and MutantKiller.java
- Remove emoji from CLI output

Documentation:
- Add TODO.md documenting remaining issues (missing verification of
  generated code, resource leaks, retry logic, rate limiting, config
  file support, multi-module projects, and more)

Co-Authored-By: Claude Opus 4.6 <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