Skip to content

refactor: finish the m1 dead code audit - #6166

Merged
kixelated merged 10 commits into
mainfrom
quest/m1/audit-dead-code
Oct 22, 2026
Merged

kixelated merged 10 commits into
mainfrom
quest/m1/audit-dead-code

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Finishes the m1 run of the dead code and API surface audit and queues the m2 run.

Changes

  • JS dependencies: dropped @moq/signals from @moq/json and the private browser bench, and solid-element from the web demo. Nothing imports them.
  • JS exports: made module-local helpers private: the carla web demo's schemas and tuning constants, plus js/net's IETF MAX_AGE_OPTION and finCancels. The unused Motion type in the carla demo is deleted. Ietf is not in @moq/net's export map, so none of these were public.
  • Quest: quest/m1/audit-dead-code.md moves to the end of m2's Required behind the release cut. It keeps the Goal and recurrence paragraph and records this run's baselines and shortlist.

Public API and wire impact

None. @moq/json loses an unused runtime dependency, which consumers never reached through it. No Rust code, Cargo feature, CLI flag, or wire behavior changes.

Audit results

  • Rust deps: cargo shear is clean.
  • Rust suppressions: 423 dead-code/unused lines, 77 of them unconditional. The unconditional ones are guards, Send assertions, registries, harnesses, fixtures, FFI tables, and two helpers waiting on the answering API. Left alone because moq-dev/moq#6159 rewrites every suppression into expect.
  • Unused pub items: a tree-wide token count finds public items whose name appears only at its definition. None were removed, since a public removal is a follow-up by the quest's rules. The shortlist is in the successor quest.
  • Cargo features: 150 across 27 manifests. Only three have no in-tree user: the moq-native tombstone's android-logcat, the QUIC FIPS crypto feature, and moq-cli's nvenc/nvdec aliases. The first two are deliberate.
  • Flags: 120 registry long flags. Every one reaches a runtime consumer or is a deprecated spelling that fails with migration guidance.
  • Knip 6.42.0 with explicit entrypoints reports nothing else real.

Overlaps with open PRs (not edited here)

  • doc/concept/audio-jitter/reference.ts exports constants only it uses; moq-dev/moq#6164 rewrites that file.
  • moq-net's cfg(test) helpers track::Subscriber::assert_error and AnnounceConsumer::assert_next_restarted/assert_next_ended have no callers. model/track.rs and model/origin.rs are churned by about a dozen open PRs, including moq-dev/moq#6159.

Suggested follow-ups

  • Remove moq-cli's nvenc/nvdec Cargo feature aliases, with a MIGRATE.md entry. moq-video and moq-transcode already dropped theirs. Recommended.
  • Decide on moq_net::Version::uses_setup_negotiation, which has no caller anywhere. Recommend removing it, with a MIGRATE.md entry.
  • Keep the rest of the public shortlist (Server::serve_both, Catalog::to_json_pretty, Format::is_planar/is_float, the quic::web builders, vendored-fork surface): each completes a symmetric API.

Validation

  • just check: passes (JS check and tests across every workspace package, plus the affected Rust, docs, and quest checks).
  • quest check: 424 documents ok.
  • Knip rerun after the change: only the reference.ts overlap remains.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 4 commits October 20, 2026 23:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing in @moq/json, the browser bench, or the web demo imports them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Un-export carla demo schemas and tuning constants, the IETF max-age setup option, and finCancels; only their own module uses them. Drop the unused Motion type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move audit-dead-code.md to the end of m2's Required behind the release cut, with this run's baselines and shortlist.

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

chatgpt-codex-connector Bot commented Oct 21, 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-22T05:57:21.780929Z 7ab52e1 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.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: bd460471-44e3-40d4-8788-8d45a60d5471
📥 Commits

Reviewing files that changed from the base of the PR and between 7c3995d and 7ab52e1.

⛔ Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing: 2
  • quest/m1/README.md
  • quest/m2/README.md
💤 Files with no reviewable changes: 1
  • quest/m1/README.md
🚧 Files skipped from review as they are similar to previous changes: 1
  • quest/m2/README.md

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

Several JavaScript exports and package dependencies are removed. The declarations and implementations that remain keep their described values and behavior. The recurring dead-code and API-surface audit is documented for m2, and audit references and required-list entries are updated.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 7ab52

The audit is listed for m2 rather than m1, with no identified issue blocking merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files. (1 skipped: 1… 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 and concisely describes the main change: completing the m1 dead-code audit.
Description check Passed The description directly explains the audit completion, dependency and export changes, quest updates, validation results, and follow-ups.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ 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.

@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 21, 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 21, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main twice (second after #6191 landed). Resolutions:

  • quest/m2/README.md: kept both sides; main's new FromStr parsers and Drop dead items entries go before this PR's recurring Dead code and API surface audit, which stays just above the test coverage audit.
  • quest/m2/drop-dead-items.md (added on main by quest: plan follow-ups from the m0/m1 spawn run #6186) linked /quest/m1/audit-dead-code.md, which this PR deletes. Repointed its Related entry to the successor /quest/m2/audit-dead-code.md, whose baselines record the same findings.

just check and quest check pass.

@codex review

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 2756423015

ℹ️ 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".

@kixelated
kixelated added this pull request to the merge queue Oct 21, 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 21, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main again (64c3a75). One conflict in quest/m1/README.md: kept main's new Subscribe update churn entry and dropped the m1 Dead code and API surface audit entry, since this PR moves that quest to m2. quest check (445 documents) and just check pass.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: the PR body's changes stand unchanged; the only new commit since the last review is the origin/main merge resolving quest/m1/README.md (keep Subscribe update churn, drop the moved m1 dead code audit entry). Codex approved head 64c3a75 with no findings, and quest check plus just check pass. Follow-ups (moq-cli nvenc/nvdec aliases, Version::uses_setup_negotiation) remain maintainer decisions listed in the body. Enabling auto-merge.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 22, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Re-queued after the merge queue failed biome's useOptionalChain at js/net/src/track.ts:2228 (code from main, linted strictly because this PR touches js/net).

  • Merged origin/main (clean, no conflicts).
  • 7c3995d: if (!dropped || dropped.kind !== "drop") becomes if (dropped?.kind !== "drop").
  • just check passes. No new review requested: the change since the Codex thumbs-up is a clean main merge plus this one-line lint fix.

(Written by Claude Opus 5.5)

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

Copy link
Copy Markdown
Collaborator Author

Re-queued after the PR left the merge queue for a conflict with main (#6169 moved the dependency and test cost audits to m2).

  • Merged origin/main at 7ab52e1. Conflicts were quest-only:
    • quest/m1/README.md: dropped the m1 Dependency and alternatives audit, Test cost audit, and Dead code and API surface audit entries, since all three quests now live in m2.
    • quest/m2/README.md: kept both sides, main's Dependency and alternatives audit and this PR's Dead code and API surface audit after Drop dead items.
  • No code changes since the last review. quest check (463 documents) and just check (including biome on js/net) pass.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 2abfb5e Oct 22, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/audit-dead-code branch October 22, 2026 08:06
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