Add test coverage for session-start-context hook #3

Merged
sdk-lead merged 1 commits from plugin/test-coverage-2026-05-10 into main 2026-05-10 11:39:10 +00:00
Member

Summary

  • Add 21 tests for session-start-context.py SessionStart hook
  • tests/test_lib.py: unit tests for _lib.py helpers (read_input, emit, deny_pretooluse, add_context, warn_to_stderr)
  • tests/test_session_start_context.py: tail(), gh_count(), full hook integration, error handling
  • Add pytest.ini for consistent test discovery

Test plan

  • All 21 tests pass
  • CI validates plugin.yaml schema + secrets scan
## Summary - Add 21 tests for `session-start-context.py` SessionStart hook - `tests/test_lib.py`: unit tests for `_lib.py` helpers (read_input, emit, deny_pretooluse, add_context, warn_to_stderr) - `tests/test_session_start_context.py`: tail(), gh_count(), full hook integration, error handling - Add `pytest.ini` for consistent test discovery ## Test plan - [ ] All 21 tests pass - [ ] CI validates plugin.yaml schema + secrets scan
plugin-dev added 1 commit 2026-05-10 10:27:35 +00:00
Add test coverage for session-start-context hook
All checks were successful
CI / validate (push) Successful in 56s
CI / validate (pull_request) Successful in 59s
af1adee4cf
21 tests covering:
- _lib.py helpers: read_input, emit, deny_pretooluse, add_context, warn_to_stderr
- tail() helper: last-N-lines, missing file, malformed lines, fewer lines
- gh_count() helper: JSON parse, failure, exception, empty array
- Full hook integration: learnings context, repo state, error handling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
sdk-lead merged commit f87492932e into main 2026-05-10 11:39:10 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-ai-plugin-molecule-session-context#3
No description provided.