Skip to content

refactor: read [recall] into one core type with its env overrides (#1515, part 2) - #1529

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

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

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

What

Second step of #1515 (option B, staged). uteke_core::RecallSettings owns the nine [recall] keys, their defaults, conversions to the engine types (graph_rerank(), recall_config()), and the UTEKE_RECALL_* / UTEKE_GRAPH_* overrides with their range checks, moved from the CLI and tested with an injected lookup. The CLI config uses it as its [recall] type (alias) and one call replaces ~80 lines of env handling; the server drops RecallFileSection and its Option chains and keeps its startup sanitizing of default_strategy.

Why

The same section was written twice (CLI struct with defaults, server Option struct with the same defaults copied) and the env overrides existed only in the CLI. Part 3 adds one apply step for the CLI, the server and MCP (closes #1355) and is where it is decided whether the server honours the UTEKE_RECALL_* variables; this part keeps it as it is. Refs #1515.

Testing

  • clippy -D warnings, fmt, cargo test --workspace pass; cargo run -p docgen changes nothing
  • 6 new core tests (defaults, equal to the built-in request defaults, partial section, conversions, valid overrides, invalid/out-of-range/NaN overrides)
  • side by side, with the real ONNX model: the CLI and the server built from develop and from this branch, same [recall] section and environment, give identical recall results for default, min_score that filters, default_strategy = vector, invalid strategy (falls back to hybrid in the server), jaccard/graph settings, and env overrides (valid, invalid, beating the file)
  • reviewed locally with the Cora MCP agent reviewer before pushing: no blocking finding; one minor finding of mine (two near-identical helpers) was fixed before this push

@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 256324f into develop Oct 22, 2026
15 checks passed
@ajianaz
ajianaz deleted the refactor/engine-settings-2 branch October 22, 2026 02:26
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.

refactor: unify the mirrored config schema structs (CLI Config vs server ServerFileConfig)

1 participant