fix(cron): summarize shell failures directly#92603
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 7:48 PM ET / 23:48 UTC. Summary Reproducibility: yes. source-level: current main still stores generic exec/bash summary text and formats it through the existing warning path before cron can promote fatal payload text. I did not run a live cron-to-channel reproduction in this read-only review. Review metrics: 2 noteworthy metrics.
Stored data model 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:
Proof path suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a narrowed, conflict-free branch that keeps the cron shell-failure fix, fixes or splits the pre-commit tooling change, adds real redacted delivery proof, and has maintainer acceptance or tightening of command excerpts. Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main still stores generic exec/bash summary text and formats it through the existing warning path before cron can promote fatal payload text. I did not run a live cron-to-channel reproduction in this read-only review. Is this the best way to solve the issue? Yes with caveats: direct cron shell-failure formatting is narrower than changing all exec display summaries, but the submitted branch is not the best merge shape until proof, conflicts, lint/quality failures, and command-excerpt acceptance are handled. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5e572dcf781a. Label changesLabel justifications:
Evidence reviewedSecurity concerns:
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)
|
…mmary Resolve conflict in embedded-agent-subscribe.handlers.tools.ts: preserve upstream replay-safety guard (attemptedMutatingAction) for mutatingAction/actionFingerprint/fileTarget while retaining the commandExcerpt field from this branch. Fix pre-commit hook ARG_MAX failure on Windows when staging large file counts (e.g. upstream merge). Pipe file lists via NUL-delimited stdin instead of argv, and use xargs -0 for git add to chunk large lists. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
@clawsweeper re-review Branch merged with upstream/main. Conflict in |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
Summary
Closes #87426.
Problem
Cron announce failures with no final assistant message could deliver a synthesized
(agent) failedsummary that paraphrased raw bash into a misleading step list, such as shell keywords being shown as separaterun then,run [andrun jqsteps.Root Cause
Exec/bash tool failures reused the generic tool display summary. That summary is useful for timelines, but it tokenizes shell stages into human-readable action fragments, which becomes confusing when cron delivery promotes the error payload as the user-visible failure notification.
Solution
Testing Performed
cmd.exe /C node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/payloads.errors.test.ts src/cron/isolated-agent.helpers.test.ts src/cron/run-diagnostics.test.ts src/agents/tool-display.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts src/agents/embedded-agent-runner/run/payloads.test.ts src/auto-reply/status.test.ts src/agents/command/session-store.test.ts src/gateway/session-utils.fs.test.tsgit diff --checkReal behavior proof
Behavior addressed: Cron shell failures now produce direct failure copy like
Bash exited with code 1. Last command: ...instead of promoting generic shell step-list text.Real environment tested: Local source checkout on current
upstream/main, using the repo Vitest wrapper through Windowscmd.exe.Exact steps or command run after this patch: The focused multi-file
node scripts/run-vitest.mjs ...command listed above, plusgit diff --check.Evidence after fix: The parent validation passed all 5 Vitest shards, including
payloads.errors.test.ts,isolated-agent.helpers.test.ts,run-diagnostics.test.ts,tool-display.test.ts, andembedded-agent-subscribe.handlers.tools.test.ts.Observed result after fix: Regression tests assert cron bash failures deliver direct shell failure text and command excerpts, while existing non-shell payload behavior remains covered by surrounding tests.
What was not tested: A live cron-to-Discord delivery run was not executed in this environment.