Repository navigation
Stop re-sending task-failure push notifications after every Gateway restart - #158035
Sanjays2402 wants to merge 1 commit into
Conversation
Restore replays and retention no-ops re-project already-failed task records, and each re-projection was sending a duplicate 'task failed' push after every Gateway restart. The task subscription layer now marks upserts that actually transition into failed/timed_out with becameFailed and carries the task notifyPolicy on the broadcast payload; the Web Push classifier only notifies on that transition and skips silent-policy tasks. Fixes openclaw#156888.
|
🦞👀 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 25, 2026, 5:56 AM ET / 09:56 UTC. ClawSweeper reviewWhat this changesThe branch marks task failure transitions in Gateway events and uses that marker and a task notification policy to decide whether Web Push sends a failure alert. Merge readiness⛔ Blocked before merge - 4 items remain The restart replay guard addresses the reported duplicate notification path, but the silent-policy guard cannot match the policy value that the Gateway publishes. The linked issue remains open, and this PR needs that correction and real behavior proof before merge. Priority: P2 Review scores
Verification
How this fits togetherThe task registry sends task changes to Gateway subscriptions, which broadcast task events. Web Push classifies those events and sends alerts to eligible subscribed browsers. flowchart LR
A[Task registry change] --> B[Gateway task subscription]
B --> C[Task event with transition and policy]
C --> D[Web Push classification]
D --> E[Eligible browser subscriptions]
E --> F[Failure alert]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +33, Tests +41. Total +74 across 4 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. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the registry's scalar notification policy when classifying Web Push events, and verify replay suppression and fresh-failure delivery through the task publication boundary. Do we have a high-confidence way to reproduce the issue? Yes, from source: the Gateway publishes notifyPolicy as a string, while the new Web Push guard accepts only an array. The read-only review did not execute a Gateway restart. Is this the best way to solve the issue? No. Transition metadata is a plausible narrow repair for restart replays, but the policy comparison and its fixture must use the actual task event contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 364f1ddf3b66. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Stop re-sending task-failure push notifications after every Gateway restart This is item 1/3 in the current shard. Shard 21/81. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Thanks @Sanjays2402 for working on this. #159179 has since removed the Tasks/TaskFlow runtime from |
Every Gateway restart was re-sending "task failed" push notifications for background tasks that had already failed long ago. The restore path re-projects retained failed records through the task registry observers, the subscription layer rebroadcasts them as task/upserted, and the Web Push classifier could not tell a re-projection from a fresh failure. Tasks with a silent notify policy were also notifying, which defeats the point of the policy.
What this changes:
Task UI updates are untouched, and broadcast/observer retry semantics are unchanged.
Fixes #156888
Testing: added regression cases in event-web-push.test.ts covering a re-projected failed task (no push), a silent-policy failure (no push), and a genuine transition into failure (push still sent). The two existing task-failure cases now carry the new flag. I verified the decision logic with a standalone repro of the exact conditions since the full vitest harness would not start on my machine, so a CI run is appreciated.