Skip to content

refactor: simplify startup TUI + fix config zero-value handling#145

Merged
cyyever merged 2 commits intomainfrom
refactor/simplify-startup-tui
Mar 27, 2026
Merged

refactor: simplify startup TUI + fix config zero-value handling#145
cyyever merged 2 commits intomainfrom
refactor/simplify-startup-tui

Conversation

@cyyever
Copy link
Copy Markdown
Collaborator

@cyyever cyyever commented Mar 27, 2026

Summary

  • Startup TUI: crust start defaults to auto mode with zero interaction. --manual flag prompts for endpoint + API key. Removed DB key prompt, advanced options toggle, and telemetry/retention/port prompts (all available via existing CLI flags).
  • Config loading: introduce rawConfig with *int/*float64 for YAML parsing to distinguish absent fields (nil β†’ use default) from explicit zeros (non-nil β†’ preserve, let Validate() reject). Fixes stale configs with max_buffer_events: 0 silently breaking the daemon.

Test plan

  • crust start β€” auto mode, no prompts
  • crust start --manual β€” prompts for endpoint + API key
  • Config with absent max_buffer_events β†’ uses default 50000
  • Config with explicit max_buffer_events: 0 β†’ validation error
  • go test ./internal/config/ β€” all pass including new cases
  • go test -short ./... β€” all pass
  • Pre-commit hooks pass (gofmt, golangci-lint, nilaway, govulncheck, go test)

cyyever added 2 commits March 27, 2026 14:10
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.
@cyyever cyyever force-pushed the refactor/simplify-startup-tui branch from d6ad3f3 to 27d3f2a Compare March 27, 2026 06:51
@cyyever cyyever merged commit db6b501 into main Mar 27, 2026
6 checks passed
@cyyever cyyever deleted the refactor/simplify-startup-tui branch March 27, 2026 06:52
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