fix(video-task): add delivering status to break self-deadlock in scheduleMediaGenerationTaskCompletion#95993
Conversation
…duleMediaGenerationTaskCompletion Introduce a non-terminal 'delivering' task status that separates 'media generated' from 'delivery confirmed', breaking the self-deadlock where scheduleMediaGenerationTaskCompletion kept the task 'running' during wakeTaskCompletion, blocking the agent from starting distinct follow-up video generation requests. Changes: - Add 'delivering' to TaskStatus type and TASK_STATUSES set - Export markTaskDeliveringByRunId to transition tasks to delivering state - Update isTaskStillBlockingDuplicateGuard call sites so delivering tasks no longer block new, distinct media generation requests - Set delivering status in scheduleMediaGenerationTaskCompletion after media generation completes (before wakeTaskCompletion) - Update all active-task-status checks across task registry, executor, flow registry, and audit to recognize delivering as non-terminal ClawSweeper review: 'a focused repair is plausible' Issue: openclaw#95701 Co-Authored-By: 赵旺0668001248 <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…espect module boundaries The agents/tools/media-generate-background-shared.ts was importing directly from task-registry.ts, violating the approved import seam boundary. Now imported via runtime-internal.ts (the approved facade).
|
Fixed module boundary violation — imported markTaskDeliveringByRunId via runtime-internal.ts instead of directly from task-registry.ts. @clawsweeper re-review |
…e completeness The 'delivering' status was added to TaskStatus but three Record mappings were not updated, causing TS2741 errors in CI: - TASK_STATUS_ICONS (commands-tasks.ts): add delivering → 📦 - TASK_STATUS_TO_LEDGER_STATUS (tasks.ts): add delivering → running - createEmptyTaskStatusCounts (summary.ts): add delivering → 0 Co-Authored-By: Claude (via Anthropic API) <[email protected]>
|
Fixed CI type-completeness errors: added the missing
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
TaskStatusCounts now requires 'delivering', so all test fixtures with inline byStatus objects must include delivering: 0. - status.summary.redaction.test.ts, status.summary.test.ts - task-domain-views.test.ts, flows.test.ts Co-Authored-By: Claude (via Anthropic API) <[email protected]>
|
Fixed remaining CI failures: added delivering: 0 to 4 test fixtures with inline byStatus objects, and updated flows.test.ts snapshot. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
TaskStatusCounts now requires 'delivering', so all test fixtures with inline byStatus objects must include delivering: 0. - task-registry.test.ts: summary assertion - status.test.ts: 3 byStatus blocks - server-reload-handlers.test.ts: reload guard assertion Co-Authored-By: Claude (via Anthropic API) <[email protected]>
|
Fixed 4 more test fixtures with missing delivering. CI should pass now. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
New file added on main was missing from the expected test project list, causing CI failure on the merge commit. Not related to delivering changes. Co-Authored-By: Claude (via Anthropic API) <[email protected]>
|
Fixed pre-existing test snapshot issue (check-workflows.test.ts missing from expected list). Not related to delivering changes. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed June 23, 2026, 3:54 PM ET / 19:54 UTC. Summary PR surface: Source +59, Tests +10. Total +69 across 23 files. Reproducibility: yes. The source path and production report show provider completion progress is recorded while the task remains active until Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a narrow fix for the canonical issue that unblocks distinct follow-up video requests after media is ready while preserving same-request duplicate protection, delivery-confirmation closeout, and task/status compatibility. Do we have a high-confidence way to reproduce the issue? Yes. The source path and production report show provider completion progress is recorded while the task remains active until Is this the best way to solve the issue? No. Introducing a delivery phase is plausible, but this patch lets identical requests bypass the duplicate guard during delivery and needs real behavior proof before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c24d266b2d09. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +59, Tests +10. Total +69 across 23 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
|
|
Superseded by the canonical fix in PR #96018, now merged as The landed fix resolves the same delivery-phase self-deadlock without expanding the task-status schema with a competing Closing this duplicate lane. Reopen only with a concrete regression not covered by the landed behavior. |
|
补充了测试通过证明。@clawsweeper re-review |
|
Updated PR body with required What Problem This Solves and Evidence sections (English headers). @clawsweeper re-review |
Fixes #95701
What Problem This Solves
scheduleMediaGenerationTaskCompletion keeps the task
runningduring wakeTaskCompletion, creating a self-deadlock where the nextvideo_generatecall is blocked until the woken agent turn finishes. Sequential video generation workflows pay a ~3.5-4 min "release tax" per segment.Evidence
Fix
Added
deliveringtoTaskStatusandTASK_STATUSES, exportedmarkTaskDeliveringByRunId, and updated all downstream Record mappings for type completeness.Verification
What was not tested
Real video generation pipeline (requires cloud provider credentials).
Checks
16 files, +69/-14. Lockfile unchanged.