fix(wikipage): log wikipage fetches for jobs#107
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughThis PR adds request logging for Wikimedia/Wikipedia fetch operations. A new Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/wikipage/wikimedia-client.ts`:
- Around line 249-289: The request logging in `#fetchJsonOnce` is masking the
actual fetch outcome because each this.#requestLog.append call can throw and
replace either a successful response or the real network/HTTP error. Update the
logging in WikimediaClient.#fetchJsonOnce so append failures are handled
separately from fetch handling, using getLogger and formatError to record the
logging error without rethrowing it, while preserving the original behavior for
the success, non-OK, and exception paths. Ensure the three branches around
this.#requestLog.append still return/throw the intended fetch result even if
logging fails.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7d0bb5c2-5b02-4c58-9236-524457e06dd3
📒 Files selected for processing (11)
package.jsonsrc/cli/queue.tssrc/common/logging.tssrc/llm/request-log.tssrc/wikipage/fetch-log.tssrc/wikipage/resolver.tssrc/wikipage/types.tssrc/wikipage/wikimedia-client.tstest/common/logging.test.tstest/llm/client.test.tstest/wikipage/resolver.test.ts
Summary
Verification