fix(agents): add observability to work-item image download#949
Merged
zbigniewsobiecki merged 1 commit intodevfrom Mar 18, 2026
Merged
fix(agents): add observability to work-item image download#949zbigniewsobiecki merged 1 commit intodevfrom
zbigniewsobiecki merged 1 commit intodevfrom
Conversation
…rkItemStep Silent null returns from downloadAttachment were completely invisible in run logs, making image delivery failures impossible to diagnose. Add INFO logs before and after the parallel download, plus a WARN when a download returns null (with query params stripped from the URL to avoid leaking Trello API credentials). Also fix a pre-existing bug where the exception-path WARN logged the full URL including query-param credentials, and correct a stray lowercase 'warn' log level in builderFactory.ts to match the codebase-wide 'WARN' convention. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchWorkItemStepsilently discarded image downloads whendownloadAttachmentreturnednull— no log entry was emitted, making failures completely invisible in run logs (only container stdout was written, which is never captured incascadeLog)key=,token=); both WARNs now strip query params with.split('?')[0]builderFactory.tshad a singlelogWriter('warn', ...)inconsistent with the codebase-wide'WARN'conventionChanges
src/agents/definitions/contextSteps.tsPromise.all(count), WARN on null return (sanitized URL), INFO after (attempted/downloaded/skipped); fix URL sanitization in existing exception WARNsrc/agents/shared/builderFactory.ts'warn'→'WARN'to match conventiontests/unit/agents/definitions/contextSteps.test.tsTest plan
[INFO] fetchWorkItemStep: downloading work item images { count: N }[WARN] fetchWorkItemStep: image download returned null { url: <no query params> }(on failure)[INFO] fetchWorkItemStep: image download complete { attempted: N, downloaded: M, skipped: K }🤖 Generated with Claude Code