Skip to content

quest(m1): plan exact timestamps in every binding - #5890

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/binding-timestamps
Oct 18, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/binding-timestamps

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

Adds quest/m1/binding-timestamps.md [L]: every binding (moq-ffi, moq-c, cpp/obs, py/swift/kt/go/dart) carries media timestamps as an exact {value, scale} record mirroring moq_net::Timestamp, replacing the lossy microsecond fields. Ranked in m1 right after Data consumer timestamps (#5677), which lands first with the interim microsecond fields.

Quest-only. Public API and wire impact: none in this PR (the planned work breaks every binding's API, no wire change).

Decisions (planned with the maintainer, 2026-10-18)

  1. Goal: bindings carry exact {value, scale} timestamps with untimed as absent, replacing microseconds on frames, datagrams, producer args and data values; core and JS untouched.
    • ✅ Yes, as stated
    • Narrower: data values only
    • Broader: revisit the core/JS Timestamp type
  2. Milestone
    • ✅ m1
    • m2
  3. Order with feat(data)!: data consumers return each value's timestamp #5677
  4. Name
    • ✅ MoqTimestamp / C moq_timestamp / wrappers Timestamp
    • MediaTime
  5. C untimed
    • ✅ Nullable const moq_timestamp *
    • scale == 0 sentinel
    • has_timestamp flag
  6. Wrapper surface
    • ✅ Record plus duration helpers
    • Raw record only
    • Full core API
  7. Rollout
    • ✅ One PR across all bindings
    • Epic: ffi+c first, then wrappers
  8. Inexact duration conversion
    • ✅ Round to nearest, documented
    • Refuse when inexact
    • Floor, documented

Considered and rejected without a prompt: raw ticks at the track scale beside MoqTrackInfo.timescale (a producer argument needs its own scale; per-value records match the core and JS).

Checks

  • quest check: 410 documents ok.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Bindings carry {value, scale} timestamps mirroring moq_net::Timestamp
instead of lossy microsecond fields, after #5677 lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T04:02:32.277481Z 069d4bd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53a8eb82-9898-4aa1-92e6-f43f3ba152af
📥 Commits

Reviewing files that changed from the base of the PR and between 8bf21d3 and c783689.

📒 Files selected for processing: 2
  • quest/m1/README.md
  • quest/m1/binding-timestamps.md
  • 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

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 069d4bd7ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread quest/m1/binding-timestamps.md Outdated
Comment on lines +34 to +35
- **Shape mirrors the core:** one `{value, scale}` per value, `value` at most
`2^62 - 1` and `scale` non-zero. The FFI boundary refuses anything else with

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound scale to the core varint range

When a caller supplies a scale above 2^62 - 1, this contract treats it as valid because it only requires a nonzero scale, but moq_net::Timescale::new rejects such values. That makes the proposed record fail to mirror the core and may leave wrappers accepting timestamps that fail only when passed across the FFI boundary. Specify the same upper bound for scale and include an out-of-range-scale verification case.

AGENTS.md reference: AGENTS.md:L57-L64

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed: Timescale::new caps the scale at 2^62 - 1 too. Fixed in c783689: the shape now bounds scale like the core, and verification adds an out-of-range scale case.

(Written by Claude Opus 5.5)

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

Copy link
Copy Markdown
Collaborator Author

Merge summary

Adds the m1 quest Exact timestamps in every binding [L] and ranks it in quest/m1/README.md right after Data consumer timestamps. Quest-only; no API or wire change in this PR.

Decisions are the eight settled with the maintainer in the PR body (bindings only, m1, after #5677, MoqTimestamp/moq_timestamp/Timestamp, nullable C pointer for untimed, record plus duration helpers, one PR across every binding, round-to-nearest duration conversion).

Review: Codex on 069d4bd found one issue (bound scale to 2^62 - 1 like Timescale::new). Fixed in c783689, which also adds an out-of-range scale verification case. CI passed on c783689 with no new review. quest check: 410 documents ok.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit f098ecb Oct 18, 2026
7 checks passed
@kixelated
kixelated deleted the quest/m1/binding-timestamps branch October 18, 2026 04:20
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