deerflow2/backend/packages/harness/deerflow/runtime/runs
john lee 9b19cca91c
fix(runtime): make RunManager.cancel() idempotent for already-interrupted runs (#3055) (#3058)
A second cancel() call on an interrupted run returned False, causing the
cancel and stream_existing_run router endpoints to raise 409 on double-stop.

Fix: return True inside the lock when record.status == RunStatus.interrupted.
This covers both the POST /cancel and POST /join endpoints without any
re-fetch or extra get() call — the idempotency lives at the source.

Also fixes stream_existing_run (the LangGraph SDK stop-button path), which
had the identical cancel() → 409 pattern and was not covered by the
original PR.  Both endpoints share the fix automatically.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:37:36 +08:00
..
store fix(harness)!: hydrate runs from RunStore and persist interrupted status (#2932) 2026-05-18 22:25:02 +08:00
__init__.py feat(persistence): add unified persistence layer with event store, token tracking, and feedback (#1930) 2026-04-26 11:05:47 +08:00
manager.py fix(runtime): make RunManager.cancel() idempotent for already-interrupted runs (#3055) (#3058) 2026-05-20 16:37:36 +08:00
schemas.py feat(gateway): implement LangGraph Platform API in Gateway, replace langgraph-cli (#1403) 2026-03-30 16:02:23 +08:00
worker.py feat(run): Propagates model_name from the gateway request through the runtime and persistence stack to the SQLite database. (#2775) 2026-05-11 21:45:18 +08:00