feat(health): optimize validation, add automatic metadata regeneration and enforce strict linking - #411
Merged
Merged
Conversation
drondeseries
force-pushed
the
main
branch
3 times, most recently
from
March 14, 2026 03:36
c616e9f to
3808cbe
Compare
…RR integration suite
…om UI and backend
…move before cleanup
javi11
approved these changes
Mar 14, 2026
yoshitaka420
pushed a commit
to yoshitaka420/altmount
that referenced
this pull request
Jun 1, 2026
…n and enforce strict linking (kipsilabs#411) Co-authored-by: drondeseries <drondeseries@users.noreply.github.com> Co-authored-by: Javier <javicuba11@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces several critical improvements to the health monitoring and repair system to prevent stalling, reduce bandwidth usage, and automate the recovery of physically corrupted metadata.
🚀 Key Features & Fixes
Optimized Usenet Validation (Bandwidth & Speed)
Automatic Metadata Regeneration
.nzbsfolder when a file has corrupted metadata and no library path..metafile from the original NZB without requiring a redownload or ARR intervention.Improved Corruption Handling in Library Sync
LibrarySyncto detect unmarshal errors and register them as corrupted entries in the database.corrupted_metadata/), and queued for repair.Strict ARR Linking
Configurable Health Timeouts
read_timeout_secondsto the health configuration (defaulting to 30s) to allow users to tune the system for slow Usenet providers.🛠 Implementation Details
internal/usenet/validation.gowith context cancellation logic.internal/importer/service.gowith NZB search and re-processing capabilities.internal/database/health_repository.goquery to pick up metadata-corrupted files even without alibrary_path.importerServiceintoHealthWorkerviainternal/health/worker.goand setup commands.