Skip to content

fix(scheduler): notify owner after deleting schedules - #3103

Merged
DavdGao merged 3 commits into
agentscope-ai:mainfrom
quifox:fix/schedule-delete-notify-pr
Oct 8, 2026
Merged

DavdGao merged 3 commits into
agentscope-ai:mainfrom
quifox:fix/schedule-delete-notify-pr

Conversation

@quifox

@quifox quifox commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

AgentScope Version

2.0.10dev, based on main at 72f3f6fa0b2fc38b8517f408ab616f0f2bd229e6.

Description

Deleting a schedule through ScheduleDelete on a node with scheduling disabled removes the storage record but leaves the timer owner's job until periodic reconciliation. Pass the existing SchedulerManager to the internal tool and call notify_changed() after a successful deletion, matching the HTTP deletion path and preserving best-effort notification behavior.

Add six regressions for notification ordering, owner/non-owner deletion, missing records, storage failure, and notification failure. The owner tests consume lifecycle notifications rather than calling reconciliation manually after deletion. Public tool inputs and application configuration remain the same.

Fixes #3102

Validation

  • pytest tests/service_scheduler_test.py tests/schedule_router_test.py tests/service_toolkit_test.py -q — 36 passed.
  • pre-commit run --all-files — passed.
  • Offline suite — 2637 passed, 57 skipped; 532 subtests passed. Ten live/service-backed integration files were excluded:
pytest tests -q \
  --ignore=tests/backend_docker_test.py \
  --ignore=tests/workspace_docker_test.py \
  --ignore=tests/test_e2e_docker_mcp.py \
  --ignore=tests/workspace_k8s_test.py \
  --ignore=tests/backend_opensandbox_test.py \
  --ignore=tests/workspace_opensandbox_test.py \
  --ignore=tests/backend_e2b_test.py \
  --ignore=tests/workspace_e2b_test.py \
  --ignore=tests/test_e2e_e2b_mcp.py \
  --ignore=tests/test_e2e_api.py

The lifecycle regressions use fakeredis-backed storage and message bus instances. Live service integration and deployment across separate processes have not been tested. Notifications do not provide an atomic stop guarantee for an already running callback.

Checklist

  • An issue has been created for this PR
  • I have read CONTRIBUTING.md
  • Docstrings are in Google style
  • Related documentation has been updated in the documentation repository — not applicable: this restores the existing deletion contract; no public usage/configuration change. The internal constructor docstring is updated.
  • Code is ready for review

@github-actions github-actions Bot added the pr/awaiting-review Waiting for maintainers to review this PR label Oct 3, 2026
@DavdGao
DavdGao merged commit 3433c6b into agentscope-ai:main Oct 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/awaiting-review Waiting for maintainers to review this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ScheduleDelete does not notify the timer owner

2 participants