Repository navigation
Conversation
|
🦞👀 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 real behavior proof before merge. Reviewed September 29, 2026, 9:34 PM ET / September 30, 2026, 01:34 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch limits background-task terminal and blocked-follow-up notice details to 120 characters and adds formatter and delivery-route regression tests. Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open. PR close coverage proof kept this PR open against #151120: model PR close coverage proof was incomplete: PR B carries the useful notice fix and is the merged place to assess it. PR A’s additional truncation of successful results is not material remaining work according to its durable report. Priority: P2 Review scores
Verification
How this fits togetherThe former Tasks runtime received ACP lifecycle results, stored task diagnostics, and formatted notices for direct delivery or a parent session. The proposed change sits in that notice formatter, between stored task results and user-facing messages. flowchart LR
A[ACP lifecycle result] --> B[Task record]
B --> C[Notice formatter]
C --> D{Delivery route}
D --> E[Direct notice]
D --> F[Parent session event]
B --> G[Full diagnostic]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +91. Total +104 across 3 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 this PR open until a linked canonical PR proves it covers this PR's unique work, or a maintainer confirms closure. Do we have a high-confidence way to reproduce the issue? Yes, for the historical bug: the pinned source and registry tests describe the ACP lifecycle-to-notice path and its oversized output. I did not execute that path in this read-only review; current main has removed it. Is this the best way to solve the issue? No. The merged replacement covers the failure and blocked-notice problem while preserving successful result content, and the branch's former runtime is no longer on main. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against da46de9d54bd; fix evidence: release v2026.9.6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
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 `d879b3f61d11` and verified on this PR through the shipped CLI and an isolated Gateway: `gateway call agent` → real HTTP model response invoking `sessions_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. | Scenario | Main | This PR | | --- | --- | --- | | Failed task, direct channel and parent-model routes | 1,801-character notice | 168-character notice with the actionable sign-in error and ellipsis | | Public `openclaw tasks show --json` | Complete 1,753-character canonical error | Same complete error | | Actual permission-denied task | Full blocked diagnostic in the notice | Bounded notice; the complete file path remains available through `tasks show` | | Follow-up after inspecting the blocked task | Completed | Completed and wrote the requested artifact using the recovered full path | | Successful completion received by parent model | Complete 420-character result | Same complete result, not truncated | The 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. ```sh node scripts/run-vitest.mjs \ src/tasks/task-registry.notifications.test.ts \ src/tasks/task-registry.test.ts \ src/tasks/task-executor-policy.test.ts \ src/tasks/task-status.test.ts \ src/acp/control-plane/manager.background-task.test.ts ``` 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. Co-authored-by: Jackten <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
Closes openclaw#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 openclaw#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 `89380978922b` and verified on this PR through the shipped CLI and an isolated Gateway: `gateway call agent` → real HTTP model response invoking `sessions_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. | Scenario | Main | This PR | | --- | --- | --- | | Failed task, direct channel and parent-model routes | 1,801-character notice | 168-character notice with the actionable sign-in error and ellipsis | | Public `openclaw tasks show --json` | Complete 1,753-character canonical error | Same complete error | | Actual permission-denied task | Full blocked diagnostic in the notice | Bounded notice; the complete file path remains available through `tasks show` | | Follow-up after inspecting the blocked task | Completed | Completed and wrote the requested artifact using the recovered full path | | Successful completion received by parent model | Complete 420-character result | Same complete result, not truncated | The 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. ```sh node scripts/run-vitest.mjs \ src/tasks/task-registry.notifications.test.ts \ src/tasks/task-registry.test.ts \ src/tasks/task-executor-policy.test.ts \ src/tasks/task-status.test.ts \ src/acp/control-plane/manager.background-task.test.ts ``` 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. Co-authored-by: Jackten <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Closes #151006
What Problem This Solves
Fixes oversized background-task completion notices when a backend returns a long diagnostic or terminal summary.
User Impact
Terminal and blocked-follow-up notices now contain a detail preview of at most 120 characters, ending in an ellipsis when shortened. Short actionable errors stay visible; full task diagnostics remain stored. Information beyond the preview still requires inspecting the task or child session.
Why This Change Was Made
Reuse the existing task-status sanitizer and compact-detail limit at terminal formatting sites. This preserves current sanitization, delivery routing, parent-review instructions, and diagnostic storage without a new setting or API.
Evidence
On public base
a1cc9b38c1c89a0d1d41d71a4160a7b14cd04d02, the real ACP error formatter → lifecycle event → registry path produces a 1,801-character notification on both direct and parent-session routes. The fix produces 168 characters for that fixture, including its title/run label. Both route tests assert that the full stored error is unchanged.Error:-prefixed prose.Validation commands
node scripts/run-vitest.mjs run --config test/vitest/vitest.tasks.config.ts src/tasks/task-executor-policy.test.ts --maxWorkers=1 --pool=forks node scripts/run-vitest.mjs run --config test/vitest/vitest.infra.config.ts src/tasks/task-registry.test.ts --maxWorkers=1 --pool=forks node scripts/run-vitest.mjs run --config test/vitest/vitest.unit-fast.config.ts src/tasks/task-status.test.ts --maxWorkers=1 --pool=forks node scripts/run-vitest.mjs run --config test/vitest/vitest.acp.config.ts src/acp/control-plane/manager.background-task.test.ts --maxWorkers=1 --pool=forks pnpm build pnpm tsgo:core node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.other.json --incremental node scripts/run-oxlint.mjs src/tasks/task-executor-policy.ts src/tasks/task-executor-policy.test.ts src/tasks/task-registry.test.ts pnpm exec oxfmt --check src/tasks/task-executor-policy.ts src/tasks/task-executor-policy.test.ts src/tasks/task-registry.test.ts git diff --checkmacOS 26.5.2, Node.js 24.21.0, locked source install.
OPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATHpoint to scratch paths for every test invocation.