fix: deliver background task completions through owning sessions#97963
fix: deliver background task completions through owning sessions#97963moeedahmed wants to merge 3 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 8, 2026, 7:51 AM ET / 11:51 UTC. Summary PR surface: Source +26, Tests +92. Total +118 across 5 files. Reproducibility: yes. at source level: current main queues background-task events on the owner session while isolated heartbeat runs can execute under a separate :heartbeat session, and the PR's new classifier gap is visible from the source. I did not establish a live Telegram reproduction in this read-only review. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a refreshed PR that passes raw completion text into the required-completion classifier, preserves the targeted background-task owner-session wake behavior, and includes redacted real Telegram/gateway proof. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main queues background-task events on the owner session while isolated heartbeat runs can execute under a separate :heartbeat session, and the PR's new classifier gap is visible from the source. I did not establish a live Telegram reproduction in this read-only review. Is this the best way to solve the issue? No, not yet. The owner-session wake approach is the narrow right layer, but the required-completion classifier should receive raw child output before the display fallback and the Telegram delivery path still needs real proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 58891c85b68b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +26, Tests +92. Total +118 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
400666a to
47e4354
Compare
|
@openclaw-mantis telegram desktop proof: verify a background-task completion reaches the owning Telegram topic with heartbeat isolation enabled and ordinary heartbeat wakes remain isolated. |
|
This pull request has been automatically marked as stale due to inactivity. |
What Problem This Solves
Background task completion events can be queued on the real requester session, such as a Telegram topic session, while heartbeat isolation runs the wake in a separate
:heartbeatsession. That can leave the requester without a visible final or blocked completion message even though the background task finished.Required subagent completions also had a second failure mode: progress-only child output could be presented as a successful handoff instead of being treated as blocked.
Why This Change Was Made
The fix keeps the behaviour narrow and native:
background-taskandbackground-task-blockeddelivery wakes.User Impact
Users waiting in the original requester session, including Telegram topic sessions, should receive the terminal completion/blocker path instead of losing it to an isolated heartbeat session. Parent agents should no longer treat a progress-only required subagent completion as a successful final deliverable.
Evidence
Local source proof after rebasing onto current
origin/main:git diff --check origin/main...HEADnode scripts/run-vitest.mjs src/infra/heartbeat-runner.ghost-reminder.test.ts src/agents/subagent-announce.test.ts src/agents/subagent-announce-delivery.test.ts src/agents/subagent-announce-dispatch.test.ts src/agents/subagent-announce-output.test.ts src/agents/subagent-announce.capture-completion-reply.test.ts src/agents/subagent-announce.format.e2e.test.ts src/agents/subagent-announce.timeout.test.tsPATH="/tmp/openclaw-pnpm-shims:$PATH" pnpm tsgo:prodPATH="/tmp/openclaw-pnpm-shims:$PATH" pnpm check:test-typesnode scripts/run-oxlint.mjs src/agents/subagent-announce.ts src/agents/subagent-announce.format.e2e.test.ts src/infra/heartbeat-runner.ts src/infra/heartbeat-runner.ghost-reminder.test.ts src/tasks/task-completion-contract.tsPATH="/tmp/openclaw-pnpm-shims:$PATH" NODE_OPTIONS=--max-old-space-size=8192 pnpm build:plugin-sdk:strict-smokePATH="/tmp/openclaw-pnpm-shims:$PATH" pnpm lint:extensions:channelsPATH="/tmp/openclaw-pnpm-shims:$PATH" pnpm lint:extensions:bundlednode scripts/build-all.mjs gatewayWatchUpstream CI passed on pushed head
47e4354a287c2148cbc04e863bad77dbc26c8e77, includingcheck-prod-types,check-test-types,check-guards,check-lint,QA Smoke CI, andReal behavior proof.Known proof gap: live Telegram/Mantis visible delivery proof is still pending. The PR is labelled for
mantis: telegram-visible-proof; merge should wait for redacted live proof or an explicit maintainer decision to accept source-level proof only.Risks and Counterexamples