Skip to content

fix(gadgets): add logging when progress comment update fails#614

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/post-comment-error-logging
Mar 6, 2026
Merged

fix(gadgets): add logging when progress comment update fails#614
zbigniewsobiecki merged 1 commit intodevfrom
fix/post-comment-error-logging

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Add WARN level logging when cascade-tools pm post-comment fails to update an existing progress comment
  • Previously errors were silently swallowed, making production debugging impossible
  • Pattern matches the existing error handling in PMProgressPoster (src/backends/progressState/pmPoster.ts)

Changes

File Change
src/gadgets/pm/core/postComment.ts Add logger import, log error with workItemId/commentId/error before fallback
tests/unit/gadgets/pm/core/postComment.test.ts Add logger mock, verify warn called on update failure

Test plan

  • Unit tests pass (npm test -- tests/unit/gadgets/pm/core/postComment.test.ts)
  • Full test suite passes (npm test)
  • TypeScript compiles (npm run typecheck)
  • Lint passes (npm run lint)

🤖 Generated with Claude Code

Previously, when `cascade-tools pm post-comment` attempted to update an
existing progress comment and failed, the error was silently swallowed
with no logging, making debugging production failures impossible.

This adds WARN level logging to the catch block in postComment.ts,
matching the pattern used in PMProgressPoster (pmPoster.ts). The log
includes workItemId, commentId, and error message for debugging.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 1e5e5f0 into dev Mar 6, 2026
6 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/post-comment-error-logging branch March 6, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant