Repository navigation
refactor(net)!: moq-net names say one thing - #6751
Conversation
Quest-Claim: ff53cd07c6928daf
Quest-Claim: 1a2186ff325f1c65
transport::Metrics drops the byte counts transport::Wire already holds; session::Stats reads them from the wire. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… finished Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… frees cache Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MoqAuthToken is MoqCredential, and each wrapper's AuthToken is Credential. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors JS Track.Consumer.info(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed end Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
writeGroup inserted a caller-built group; createGroup builds it, like Rust's create_group and e2ee's createGroup. Sharing one group between tracks goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
finish() declares the end without closing, abort(err) is terminal, and close() releases the handle like a Rust drop: clean with a declared end, otherwise a Cancel abort. Producer.closed and Demand.closed now settle on the outcome, including a reached and settled end; the wire layer watches the release through private hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd() Lister.ended is renamed closed. Group and broadcast Demand.unused now reject once the handle closes, as Rust's do, instead of reading a closed handle as unused. Subscriber.end() and Ordered.end() are removed: readers await finished(); publishers read the snapshot through a private hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
A consume() handle shares the producer's state, so its close() ended the group for every reader. close() now takes no error and releases only this handle: a shared handle ends its own reads, a mirror closes its own copy. Wire and track fan-out fail a reader's copy through a private hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 284515e
No actionable bugs found in the inspected changes. Consistent names and the narrower JS createGroup ownership API are a coherent direction. Rust allocator/credential/info/stats callers, binding credential wrappers, group demand watchers and transport Wire/metrics snapshot handling remain aligned through the migration.
Verification: static GitHub inspection of the changes and relevant surrounding code only. No builds, binding regeneration, tests or interoperability checks executed.
Mirror moq_net::bandwidth::Allocator and Session::allocator() across moq-ffi, every hand-written wrapper, OBS, and moq-c (moq_session_allocator, moq_allocator_reserve, moq_allocator_close). Python and Swift move the nested Bandwidth.Consumer to a top-level BandwidthConsumer, matching Kotlin, Dart, and C++. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 59da867
Compared with previous review at 284515e.
No actionable bugs found in this update. Extending Allocator naming through UniFFI, language wrappers, OBS and the C ABI keeps the public surface aligned. The Python/Swift BandwidthConsumer move and retained producer bandwidth options are documented. Inspected caller migrations, Dart native symbols/converters and C++ binding generation.
Verification: static GitHub inspection only; no builds, binding regeneration or tests executed.
moq-audio's capture logs a finished track's Ok outcome, the drain and compat clients finish their groups, rustfmt, and the quest now covers only the JS consumers whose close() still ends shared state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he_clean_outcome Main's no-async model gate (#6851) builds tests without the async read_frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fecycle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fecycle #6815's IETF range updates finish their group producers, finish tracks before closing them, and release an excluded group's reader through the private releaseGroupReader hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n group below the end A prune that evicts the open group holding the end back now re-checks the outcome, as the Rust poll_outcome does once the evicted slot leaves its lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fecycle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#6900's new bench ends them with the pre-split close(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A received copy's tail grace is judged when polled, so a later subscription with a longer max delay could reopen an end closed() already reported, and an abort within it turned it into an error. poll_outcome now latches the clean outcome it returns, as JS does by settling before a subscription change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Carry the renames into #6781 (simulcast rungs): MoqAllocator option types, Reservation::rate()/consume(), moq_allocator_* in the C tests, and keep both sides of the Unreleased MIGRATE entries. Rename main's new track::Consumer::query() and JS writeGroup callers, and regenerate the Dart bindings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep both Unreleased MIGRATE entries, take finish()/abort() with createGroup(), drop the shared-group and prefilled-group tests that createGroup rules out, and carry group::Demand's new closed() docs beside wanted_changed(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#6834 replaced the per-token handles (MoqAuth, MoqAuthToken, and each wrapper's Auth/AuthToken) with MoqSession.tokens()/grants(), so the binding-level Credential rename and its MIGRATE entries go; moq-net's auth::Auth is still renamed Credential, now including the session fields #6834 added. Keep Allocator/BandwidthConsumer in the wrappers beside the new GrantConsumer and Tokens, take #6834's binding docs and OBS token flow, and regenerate the Dart bindings. #6750 merged as a squash, so its conflicts resolve to the earlier merge of its head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged main again after moq-dev/moq#6750 and moq-dev/moq#6834 landed, then landing
Checks: (Written by Claude Opus 5.5) |
Merge origin/main brought #6751, which renamed Track.Producer.writeGroup to createGroup. The interop probe fixture now drives the clock until the estimate lands, and the announce teardown test uses closeUnwanted like Connection.announced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Carry #6751's renames into the draft 14-17 removal: stats::Message, Session::allocator(), track info(), and keep both MIGRATE entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
moq-net and
@moq/netnames collided with other items (stats::Controlvstrack::Control,stats::Bytesvsbytes::Bytes,transport::Statsvssession::Stats, JSReservation.grantvsAuth.Grant, and a reservation's rate namedpeek()in Rust,grant()in the bindings, andratein JS), described the wrong shape (Session::bandwidth()returns an allocator beside thesend_bandwidth()/recv_bandwidth()estimates), or did not mirror each other (Rustquery()vs JSinfo(), JSwriteGroupvs Rustcreate_group). Quest:quest/m1/api-audit/net-names.md.Approach
One commit per decided rename, each carried through every caller, binding, and doc that exposes it.
transport::Metricsdrops the byte counts, andsession::Statsreads them from the transport'sWire.Impact
All breaking;
rs/moq-net,js/net,rs/moq-tokio,rs/moq-ffi,rs/moq-c, and each wrapper'sMIGRATE.mdsay how to migrate. Wire: none.Session::bandwidth()→allocator(),Client::with_bandwidth→with_allocator,auth::Auth→auth::Credential,track::Consumer::query()/track::Querying→info()/track::Resolving,bandwidth::Reservation::consumer()→consume(),bandwidth::Reservation::peek()→rate(),stats::Control→stats::Message,stats::Bytes→stats::Totals.group::Demanddropsis_used/used/unused/poll_used/poll_unusedforwanted(),wanted_changed(), andpoll_wanted_changed(), liketrack::Demand.transport::Stats→transport::Metricswithoutbytes_sent/bytes_received;poll::Session::stats()→metrics(), now defaulted;transport::StatsUnavailableis gone.Connection::bandwidth()→allocator().@moq/net:Auth.Auth→Auth.Credential,Reservation.grant→rate, a connection'sbandwidth→allocator, andTrack.Producer.writeGroup(group)→createGroup(sequence), which returns the new group.MoqBandwidth→MoqAllocatorandMoqSession::bandwidth()→allocator(); each wrapper'sBandwidth/bandwidth()→Allocator/allocator().MoqReservation::grant()→rate(), and each wrapper'sReservation.grant()(GoGrant()) →rate()(GoRate()). Python's and Swift's nestedBandwidth.Consumeris now the top-levelBandwidthConsumer, as in Kotlin, Dart, and C++. Producer options keep theirbandwidthfield, like moq-audio/moq-video.moq_session_bandwidth→moq_session_allocator,moq_bandwidth_reserve→moq_allocator_reserve,moq_bandwidth_close→moq_allocator_close,moq_reservation_grant→moq_reservation_rate. The C ABI is not frozen: its Unreleased MIGRATE already carries layout-breaking changes. The receive-estimate names (recv_bandwidth,moq_bandwidth_consumer_*) stay.Choices made without asking, for review:
poll::Session::stats()is also renamedmetrics(), so the method names what it returns.metrics()refreshes from the backend's byte stats, so Iroh still reports bytes; the registry sees them only once something samples the session.createGrouptakes a sequence and builds the group like Rust'screate_groupand@moq/e2ee'screateGroup, rather than only renamingwriteGroup(group). So a group can no longer be written before joining a track, or join two tracks; the three tests for that path are gone, and so is thegroupStarthook.bandwidthbecameallocatortoo, since it has the same collision besideprobe.Alternatives
writeGrouptocreateGroup(group)only: keeps prefilled and shared groups, butcreateGroupwould then take two shapes within JS.Decisions
What do Rust, the bindings, and the C ABI call a reservation's current slice? (JS calls the watchable signal
rate, read withrate.peek().)peek()/moq_reservation_peek, matching Rust before this PR (recommended at the time)rate()/moq_reservation_rate, matching JS'srate✅ (maintainer, 2026-10-25)grant()in the bindingsJS keeps its signal-free
Reservation.peek(), which reads the registry directly after a synchronousupdate(), beside theratesignal.Merging main: moq-dev/moq#6428 dropped the JS per-name sequence namespace, so its replacement tests resolve to main's "a replacement producer starts over", now written with
createGroup. The later merge renames main's newtrack::Consumer::query()callers (lite and IETF publishers, the fuzz bench helper) toinfo()and its newauth::Authuses toCredential, keeps both sides' MIGRATE entries, fixes the Python and Swift docs that still namedBandwidth.Consumer, and regenerates the Dart bindings and@moq/netAPI report. The third renames the configured-token code from moq-dev/moq#6177 (moq-tokio'sauth::Authand@moq/net'sAuth, whichconnection/tokens.tsimports asPresentedbeside its own internal dialCredential) and carries the renames into the merged binding docs. The fourth keeps main's now-usedInFlight::acceptedbeside this branch'strack::Resolving, keeps both moq-tokio MIGRATE entries, and drops main's newquest/m1/api-audit/wanted.mdblocker on this one, noting thatgroup::Demandalready sayswanted. The fifth keeps both sides' Unreleased MIGRATE entries beside moq-dev/moq#6745's decoder reads, the sixth takes moq-dev/moq#6851's async-only lint reason onstats::Session::controlwithstats::Message, and the seventh regenerates the@moq/netreport under moq-dev/moq#6794's API Extractor and carries theSession allocatorentry into the hand-written 0.7 history that moq-dev/moq#6052's generatedc/moq/MIGRATE.mdcopies. The eighth carries the renames into moq-dev/moq#6781's simulcast rungs (MoqAllocatoroption types,Reservation::rate()/consume(),moq_allocator_*in the C tests, main's newquery()and JSwriteGroupcallers), keeping its idle-reservation MIGRATE entries in the new names. The ninth merges moq-dev/moq#6750:finish()/abort()withcreateGroup(), dropping its shared-group and prefilled-group tests thatcreateGrouprules out, and one hole-fill test now awaits the group's asynchronous finish. The tenth takes moq-dev/moq#6834, which replaced the per-token binding handles (MoqAuth,MoqAuthToken, each wrapper'sAuth/AuthToken) withMoqSession.tokens()/grants(), so the binding-levelCredentialrename and its MIGRATE entries are gone; moq-net'sauth::Authis still renamedCredential, including the session fields #6834 added.Checks:
just check(all lanes the branch touches, including 8868 Rust tests; on the bindings commit, dart's RSS-boundedleak_test.dartfailed once under the parallel load and passes alone),just rs wasm,just test interop --all, andbun testin net, hang, watch, e2ee, publish, and room all pass. After therate()rename and merging main:just check(js, rs with 8865 tests, markdown, gh, quest, obs, drill, lints) plusjust py check/test,kt check(the Kotlin wrapper build and JVM tests),go check,cpp check,obs compile, anddart checkpass. Not run: the Swift wrapper (no macOS here). After the latest merge of main:just checkpasses every lane it selects (rs, js, py, kt, swift, go, cpp, obs, dart, markdown, quest, and the rest).just rs featuresandjust rs loomfail on errors this PR does not touch, whichorigin/mainhas too: moq-net's rustdoc links (crate::Session::closed,Self::unusedintrack/fill.rs, and three private-item links), moq-tokio'sopen_requestunused in onetokio-featurescombination, andtests/loom.rscalling the now-privateBroadcast::route()and the removedSubscription::with_groups. The rest offeatures(quic, media,--no-default-features) passes. After the fourth through sixth merges of main:just checkpasses every lane it selects (rs, js, py, kt, go, cpp, obs, dart, markdown, quest, and the rest; Swift skips without a toolchain here) after each, andjust test interop --allpasses after the fifth. After the seventh:just checkpasses every lane it selects (rs with 9068 tests, c, cpp, js, py, kt, go, obs, dart, markdown, gh, quest, toml, nix, and the rest; Swift skips without a toolchain), and so doesjust test interop --all.After the eighth through tenth merges:
just checkpasses every lane it selects (rs, c, cpp, obs, js, py, kt, go, dart, markdown, gh, quest, toml, nix, and the rest; Swift skips without a toolchain), and so doesjust test interop --all.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code