Repository navigation
fix(tasks): bound ACP terminal notification details - #151120
Conversation
Reuse TASK_STATUS_DETAIL_MAX_CHARS when formatting ACP/background task failure, blocked, and completion notices so unbounded formatAcpErrorChain diagnostics stay in the stored task record instead of flooding the channel (openclaw#151006).
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 6:05 AM ET / 10:05 UTC (Revision 3). ClawSweeper reviewWhat this changesBounds failed, lost, and blocked background-task notification details to 120 characters while preserving stored diagnostics and successful results, with documentation and regression coverage. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and the latest release still have the reported behavior. No blocking patch defect was found, and the updated runtime observations address the previous proof request. Likely related people Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s task registry tracks background execution and sends terminal updates either directly to a channel or through the requesting conversation. This change formats those updates without changing the underlying task record or delivery routing. flowchart TD
A[Background execution] --> B[Task registry]
B --> C[Complete stored diagnostics]
C --> D[Task inspection]
B --> E[Terminal notification formatter]
E --> F[Direct channel notification]
E --> G[Requesting conversation]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +164, Docs +5. Total +176 across 6 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep diagnostic previews bounded at the shared presentation owner while retaining complete task records and successful completion output. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source passes complete long diagnostics into both delivery routes without a display limit; the supplied before/after CLI observations corroborate that path. This reviewer did not execute target code. Is this the best way to solve the issue? Yes. Reusing the existing task-status sanitizer and limit is a focused repair, and preserving successful results avoids truncating information the parent needs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cc9f1008a3c8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Preserve complete stored diagnostics and successful completion output. Verify direct and queued notices through registered task lifecycle delivery and a SQLite reload. Co-authored-by: Jackten <[email protected]>
|
landpr-approve-unrelated-red |
|
Landed the diagnostic-only repair. Failed, lost, and blocked task notices now use the existing sanitized preview limit; full stored diagnostics and successful completion results remain intact. The shipped CLI/Gateway flow reproduced 1,801-character notices on main and 168-character notices after the fix, both through real loopback channel delivery and parent-model HTTP receipt. Public Focused validation passed 197 tests. The fresh exact-head canonical review cleared correctness, security, and product-path proof. Hosted CI's sole source failure was the unrelated registered CLI watchdog cancellation/agent.wait timeout; its complete settled attempt was retained and handled through the native unrelated-red approval, not relabeled green or retried. Thanks @Bartok9 for the original fix and @Jackten for the report and registry-boundary regression coverage. |
Closes #151006
What Problem This Solves
Fixes oversized ACP background-task failure notices when a backend returns a long diagnostic chain.
User Impact
Failure, lost-task, and blocked-task notifications show a sanitized detail preview of at most 120 characters. Short actionable errors remain visible, and full diagnostics stay in the task record for
openclaw tasks show.Successful completion summaries remain intact, including parent-review messages. Delivery policy, routing, and persistence are unchanged. No new setting or public API is introduced.
Why This Change Was Made
Terminal notices used the existing sanitizer without its display bound. Failed and lost notices now reuse the canonical task-status detail formatter; blocked notices and their follow-ups use the same existing limit. The fix does not truncate the producer's error or successful result.
The registered-lifecycle regression from #151012 is retained with contributor credit and strengthened with a real SQLite reset/reload. Notification tests and their existing fixture are separated from the oversized registry test file without dropping coverage. This PR preserves the original contributor commit.
Evidence
Reproduced on pinned main
d879b3f61d11and verified on this PR through the shipped CLI and an isolated Gateway:gateway call agent→ real HTTP model response invokingsessions_spawn(runtime=acp)→ registered ACP backend → task notification dispatch. A registered channel adapter delivered direct notices over loopback HTTP; queued notices were observed in the actual parent model's HTTP requests.openclaw tasks show --jsontasks showThe registered-lifecycle regression separately verifies that the full diagnostic survives resetting the task registry and reloading from SQLite.
Final focused verification: 197 tests passed across five files, including registered direct/queued delivery, long successful results, blocked follow-ups, short actionable errors, task status, and ACP task ownership. Four-file type-aware lint reported zero warnings/errors. Formatting, whitespace, and the changed-file line-cap ratchet passed.
The ACP backend, model, and channel adapters are synthetic public-SDK plugins, running with private state and loopback HTTP only. No external provider, Telegram client, live Telegram delivery, operator Gateway, or full local repository test matrix was exercised. No production test seam or direct lifecycle injection was used in the CLI proof.