Skip to content

TMT MBR: process_run's floor rows and transfer rows as RunScans methods; 291 -> 211 lines - #562

Merged
ypriverol merged 1 commit into
mainfrom
refactor/tmt-mbr-run
Nov 25, 2026
Merged

ypriverol merged 1 commit into
mainfrom
refactor/tmt-mbr-run

Conversation

@ypriverol

@ypriverol ypriverol commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Splits process_run in crates/andes/src/bin/andes/quant/tmt/mbr.rs (291 -> 211 lines) under the 250-line budget, moving code without changing it:

  • RunScans holds what the run's steps share (the context, the run index, its MS2 scans, the corrected reporter vectors, the fragment tolerance and the deviation threshold tau).
  • RunScans::floor_rows: the noise-floor training rows (was the first loop in process_run).
  • RunScans::transfer_row: building a transfer candidate's TransferRow (was inline in the library-entry loop).

The rows, their order and every field are unchanged. The TMT MBR tests pass.

fn_lines.tsv: drops tmt/mbr.rs::process_run.

Summary by CodeRabbit

  • Refactor
    • Updated run processing while preserving existing scan comparisons, leakage detection, and transfer-candidate scoring behavior. No user-facing changes are expected.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

process_run now uses a RunScans helper to generate noise-floor training rows and construct transfer candidates. The existing row-labeling rules and candidate field sources remain unchanged.

Changes: Run scan processing

Layer / File(s) Summary
RunScans helper and integration
crates/andes/src/bin/andes/quant/tmt/mbr.rs
process_run initializes RunScans with run context and scan data. The helper generates noise-floor rows using the existing scan comparison and labeling rules, and assembles transfer candidates from the existing data sources.

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

Change: Refactor

Merge Risk: Minimal · up to 85f25 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: process_run's noise-floor training rows and transfer rows move into RunScans methods (floor_rows and transfer_row), with the line count reduced from 291 to 211. The ra…
Description check Passed The description states what changed and why: it splits process_run in mbr.rs under the 250-line budget, introduces RunScans with floor_rows and transfer_row, and states that rows and fields are unchan…
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: Title check

Explanation

The title names the main change: process_run's noise-floor training rows and transfer rows move into RunScans methods (floor_rows and transfer_row), with the line count reduced from 291 to 211. The raw summary and PR objectives confirm this refactor in mbr.rs.

Full details: Description check

Explanation

The description states what changed and why: it splits process_run in mbr.rs under the 250-line budget, introduces RunScans with floor_rows and transfer_row, and states that rows and fields are unchanged. It also notes the TMT MBR tests pass and the fn_lines.tsv update. It does not follow the template's 'What and why' heading or the 'Results changed?' section, and the checklist is absent. The Results changed question is implicitly answered (no change in output), but not as a ticked checkbox. Other checklist items (goldens, ratchet baseline, statistics.log, ARCHITECTURE.md/DOCS.md, citations) are not addressed.

Resolution

Optionally add the template headings. Tick 'No: identifications, scores, quantities and output files are unchanged' explicitly. Address the checklist items, especially whether goldens and the ratchet baseline are affected. Confirm that no docs need updating.

Finishing Touches

Generate unit tests (beta)

  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 74131ba4-f334-467e-8d76-6da1081f0f9e
Commits

Reviewing files that changed from the base of the PR and between cdfecdf and 85f25cc.

Files ignored due to path filters: 1

  • crates/andes/tests/ratchets/fn_lines.tsv is excluded by !**/*.tsv
Files selected for processing: 1

  • crates/andes/src/bin/andes/quant/tmt/mbr.rs

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

@ypriverol
ypriverol force-pushed the refactor/tmt-mbr-run branch from 2701d2c to 85f25cc Compare November 25, 2026 12:24
@ypriverol
ypriverol merged commit d210252 into main Nov 25, 2026
6 checks passed
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