test: comprehensive scheduler test suite (96 tests) - #137
Merged
Conversation
nox-0x
approved these changes
Apr 14, 2026
nox-0x
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. 96 tests covering scheduler engine (overlap policies, concurrency, execution dispatch, state management), REST API endpoints, and CRUD/run-history operations — exactly the coverage this feature needed.
Add three test files covering all scheduler layers: - schedules-crud.test.ts: CRUD storage, name validation, run history JSONL - scheduler.test.ts: engine init/stop, overlap policies, concurrency queue, isolated and agent execution dispatch, one-time schedules, catch-up - schedules-api.test.ts: all 9 REST endpoints with validation and happy paths Add test utilities to scheduler.ts: _resetForTesting(), _setExecutors(), _onRunCompleted export — enables testing without spawning real Claude sessions or gateway connections. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aterrylu
force-pushed
the
terry/scheduler-tests
branch
from
April 14, 2026 09:12
ed4ce83 to
a01d451
Compare
5 tasks
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
_resetForTesting,_setExecutors,_onRunCompleted) toscheduler.tsfor clean executor mockingTest Coverage
schedules-crud.test.tsscheduler.test.tsschedules-api.test.tsWhat was untested before
The scheduler shipped with only 3 superficial tests (tool name existence checks). This PR adds coverage for:
claude -p+ agent gateway send) — verified via injectable mock executorsTest plan
🤖 Generated with Claude Code