Skip to content

chore: bump the moq pin past moq-tokio's fallback runtime - #196

Merged
kixelated merged 8 commits into
mainfrom
quest/m1/moq-pin
Oct 29, 2026
Merged

kixelated merged 8 commits into
mainfrom
quest/m1/moq-pin

Conversation

@kixelated

@kixelated kixelated commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

moq_rev, which ts and ffi both build against, predates moq-tokio's fallback runtime (moq-dev/moq#7123), so C still can't reach moq-tokio outside a tokio runtime. At moq's main, ffi/moq/ffi.toml fails with stale and missing excludes and just ts census ICEs.

Approach

  • moq_rev moves to 30f25c04, #7123's merge commit.
  • ts: a polymorphic census lowering &dyn Trait from a pointee that is still a type parameter (moq's <S as Source>::Item) normalized it twice and ICEd. object_of now leaves that coercion undefined in the census, since only an instance decides the class. The new case is in the reject fixture.
  • ffi: ffi.toml excludes track moq's API, after feat(ffi): export Url, SocketAddr, paths, and Vec<T> across the C ABI #190: moq-tokio's QUIC driver moved under quic::driver::{connection, endpoint}, kio gained Bridge, and names moq removed are dropped. Every remaining exclude is something the export refuses.
  • moq.c / moq.cpp / moq.kt:
    • Path::new now rejects an empty segment, so the tests assert that /cam/ fails with EmptySegment.
    • moq#7046 removed binary_snapshot. Its replacement json_snapshot<T: Serialize> is generic and was already excluded, so the catalog block now covers a generic is_claimed instance and mutate instead.
    • C now calls moq_origin_spawn() and moq_connect_config_init() outside any runtime. At the old pin the first aborted and the second failed with "no async runtime".
  • Quests: deletes m1/moq-pin and adds m1/ffi-export/warnings (see Follow-ups).

Verified: just ffi moq, just ts moq, just ts census, just check, just test.

Census, same translators, old pin -> new pin:

ts Refusals Function instances
moq-net 2916 -> 3092 11454 -> 11776
model 944 -> 1328 3488 -> 3961
kio 382 -> 383 411 -> 429

The model and moq-net growth is moq's move to hashlink's linked hash map, whose NonNull calls the translator refuses (+244 unsupported call in model), plus more foreign types (+66) and casts (+31).

ffi, exported/refused Types Methods and fields
moq-tokio 68/28 -> 65/31 284/47 -> 279/46
moq-net 126/32 -> 127/30 550/21 -> 554/21
moq-mux 177/22 -> 170/21 1092/74 -> 1045/70
hang 73/7 -> 70/7 272/22 -> 256/20

moq-mux and hang shrink as moq deleted API (moq#7046). moq-tokio's 3 newly refused types (quic::driver::endpoint::{Error, Socket}, unix::Error) are objects that no export returns. Against this PR's first head, before #190's foreign types and #205's slices, moq-tokio went from 56/96 types and 213/293 methods and fields to 65/96 and 279/325.

Impact

  • No public API change in rust2's crates.
  • moq's generated bindings follow moq's API: moq_path_too_long becomes the moq_path_invalid enum, the moq_binary_* snapshot names go away, and moq_origin_spawn/moq_connect_config_init work outside a runtime.

Alternatives

  • Pinning moq at #7123's branch head instead of main: it isn't on main's history, and would skip the API the next bump has to absorb anyway.

Follow-ups

  • New quest m1/ffi-export/warnings: a unit-returning callback (catalog::Producer::mutate) emits let result = ...; (), which warns unused variable 3 times in moq's glue.
  • C can no longer publish a track the catalog lists until a generic json_snapshot<T: Serialize> exports; this belongs with the instance-keys quest.
  • moq's kio uses AtomicUsize::fetch_update, deprecated on the ffi nightly; this is moq's own code.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 3 commits October 28, 2026 15:58
Quest-Claim: ab2ec9cf05b1176f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Bump the moq pin past the fallback runtime chore: bump the moq pin past moq-tokio's fallback runtime Oct 28, 2026
@kixelated
kixelated marked this pull request as ready for review October 28, 2026 23:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-29T03:28:30.741872Z 3554430 New commits
🔒 Security Review ✅ Completed 2026-10-29T03:30:04.541501Z 3554430 New commits
ℹ️ 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.

@kixelated kixelated left a comment

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.

Automated review by review (OpenAI)

Reviewed commit: 4747602

No actionable bugs found. Pinning the upstream merge and adapting the export exclusions/tests is a focused way to bring the fallback runtime to C. The census guard is limited to unresolved type parameters in polymorphic mode, leaving concrete trait-object lowering intact. The added C calls directly cover runtime-free construction; they do not establish an end-to-end session, and the removed catalog-publication coverage remains an explicitly documented generic-export limitation.

Verification: static review of the pin, exclusions, binding-test changes and surrounding coercion lowering. I did not run builds, census, tests or a C session, and did not independently audit every upstream change in the pin bump.

kixelated and others added 2 commits October 28, 2026 16:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kixelated kixelated left a comment

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.

Automated review by review (OpenAI)

Reviewed commit: e1d1d80

No new actionable bugs found in the update since 4747602. Most changes import main's foreign-type support, inference gate and TS reference counting; the pin/coercion fix itself is unchanged. Reconciling the export configuration with those capabilities is the right direction: accept::Health is now exposed while its unsupported new/failed methods remain excluded, rather than suppressing the whole type. The moved QUIC exclusion and existing generated-name disambiguation are retained.

Verification: static comparison against the previous review and the updated base, including exclusion lists and binding-test integration. I did not run builds, census, tests or a live C session; runtime-free construction still does not demonstrate an end-to-end session.

# Conflicts:
#	ts/fixtures/reject/census.md
#	ts/fixtures/reject/src/lib.rs
@kixelated
kixelated merged commit 8e033bf into main Oct 29, 2026
1 check passed
@kixelated
kixelated deleted the quest/m1/moq-pin branch October 29, 2026 04:15
kixelated added a commit that referenced this pull request Oct 29, 2026
#196's pin drops binary_snapshot; the JSON track takes its place in
moq.c, moq.cpp, and moq.kt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated added a commit that referenced this pull request Oct 29, 2026
…e-check the bench (#229)

#196's moq pin dropped Ietf DRAFT_16 and DRAFT_17, so the hand-written route
passed undefined as both forms' versions, which moq reads as leading ones:
its QUIC varint decode of 2 bytes and wider failed the output check. Use
Lite DRAFT_06 for QUIC and DRAFT_07 for leading ones, typed as moq's
StreamVersion, and type-check bench/ against moq at the pin in just check.

Co-authored-by: Luke Curley <432854+kixelated@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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