refactor: simplify startup TUI + fix config zero-value handling#145
Merged
refactor: simplify startup TUI + fix config zero-value handling#145
Conversation
Startup: reduce interactive setup from 5 form groups to zero interaction. `crust start` defaults to auto mode; `--manual` prompts for endpoint+key. DB encryption key, telemetry, retention, port, and disable-builtin are now CLI-flag-only (already existed as --db-key, --telemetry, etc.). Config: use rawConfig with *int/*float64 for YAML parsing so Load() can distinguish absent fields (nil β use default) from explicit zeros (non-nil β copy as-is, let Validate reject invalid values). Fixes stale config files with max_buffer_events: 0 silently breaking the daemon.
Move FuzzWebSearchURLBypass out of 12s parallel batch into sequential 15s slot β it creates a full engine per iteration and times out under CPU contention. Bump FuzzPipeBypass and FuzzForkBombDetection from 12s to 15s to avoid "context deadline exceeded" shutdown races.
d6ad3f3 to
27d3f2a
Compare
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
crust startdefaults to auto mode with zero interaction.--manualflag prompts for endpoint + API key. Removed DB key prompt, advanced options toggle, and telemetry/retention/port prompts (all available via existing CLI flags).rawConfigwith*int/*float64for YAML parsing to distinguish absent fields (nil β use default) from explicit zeros (non-nil β preserve, letValidate()reject). Fixes stale configs withmax_buffer_events: 0silently breaking the daemon.Test plan
crust startβ auto mode, no promptscrust start --manualβ prompts for endpoint + API keymax_buffer_eventsβ uses default 50000max_buffer_events: 0β validation errorgo test ./internal/config/β all pass including new casesgo test -short ./...β all pass