Skip to content

ROCMAI-208: extract examine/model-catalog/engine-inventory rendering into examine_report_text.rs - #760

Merged
jussielo-amd merged 1 commit into
mainfrom
rocmai-208-examine-report-text
Oct 29, 2026
Merged

jussielo-amd merged 1 commit into
mainfrom
rocmai-208-examine-report-text

Conversation

@jussielo-amd

Copy link
Copy Markdown
Collaborator

Summary

Phase 6f-1 of the main.rs modularization (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 of apps/rocm/src/main.rs into a new apps/rocm/src/examine_report_text.rs (~1290 lines of production code, one of the two largest clusters in this split alongside services_text.rs).

  • 37 listed functions moved exactly contiguously, plus two interleaved items not named in the ticket (DEFAULT_ENGINE_MARKER const, model_registry_adapter_availability_note), both confirmed private with no external callers.
  • render_config_text/telemetry_policy_summary sit 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.
  • A real change-caused fix: advised_commands.rs's structural-scanner exemption list had a file-path entry that needed updating since the string it exempts physically moved.
  • 7 blocks of tests partitioned into the new module's own test block; total workspace test count unchanged.
  • docs/architecture.md updated 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 --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • cargo xtask manifest --check
  • cargo xtask check-crate-edges
  • python scripts/smoke_local.py --profile debug --skip-build
  • cargo test --workspace --no-fail-fast — 4322 passed, 0 failed, 17 ignored (independently re-run twice; one run hit two pre-existing unrelated timing flakes in therock.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

Copilot AI 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.

🔵 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

@jussielo-amd
jussielo-amd force-pushed the rocmai-208-examine-report-text branch 2 times, most recently from c69da31 to 8494487 Compare October 29, 2026 15:03
@jussielo-amd
jussielo-amd marked this pull request as ready for review October 29, 2026 15:04
@jussielo-amd
jussielo-amd requested a review from a team as a code owner October 29, 2026 15:04
Base automatically changed from rocmai-209-services-text to main October 29, 2026 15:05
…into examine_report_text.rs

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
@jussielo-amd
jussielo-amd enabled stacked auto-merge October 29, 2026 15:05
@jussielo-amd
jussielo-amd force-pushed the rocmai-208-examine-report-text branch from 8494487 to b2fa7af Compare October 29, 2026 15:05

@juhovainio juhovainio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.rs and the same 33 appear in the new module under the same names, so nothing was dropped or weakened.
  • The advised_commands.rs exemption path was updated for the moved string.
  • CI is green.

Non-blocking notes:

  1. The long caller inventory in the module doc and in the architecture.md bullet will drift as callers change. Consider trimming it.
  2. The architecture.md wording "folding Phase 6f closed" reads awkwardly.
  3. The PR body ends with an AI generated-with footer; consider removing it.
  4. 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@jussielo-amd
jussielo-amd added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit db331bd Oct 29, 2026
24 checks passed
@jussielo-amd
jussielo-amd deleted the rocmai-208-examine-report-text branch October 29, 2026 16:26
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.

3 participants