Skip to content

scan: persist workers/limit/timeout defaults via --save-defaults - #5

Merged
codewiththiha merged 1 commit into
mainfrom
feature/scan-defaults
Aug 4, 2026
Merged

scan: persist workers/limit/timeout defaults via --save-defaults#5
codewiththiha merged 1 commit into
mainfrom
feature/scan-defaults

Conversation

@codewiththiha

Copy link
Copy Markdown
Owner

Makes scan/all workers, limit, and timeout resolve as explicit flag -> persisted -> built-in default, and persists explicitly-passed values with --save-defaults.

  • ScanArgs.max/limit/timeout become Option (no baked-in clap defaults).
  • Resolution + persistence helpied in commands/scan.rs, reused by all.
  • --timeout20s --save-defaults writes and applies the new defaults.

Follow-up to #4 (settings foundation).

Resolve scan workers/limit/timeout as explicit flag -> persisted
setting -> built-in default for both scan and all, using the new
UserSettings from vmate-core. Remove the clap baked-in defaults from
ScanArgs so an absent flag consults the persisted config. --save-defaults
persists only the explicitly-passed scan flags and applies them this run.

Add resolver and persistence tests covering builtin fallback, persisted
override, explicit-flag precedence, and save-only-writes-passed-keys.
@codewiththiha
codewiththiha merged commit c31aed1 into main Aug 4, 2026
@codewiththiha
codewiththiha deleted the feature/scan-defaults branch August 4, 2026 04:23
codewiththiha added a commit that referenced this pull request Aug 4, 2026
- #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.
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