fix: keep tracked-change revision ids in signed 32-bit range#427
Conversation
Suggestion mode seeded w:ins/w:del ids from Date.now(), producing 13-digit values that overflow the signed 32-bit range consumers read w:id into. Mint from a document-seeded counter and fold out-of-range ids at parse/serialize boundaries. Port of eigenpal/docx-editor#1093. Co-authored-by: Jan Kubica <jan-kubica@users.noreply.github.com>
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request ensures tracked-change revision IDs remain within the signed 32-bit integer range accepted by OOXML consumers by introducing ID normalization and replacing clock-based ID generation with a monotonic counter seeded from the document. The review feedback highlights two critical issues: first, using a module-level global counter in revisionIds.ts can cause ID collisions and document corruption in multi-editor environments; second, paragraph-mark revisions (pPrMark) are currently ignored during document seeding, which can also lead to ID collisions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Folio stores paragraph-mark revisions on pPrMark.info.id, not the upstream pPrIns/pPrDel shape. Also commit the docx-core model API snapshot for MAX_REVISION_ID / normalizeRevisionId. Co-authored-by: Jan Kubica <jan-kubica@users.noreply.github.com>
CC: format:check failed on the pPrMark seeding follow-up. Co-authored-by: Jan Kubica <jan-kubica@users.noreply.github.com>
|
@coderabbitai review |
Suggestion mode seeded
w:ins/w:delrevision ids fromDate.now(), producing 13-digitw:idvalues that overflow the signed 32-bit range OOXML consumers read into. Exported documents then failed to open.Changes
revisionIds.ts), starting at 1EditorState.createand fromseedCommentAllocatornormalizeRevisionId