Skip to content

Fix structured startup errors for invalid env options - #29

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
erSpell:fix/startup-env-validation
Sep 11, 2026
Merged

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

Conversation

@erSpell

@erSpell erSpell commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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.

@royalpinto007
royalpinto007 merged commit 9de35ad into AgentPostmortem:main Sep 11, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown

And it's in. Thanks @erSpell.

Genuinely helpful change for VaultRAG.

If this project helps you out, a star helps others find it too.

Happy to see more from you whenever you have the time.

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

2 participants