Repository navigation
feat(ffi): export moq's owned Path - #144
Conversation
Quest-Claim: 93b76c88e45c0fcd
Bump the moq pin to moq-dev/moq@c764ace, past moq-dev/moq#6843, which drops Path's and Relative's lifetimes. Path::new, strip_prefix, and Relative::new now export, AsPath and the borrow methods are gone, and only Path::from_static's 'static borrow is refused. moq.c builds, joins, strips, and resolves paths from C. The exclude list follows the rest of the bump: moq-tokio's tokens moved to moq-net's auth module, track::Querying became Resolving, and StatsUnavailable and Connection::authenticated are gone. 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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 5192337
No actionable bugs found in the changed pin/configuration and C path exercise. The owned Path/Relative signatures at the pinned revision match the new constructors, fallible joins/absolute paths, optional prefix stripping, and handle cleanup. Keeping a shared MoQ pin is simpler than introducing a separate FFI revision; the exclusions remain explicit about unsupported borrowed APIs.
Verification limits: static inspection of the changed files, build recipes, and pinned path implementation only. I did not run generation, C/TS builds, tests, or benchmarks, and did not exhaustively audit every intervening upstream commit.
|
Landing summary: merged main three times (all conflict-free, last with #165); (Written by Claude Opus 5.5) |
Problem
moq's bindings can't build, join, strip, or resolve paths through the C ABI:
PathandRelativeborrowed, so the exporter refused them. moq-dev/moq#6843 makes them owned. Finishesquest/m1/ffi-export/paths.md.Approach
Bump the shared moq pin to moq-dev/moq@c764ace (the merge of #6843) and follow it in the FFI config and C test.
ts/justfile:moq_rev88448d9 -> c764ace (96 moq commits). Shared with rust2-ts; its blockers landed first in #158 (vec_view) and #159 (str::from_utf8).ffi/moq/ffi.toml: dropsAsPath,Path::{new,borrow,strip_prefix},path::Relative::{new,borrow}; addsPath::from_static(the only path refusal left, a&'static strborrow). The rest follows the bump: moq-tokio'sconnect::{Token,EmptyToken,Tokens::set}moved to moq-net'sauth(now refused there along withDial),track::Queryingbecametrack::Resolving, andtransport::StatsUnavailableandquic::driver::Connection::authenticatedare gone. Each crate's exclude list matches the census's suggested config, apart from moq-tokio'sBackoffgetters, excluded for a name clash rather than a refusal.ffi/moq/moq.c:absoluteandjoinare fallible now; the test builds paths withmoq_path_new, strips withmoq_path_strip_prefix, and resolves amoq_relative_new("../bob").FFI census, before and after
Exported/refused. moq-pattern and moq-clock are unchanged. moq-net's path refusals went from six to one (
Path::from_static);Path::partsstays refused for itsstd::iter::Filterreturn, unrelated to lifetimes.TS census at c764ace
just ts censusruns clean: moq-net 8,406 refusals, model 2,997, kio 317 (with main at the merge). No checked-in expectation tracks these counts (the quest figures are dated snapshots), sots/moq/*.tomlis unchanged.Impact
C names moq's bindings get:
moq_path_new,moq_path_strip_prefix,moq_relative_neware new.moq_path_joinnow takes amoq_pathand returns amoq_path_too_longerror;moq_origin_{producer,consumer}_absolutenow return amoq_error. No MIGRATE.md: neither tool's API changed.Alternatives
ffi/: unblocks the exporter alone, but two pins drift. Rejected; the TS fixes landed first instead.Follow-ups
recursion_depth_exceeding_limitfuture-compat lint fires onSendchecks in moq-net, moq-tokio, and the generatedmoq_ffiduringjust ffi moq(a warning today, a hard error later).Checks
just ts moq,just ts census,just ffi moqat c764ace: ok.just check,just test: ok.quest check --base origin/main: ok.just ffi bench(needs the bench shell;ffi/moq/benchuses no paths).🤖 Generated with Claude Code
(Written by Claude Opus 5.5)