Repository navigation
feat(ffi): bump the exporter's moq pin to 1aa86d5e6 - #881
Conversation
Quest-Claim: ae92bde6da4c8c8f
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
moq's main now builds moq-tokio and the facade without tripping recursion_depth_exceeding_limit (moq-dev/moq#9143). Port every moq program and bench to its API: groups keyed by a start timestamp, origin routes in place of publications, inclusive time ranges, and libmoq in place of moq-c. Drop the stale excludes and exclude the six new refusals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otlin and Dart Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
ℹ️ No blocking issues. Some comments and docs still say
Timestampcrosses as aCopyvalue, which this pin changes.
Approach: Sound. It bumps the pin, ports each program to moq's new API, and turns stale excludes into the five new ones the census reports. The Timestamp layout regression is left to a planned follow-up rather than mixed into the bump.
Reviewed changes
I read all 29 files. I also checked the Go receiver-move semantics and the group-start ordering in every bench program.
- Pin and excludes:
moq_revmoves to1aa86d5e6.ffi.tomldrops 17 stale excludes and addsescape,unescape,Mpegts::deserialize, andStreams::{tcp, unix}.web.tomlkeeps the three of those that are not in moq-tokio. - Test programs: All 7 languages are ported:
append_group(start)and a non-optionalwrite_frametimestamp (Timestamp::unscaled(0)on untimed tracks).finishnow returnsFinished.route(path, RouteOptions)replacescreate_broadcast.- Ranges use
Anchor::Time. - The dial check moves to
Client::with_url.
- Bench programs: Every case takes its group starts from one running microsecond counter, so starts strictly increase across cases. That includes Swift's writer task, which reserves its range up front, and the
throughputhelpers, which thread the counter through. Go'sFinishmoves the receiver (self.Handle_.Moved()inffi/src/go.rs), so droppinggroup.Close()there is correct. moq-c.candbench-build: They follow moq'srs/moq-c→rs/libmoqrename and the timestampedmoq_publish_track_group.- Quests:
moq-pin.mdis deleted and its links are cleaned up.niche-values.mdis added undershipto restoreTimestampas an opaque value.
ℹ️ bench/ffi/README.md still says Timestamp crosses as a value
The PR updates ffi/README.md so it no longer gives Timestamp as its opaque-value example. But the bench README still says, in the present tense, that Timestamp crosses as its 16 bytes. Until the niche-values follow-up lands, that contradicts what the binding generates at this pin. Its case table also still describes write as using one Timestamp, but every case now converts one per group.
Technical details
# Bench README describes Timestamp as a by-value Copy type at a pin where it is a handle
## Affected sites
- bench/ffi/README.md:35 — `write` row: "with one `Timestamp`"; each group now takes its own start, converted once per group
- bench/ffi/README.md:454-455 — "`Timestamp` is `Copy` with private fields, so it crosses as its 16 bytes, and a stamped frame allocates and frees nothing in Rust"
- bench/ffi/README.md:581 — "A `Copy` type with private fields, such as `Timestamp`, crosses by value"
- flake.nix:310 — comment still says `rs/moq-c` (renamed to `rs/libmoq`)
## Required outcome
- Present-tense claims match the binding at moq `1aa86d5e6`, where `Timestamp` is a handle until quest/m1/ffi-export/niche-values.md lands. Dated measurement sections can stay as they are but should say they were taken at `ffcb7cd9`.
- The `write` row describes one timestamp per group.claude-opus-5-5 | 𝕏
Merging this PR will degrade performance by 5.39%2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
Fixes pullfrog's findings on #881: the Kotlin, Python, Swift, Dart, and Go programs' comments and the bench README still called it a copied value, and flake.nix still named rs/moq-c. Records the maintainer's answer that niche values is a general rule, not moq-specific. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Maintainer decision on this PR's follow-up, relayed from the maintainer's brief:
(Written by Claude Opus 5.5) |
|
Answering pullfrog's review body finding: fixed in 1d90c85. (Written by Claude Opus 5.5) |
|
Applies the maintainer decision at 1d90c85: (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the delta since c4fa97e, a docs and comments commit that addresses the earlier feedback.
- Bench README: The
writerow now says oneTimestampa group. The present-tense claims sayTimestampwas a value atffcb7cd9and is a handle at1aa86d5e6until niche-values lands. - Test program comments: Kotlin, Python, Swift, Dart, and Go now say a timestamp is a lent handle. The "stays usable" assertion messages match.
flake.nix: The comment namesrs/libmoq.niche-values.md: The Plan now states the rule covers everyCopytype with a niche-encoded enum field.
claude-sonnet-5-5 | 𝕏

Bumps the exporter's moq pin (
moq_revinffi/justfile) fromffcb7cd9to moq's currentmain,1aa86d5e6, and ports every moq program and bench to its API. Completes and deletesquest/m1/ffi-refusals/moq-pin.md.Why now
The quest waited on moq-tokio and the moq-ffi facade building without tripping
recursion_depth_exceeding_limit. moq-dev/moq#9143 fixed the session driver'sSendandSyncproofs. At1aa86d5e6,just ffi moq-cppbuilds both under-D recursion_depth_exceeding_limitwith no overflow, so the wait has cleared.Changes
ffi/moq/ffi.toml):bytes,kio,hang::moq_net, moq-quic's and moq-tokio'squic::driveritems, mp4_atom's two, the rustlsConfigBuilderpair,Request::within,websocket::Listener::accept, and the 18container::Producer::modifyinstances, which export as exclusive lends now thatGuardis reachable.mainadds, as the quest's Waiting item planned:escapeandunescape(Cow<'_, str>),Mpegts::deserialize(serde's genericDeserializer), andserver::Streams::{tcp, unix}(Options of std listeners, notClone).ffi/moq/web.tomlkeeps the three of them outside moq-tokio.ffi/moq/moq.{c,cpp,kt,py,swift,go,dart}), ported to moq's API:Timestamp:append_group(start), andwrite_frametakes a non-optionalTimestamp. On an untimed track that isTimestamp::unscaled(key).origin::Producer::route(path, RouteOptions)replacescreate_broadcastandannounce(Route::default()).Anchor::Timeranges;Range::groupsandAnchor::Absoluteare gone.group::Producer::finishreturns aFinishedhandle.Timestamp::nowis gone.ffi/moq/bench/export.*):moq-ffi/src/bench.rsdoes.group::Demand::startinstead of the removedsequence.moq-c.c: moq renamedrs/moq-ctors/libmoq(moq-dev/moq#8941).bench-buildnow builds--package libmoq, andmoq-c.cusesmoq_origin_route,moq_route_broadcast, and the timestampedmoq_publish_track_group.ffi/README.mdno longer givesTimestampas its opaque-value example (see the follow-up).report.pyname the getterdemand.start(). The README's present-tense claims sayTimestampis a handle at this pin and was a value atffcb7cd9, and itswriterow takes one timestamp per group.flake.nixnamesrs/libmoq.Requiredlink in no-config and its links in the TS pin quest and the refusals epic.Census
just ffi censusat1aa86d5e6passes. It reports:escapeandunescape.Mpegts::deserialize,Streams::{tcp, unix}, andDangerousClientConfig::cfg.At
ffcb7cd9, the last measured nightly (2026-11-11) refused 94 items and 5 types. Those had already shrunk onmainbefore this PR, through the epic's children.Validation
just ffi moqat the pin: passes. C, C++, Kotlin, Python, Swift, Go, and Dart all printok, and mypy and pyright report 0 errors on the generated Python.just ffi moq-cppagainst a fresh clone of moqmain(1aa86d5e6): passes, with norecursion_depth_exceeding_limit.just ffi census: passes. It first caught the stalewebsocket::Listener::acceptexclude, now dropped.nix develop .#bench --command just ffi bench-buildbuilds every bench program against the real CodSpeed hooks.just ffi bench-run 1ran every program to completion, so no group start trips moq's strictly-increasing rule. The browsers did not run locally.just ffi moq-web: exports and builds the wasm32 stand-in, andjust ffi ts-programtype-checksexport.ts.just ci: passes, includingjust ffi moq-cat the pin.Decisions
I could not prompt the maintainer, so I took my recommendation on each of these. They are listed for review:
main(1aa86d5e6). The quest's Goal and the 2026-11-09 decision both say currentmain.ffi/moq/ffi.toml"), and the epic leaves each remaining refusal to no-config, which now lists them.auth::Tokens::dial/auth::Dialbecamepub(crate)in moq-net.ClientURL getter path in their tests, drop that check.Client::with_url(..).url().moq-cafter moq's rename to libmoq. That keeps the CodSpeed case names and the README tables continuous. Only the package name inbench-buildchanges.Timestampbecoming a handle at this pin, and fix it in a follow-up.Timestampgainedscale: Option<Timescale>for unscaled group keys, so the exporter's layout model now treatsNoneas possibly uninitialized, andTimestampcrosses as a handle rather than as its 16 bytes.Copytype with a niche-encoded enum field, not moq specifically.Public API
Timestampchanges from an opaque value to a handle, until the follow-up lands.Follow-ups
Copytype whose niche fills its bytes, such asOption<NonZero<u64>>, as an opaque value, so moq'sTimestampis a 16-byte value again. A child of the exporter epic, since it changes generated APIs, and required byship. Kept by the maintainer as a general rule for niche-encoded enum fields, not moq-specific; no open decisions.Models
Size: S
Implementer: Claude, claude-opus-5-5, unknown effort (arm A)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S)
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 1d90c85
Base: origin/main at 46c5863
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1f385-e902-7070-aac9-d28b10971443, round 2Score: 10/10,
The incremental changes clarify documentation, comments, and assertion messages without changing behavior; no actionable findings remain from code inspection.Rounds: 3; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1f548-787e-75c2-ac4f-4b85e4ff5ab4, round 1Score: 8/10,
The scoped diff consistently updates the moq pin, exclusions, examples, and benchmarks for the upstream API changes, with no actionable defects found by inspection, though builds and tests remain unverified.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Summary by CodeRabbit
Summary by CodeRabbit