Repository navigation
ROCMAI-208: extract examine/model-catalog/engine-inventory rendering into examine_report_text.rs - #760
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Prerequisite #757’s merge status and the final rebased stack’s integration checks require maintainer verification.
No open issues 🎉
What changed in this PR
This PR completes the Phase 6f extraction from main.rs by moving examine, model-catalog, and engine-inventory rendering into a dedicated module, with no intended behavior change.
Changes:
- Relocates rendering helpers and their existing tests into
examine_report_text.rs. - Updates imports and the advised-command scanner exemption for the moved code.
- Documents the new module and Phase 6f completion.
Builds and tests were not rerun in this review environment.
| File | Description |
|---|---|
docs/architecture.md |
Documents module ownership and Phase 6f completion. |
apps/rocm/src/main.rs |
Imports extracted helpers and removes relocated code and tests. |
apps/rocm/src/examine_report_text.rs |
Houses rendering helpers and their regression tests. |
apps/rocm/src/advised_commands.rs |
Updates the scanner exemption to the new source path. |
Review effort: Balanced
c69da31 to
8494487
Compare
…into examine_report_text.rs Signed-off-by: Jussi Elo <jussi.elo@amd.com>
8494487 to
b2fa7af
Compare
juhovainio
left a comment
There was a problem hiding this comment.
I went through this against the base and the extraction looks faithful. Nothing blocking.
- Moved code is identical apart from the module header, imports, the test wrapper, and
pub(crate)on the five functions that have outside callers. - 33 tests left
main.rsand the same 33 appear in the new module under the same names, so nothing was dropped or weakened. - The
advised_commands.rsexemption path was updated for the moved string. - CI is green.
Non-blocking notes:
- The long caller inventory in the module doc and in the
architecture.mdbullet will drift as callers change. Consider trimming it. - The
architecture.mdwording "folding Phase 6f closed" reads awkwardly. - The PR body ends with an AI generated-with footer; consider removing it.
- The "Depends on #757" note looks stale, since #757 is already merged.
One small inline nit below.
| //! `launch_default` calls `render_launch_summary` directly, also re-imported | ||
| //! there. `render_examine_text`, `render_examine_text_with_paths`, and | ||
| //! `render_model_registry_verbose_text_with_context_and_host` are also | ||
| //! `pub(crate)`, read from [`chat.rs`](../apps/rocm/src/chat.rs)'s |
There was a problem hiding this comment.
Nit: this relative markdown link (../apps/rocm/src/chat.rs) does not resolve from inside apps/rocm/src under rustdoc, and lychee does not check .rs files. Plain backticks would do, or trim the caller inventory since it will drift.
Summary
Phase 6f-1 of the
main.rsmodularization (epic ROCMAI-27) — the last PR in the 8-way ROCMAI-86 stack. Mechanical relocation, no behavior change: moves examine/model-catalog/engine-inventory rendering out ofapps/rocm/src/main.rsinto a newapps/rocm/src/examine_report_text.rs(~1290 lines of production code, one of the two largest clusters in this split alongsideservices_text.rs).DEFAULT_ENGINE_MARKERconst,model_registry_adapter_availability_note), both confirmed private with no external callers.render_config_text/telemetry_policy_summarysit immediately adjacent to this cluster's end boundary but are confirmed out of scope — already flagged on epic ROCMAI-27 and on ROCMAI-179 (Phase 8) as a known leftover gap, left untouched.dispatch()calls directly into this module at three points (render_model_registry_verbose_text_with_context_and_host,render_model_registry_text_with_context_and_host,examine_human_report) — body confirmed byte-identical (independently re-verified by SHA-256), only imports changed.advised_commands.rs's structural-scanner exemption list had a file-path entry that needed updating since the string it exempts physically moved.docs/architecture.mdupdated with this module's entry, and the top-of-section Phase 6f status line updated to mark it complete (all 8 sub-phase tickets listed) — Phase 7+ status left untouched.Test plan
cargo build --workspacecargo clippy --workspace --all-targets -- -D warningscargo fmt --all -- --checkcargo xtask manifest --checkcargo xtask check-crate-edgespython scripts/smoke_local.py --profile debug --skip-buildcargo test --workspace --no-fail-fast— 4322 passed, 0 failed, 17 ignored (independently re-run twice; one run hit two pre-existing unrelated timing flakes intherock.rs, a file this PR doesn't touch — both confirmed passing in isolation, both files untouched by this diff; a clean rerun matched baseline exactly)dispatch()call sites confirmed byte-identical (SHA-256 of the function body)Depends on #757 (ROCMAI-209) — eighth and final PR in the ROCMAI-86 (Phase 6f) stack. Once this merges, Phase 6f of epic ROCMAI-27 is complete.
Part of Jira ROCMAI-208 / epic ROCMAI-27.
🤖 Generated with Claude Code