Repository navigation
ROCMAI-210: extract update-surfaces rendering into update_cmd.rs and fold automation-proposal/daemon rendering into automations.rs - #752
Draft
jussielo-amd wants to merge 5 commits into
Conversation
…d sidebar) from main.rs Signed-off-by: Jussi Elo <jussi.elo@amd.com>
…d module Signed-off-by: Jussi Elo <jussi.elo@amd.com>
…into engine_ipc.rs Signed-off-by: Jussi Elo <jussi.elo@amd.com>
… into gpu_policy.rs Signed-off-by: Jussi Elo <jussi.elo@amd.com>
…fold automation-proposal/daemon rendering into automations.rs Signed-off-by: Jussi Elo <jussi.elo@amd.com>
8 tasks done
There was a problem hiding this comment.
🔵 Needs a closer look
Dependency #750's merge status and the reported build/test results remain independently unverified, so maintainer confirmation is needed.
No open issues 🎉
What changed in this PR
Continues the main.rs modularization by relocating update and automation rendering into focused modules, preserving existing behavior and dispatch wiring.
Changes:
- Extracts update reporting, runtime selection, and activation into
update_cmd.rs. - Moves automation/proposal and daemon rendering into
automations.rs, updating callers and imports. - Relocates nine existing tests and updates the architecture documentation.
| File | Description |
|---|---|
docs/architecture.md |
Documents module responsibilities and updates cross-references. |
apps/rocm/src/update_cmd.rs |
Houses update logic and five relocated tests. |
apps/rocm/src/therock_version_proptests.rs |
Points property tests at the relocated selector. |
apps/rocm/src/main.rs |
Removes relocated helpers and tests; updates module imports. |
apps/rocm/src/chat.rs |
Imports renderers from their new modules. |
apps/rocm/src/automations.rs |
Houses automation and daemon rendering plus four relocated tests. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 6f-3 of the
main.rsmodularization (epic ROCMAI-27). Mechanical relocation, no behavior change, split across two destinations:apps/rocm/src/update_cmd.rs— therocm updatecommand's rendering/activation logic:render_update_text,append_update_surfaces,apply_runtime_update,append_update_activate_summary,select_runtime_update_source,select_installed_update_runtime, plusupdate_should_preview_or_apply(interleaved, not named in the original ticket summary but part of the same cluster).apps/rocm/src/automations.rs— that file's own doc comment already anticipated this ("Render/policy helpers remain in the crate root... reached throughcrate::"), now rewritten since they live here:render_automations_text,ProposalKind,proposal_kind/proposal_plain_summary/proposal_plain_reason/proposal_status_label/proposal_bool_argument,fallback_tool_for_automation_action,automation_event_plain_summary,audit_event_plain_summary,watcher_last_check/watcher_plain_name/watcher_plain_trigger/watcher_plain_action/watcher_policy_note/watcher_mode_plain_label,render_daemon_text.main.rs/chat.rs:therock_version_proptests.rs,runtimes_cmd.rs/runtime_install_finalize.rs(via theROLLBACK_RECOVERY_HINTconst, which stayed inmain.rssince it has other callers).render_automations_text's production call site frommain.rsorphaned several now-deadrocm_coreimports — cleaned up in this same commit (confirmed dead by grep, not just removed speculatively).dispatch()confirmed byte-identical (independently re-verified by SHA-256).update_cmd.rs, 4 to a new test module inautomations.rs, which had none before); total workspace test count unchanged.docs/architecture.md: newupdate_cmd.rsbullet, rewrittenautomations.rsbullet, and a stale cross-reference elsewhere in the doc corrected.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, matches baseline exactly). One pre-existing unrelated timing flake observed this run —comfyui::tests::reinstall_is_refused_while_comfyui_starts_until_it_is_stopped, in a file this PR does not touch; confirmed passing in isolation. (Two other known pre-existing flakes in this repo,therock/cli_progress, did not trigger this run.)dispatch()call sites confirmed byte-identical (SHA-256 of the function body)Depends on #750 (ROCMAI-214) — fifth PR in the ROCMAI-86 (Phase 6f) stack.
Part of Jira ROCMAI-210 / epic ROCMAI-27.
🤖 Generated with Claude Code