Skip to content

Fix structured startup errors for invalid env options - #29

Open
erSpell wants to merge 1 commit into
AgentPostmortem:mainfrom
erSpell:fix/startup-env-validation
Open

Fix structured startup errors for invalid env options#29
erSpell wants to merge 1 commit into
AgentPostmortem:mainfrom
erSpell:fix/startup-env-validation

Conversation

@erSpell

@erSpell erSpell commented Sep 11, 2026

Copy link
Copy Markdown

Summary

  • Validate EMBEDDER and LLM values when settings are loaded.
  • Raise a structured StartupConfigError that records the invalid variable, value, and valid options.
  • Report invalid CLI startup config as a clean configuration error instead of a traceback.
  • Add regression coverage for invalid EMBEDDER, invalid LLM, and CLI no-traceback behavior.

Tests

  • . .venv/Scripts/activate && python -m pytest tests/test_config.py -q
  • . .venv/Scripts/activate && python -m pytest tests/test_config.py tests/test_embeddings.py -q
  • . .venv/Scripts/activate && python -m pytest tests/test_config.py tests/test_embeddings.py tests/test_generate.py tests/test_response_models.py tests/test_cli_citations.py -q
  • . .venv/Scripts/activate && python -m ruff check vaultrag/config.py vaultrag/cli.py tests/test_config.py && python -m compileall -q vaultrag

Notes

  • The config-focused tests and nearby non-DB tests pass locally.

Closes #23

@github-actions

Copy link
Copy Markdown

Welcome, @erSpell, and thanks for your first pull request to VaultRAG.

A quick look at CONTRIBUTING.md covers how things are set up and run here.

I'll review this shortly. Ask anything in the thread if something is unclear.

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.

Unvalidated EMBEDDER/LLM env values crash startup with bare traceback

1 participant