Skip to content

feat(init): add --init wizard step for compaction probe config (#2048)#2054

Merged
bug-ops merged 1 commit intomainfrom
feat/issue-2048/add-init-wizard-step-for-comp
Mar 20, 2026
Merged

feat(init): add --init wizard step for compaction probe config (#2048)#2054
bug-ops merged 1 commit intomainfrom
feat/issue-2048/add-init-wizard-step-for-comp

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 20, 2026

Summary

Implements issue #2048: adds [memory.compression.probe] configuration option to the --init wizard and config migration.

Users can now configure compaction probe settings interactively:

  • probe_enabled (default: false)
  • probe_model (default: empty = inherits summary_model)
  • probe_threshold (default: 0.6)
  • hard_fail_threshold (default: 0.35)

Config migration updates existing zeph.toml files to include the commented [memory.compression.probe] section.

Changes

  • src/init.rs: Added 4 fields to WizardState, probe prompts in step_context_compression(), build_config() mapping
  • crates/zeph-config/src/loader.rs: Added Config::validate() checks for probe thresholds (mirrors soft/hard compaction validation pattern)
  • config/default.toml files: Added commented [memory.compression.probe] block to all three locations
  • Tests: 12 new tests (6 in init.rs, 5 in loader.rs, 1 in migrate.rs)

Validation

✅ All 6074 tests pass (+12 new)
✅ Formatter clean (cargo +nightly fmt --check)
✅ Clippy clean (cargo clippy --workspace --features full -- -D warnings)
✅ Nextest clean (cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins)

Review Summary

Follow-up Issues (non-blocking)

To be filed after merge:

  1. Add NaN/Inf validation tests for probe thresholds (parity with semantic_cache_threshold)
  2. Add targeted migration test for partial [memory.compression] configs
  3. Add boundary tests for max_questions=0, timeout_secs=0
  4. Reconcile pre-existing soft_compaction_threshold discrepancy (0.60 vs 0.70 in default.toml files)

Related

PR #2047 (compaction probe validation)

@github-actions github-actions bot added enhancement New feature or request documentation Improvements or additions to documentation rust Rust code changes size/L Large PR (201-500 lines) core zeph-core crate config Configuration file changes and removed enhancement New feature or request labels Mar 20, 2026
- Add probe prompts to step_context_compression(): enable/disable confirm,
  model input, threshold (0.0, 1.0], hard-fail threshold with cross-field
  validation loop (same pattern as soft/hard compaction thresholds)
- Add probe_enabled, probe_model, probe_threshold, probe_hard_fail_threshold
  fields to WizardState with defaults (false, None, 0.6, 0.35)
- Map WizardState probe fields to config.memory.compression.probe in build_config()
- Add Config::validate() checks for probe thresholds when probe.enabled:
  threshold in (0.0, 1.0], hard_fail_threshold in [0.0, 1.0),
  hard_fail_threshold < threshold, max_questions >= 1, timeout_secs >= 1
- Add commented [memory.compression.probe] block to all three default.toml
  files so --migrate-config surfaces the section to users
- Add unit tests: build_config_probe_* (6 cases), loader validate tests (5 cases),
  migrate_reference_contains_probe_section
@bug-ops bug-ops force-pushed the feat/issue-2048/add-init-wizard-step-for-comp branch from 043e9c7 to 6eaf0b7 Compare March 20, 2026 15:43
@bug-ops bug-ops enabled auto-merge (squash) March 20, 2026 15:43
@github-actions github-actions bot added the enhancement New feature or request label Mar 20, 2026
@bug-ops bug-ops linked an issue Mar 20, 2026 that may be closed by this pull request
@bug-ops bug-ops merged commit 7e35493 into main Mar 20, 2026
25 checks passed
@bug-ops bug-ops deleted the feat/issue-2048/add-init-wizard-step-for-comp branch March 20, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(core): add --init wizard step for compaction probe config

1 participant