Skip to content

fix: int64を選ぶように#9

Open
kaitoyama wants to merge 1 commit into
mainfrom
fix/invoice-int64-amounts-and-timestamps
Open

fix: int64を選ぶように#9
kaitoyama wants to merge 1 commit into
mainfrom
fix/invoice-int64-amounts-and-timestamps

Conversation

@kaitoyama
Copy link
Copy Markdown
Collaborator

@kaitoyama kaitoyama commented Feb 8, 2026

明示的に指定しないとgoで32になっていた

Summary by CodeRabbit

Release Notes

  • API Updates
    • Enhanced data accuracy and reliability for financial records. All monetary amounts (invoice totals, amounts due, paid, and remaining) and creation timestamps in invoices and checkout sessions now use 64-bit integer formatting. This provides improved numeric precision, reduces overflow risks, and ensures better support for large transaction values across the platform.

- Add format: int64 to amount_due, amount_paid, amount_remaining, created
  in Invoice and GetCheckoutSessionsResponse schemas
- Regenerate server/gen.go so Go types are *int64 instead of *int

Avoids silent overflow on 32-bit builds and Unix timestamp overflow in 2038.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

The changes add explicit 64-bit integer formatting to numeric fields in the OpenAPI schema and update corresponding generated Go code, changing field types from 32-bit to 64-bit integers for monetary amounts and timestamps across Invoice and GetCheckoutSessionsResponse types.

Changes

Cohort / File(s) Summary
API Schema Updates
openapi.yaml
Added format: int64 to monetary and timestamp fields in Invoice and GetCheckoutSessionsResponse objects to explicitly specify 64-bit integer representation.
Generated Code Synchronization
server/gen.go
Updated struct field types from *int to *int64 for corresponding monetary and timestamp fields in GetCheckoutSessionsResponse and Invoice, reflecting schema changes; codegen version bumped to v2.5.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Integers grow stronger, taller still,
From thirty-two to sixty-four with will,
Our currency and timestamps now run deep,
No overflow shall make us weep!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is in Japanese and translates to 'fix: choose int64', which directly describes the core change of upgrading integer fields from 32-bit to 64-bit integers across Invoice and GetCheckoutSessionsResponse schemas.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/invoice-int64-amounts-and-timestamps

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

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