feat(config): configurable dream pipeline thresholds (#731)#742
Merged
Conversation
Replaces hardcoded dream pipeline constants with configurable values. Changes: - DreamConfig struct (uteke-core + uteke-cli config) - contradict_similarity_threshold: 0.6 (cosine > this → NOT contradiction) - contradict_tag_jaccard_min: 0.4 (up from 0.3, reduces false positives) - contradict_max_memories: 200 (O(n²) scan limit) - dedup_threshold: 0.92 (cosine > this → merge candidate) - orphan_importance_threshold: 0.15 (safer than old 0.3) - MaintenanceConfig defaults changed to safer values: - auto_aging_enabled: true → false (opt-in) - auto_aging_interval_hours: 6 → 24 (daily) - auto_dream_interval_days: 3 → 7 (weekly) - DreamConfig wired into CLI main.rs and server main.rs via set_dream_config() - dream.rs reads from self.dream_config instead of const values - DEFAULT_ORPHAN_THRESHOLD updated 0.3 → 0.15 - Server reads [dream] section from uteke.toml Config example: [dream] contradict_similarity_threshold = 0.6 contradict_tag_jaccard_min = 0.4 contradict_max_memories = 200 dedup_threshold = 0.92 orphan_importance_threshold = 0.15 Closes #731
| /// Set dream pipeline thresholds (#731). | ||
| /// | ||
| /// Overrides the default hardcoded values for contradiction scan, | ||
| /// dedup/consolidate, and orphan detection phases. Called once at |
| info!("Opening store at: {db_path}"); | ||
| let uteke = match Uteke::open(&db_path) { | ||
| Ok(u) => Arc::new(Mutex::new(u)), | ||
| Ok(mut u) => { |
🔍 Cora AI Code ReviewReview powered by cora-cli · BYOK · MIT |
- consolidate() expects f32 not f64 — remove incorrect cast - Server dream config: unwrap_or_default() for Option<usize> returns 0 (wrong), use unwrap_or(DreamConfig::default().*) instead - Format: restructure server dream config block for rustfmt compliance
This was referenced Jul 18, 2026
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
Replaces all hardcoded dream pipeline constants with configurable values via
[dream]config section. Also changes[maintenance]defaults to safer values.Breaking Change (defaults only)
auto_aging_enabledtruefalseauto_aging_interval_hoursauto_dream_interval_daysorphan_importance_thresholdcontradict_tag_jaccard_minNew Config Section
Files Changed
config.rs— DreamConfig struct + MaintenanceConfig safer defaultslib.rs— DreamConfig on Uteke struct + set_dream_config() setterdream.rs— Read from self.dream_config instead of const valuesorphans.rs— DEFAULT_ORPHAN_THRESHOLD 0.3 → 0.15uteke-cli/main.rs— Wire dream config at startuputeke-server/main.rs— Read [dream] from uteke.toml, wire at startupCloses #731