Skip to content

docs: document config.yaml#168

Closed
readwrightexecute wants to merge 1 commit into
ory:mainfrom
readwrightexecute:docs/config-yaml-issue-167
Closed

docs: document config.yaml#168
readwrightexecute wants to merge 1 commit into
ory:mainfrom
readwrightexecute:docs/config-yaml-issue-167

Conversation

@readwrightexecute
Copy link
Copy Markdown

@readwrightexecute readwrightexecute commented May 23, 2026

Summary

  • documents ~/.config/lumen/config.yaml / $XDG_CONFIG_HOME/lumen/config.yaml
  • explains config precedence: defaults → YAML → env vars → CLI/programmatic overrides → server selection
  • documents top-level fields, server fields, env var overrides, known models, aliases, validation rules, and examples
  • updates README to link to the canonical configuration doc
  • adds config docs tests to verify documented YAML examples parse through the real config loader

Fixes #167.

Tests

  • go test ./internal/config -run 'TestDocumentation|TestConfigurationDocumentationIsLinkedFromREADME' -count=1
  • go test ./internal/config -count=1
  • go test ./cmd -run 'Config|Model|Backend|Index|Search|Stdio' -count=1
  • go test ./... -count=1
  • git diff --check

Summary by CodeRabbit

  • Documentation

    • New CONFIGURATION.md guide documenting YAML config files, environment variable overrides, CLI server selection, and multi-server setups
    • Updated README with consolidated configuration guidance and expanded environment variable reference
  • New Features

    • Added support for manutic/nomic-embed-code:7b embedding model

Review Change Stack

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 23, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bbf4de40-c85d-49e3-bba6-3f8f259ec6de

📥 Commits

Reviewing files that changed from the base of the PR and between d0dee0e and da6ef50.

📒 Files selected for processing (3)
  • README.md
  • docs/CONFIGURATION.md
  • internal/config/config_docs_test.go

📝 Walkthrough

Walkthrough

This PR documents Lumen's YAML configuration system by adding a comprehensive guide (docs/CONFIGURATION.md) covering file locations, precedence rules, schema, environment-variable overrides, CLI filtering, and multi-server failover behavior; updating README.md to cross-reference the new documentation and adding a new supported embedding model; and introducing a test suite that validates all documented configuration examples and parsing behavior.

Changes

Configuration Documentation and Tests

Layer / File(s) Summary
Configuration overview and schema definition
docs/CONFIGURATION.md (lines 1–29, 66–88)
Configuration file locations (e.g., ~/.config/lumen/config.yaml), precedence order across built-in defaults, YAML, environment, and CLI flags, and schema for top-level fields (log_level, max_chunk_tokens, freshness_ttl, reindex_timeout) and per-server fields (backend, host, model, dims, ctx_length, min_score).
Configuration examples and behavior documentation
docs/CONFIGURATION.md (lines 31–65, 89–212)
Minimal YAML examples for Ollama and LM Studio, full config with logging/timeout settings, known embedding model metadata table with dims/context/min-score and automatic inference, environment-variable field mappings (with host overrides by backend type), CLI flag filtering (--model/-m, --backend/-b) and failover semantics, multi-server matching example, custom/unknown model handling requiring explicit dims, common validation errors, and MCP server behavior with config reloading.
README configuration section and model registry update
README.md (lines 278–309, 327, 337–339)
Rewrote Configuration section to describe persistent YAML with environment-variable overrides limited to the first server and expanded the environment variable reference table; added manutic/nomic-embed-code:7b to supported embedding models; and replaced detailed CLI instructions with a pointer to docs/CONFIGURATION.md for multi-server setups, custom models, and validation rules.
Configuration validation test suite
internal/config/config_docs_test.go (lines 1–253)
Added seven test functions covering minimal Ollama/LM Studio configs, full config with log levels and duration parsing, multi-server failover with WithServerSelection, custom model dims requirement, environment-variable override precedence, and README linkage validation; includes utilities for temporary YAML fixtures, environment variable isolation, and repository root detection.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: document config.yaml' is specific and directly describes the main change—adding documentation for config.yaml configuration file.
Linked Issues check ✅ Passed The PR fully addresses issue #167 requirements: documents config.yaml location, structure, precedence, top-level fields (log_level, max_chunk_tokens, freshness_ttl, reindex_timeout), servers with required/optional fields, and provides working examples validated by tests.
Out of Scope Changes check ✅ Passed All changes are directly scoped to documentation: README.md updates point to new YAML docs, docs/CONFIGURATION.md provides comprehensive configuration guidance, and tests validate documented examples parse correctly.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@readwrightexecute readwrightexecute closed this by deleting the head repository Jun 3, 2026
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.

Document config.yaml

2 participants