refactor: deepen six architecture candidates - #9
Merged
Conversation
- #1 builtin identity: BuiltinConfig::from_path + display_name centralize the path-layout parse; export_name and recent route through them (3 inline file_stem parses deleted) - #2 scan pipeline: scan::scan_pipeline shared by scan and all; all.rs keeps only the connect half; report format unified - #3 retry budget: pure RetryBudget type drives the retry/drop rules; ConnectService::run consults it instead of inline counters - #4 settings persist: persist_scan/persist_connect live beside the resolvers in UserSettings; command-layer apply helpers deleted - #5 process teardown: OpenVpnHandle owns kill_graceful; kill_handle deleted; the kill registry becomes a per-session ProcessRegistry threaded through spawn sites (hides the global, fixes cross-test killing) - #6a/6b: journal_mode moves to db::pool; ScanProgress reports deltas Flaky custom_retry_count test fixed (per-session registry + 30s handshake timeout); full suite now stable across repeated runs.
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.
Implements the six deepening candidates from the architecture review (built-in identity, scan pipeline, retry budget, settings persist, process teardown + per-session registry, journal_mode/worker deltas).
BuiltinConfig::from_path+display_nameown the path-layout parse;export_nameand both recent displays route through them instead of re-parsing the file stem in three places.scan::scan_pipelineis shared byscanandall;allkeeps only the connect half; the report format is unified (was already drifting).RetryBudgettype drives the retry/drop rules inConnectService::run— the policy is now directly unit-testable without spawning subprocesses.persist_scan/persist_connectlive beside the resolvers inUserSettings; the command-layer apply helpers are deleted.OpenVpnHandleownskill_graceful;kill_handleis deleted; the kill registry becomes a per-sessionProcessRegistrythreaded through the spawn path — hiding the global and fixing a real test-isolation bug (one test's cleanup was killing another's live processes).journal_modemoves todb::pool;ScanProgressreports deltas instead of workers reading absolute counters back.Also fixes the flaky
custom_retry_counttest (per-session registry + longer handshake timeout). Full suite is now stable across repeated runs.