fix(kanban): make creator wake turns graph-safe#71100
Conversation
7381f8d to
b55a628
Compare
Related to #66703: both change creator-wake policy, but this PR preserves automatic wakes and constrains their synthetic turn while #66703 makes wakes explicit and thread-isolated. Maintainer decision needed on the intended delivery-versus-conversational contract. |
|
Clarifying the relationship to #66703: these changes are orthogonal, not competing implementations of the same mechanism. #66703 proposes a new enablement policy ( #71100 deliberately does not change whether creator wakes are enabled. It preserves current main's established
Those properties remain correct if maintainers later make wakes opt-in, restrict them to threads, or keep today's default. Even under #66703's proposed policy, an explicitly enabled wake still needs this context and idempotency guidance. |
Summary
Harden Kanban creator-session wake-ups so a terminal event does not look like a fresh decomposition request:
kanban.auto_subscribe_on_createinto the effectiveDEFAULT_CONFIG["kanban"]block so the documented opt-out validates as a known config keyauto_decomposegates only the built-in Triage decomposerauto_subscribe_on_createcreated_by=auto-decomposer, while profile-created work stamps the profile nameRoot cause for #70752
Current
mainhas one built-in automatic decomposition producer: the gateway Triage watcher. It re-readskanban.auto_decomposeevery tick, acts only on Triage tasks, and creates children withcreated_by=auto-decomposer.The report's duplicate tasks were stamped
created_by=orchestratorand appeared one notifier interval after the root completed. That provenance matches the independent creator-wake path: an auto-subscribed terminal event resumes the originatingorchestratorsession with a synthetic user turn, and that profile can callkanban_createfor follow-up work. The old wake carried only task ID/title/status and the open-ended instruction “decide the next step”; it omitted the worker result that would tell the resumed model the pipeline already existed.This PR preserves intended event-driven orchestration. It does not fuse
auto_decomposeand notification controls or prohibit legitimate follow-up creation.Addresses #70752.
Verification
ruff checkon touched Python filespy_compileon touched Python filesDEFAULT_CONFIGcontains one effectivekanbanblock and recognizeskanban.auto_subscribe_on_creategit diff --check