curo1305
9735a5559e
test: add tests for setup wizard personalization and system prompt builder
...
Cover _USE_CASE_PLUGINS mapping, _suggest_plugins side effects, _build_system_base
output for all name/purpose combinations, and GeneralConfig.purpose round-trip.
Also update CLAUDE.md with the testing workflow rule.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-19 10:43:20 +02:00
curo1305
51029d4a2d
test: add coverage for config TUI, ConfigField, schema changes, and CLI auto-setup
...
- test_config.py: GeneralConfig defaults, plugin_settings round-trip
- test_config_field.py: ConfigField dataclass, BasePlugin.config_fields() no-op,
plugin subclass override
- test_config_tui.py: _get/_set_nested, _fid/_pfid helpers, GENERAL_FIELDS validity,
ConfigApp general tab rendering, save handler, plugins table, plugin tab visibility,
q key exit — using Textual run_test() + Pilot
- test_cli.py: auto-setup wizard on first run, skip wizard when config exists,
/config in _STATIC_COMMANDS
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-18 21:53:19 +02:00
curo1305
251e509ee0
test: comprehensive test suite
...
Unit tests:
- test_security_boundaries.py: vault block, vault lock sentinel
- test_security_injection.py: all 4 injection categories, case-insensitive
- test_vault_rw.py: roundtrip, file permissions (chmod 400), no key in config
- test_config.py: schema roundtrip, no api_key field, chmod 600 on config.yaml
- test_memory_reader.py: list, read, sandboxing, context loading
- test_memory_writer.py: write, append, index update, traversal blocked, chmod 600
- test_providers.py: required fields, unique IDs, litellm prefix format
- test_renderer.py: key redaction for sk-ant-, sk-, AIza patterns
Security tests:
- test_vault_ai_isolation.py: 7 traversal patterns blocked via memory read/write
- test_path_traversal.py: 20+ traversal patterns — all rejected for read and write
- test_prompt_injection.py: 21-item corpus + 5 clean texts (no false positives)
Integration tests:
- test_lmstudio.py: live call to localhost:1234, streaming, full stack session,
injection scan on real output (skips if LM Studio not running)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-17 12:55:06 +02:00