Skip to content

quest(m0): finish the dependency and alternatives audit - #6053

Merged
kixelated merged 20 commits into
mainfrom
quest/m0/audit-deps
Oct 20, 2026
Merged

kixelated merged 20 commits into
mainfrom
quest/m0/audit-deps

Conversation

@kixelated

@kixelated kixelated commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes the m0 run of the dependency and alternatives audit, picking up where moq-dev/moq#5975 left off. It compares direct dependency majors, maintenance and alternatives, who owns each duplicate, and hand-rolled utilities. The quest is then deleted and the m1 run is scheduled, carrying the baselines.

Changes (one commit each)

  • gstreamer 0.23 to 0.24 (moq-gst). Stays within the 1.91 MSRV and replaces paste with pastey. gstreamer-rs's Bus::timed_pop_filtered never polls when given a zero timeout, because it returns before popping once any time has elapsed. That made one sink test fail, so the tests' non-blocking pops now use pop_filtered. The paste advisory ignore in deny.toml now names the parents that remain.
  • tikv-jemallocator / -ctl 0.6 to 0.7 (moq-tokio, jemalloc 5.3.1). Dependabot never proposed this major. moq-tokio re-exports tikv_jemallocator, so MIGRATE.md has an entry.
  • hang drops lazy_static in favor of std::sync::LazyLock. The workspace dependency is removed too.
  • Dependabot: removed the reqwest-middleware hold, since we are already on 0.5 through the http-cache-reqwest alpha. The uniffi hold moves from >=0.32 (we are on 0.32) to >=0.33, matching the Go generator pairing. infra/moq-sh's Bun lock is now covered; just js audit already checked it, but Dependabot never updated it.
  • moq-audio: corrected the manifest comment. unsafe-libopus has not been pushed upstream since 2024-11, and opus 0.4 now uses the maintained opusic-sys. The Opus backend quest now lists the current candidates.
  • moq-tokio: replaced hand-written IPv6 masks with Ipv6Addr::is_unique_local / is_unicast_link_local. Same masks, stable since Rust 1.84.
  • @moq/net bug fix: Hex.toBytes passed non-hex pairs to parseInt, which produces NaN and is stored as 0. A mistyped serverCertificateHashes entry therefore pinned the wrong hash instead of failing. It now validates input like @moq/hang's copy, with a regression test.
  • @moq/auth: replaced @hexagon/base64 with jose's base64url, which was already a dependency and uses the same unpadded alphabet. Standard base64 is still accepted, by mapping it onto the url alphabet. The old decoder never threw: it turned unknown characters into zero bytes. So malformed key fields used to pass validation, and the standard-base64 fallback never ran. Both cases now have tests.
  • moq-relay: added a comment explaining why http-cache-reqwest is a 1.0 prerelease. That reason used to live in the Dependabot hold.
  • Quests: the m0 audit is replaced by quest/m1/audit-deps.md, which records baselines, duplicate owners, the majors still open, and dependencies kept on purpose. Three new m2 quests cover the hand-rolled code a maintained crate replaces:
    • quest/m2/h264-reader.md: moq-mux parses the SPS VUI with h264-reader and uses one bit reader.
    • quest/m2/mp4-atom-config.md: avcC and hvcC go through mp4-atom.
    • quest/m2/relay-prometheus-client.md: /metrics uses prometheus-client.

Considered and left alone

  • usage-rs 7 already has its own quest, quest/m2/usage-rs-7.md. The derive needs a crate-wide rename.
  • vt100 0.17/0.18 were published within the last two days, inside the 7-day cooldown.
  • tracing-wasm to wasm-tracing: the original repository is gone and the fork has the same defaults. The swap grew moq_wasm.wasm by 2.9 KB gzipped (888,745 to 891,601 bytes), so I kept the original.
  • tracing-android to tracing-logcat: the replacement would add rustix 0.38.
  • Remaining advisories (ashpd/zbus, VitePress/esbuild, typography/postcss-selector-parser, braces) all wait on upstream. No new exceptions.

Public API and wire

  • moq-tokio: jemalloc::tikv_jemallocator is now 0.7 (breaking, MIGRATE.md entry added).
  • moq-gst (breaking for Rust embedders only, MIGRATE.md entry added): plugin_init, plugin_register_static, and the glib::Enum impls on ConnectionStatus and MediaContainer now use gstreamer 0.24 / glib 0.21 types. A crate that links gstmoq must bump its own gstreamer to 0.24. Pipelines and the loadable plugin are unaffected.
  • @moq/auth: Key.parse now refuses key fields with non-base64 characters, which it used to accept silently. The signatures are unchanged.
  • No other public API changes, and no wire changes.

Decisions (confirmed)

The maintainer confirmed each decision below, taking the PR's recommendation.

  1. gstreamer 0.25 for moq-gst is a follow-up, not this PR. It requires Rust 1.92 while the workspace MSRV is 1.91, so the follow-up gives moq-gst its own rust-version = "1.92", the same way moq-relay and moq-cli override theirs. It's a plugin, not a library other crates build on. This PR stops at 0.24.
  2. The three new m2 quests are accepted. Adding prometheus-client remains the maintainer's call when that quest starts, as its Plan states.
  3. tracing-wasm is kept over the 2.9 KB gzipped wasm-tracing swap.

Checks

  • cargo test -p moq-gst: 144 + 51 tests pass. The one test that failed on 0.24 passes on 0.23, and now passes on 0.24 with pop_filtered.
  • jemalloc tests pass on 0.7: cargo test -p moq-tokio --features jemalloc --lib jemalloc.
  • cargo test -p hang, the connection:: tests in moq-tokio, and bun test in js/net and js/auth (127 tests) all pass. tsc passes for js/auth.
  • cargo deny check advisories bans sources: only the three known zbus-family unmaintained crates remain. just js audit: the same six root findings; the Worker locks are clean.
  • quest check passes.
  • just check: on the second run every suite passed, including 9,009 Rust tests and the JS, docs, and demo builds. The only failure was a TOML formatting slip, fixed in the last commit; taplo fmt --check, cargo sort --check, and cargo shear pass now (shear's one warning, a redundant ignore in moq-uring, predates this branch). The first run failed export::redundant_importers_switch_through_bufferbloat_on_lite_07 ("stitching export exited") under load average around 50. Rerunning it in isolation passed 4/4 on both this branch and origin/main, after it failed 1 of 3 in an earlier stress run here. It looks like a load-sensitive flake in a test added in moq-dev/moq#5967. Nothing on this branch touches that path.

Suggested follow-ups

  • Bump moq-gst to gstreamer 0.25 with rust-version = "1.92" (decision 1).
  • Release moq-dev/web-transport (release PR moq-dev/web-transport#430 is open). web-transport-iroh main already takes kio 0.6, which removes the kio 0.5 duplicate.
  • Upstream dependency bumps in our own crates: moq-dev/vaapi (bindgen 0.72, libloading 0.9, thiserror 2) and kixelated/mp4-atom (thiserror 2).
  • Report gstreamer-rs's zero-timeout timed_pop_filtered bug upstream. That's outside our orgs, so it needs approval.
  • Make the bufferbloat redundant-import test robust under load.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 14 commits October 19, 2026 21:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gstreamer 0.24 keeps the 1.91 MSRV (0.25 needs 1.92) and swaps paste for
pastey. Its Bus::timed_pop_filtered never polls with a zero timeout, so the
tests' non-blocking pops use pop_filtered instead. The paste advisory stays
ignored for its other parents, now named in deny.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes jemalloc 5.3.1. moq-tokio re-exports tikv_jemallocator, so the major
reaches its public API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The one lazy_static use predates std::sync::LazyLock, stable since Rust 1.80.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reqwest-middleware is already on 0.5 through the http-cache-reqwest alpha,
and uniffi is already on 0.32 with a matching Go generator, so both holds were
blocking nothing. uniffi now holds at the next minor, which needs the generator
bumped with it. infra/moq-sh has its own Bun lock that `just js audit` checks
but Dependabot never updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
unsafe-libopus has not been pushed since 2024-11, and the opus crate no
longer goes through audiopus_sys. The pure-Rust build is still the reason to
keep it; the Opus backend quest now lists the current alternatives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ipv6Addr::is_unique_local and is_unicast_link_local (stable since 1.84) are
the same fc00::/7 and fe80::/10 masks the check spelled out by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hex.toBytes fed each pair to parseInt, which yields NaN (stored as 0) for a
non-hex pair, so a mistyped serverCertificateHashes entry pinned a different
hash instead of failing. It now validates like @moq/hang's copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@moq/auth already depends on jose, whose base64url encodes the same unpadded
alphabet, so the second base64 package goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason lived only in a Dependabot hold that no longer applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Records the m0 baselines, upstream-owned duplicates, kept dependencies, and
open majors in the m1 successor, and plans the three hand-rolled replacements
the audit found: H.264 parsing on h264-reader, avcC/hvcC through mp4-atom,
and relay metrics through prometheus-client.

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>
@kixelated

Copy link
Copy Markdown
Collaborator Author

This PR is a draft because three decisions are open (details in the description).

  1. gstreamer 0.25 needs Rust 1.92. I recommend giving moq-gst its own rust-version = "1.92" in a follow-up, the same way moq-relay and moq-cli override theirs.
  2. Should the three new m2 quests land? They are h264-reader, avcC/hvcC through mp4-atom, and prometheus-client for relay metrics. I recommend all three; the prometheus-client quest adds a new dependency.
  3. I kept tracing-wasm, because the wasm-tracing fork added 2.9 KB gzipped to the wasm bundle. I recommend keeping it.

Status:

  • The audit is complete, and the m1 successor records the baselines.
  • just check passed on the second run. The first run hit a bufferbloat export test flake under load; that test passes in isolation on both this branch and main.

Once the decisions are settled, this can go through /quest-iterate and then /quest-ready.

(Written by Claude Opus 5.5)

@kixelated
kixelated marked this pull request as ready for review October 20, 2026 06:08
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 28 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: cd06ac29-c6d1-4443-a098-fa6e349768f2
📥 Commits

Reviewing files that changed from the base of the PR and between 62c769a and 7a2d3c2.

⛔ Files ignored due to path filters: 2
  • Cargo.lock is excluded by !**/*.lock
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing: 30
  • .github/dependabot.yml
  • Cargo.toml
  • deny.toml
  • js/auth/package.json
  • js/auth/src/cli.ts
  • js/auth/src/key.test.ts
  • js/auth/src/key.ts
  • js/net/src/util/hex.test.ts
  • js/net/src/util/hex.ts
  • quest/m0/README.md
  • quest/m0/audit-deps.md
  • quest/m0/ci/audit.md
  • quest/m1/README.md
  • quest/m1/audit-deps.md
  • quest/m2/README.md
  • quest/m2/audio-opus-backend.md
  • quest/m2/h264-reader.md
  • quest/m2/mp4-atom-config.md
  • quest/m2/relay-prometheus-client.md
  • rs/hang/Cargo.toml
  • rs/hang/src/catalog/video/av1.rs
  • rs/moq-audio/Cargo.toml
  • rs/moq-gst/Cargo.toml
  • rs/moq-gst/MIGRATE.md
  • rs/moq-gst/src/sink/imp.rs
  • rs/moq-gst/tests/element.rs
  • rs/moq-relay/Cargo.toml
  • rs/moq-tokio/Cargo.toml
  • rs/moq-tokio/MIGRATE.md
  • rs/moq-tokio/src/connection.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66bc4f4e-07fe-423c-8331-32a9ec841162
📥 Commits

Reviewing files that changed from the base of the PR and between e24f770 and 62c769a.

📒 Files selected for processing: 2
  • js/net/src/util/hex.test.ts
  • js/net/src/util/hex.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

The changes replace the JavaScript authentication package’s base64 helper with jose base64url utilities and add hex parsing validation. They update dependency automation and Rust dependency versions, and revise Rust initialization and IPv6 address checks. The dependency audit moves from m0 to m1, and new m2 documents describe planned dependency and implementation work.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 62c76

The reviewed changes are ready to merge with no actionable risk identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: completing the m0 dependency and alternatives audit.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly matches the changeset. It explains the dependency audit, dependency updates, utility replacements, validation fixes, documentation changes, new quests, API change…
Full details: Description check

Explanation

The pull request description directly matches the changeset. It explains the dependency audit, dependency updates, utility replacements, validation fixes, documentation changes, new quests, API changes, and test results.

✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • 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 commented Oct 20, 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-20T16:12:03.101438Z 7a2d3c2 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.

@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: 9b597a11ce

ℹ️ 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 js/auth/package.json
key.ts still imported @hexagon/base64 after the dependency left the
manifest and lockfile, so a clean install could not resolve it. Encode
generated HMAC secrets with jose's base64url and decode through it too,
mapping standard base64 onto the url alphabet.

The old decoder never threw: unknown characters became zero bytes, so
malformed fields passed validation and the standard-base64 fallback was
unreachable. Both are now covered by tests.

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

@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: 62ef955bf8

ℹ️ 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 rs/moq-gst/Cargo.toml
kixelated and others added 2 commits October 19, 2026 23:59
plugin_init, plugin_register_static, and the glib::Enum impls on
ConnectionStatus and MediaContainer now carry gstreamer 0.24 / glib 0.21
types, so a crate linking gstmoq must bump its own gstreamer.

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

@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: e24f770862

ℹ️ 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 js/net/src/util/hex.ts
The stricter Hex.toBytes accepted "" (and "0x") as a zero-length hash,
which the old regex-free version refused. An empty /certificate.sha256
body or serverCertificateHashes value is a config error, so throw.

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

Copy link
Copy Markdown
Collaborator Author

Merging.

  • The maintainer confirmed all three decisions (gstreamer 0.25 as a follow-up, the three m2 quests, keeping tracing-wasm). The description now records them as confirmed.
  • Review gate: Codex's findings on e24f770862 are fixed in 62c769ac6a and their threads are resolved. Codex has not re-reviewed the final head, but CodeRabbit reviewed 62c769ac6a with no actionable comments, which counts as the non-Grok review of the final head.
  • No new changes since that review.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

The queue dropped this PR as unmergeable once moq-dev/moq#6060 (usage-rs 7) landed. 7a2d3c2882 merges main:

  • quest/m2/README.md: kept this PR's three new m2 quests and dropped the usage-rs 7 entry, since chore(deps)!: adopt usage-rs 7 #6060 finished and deleted that quest.
  • rs/moq-tokio/MIGRATE.md: kept both ## Unreleased entries (tikv-jemallocator 0.7 and usage-rs 7).
  • quest/m1/audit-deps.md: removed usage-rs 7 from the majors still open, since it has landed.

Checks after the merge: cargo metadata --locked, cargo check --all-features for moq-tokio, moq-relay, moq-gst and hang, taplo fmt --check on the merged manifests, and quest check all pass.

Review gate: the only change since CodeRabbit's clean review of 62c769ac6a is this merge of main, so I'm relying on that review rather than waiting for a new one.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 028d040 Oct 20, 2026
4 checks passed
@kixelated
kixelated deleted the quest/m0/audit-deps branch October 20, 2026 16:39
kixelated added a commit that referenced this pull request Oct 20, 2026
The m0 dependency audit finished in #6053; its recurring successor lives in m1.

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