fix(discord): preserve streamed replies after tool warnings#84359
fix(discord): preserve streamed replies after tool warnings#84359joshavant wants to merge 2 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows the current-main Discord finalizer can send later error finals through fallback cleanup that clears the attached draft, and the linked issue discussion reports the matching real Discord symptom. PR rating Rank-up moves:
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. Real behavior proof Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Choose one canonical Discord fix, keep standalone terminal-error cleanup intentional, and merge only after exact-head checks plus real Discord proof that the final answer and warning remain visible. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the current-main Discord finalizer can send later error finals through fallback cleanup that clears the attached draft, and the linked issue discussion reports the matching real Discord symptom. Is this the best way to solve the issue? Mostly yes for the later-warning order this branch targets. The remaining maintainer choice is whether this narrower guard is preferred over the active replacement PR that also covers warning-before-final ordering. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a00e7d3898cf. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
Summary
Motivation
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
Behavior addressed: Discord streamed final replies should remain visible when a later failed-tool warning is delivered.
Real environment tested: Source checkout on macOS with focused Discord monitor tests; pre-patch AWS Crabbox attempts from current main did not reproduce the exact destructive deletion state.
Exact steps or command run after this patch: node scripts/run-vitest.mjs extensions/discord/src/monitor/message-handler.process.test.ts; pnpm check:changed
Evidence after fix: The new regression test keeps the preview message id after delivering a normal final followed by an isError final, and the full Discord process test file passes.
Observed result after fix: The finalized preview remains intact and the failed-tool warning is delivered through normal Discord reply delivery.
What was not tested: A successful after-patch live AWS Discord deletion reproduction/fix comparison, because current main did not reliably reproduce the destructive live state during investigation.
Before evidence (optional but encouraged): The new regression test failed before the fix because the later error final cleared the already-finalized draft preview.
Root Cause (if applicable)
Regression Test Plan (if applicable)
User-visible / Behavior Changes
Discord streamed replies should no longer disappear when a later failed-tool warning is delivered.
Diagram (if applicable)
Security Impact (required)
Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
Compatibility / Migration
Risks and Mitigations