Skip to content

test(chat): raise chat-service line coverage to ≥85% - #216

Open
MITOM06 wants to merge 1 commit into
mainfrom
test/cov-chat
Open

MITOM06 wants to merge 1 commit into
mainfrom
test/cov-chat

Conversation

@MITOM06

@MITOM06 MITOM06 commented Nov 14, 2026

Copy link
Copy Markdown
Owner

What

Unit tests only, no production code changes.

  • LinkPreviewServiceTest (27 tests): uses a local JDK HttpServer stub and the package-private constructor with an injectable SSRF guard. Covers URL validation (null/blank/too long/malformed/non-http/no host), OG/twitter/<title>/meta-name fallbacks, entity decoding, image absolutizing (relative, javascript:, unresolvable), non-HTML and non-2xx responses, guard refusal (host never contacted), the guard running on every redirect hop, redirects up to the limit and past it, missing or invalid Location, connection refused, the total-timeout deadline, the MAX_BYTES body cap, and CappedBodySubscriber (zero cap, below cap, truncate+cancel, onError).
  • AiFeedbackServiceTest (4 tests): message not found, none/null rating deletes the vote, first vote creates a document, an existing vote is updated in place.
  • CallTranscriptServiceTest (6 tests): member of an active call gets RPUSH + 2h TTL with the right JSON, null ts falls back to now, invalid input is ignored, non-member is rejected, ended or unknown call is rejected, a Redis failure is swallowed.

Mutation sanity check: disabling the SSRF guard or changing the zero-cap body makes 3 LinkPreview tests fail (reverted).

Coverage (jacoco.csv, lines)

83.70% (6785/8106) -> 86.15% (6983/8106)

No bugs found, no disabled tests. coverage-thresholds.txt not touched.

🤖 Generated with Claude Code

…ptService

Raises chat-service line coverage 83.70% -> 86.15%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
platform-web Ready Ready Preview Nov 14, 2026 10:45am UTC

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 89426ab0-a153-4266-8ccc-4f4683fa2673
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

This branch was successfully deployed

1 active deployment
Preview — 1e966f5d Deployed Nov 14, 2026 by vercel[bot]
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