Skip to content

Conversation

@javi11
Copy link
Owner

@javi11 javi11 commented Dec 29, 2025

Summary

  • Remove unused HealthConfig struct and EventHandler type from checker.go
  • Remove PendingManualChecks field from WorkerStats (no longer used after manual queue removal)
  • Rename config.go to controller.go to accurately reflect its contents (HealthSystemController)
  • Fix Go anti-pattern: pass context as parameter instead of storing in struct
  • Extract processMetadataForSync helper to reduce code duplication in SyncLibrary and syncMetadataOnly
  • Extract updateSymlinkForMountChange helper for symlink updates in getAllLibraryFiles and getAllImportDirFiles
  • Fix UsedFiles comment to match struct name
  • Inline thin config getter wrapper functions for clarity

Test plan

  • go build ./... passes
  • go test ./internal/health/... passes
  • Verify health worker functionality works correctly
  • Verify library sync operations complete successfully

🤖 Generated with Claude Code

- Remove unused HealthConfig struct and EventHandler type from checker.go
- Remove PendingManualChecks field from WorkerStats (no longer used)
- Rename config.go to controller.go to match its contents
- Fix context anti-pattern: pass ctx as parameter instead of storing in struct
- Extract processMetadataForSync helper to reduce code duplication
- Extract updateSymlinkForMountChange helper for symlink updates
- Fix UsedFiles comment to match struct name
- Inline thin config getter wrapper functions

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@javi11 javi11 merged commit c46bc1b into main Dec 29, 2025
1 check passed
drondeseries added a commit to drondeseries/altmount that referenced this pull request Dec 29, 2025
refactor(health): remove dead code and fix Go anti-patterns (javi11#179)
drondeseries added a commit to drondeseries/altmount that referenced this pull request Dec 29, 2025
refactor(health): remove dead code and fix Go anti-patterns (javi11#179)
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.

2 participants