Skip to content

refactor: one EngineSettings and one apply step for the CLI and the server (#1515, part 3) - #1530

Merged
ajianaz merged 1 commit into
developfrom
refactor/engine-settings-3
Oct 22, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/engine-settings-3

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

What

Third step of #1515 (option B, staged). uteke_core::EngineSettings holds [tier], [recall], [dream], [lifecycle] and [embed_fallback] (FallbackSettings is deserializable like the other four). The CLI config and the server config embed it with #[serde(flatten)], so their five mirrored sections and the CLI's fallback struct are gone, and Uteke::apply_settings replaces the sequence of setters (Jaccard weight, dream thresholds, lifecycle, fallback) that both binaries repeated. Hand-written code removed: ~200 lines.

Why

The sections were written twice and applied twice. MCP still applies none of them; that is part 4 (a loader for MCP, which changes MCP recall results and gets its own contract note). Refs #1515, #1355.

Testing

  • clippy -D warnings, fmt, cargo test --workspace pass; cargo run -p docgen changes nothing
  • 4 new core tests (the five sections parse next to other and unknown sections through flatten, an empty file is all defaults, apply_settings sets what it should, an incomplete fallback is not applied)
  • side by side with the real ONNX model: the CLI and the server built from develop and from this branch, same config with all five sections, a partial file and an invalid one (negative tier days, bad strategy), give identical recall results, lifecycle status, aging status; the only difference is that the server logs the dream and lifecycle settings on every start
  • reviewed locally with the Cora MCP agent reviewer before pushing: no blocking finding; two notes of mine (the settings now carry the fallback key but have no Debug; two log lines always appear) are recorded in the code and the changelog

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 6ab2f98 into develop Oct 22, 2026
15 checks passed
@ajianaz
ajianaz deleted the refactor/engine-settings-3 branch October 22, 2026 02:58
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