Repository navigation
fix: cron and local DMs reach an open Desktop Bot Chat - #105442
Merged
Merged
Conversation
Adapt FalconOrtiz's owner-mailbox proposal from #101564 onto the current notification poller and topical modules. The durable mailbox is cross-process ingress only: the existing owner admits its normal prompt turn after the current turn and human FIFO clear. Retain immutable receipts, stable admission identities, capability and lease fencing, compression lineage, and disable blind recovery replay of imported turns. The original stale server hunks and expiring receipt protocol were rebuilt rather than cherry-picked: the current facade decomposition and durable busy admission contract differ. Credit the earlier owner-mailbox work in #100544 and durable producer work in #100319. Co-authored-by: fangliquanflq <fangliquan@qq.com> Co-authored-by: 686f6c61 <github@00b.tech>
Route local producers to durable owner ingress before attempting the unowned CLI lane. Preserve per-run/per-message IDs and receipt-first retry handling; never fall back after ambiguous admission. Report cron admission as queued, not completed or failed, in job status, the execution ledger and CLI/tool UX. Native isolated Electron validation reproduces SESSION_NOT_OWNED on main for both idle and busy owners. Fixed owner consumes idle cron, busy cron, local DM and mounted-chat cron exactly once, keeps its lease, yields to queued human input, and preserves the prior model-request prefix and tool schema. Inference alone used a deterministic loopback wire stub; no paid model call.
૮ >ﻌ< ა ci reviewran on e8125a5 — fix: cron and local DMs reach an open Desktop Bot Chat
|
This was referenced Sep 7, 2026
1 task
1 of 39 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.
Cron output and local agent DMs now reach a canonical Bot Chat that stays open in Desktop, without starting a second transcript writer.
Changes
delivery_queued/delivery_outcome=queued, not completed delivery or failure. Document that historical job status records admission; terminal receipts are authoritative.Root cause: the separate cron/DM CLI tried to resume a session whose valid lease belonged to a permanently open Desktop backend.
Validation
Live repro: on main
2237be355906fbe6065ce1815711eee52b2d646e, real isolated Electron → production serve backend plus separate cron helper/CLI returnedSESSION_NOT_OWNEDfor both idle and busy owners. After the fix, idle cron, busy cron, local DM runner and mounted-chat cron each settled exactly once without releasing the same owner lease.scripts/run_tests.sh tests/cron/ tests/tui_gateway/ tests/tools/test_daytona_environment.py tests/tools/test_web_tools_config.py tests/tools/test_bot_live_owner_delivery.py tests/tools/test_bot_mode_dm.py: 2422 passed, 0 failed, 3 skipped, 224 filesInference was a deterministic loopback wire stub, not a real-model quality/cost/cache-hit test. No paid model requests. Private native test artifacts and request captures are not published.
The broader five-directory run was exercised. Its introduced assertion/signature drift and two missing optional SDKs were corrected and rerun green above. One unrelated existing native
sort --compress-programmarker assertion intests/tools/test_execution_flag_detection.pyfails identically on the pristine main snapshot on this host; this PR does not change that file or claim a fully green broad suite.Credit and scope
Adapted @FalconOrtiz's #101564 owner-mailbox proposal onto current topical modules, preserving contributor authorship. Credits earlier owner-routing work by @fangliquanflq (#100544) and durable ingress work by @686f6c61 (#100319). The stale facade hunks and expiring protocol were rebuilt rather than copied wholesale. #103437's process-local registry and #102659's bounded ownership retries do not cover this separate-process permanent-owner case.
Queued ingress is fenced to its admitted live owner. If that owner exits before consumption, the record remains inspectable rather than being silently adopted by a new session; claimed/failed/cancelled turns are never automatically replayed. Older running backends need restarting after upgrade to advertise support.
Fixes #99956
Fixes #101060
Fixes #103030
Infographic