feat(stability): per-source resync staleness override for Passive Mode (#3122)#3129
Merged
Merged
Conversation
#3122) Follow-up to #3125 / #3126 / #3128. Closes item 2 of the reporter's feedback on #3122 (advanced per-source setting for the staleness window). * SourceConfig gains optional passiveResyncStaleMs (ms). Falls back to the 4h class default when absent. * MeshtasticManager.effectivePassiveResyncStaleMs() resolves the active threshold, clamping out-of-range overrides ([1 min, 7 days]) so a 0 or astronomical value can't disable the safeguard. * Plumbed through all 5 MeshtasticManager construction sites in sourceRoutes; a change in the value triggers a transport restart alongside the existing passiveMode toggle. * UI: numeric "Resync staleness window (hours)" input appears under the Passive Mode toggle when enabled. Blank = use 4h default. Tests: 9 new tests cover default, constructor override, configureSource override + clear, below-floor / above-ceiling rejection, exact boundary acceptance, and NaN rejection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job Code Review for PR #3129Comprehensive review of the per-source resync staleness override implementation. Todo List
✅ Overall AssessmentThis is a well-implemented, production-ready feature with excellent attention to detail. The code demonstrates strong defensive programming practices and thorough testing. 🏆 StrengthsSecurity & Validation
Code Quality
Testing
User Experience
🔍 Technical AnalysisMeshtasticManager Changes (
|
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.
Follow-up to #3125 / #3126 / #3128. Closes item 2 of the reporter's feedback on #3122 — exposing the resync staleness window as an advanced per-source setting.
Why
The reporter wrote: "4 hours is a reasonable default, but exposing it as an advanced per-source setting from the start would be ideal." Different fleets have different needs — a router-class node whose config rarely changes might prefer 24 h; a node with frequent remote channel rekeys might prefer 1 h. Hard-coding 4 h served the original bug fix; letting operators tune it without code changes is the next step.
What
What's not in this PR
All three reporter items are now landed when this merges. Future work that would still be welcome but isn't in scope:
Test plan
🤖 Generated with Claude Code