Skip to content

refactor(moe): MoeRouter rename + finish Codecov (#14) - #24

Merged
rmems merged 1 commit into
mainfrom
refactor/moe-router-generic-and-codecov
Jul 30, 2026
Merged

refactor(moe): MoeRouter rename + finish Codecov (#14)#24
rmems merged 1 commit into
mainfrom
refactor/moe-router-generic-and-codecov

Conversation

@rmems

@rmems rmems commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rename public types OlmoeRouterMoeRouter and OlmoeOutputMoeOutput so the API is family-agnostic (supports OLMoE, Qwen3-MoE, Gemma-4, DeepSeek-2, Llama-MoE).
  • Finish remaining issue #14 acceptance items: Codecov badge, codecov.yml ignore paths, local lcov.info gitignore.

ModelFamily::Olmoe and GGUF olmoe.* metadata keys are unchanged (they name a real architecture, not the router type). No deprecated type aliases (crate is 0.1.0; no external consumers found).

Core Codecov CI (cargo llvm-cov + conditional upload) was already on main; this PR only closes the remaining gaps.

Closes #14

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --locked (36 tests)
  • CI green on this PR (coverage upload when CODECOV_TOKEN present)
  • Confirm no remaining OlmoeRouter / OlmoeOutput symbols

Implemented by Grok Build: Grok 4.5


Summary by cubic

Renamed OlmoeRouter/OlmoeOutput to MoeRouter/MoeOutput for a family-agnostic API, finished Codecov setup, and fixed the README MoE example so it compiles.

  • Refactors
    • Rename: OlmoeRouterMoeRouter, OlmoeOutputMoeOutput; keep ModelFamily::Olmoe and GGUF olmoe.* unchanged.
    • Docs and examples: update to new names; README MoE snippet now compiles (wrapped in fn main() -> cortex_tensor::Result<()>).
    • Codecov: add README badge; move ignores to root ignore in codecov.yml (target/**, examples/**); ignore local lcov.info in .gitignore.
  • Migration
    • Update imports and types to MoeRouter and MoeOutput.
    • If using the example, switch to MoeRouter::load_with_mode(...).

Written for commit 45064bb. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c382f063-59cb-40de-a471-d94b98ed3ebd

📥 Commits

Reviewing files that changed from the base of the PR and between 8d60649 and 962a839.

📒 Files selected for processing (5)
  • .gitignore
  • README.md
  • codecov.yml
  • src/moe/mod.rs
  • src/moe/tests.rs

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Renamed the public MoE router and output types to MoeRouter and MoeOutput.
    • Updated router examples and documentation to cover family-aware MoE GGUF workflows.
  • Documentation

    • Expanded MoE routing, metadata, tensor routing, and GGUF handling guidance.
    • Added a Codecov status badge.
  • Chores

    • Improved coverage configuration by excluding generated build and example artifacts.

Walkthrough

The PR renames the public MoE router and output types, updates tests and README examples, and adds Codecov configuration, a coverage badge, and LCOV artifact exclusion.

Changes

MoE Router API Rename

Layer / File(s) Summary
Router types and return contracts
src/moe/mod.rs
OlmoeRouter and OlmoeOutput are renamed to MoeRouter and MoeOutput; routing methods return the renamed output type.
Router usage and documentation
src/moe/tests.rs, README.md
Tests and README examples use the renamed router APIs, including family-aware loading, forwarding, and checkpoint probing.

Coverage Reporting Configuration

Layer / File(s) Summary
Codecov configuration and repository presentation
.gitignore, codecov.yml, README.md
LCOV output is ignored, Codecov excludes target/** and examples/**, and a Codecov badge is added.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: GItHub Actions, documentation

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The MoE API rename is outside issue #14's coverage-reporting scope and changes the public API. Move the router/output rename to a separate PR and keep this change focused on Codecov setup.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly covers the two main changes: the MoeRouter rename and the Codecov work for issue #14.
Description check ✅ Passed The description matches the PR, covering the API rename and the remaining Codecov setup items for issue #14.
Linked Issues check ✅ Passed The PR addresses the remaining issue #14 items: Codecov badge, root codecov.yml ignores, and local lcov.info ignore.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch refactor/moe-router-generic-and-codecov

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

@amazon-q-developer amazon-q-developer 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.

This PR successfully completes the refactoring to make the MoE router API family-agnostic by renaming OlmoeRouterMoeRouter and OlmoeOutputMoeOutput. The changes are consistent across documentation, code, and tests. The Codecov configuration additions (badge, ignore paths, gitignore) properly address issue #14 requirements. All changes compile correctly and maintain backward compatibility at the metadata layer as documented in the PR description.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Qodana for Rust

It seems all right 👌

No new problems were found according to the checks applied

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@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: 58f0aea356

ℹ️ 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 codecov.yml Outdated
rmems added a commit that referenced this pull request Jul 29, 2026
Codecov expects `ignore` at the YAML root, not nested under `coverage`.
Addresses Codex review on PR #24.

Grok Build: Grok 4.5
codescene-access[bot]

This comment was marked as outdated.

@coderabbitai coderabbitai Bot added documentation Improvements or additions to documentation GItHub Actions labels Jul 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 198-211: Wrap the README MoE example containing
MoeRouter::load_with_mode and router.forward in a fn main() ->
cortex_tensor::Result<()> function, and return Ok(()) after the existing
operations so the ? operators compile unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 63cd65ce-ef60-45c8-85b3-62d792ce86d1

📥 Commits

Reviewing files that changed from the base of the PR and between 37c5a21 and 8d60649.

📒 Files selected for processing (5)
  • .gitignore
  • README.md
  • codecov.yml
  • src/moe/mod.rs
  • src/moe/tests.rs

Comment thread README.md Outdated

rmems commented Jul 29, 2026

Copy link
Copy Markdown
Owner Author

Babysit note (Grok Build: Grok 4.5)

  • CodeRabbit “out of scope” pre-merge warning: intentional. User requested one PR that both finishes Add Codecov coverage reporting (Rust) #14 leftovers and renames OlmoeRouter/OlmoeOutputMoeRouter/MoeOutput.
  • Linked-issues check about workflow: core cargo llvm-cov + conditional Codecov upload already live on main (d189a73 / current .github/workflows/rust.yml); this PR only adds the remaining acceptance items (badge, top-level ignore, lcov.info gitignore).
  • Review threads fixed:
    1. Codex: top-level Codecov ignore8d60649
    2. CodeRabbit: Result-returning README example → 45064bb

codescene-access[bot]

This comment was marked as outdated.

Replace family-branded OlmoeRouter/OlmoeOutput with generic MoeRouter/MoeOutput
so the public API matches multi-family MoE support. ModelFamily::Olmoe and GGUF
olmoe.* metadata keys are unchanged.

Complete remaining issue #14 acceptance items: Codecov README badge, top-level
ignore paths in codecov.yml (target/**, examples/**), and local lcov.info
gitignore. README MoE example uses a Result-returning main so `?` is valid.

Implemented by Grok Build: Grok 4.5

Closes #14
@rmems
rmems force-pushed the refactor/moe-router-generic-and-codecov branch from 45064bb to 962a839 Compare July 29, 2026 11:06

@codescene-access codescene-access 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.

Our agent can fix these. Install it.

Gates Passed
6 Quality Gates Passed

Absence of Expected Change Pattern

  • cortex-tensor/src/moe/mod.rs is usually changed with: cortex-tensor/src/moe/checkpoint.rs

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@rmems
rmems merged commit e712320 into main Jul 30, 2026
9 checks passed
@rmems
rmems deleted the refactor/moe-router-generic-and-codecov branch July 30, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation GItHub Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Codecov coverage reporting (Rust)

1 participant