Skip to content

fix(demo): require explicit API keys in demo and clean up README config - #50

Merged
getdownandcode merged 2 commits into
mainfrom
fix/demo-strict-mode-and-docs
Oct 1, 2026
Merged

getdownandcode merged 2 commits into
mainfrom
fix/demo-strict-mode-and-docs

Conversation

@getdownandcode

Copy link
Copy Markdown
Owner

Summary

Enforce explicit credentials in examples/demo.py and clean up unused configuration keys in README.md (resolving AUD-05 and AUD-06).

What Changed

  • In examples/demo.py:
    • build_llm now raises ValueError when running in live mode without the required API key rather than silently degrading to FakeLLMClient.
    • Pass configured API keys to create_llm_client.
  • In README.md:
    • Removed unused sample configuration keys ENVIRONMENT=development and JWT_SECRET=... from .env snippet. Added LLM_MODEL=gemini-2.0-flash.
  • In tests/integration/test_demo.py:
    • Added test_build_llm_strict_live_mode verifying live vs offline execution behavior.

How Tested

  • pytest tests/integration/test_demo.py
  • Full test suite: 243 passed, 24 skipped (real infra flag).
  • Linting and typing: ruff and mypy 100% clean.

@getdownandcode getdownandcode left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer Review: Strict Demo Mode & README Configuration Cleanup

  • Correctness: Verified. build_llm raises an explicit ValueError when API keys are absent in live mode instead of silently falling back to FakeLLMClient.
  • Documentation: Unused JWT_SECRET and ENVIRONMENT removed from README snippet.
  • Testing: Passes cleanly with complete assertions.

LGTM.

@getdownandcode
getdownandcode merged commit 577fce2 into main Oct 1, 2026
1 check passed
@getdownandcode
getdownandcode deleted the fix/demo-strict-mode-and-docs branch October 1, 2026 15:06
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