test: add unit tests for 8 untested modules (batch 3)#191
Merged
teknium1 merged 3 commits intoNousResearch:mainfrom Mar 1, 2026
Merged
test: add unit tests for 8 untested modules (batch 3)#191teknium1 merged 3 commits intoNousResearch:mainfrom
teknium1 merged 3 commits intoNousResearch:mainfrom
Conversation
New test files (143 tests total): - tools/debug_helpers.py: DebugSession enable/disable, log, save, session info - tools/skills_guard.py: scan_file, scan_skill, trust levels, install policy, structural checks - tools/skills_sync.py: manifest read/write, skill discovery, sync logic - gateway/sticker_cache.py: cache CRUD, sticker injection text builders - gateway/channel_directory.py: channel resolution, display formatting, session building - gateway/hooks.py: hook discovery, sync/async emit, wildcard matching - gateway/mirror.py: session lookup, JSONL append, mirror_to_session - honcho_integration/client.py: config from env/file, session name resolution, linked workspaces Also documents a gap in skills_guard: multi-word prompt injection variants like "ignore all prior instructions" bypass the regex scanner.
Replace loose "contains" checks with exact output matching for build_sticker_injection and build_animated_sticker_injection. Add edge cases: set_name without emoji, empty description, empty emoji.
teknium1
added a commit
that referenced
this pull request
Mar 1, 2026
Remove loop_scope="function" parameter from async test decorators in test_hooks.py. This matches the existing convention in the repo (test_telegram_documents.py) and avoids requiring pytest-asyncio 0.23+. All 144 new tests from PR #191 now pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New Test Files
tests/tools/test_debug_helpers.pytools/debug_helpers.pytests/tools/test_skills_guard.pytools/skills_guard.pytests/tools/test_skills_sync.pytools/skills_sync.pytests/gateway/test_sticker_cache.pygateway/sticker_cache.pytests/gateway/test_channel_directory.pygateway/channel_directory.pytests/gateway/test_hooks.pygateway/hooks.pytests/gateway/test_mirror.pygateway/mirror.pytests/honcho_integration/test_client.pyhoncho_integration/client.py