Skip to content

refactor: strip R6.x audit-process residue from MCP + router comments (C3) - #1374

Merged
slin1237 merged 1 commit into
mainfrom
refactor/c3-r6-comment-hygiene
Apr 24, 2026
Merged

slin1237 merged 1 commit into
mainfrom
refactor/c3-r6-comment-hygiene

Conversation

@slin1237

@slin1237 slin1237 commented Apr 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Pure comment hygiene across 11 R6.x-touched files in `crates/mcp/` and `model_gateway/src/routers/`. Mirrors C2 (#1310) which did the same for `crates/protocols/src/` after the Wave-1/2 protocol surface additions.

Rules applied

KEEP: spec references citing file/line or SDK path; per-field `///` docs; `SAFETY:` / `NOTE:` invariants; design-intent prose.

DROP: `R6.x:` task markers; per-cycle review narrative; "per coordinator" / "flagged for follow-up" / "per audit" references; "Before R6.8 this did X" historical comparisons now that the PR landed.

PRUNE: multi-paragraph doc blocks where one paragraph is signal and the rest is audit narrative.

Acceptance

```
$ grep -rnE 'R6.[0-9]' crates/mcp/src/ model_gateway/src/
(no output)

$ grep -rnE 'per coordinator|per audit|per follow-up|cycle-?[12]|Addresses.*bot-review' \
crates/mcp/src/ model_gateway/src/
(no output)
```

  • No changes to any declared `pub` item, field, enum variant, `#[serde(…)]` attribute, function signature/body, test, or macro. Pure comment edits.
  • `cargo check -p openai-protocol -p smg-mcp -p smg --lib --tests --benches` green.
  • `cargo clippy -p openai-protocol -p smg-mcp -p smg --lib --tests --benches -- -D warnings` green.
  • `cargo fmt --all` clean.

Files edited (11)

  • `crates/mcp/src/transform/transformer.rs`
  • `model_gateway/src/routers/common/mcp_utils.rs`
  • `model_gateway/src/routers/grpc/common/responses/{streaming,utils}.rs`
  • `model_gateway/src/routers/grpc/harmony/builder.rs`
  • `model_gateway/src/routers/grpc/harmony/responses/{common,non_streaming,streaming}.rs`
  • `model_gateway/src/routers/grpc/regular/responses/conversions.rs`
  • `model_gateway/src/routers/openai/mcp/{tool_handler,tool_loop}.rs`

Net line delta: −4 lines (pruning rewrites some prose around cut lines).

Test plan

Comment-only change. Full cargo build / test / clippy / fmt verified locally.

Summary by CodeRabbit

  • Documentation
    • Updated inline documentation and test comments across routing and response handling modules to remove outdated version references and reworded explanatory notes for improved clarity and consistency.

… (C3)

Pure comment hygiene on the R6.x-touched surface (crates/mcp/ +
model_gateway/src/routers/). Same pattern C2 (#1310) used on
crates/protocols/src/. No semantic changes.

Rules applied:
- KEEP: spec references with line/SDK path, per-field `///` docs,
  SAFETY/NOTE invariants, design-intent prose.
- DROP: `R6.x:` task markers, per-cycle review narrative, "per
  coordinator" / "flagged for follow-up" references, "Before R6.8 this
  did X" historical comparisons now that the PR landed.
- PRUNE: multi-paragraph doc blocks where one paragraph is signal and
  the rest is audit narrative.

Acceptance:
- `grep -rnE "R6\\.[0-9]" crates/mcp/src/ model_gateway/src/` → zero hits.
- `grep -rnE "per coordinator|per audit|per follow-up|cycle-?[12]"
   crates/mcp/src/ model_gateway/src/` → zero hits.
- No changes to any declared pub item, field, enum variant, serde attr,
  function signature/body, or test.
- `cargo check -p openai-protocol -p smg-mcp -p smg --lib --tests --benches`
  green.
- `cargo clippy -p openai-protocol -p smg-mcp -p smg --lib --tests
  --benches -- -D warnings` green.
- `cargo fmt --all` clean.

Net line delta: -4 lines (pruning often rewrites prose around the cut
line).

Co-authored-by: Tingting Zhou <zhoutt96@gmail.com>
Signed-off-by: Simo Lin <linsimo.mark@gmail.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added grpc gRPC client and router changes mcp MCP related changes model-gateway Model gateway crate changes openai OpenAI router changes labels Apr 24, 2026
@coderabbitai

coderabbitai Bot commented Apr 24, 2026 •

Copy link
Copy Markdown

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: 3eb0d91b-9900-457b-b705-e61bd4c78a6c

📥 Commits

Reviewing files that changed from the base of the PR and between 3562749 and b877928.

📒 Files selected for processing (11)
  • crates/mcp/src/transform/transformer.rs
  • model_gateway/src/routers/common/mcp_utils.rs
  • model_gateway/src/routers/grpc/common/responses/streaming.rs
  • model_gateway/src/routers/grpc/common/responses/utils.rs
  • model_gateway/src/routers/grpc/harmony/builder.rs
  • model_gateway/src/routers/grpc/harmony/responses/common.rs
  • model_gateway/src/routers/grpc/harmony/responses/non_streaming.rs
  • model_gateway/src/routers/grpc/harmony/responses/streaming.rs
  • model_gateway/src/routers/grpc/regular/responses/conversions.rs
  • model_gateway/src/routers/openai/mcp/tool_handler.rs
  • model_gateway/src/routers/openai/mcp/tool_loop.rs

📝 Walkthrough

Walkthrough

This PR updates comments and documentation across multiple files, removing specific PR/release references (e.g., R6.2, R6.3, R6.4, R6.7, R6.8) and rephrasing explanatory text. No functional logic, control flow, or behavior changes are introduced.

Changes

Cohort / File(s) Summary
MCP Transformer & Common Utils
crates/mcp/src/transform/transformer.rs, model_gateway/src/routers/common/mcp_utils.rs
Updated comments removing specific PR version references (R6.2/R6.3/R6.4) and rephrased documentation about response shapes and routing behavior.
GRPC Common Responses
model_gateway/src/routers/grpc/common/responses/streaming.rs, model_gateway/src/routers/grpc/common/responses/utils.rs
Removed PR/release labels and adjusted documentation for image generation handling, tool builtin wiring, and counterfactual phrasing in inline comments.
GRPC Harmony Router
model_gateway/src/routers/grpc/harmony/builder.rs, model_gateway/src/routers/grpc/harmony/responses/common.rs, model_gateway/src/routers/grpc/harmony/responses/non_streaming.rs, model_gateway/src/routers/grpc/harmony/responses/streaming.rs
Removed "R6.8" and "Motivation" labels, reformatted documentation for strip_image_generation_from_request_tools and related functions.
GRPC Regular Router
model_gateway/src/routers/grpc/regular/responses/conversions.rs
Removed regression label "(R6.4)" from test comment and rephrased description of image generation call handling.
OpenAI MCP Router
model_gateway/src/routers/openai/mcp/tool_handler.rs, model_gateway/src/routers/openai/mcp/tool_loop.rs
Removed R6.7-specific release labels and external PR/CI log references, updated streaming tool event ordering documentation and test descriptions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

mcp, model-gateway, grpc, openai

Suggested reviewers

  • CatherineSue
  • key4ng
  • claude

Poem

🐰 Whiskers twitching, I hop through the code,
Removing old labels from every road,
R6.8, R6.7, now they must go,
Cleaner comments help our logic flow! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing R6.x audit-process references from comments across MCP and router files. It is specific, concise, and clearly reflects the refactoring work described in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/c3-r6-comment-hygiene

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

@claude claude 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.

Clean comment-only PR — removes ephemeral R6.x / PR-number references from 11 files, making comments timeless. No logic changes. LGTM.

@slin1237
slin1237 merged commit ee01556 into main Apr 24, 2026
39 checks passed
@slin1237
slin1237 deleted the refactor/c3-r6-comment-hygiene branch April 24, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grpc gRPC client and router changes mcp MCP related changes model-gateway Model gateway crate changes openai OpenAI router changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant