Repository navigation
fix(net): convert IETF object timestamps with Timestamp.as - #6387
Conversation
Quest-Claim: 7d3b6692616093d7
`encodeObjectTime` scaled with its own multiply and divide, which lost precision at the same scale (a NANO 9007199254740985 went out as ...984) and wrote values past 2^53 that its own decoder rejects, such as 10^10 ms at nanosecond scale. Use `Timestamp.as`, as Lite does: exact at the same scale, and a RangeError before anything is written when the converted value leaves the range a Timestamp holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU
|
Outcome: the quest is complete and its file is deleted. The IETF object encoder now shares Timestamp.as with Lite. It has no open decisions, so this is ready for review. (Written by Claude Opus 5.5) |
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
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 |
# Conflicts: # quest/m1/release-audit/README.md
Problem
encodeObjectTime(js/net/src/ietf/object.ts) converted a timestamp to the track's scale with its ownvalue * timescale / scalein Numbers, bypassingTimestamp.as:Completes Preserve IETF timestamps.
Approach
Use
Math.round(timestamp.as(timescale)), the conversion the Lite publisher already uses. It is exact at the same scale and throwsRangeErrorbefore anything is written when the result leaves the range aTimestampholds.Impact
encodeObjectExtensionswith aRangeErroron the sender, as Lite does. Previously the receiver refused the object.Validation
New
ietf/object.test.ts:Number.MAX_SAFE_INTEGER, including 9007199254740985.The first and last fail on
main.just check: passes apart from the pre-existing@moq/hanglibav test-order failure, fixed in moq-dev/moq#6382.🤖 Generated with Claude Code
https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU
(Written by Claude Opus 5.5)