Repository navigation
Remove external DNS from the WebFinger unit test - #1275
Conversation
The WebFinger unit test mocked HTTP responses but still resolved the public hostnames through the SSRF guard. Skip that guard for these mocked lookups so external DNS latency cannot exhaust Bun's timeout. Retain both alias assertions and fetch restoration. A temporary DNS-failure harness fails before the patch and passes with zero DNS calls afterward. The CLI suite passes on Deno, Node.js, and Bun. Note the option rename needed when merging into 2.4 or later. Fixes fedify-dev#1273 Changelog: none Assisted-by: Codex:gpt-6.1-sol Assisted-by: Claude Code:claude-opus-5-5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe ChangesWebFinger test
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to This test-only change avoids DNS validation for mocked lookups while leaving production validation and its dedicated tests intact. No outstanding merge risk is indicated. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
The test in packages/cli/src/webfinger/mod.test.ts mocks HTTP responses but still resolves real hostnames through the SSRF guard, allowing DNS latency to exhaust Bun's timeout. Pass
allowPrivateAddress: truefor these mocked lookups so the existing alias assertions run without external DNS.A temporary DNS-blocking harness failed before the patch and passed with zero DNS calls afterward.
mise run test-each clipassed all 78 tests on each of Deno, Node.js, and Bun. The dedicated SSRF tests also passed.Fixes #1273.