Skip to content

test: verify send status timestamp type - #2887

Closed
yangr-happy wants to merge 2 commits into
larksuite:mainfrom
yangr-happy:feat/f3cbfea
Closed

yangr-happy wants to merge 2 commits into
larksuite:mainfrom
yangr-happy:feat/f3cbfea

Conversation

@yangr-happy

@yangr-happy yangr-happy commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Add regression coverage for send_status output to ensure last_updated_time preserves its JSON numeric type and full precision, including values above the exact integer range of float64. The tests also verify quoted numeric values remain strings and representative response fields stay unchanged.

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage for status responses and JSON parsing, including large timestamp values and quoted numeric values.
    • Added checks that representative response fields remain unchanged and requests are handled as expected.
    • These checks help verify consistent handling of status information across supported response formats and improve confidence in response accuracy.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds tests for preserving last_updated_time values during JSON response parsing and in bot-mode send_status responses.

Changes: Timestamp precision coverage

Layer / File(s) Summary
Response parsing and service coverage
internal/client/response_test.go, cmd/service/service_test.go
Tests check exact json.Number values for regular and large timestamps, string preservation for quoted timestamps, representative response fields, and mock request details.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

  • larksuite/cli#2868: Adds the same tests for timestamp precision in response parsing and send_status responses.
Merge Risk: Minimal · up to fb4de

The changes add focused timestamp regression coverage without changing runtime behavior. No actionable merge-blocking risk remains after normal checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the purpose and scope of the tests, but it does not follow the required template. It omits the Summary, Changes, Test Plan, and Related Issues sections, including the … Rewrite the description using the required headings. Include a brief summary, a list of changes, the completed test-plan checklist, and the related-issues entry or links.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the added regression test for the send_status timestamp type.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the purpose and scope of the tests, but it does not follow the required template. It omits the Summary, Changes, Test Plan, and Related Issues sections, including the required test-plan items.

Resolution

Rewrite the description using the required headings. Include a brief summary, a list of changes, the completed test-plan checklist, and the related-issues entry or links.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
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: 602fa844-38a1-4dc4-a846-d96eb2f1bd2f
Commits

Reviewing files that changed from the base of the PR and between f31194b and fb4dec9.

Files selected for processing: 2
  • cmd/service/service_test.go
  • internal/client/response_test.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions github-actions Bot added the size/S Low-risk docs, CI, test, or chore only changes label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@fb4dec9da9d244ba240f0e6cd57638cdc03cd5df

🧩 Skill update

npx skills add yangr-happy/cli#feat/f3cbfea -y -g

@yangr-happy yangr-happy closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Low-risk docs, CI, test, or chore only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant