Repository navigation
ROCMAI-862: list running managed services in the Windows dashboard - #1002
Conversation
On Windows there is no telemetry daemon, so nothing ever filled the dashboard's instance list: Home said "Running 0" and Serving "Running now - 0" while rocm services list showed ready services. The live managed-registry probe now also returns the live services as instances (same merge_instance mapping the daemon uses). A background poller reads it once a second under spawn_blocking and posts ClientMsg::ManagedInstances, which AppState::set_managed_instances applies in place so the Home tile's model does not change order each poll. The first poll is immediate. The poller runs only on Windows, never for --demo/--replay or a focused host. has_received_snapshot is untouched, so quit-confirm behaviour is unchanged. Linux is not affected. Also corrects the Observe empty state, the Windows quit-prompt manual-test steps, and README/install docs that said the Windows dashboard shows only GPU/CPU/memory. Known divergence: the probe reads the record's on-disk status, so a crashed service can read as running until a rocm services command reconciles it. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
aaf2570 to
9196431
Compare
The red
|
juhovainio
left a comment
There was a problem hiding this comment.
Thanks for this. I read the diff and found nothing that breaks the Windows list itself, and the scope matches ROCMAI-862 (Linux path untouched, docs updated, the Windows-only gap stated in the PR body). I'm requesting changes only because three tests don't catch the regressions they appear to guard; all three are small to fix.
To address
- The poller test is named and commented as pinning an immediate first poll, but a 20 ms period with a 5 s timeout also passes if the first tick is delayed by a full period.
- Nothing exercises the
event_loopwiring (thespawn_managed_registry_pollercall and theClientMsg::ManagedInstancesarm). Removing either leaves every added test green. - The Observe empty-state remedy "serve one from 3 Serving" is pinned by wording only; nothing ties "3" to the Serving tab.
Inline comments below cover each.
Smaller notes
- No fixture uses a
failedstatus, and the renderedshint in the quit prompt isn't asserted with registry-sourced instances. - A crashed service can show as
readyon Windows (raw on-disk status). The PR documents this, but the dashboard now presents it as a running server where it previously showed nothing, so it's worth a conscious call.
Please confirm
- The separate 1 s poller replaces the ticket's
push_host_gpu_snapshotrefresh. It looks like the better design (disk I/O off the UI thread); should the ticket text be updated to match? launcher_serving_instancesnow goes throughmerge_instanceinstead of a four-field literal. Please confirmmerge_instancesets no extra launcher-visible fields.
CI
All checks pass except Security scan / Security scanners and Security scan / gitleaks (3 generic-api-key hits). The one hit I could read is apps/rocm/src/serve_summary.rs:557 from d027ff8, which is already on main and not part of this diff, so it looks like a stale scan range. I could not inspect the other two hits, so please confirm they are the same pre-existing ones, or rebase and rerun.
| // "Nothing running" has been on screen for a second. | ||
| let (probe, expected) = probe_with(&["svc-a"]); | ||
| let (tx, mut rx) = mpsc::unbounded_channel(); | ||
| let handle = spawn_managed_registry_poller(probe, tx, Duration::from_millis(20)); |
There was a problem hiding this comment.
This test is named and commented as pinning an immediate first poll, but with a 20 ms period and a 5 s timeout a poller that delays its first tick by one period (e.g. interval_at(now + period)) passes too. Use a long period (or paused time) with a short timeout so only an immediate first tick passes.
| if polls_managed_registry(args.focus, state.simulated, cfg!(windows)) | ||
| && let Some(probe) = args.managed_registry_probe.clone() | ||
| { | ||
| spawn_managed_registry_poller(probe, chat_tx.clone(), Duration::from_secs(1)); |
There was a problem hiding this comment.
Removing this spawn, or the ClientMsg::ManagedInstances arm below, leaves every added test green; only the gate and the poller are exercised. Consider a small helper taking windows: bool that does gate plus spawn so the wiring has a test, or name the gap in the PR text.
| assert!( | ||
| grid.contains("no instance registry on this platform"), | ||
| "should name the platform limitation, not claim a daemon could be started; got:\n{grid}" | ||
| grid.contains("no managed services running"), |
There was a problem hiding this comment.
This pins the wording only. "serve one from 3 Serving" is a remedy naming a tab; add a comment naming the test that proves tab 3 is Serving, or derive the label from the tab enum.
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review · review-code · head 91964318
Review — needs work
Full review of the whole change (base...head: merge-base d027ff8e3ad9220ebb622667c97ed227d4b6c3e1…91964318eeb7e2c9c02532077b492b84d48a1bc8; GitHub's reported base.sha 573027c5 is itself several commits ahead of the actual merge-base, as expected for an unrebased branch — this does not change what was reviewed). Ticket ROCMAI-862 named in the title (bare identifier, not retrievable from here); the title and body's own description of the change ("list running managed services in the Windows dashboard") match what the diff does, with one scope-accuracy exception below.
Blocking
-
PR's own "Scope" claim that nothing in this diff is reachable on Linux is incorrect —
apps/rocm/src/dash.rs:727'slauncher_serving_instances, called from the platform-neutralrun_launcher(apps/rocm/src/dash.rs:655, nocfg(windows)/cfg(unix)gate anywhere between the two), was refactored by this diff to route through the newmanaged_instances()helper andmerge_instance, which now populatesgpu_ids,quantization,tensor_parallel_size,launch_args,env_varsandlog_fileon the launcher's serving-instance list (previously always defaulted by the old 4/5-field hand-rolled literal). This executes every time the barerocmlauncher front door runs with a service serving, on every platform, not only Windows. In practiceui/launcher.rsdoesn't currently render any of those new fields, so the user-visible effect today is nil, but the description's "Scope: Windows only... on Linux nothing in this diff is reachable" is a direct, checkable overclaim.
Confidence 90 · architectural · Fix: narrow the "Scope" paragraph to acknowledge the launcher-side refactor applies on every platform (even though its only current platform-specific effect is the Windows instance list). -
CI is red on this exact head commit —
Security scan / Security scannersandSecurity scan / gitleaksboth fail. Read the raw gitleaks report directly: all 3generic-api-keyhits are on commitd027ff8e3ad9220ebb622667c97ed227d4b6c3e1(apps/rocm/src/serve_summary.rs:557,:585,apps/rocm/src/runtime_install_finalize.rs:1315) — a commit already onmain(the PR's own merge-base) and not touched by this diff at all, so this looks like a stale/mis-scoped gitleaks comparison range rather than a secret this PR introduced.
Confidence 100 · mechanical · Fix: this isn't something a diff-level change fixes — a maintainer needs to confirm the 3 hits are the pre-existing ones (not new) and get the scan re-run against a corrected range or the finding allowlisted before merge. -
Several new tests don't verify the specific regression they're named/claimed to pin:
crates/rocm-dash-tui/src/app/event_loop.rs:1090(managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly) polls every 20ms against a 5s receive timeout. Both "first tick fires immediately" (the real, correct behavior — verified by tracingtokio::time::interval's semantics) and a hypothetical "first tick delayed by one full period" clear a 5s bound equally easily, so the test cannot actually distinguish them — despite the PR body explicitly claiming "The poller's immediate-first-read... [is] covered too."- No test anywhere calls
event_loop::runor the privateevent_loopfunction (confirmed via repo-wide grep) — so the two lines that actually wire this feature together,event_loop.rs:290'sspawn_managed_registry_poller(probe, chat_tx.clone(), ...)call andevent_loop.rs:322'sSome(ClientMsg::ManagedInstances(live)) => state.set_managed_instances(live)match arm, are each exercised only by directly unit-testingspawn_managed_registry_poller/set_managed_instancesin isolation. Deleting either integration line leaves every existing test green. crates/rocm-dash-tui/src/app/mod.rs:750(set_managed_instances_follows_the_polled_registry_list) never setsinstance_selto a nonzero value before shrinkinginstancesto empty, so it cannot catch a droppedself.clamp_selectors()call (mod.rs:626) — a call whose entire purpose (clamp_selectors,mod.rs:562) is keeping the selection index in range once the (now registry-sourced) list shrinks.
Confidence 85 · logic · Fix: tighten the immediate-tick test's timeout to something close to the period (e.g. 200ms), add a selection test that actually shrinks the list out from under a nonzeroinstance_sel, and add one test that drives the realevent_loop/runentry point with an injected probe+client so the two wiring lines are not solely implied by their halves' unit tests.
-
crates/rocm-dash-tui/src/ui/tabs/instances.rs:209's new empty-state text names "3 Serving" with nothing tying it to the real tab mapping (TAB_LABELSinui/tabs/mod.rs, which does sayServingis digit'3'today), and the one test touching this code path,draw_empty_names_the_platform_reason_for_the_in_process_collector(instances.rs:271), asserts only"no managed services running"and the absence of"start daemon"(instances.rs:290) — never the"3 Serving"/"serve one from"substring at all. A stale or mistyped tab reference here would never be caught by any test.
Confidence 85 · logic · Fix: assert the full remedy string (or at minimum the tab digit/name) in the existing test, and/or derive it fromTAB_LABELSinstead of a bare literal. -
docs/architecture.mdwas not updated for this PR's central change. Its entries forregistry_probe.rs(line 294: "ManagedRegistryProbe::snapshotreturns aManagedRegistrySnapshot: whether any record is live, and the idsrocm services stop <id>can reach") andclient.rs(line 289, describingClientMsg's payloads) both omit the newinstances: Vec<Instance>field /ClientMsg::ManagedInstancesvariant — which is the entire point of this PR. This project's own rootAGENTS.mdrequires every production source file's entry be kept accurate in the same change that changes its role ("the check reads no prose, so keeping an entry's description true is still on you").
Confidence 85 · mechanical · Fix: add a sentence to both entries naming the new field/variant and the poller that reads it. -
Silent, unlogged panic-swallow in the poller —
crates/rocm-dash-tui/src/app/event_loop.rs:97'slet Ok(snapshot) = tokio::task::spawn_blocking(move || probe.snapshot()).await else { continue; }has no logging call, unlike the sibling Windows GPU-collection failure path inclient.rs, which doeswarn!. A probe that panics on every tick (e.g. a persistently unreadable services directory) would silently and permanently freeze the instance list for the rest of the session with zero diagnostic trace anywhere. The only test for this path (managed_registry_poller_survives_a_panicking_probe) exercises one panic followed by recovery, not a persistent failure.
Confidence 70 · logic · Fix: log a warning on the swallowed-panic branch, at minimum once, so a persistently broken probe is visible somewhere.
Non-blocking
None beyond what's listed under Decisions for the author below.
Decisions for the author
- 1-second disk-polling vs. a push/fs-watch mechanism for Windows instances — tradeoff. The chosen design (poll the registry every second under
spawn_blocking) is simple and avoids cross-platform file-watching complexity, but it does introduce a self-documented ~1s staleness window between the live registry read the quit-confirm gate uses (has_live_instance_with) and the polledinstanceslist used for its display/stop-ability (has_stoppable_managed_instance_with). Reads as a deliberate, reasonable choice — confirm it is. launcher_serving_instancesnow exposeslaunch_args/env_vars/gpu_ids/quantization/tensor_parallel_size/log_fileon every platform via the sharedmerge_instancemapping — non-blocking-improvement. Verified neither the old nor the new test on this path (launcher_serving_instances_maps_ready_registry_record) asserts those fields either way, andui/launcher.rsdoesn't currently render them, so there's no live issue — butenv_varsin particular can carry sensitive values, and it's now reachable through a shared mapping function a future launcher UI change could render without anyone re-deriving this analysis. Worth a one-line test or comment nailing down that the launcher deliberately ignores those fields today.- None of the three edited doc files mention the PR's own "Known divergence" — non-blocking-improvement. The PR body explicitly states that a crashed-but-unreconciled Windows service can still read
ready/running(on-disk status, not process liveness), but README.md, docs/manual-testing.md and docs/rocm-docs/install/installation.md don't carry any version of that caveat for an end user or manual tester, only the PR body and in-code comments do.
Positive signals
polls_managed_registry(focus, replay, windows: bool)(event_loop.rs:75) takeswindowsas a plain parameter instead ofcfg!, so the entire gating matrix is unit-tested on every CI platform rather than only Windows — exactly the pattern this project's ownAGENTS.mdasks for with platform-gated logic.set_managed_instances(app/mod.rs:621) refills the existingHashMapin place instead of rebuilding it, specifically to avoid a freshRandomStatereordering the Home tile's displayed model on every poll — traced and confirmed correct: clearing without rebuilding keeps the same hasher, so same-key-set iteration order is deterministic across polls, which is a real (and non-obvious) bug the author avoided rather than one that happens to look avoided.managed_instances()(dash.rs:378) is verified byte-for-byte identical in itsmerge_instancecall to the daemon's own mapping incrates/rocm-dash-daemon/src/runner.rs, substantiating the PR's claim that this reuses "the same mapping the daemon itself applies" rather than a second hand-rolled one that could drift.
Deployment notes
None beyond the CI-red item above. No migrations, no new runtime dependencies; this is additive, mostly Windows-reachable behavior (plus the Linux-reachable launcher refactor noted under Blocking, whose current practical effect is nil since nothing renders the newly-populated fields).
What this covered
All 14 changed files read in full against 91964318eeb7e2c9c02532077b492b84d48a1bc8 (via git show pr-1002:<path> against a local read-only clone, never checked out), by 4 independent fan-out workers grouped by coupling — (1) apps/rocm/src/dash.rs + registry_probe.rs; (2) event_loop.rs + client.rs + app/mod.rs; (3) app/quit_confirm.rs, app/types.rs, app/test_support.rs, ui/launcher.rs, ui/quit_confirm.rs, ui/tabs/instances.rs; (4) README.md + docs/manual-testing.md + docs/rocm-docs/install/installation.md — plus my own direct verification of every candidate above (raw CI/gitleaks logs, docs/architecture.md, ui/tabs/mod.rs's TAB_LABELS, run_launcher's platform-neutrality, tokio::time::interval/timeout math, clamp_selectors's purpose, merge_instance call-site diffing against the daemon's own).
Agent-instruction pass: this repo's root AGENTS.md (an OSS-contribution workflow document) was read in full and applied throughout (doc-sync requirements, platform-gated-test requirements, "a message about the CLI's own behavior is asserted together with the behavior"). History/prior-changes passes were light — git log/blame used only incidentally (e.g., confirming the gitleaks-flagged commit predates this branch); no standalone findings came from them.
Design review (Step 7): no fundamental approach problem found. The polling/refill-in-place/shared-merge_instance-mapping design is sound; what surfaced were test-coverage gaps and description/doc accuracy, not a wrong architecture.
One disclosed limitation on blindness: this review's mandatory duplicate-review pre-check (confirming no review from a given automated-review identity already existed at this head sha) necessarily surfaced the one existing human review's full text (from juhovainio) before this review's own fan-out workers were dispatched. That text was never relayed to, or quoted for, any worker, and every finding above was independently re-derived and verified against the code from scratch — but full blind separation from that one incidental read was not achievable given the required pre-check. Some topical overlap with that review (the immediate-poll test timing, the untested "3 Serving" string, and a question about merge_instance's launcher-visible fields) should be read as independent corroboration rather than this review being unaware of it; this report also found one thing that review did not raise (the Linux-reachability scope mismatch) and did not re-raise its smaller notes about a failed-status fixture or the quit-prompt s-hint assertion, which this review did not independently re-derive.
Not reconciled against any discussion beyond that one pre-check read; no reply threads were read.
Not a human review. This is an automated code review; please verify findings independently before acting on them.
|
The E2E self-hosted run for this head (9196431) was cancelled by mistake during a queue cleanup; it has been re-queued. |
The gitleaks failure is a false positive on already-merged code, not this PRDiagnosing rather than re-running, since a re-run cannot change the result.
The gitleaks finding is: That line is a test fixture setting a model name: lemonade.api_model = "Qwen3-0.6B-GGUF".to_owned();The Two things make it clearly not this PR's:
Category: pre-existing, and a rule false positive. Not this PR's bug, and not infrastructure either. What I did not do: I have not added it to The remaining |
Confirmed: all three gitleaks hits are the same pre-existing false positives@juhovainio — you asked me to confirm the other two hits or rebase and rerun. I pulled the full report rather than rerunning, because a rerun cannot change the answer. Your read was right, and it extends to all three. Every hit is
So: two model names and a struct field whose name happens to contain Your diagnosis of the mechanism was also right — the scan range is The companion Not fixed, deliberately. The real remedy is three fingerprint entries in I have not yet worked the three test findings (the poller test's period/timeout window, the untested |
Brings the branch up to date after 53 commits, and clears the stale gitleaks failure: its three findings are all in d027ff8 (ROCm#914), which landed in main on 2026-11-10 just after this PR was last scanned. Every other open PR carries that commit and passes the scan, because it now sits on the base side of the comparison rather than looking like a commit this PR introduces. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
Correcting myself: the gitleaks failure was fixable, and is now fixedEarlier I said the three What actually gave it away: every other open PR — #678, #854, #919, #1036, #1054 — also contains The real cause was a stale scan. Merging The findings themselves remain what I described — The merge itself was clean, with no conflicts. Verified on Linux before pushing: No review items were addressed by this push; the ones from the 2026-11-10 review still stand. |
The remaining lane is not going to start: the self-hosted runner pool is downThis PR has no failures left — the only thing outstanding is a GPU lane that has been
Three of the six are offline. The MI300X pair is the stranger case: both report Nothing about this PR can clear it; it needs someone with runner access to restart the MI300X agents and bring |
Correction: the MI300X runners were working, not wedgedIn my previous comment I said both MI300X runners reported
What actually stands from that comment:
So the MI300X half needs patience, not an admin. The W7900 half still needs someone to bring that runner back. |
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review · head 3eab1dbb
This automation never files a GitHub approval, so no approving review will appear here whatever the outcome — the merge decision stays with a human reviewer.
Review — needs work
Full review of the whole change (base 691834a0…head 3eab1dbb). Ticket ROCMAI-862 named in the title; not independently retrieved here (deliberately — see What this covered). The title/body's own description of the change ("list running managed services in the Windows dashboard") matches what the diff does, with one scope-accuracy exception below.
Blocking
-
The PR's own "Scope: Windows only... on Linux nothing in this diff is reachable" claim is inaccurate.
apps/rocm/src/dash.rs:727'slauncher_serving_instances, called fromrun_launcher(apps/rocm/src/dash.rs:655, nocfg(windows)/cfg(unix)gate anywhere between the two), was refactored by this diff to route through the newmanaged_instances()helper (apps/rocm/src/dash.rs:378) andmerge_instance, which now populatesgpu_ids,quantization,tensor_parallel_size,launch_args,env_varsandlog_fileon the launcher's serving-instance list — fields the old hand-rolled 4/5-field literal left at their defaults. This runs every time the barerocmlauncher front door executes with a service serving, on every platform, not only Windows. Nothing inui/launcher.rscurrently renders those fields, so the live effect today is nil, but the description's absolute claim is checkably false.
Confidence 90 · architectural · Fix: narrow the "Scope" paragraph to acknowledge the launcher-side refactor applies on every platform (its only platform-specific effect remains the Windows instance list). -
Three of the new tests don't verify the specific behavior they're written to pin:
managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly(crates/rocm-dash-tui/src/app/event_loop.rs:1090) polls every 20ms against a 5-second receive timeout. Both "first tick fires immediately" (the real, correcttokio::time::intervalbehavior) and a hypothetical "first tick delayed by one full period" clear a 5s bound equally easily, so the test cannot actually distinguish them, despite the PR body explicitly claiming the immediate-first-read is "covered too."set_managed_instances_follows_the_polled_registry_list(crates/rocm-dash-tui/src/app/mod.rs) never setsinstance_selto a nonzero value before shrinkinginstancesto empty, so it cannot catch a droppedself.clamp_selectors()call insideset_managed_instances— withinstance_selalready at its default of 0, removing that call changes nothing the test observes.draw_empty_names_the_platform_reason_for_the_in_process_collector(crates/rocm-dash-tui/src/ui/tabs/instances.rs:271) asserts only"no managed services running"and the absence of"start daemon", never the"3 Serving"/"serve one from"substring itself (the "3" is correct today — verified againstActiveTab::from_digit— but a future typo or tab reorder here would go uncaught).
Confidence 85 · logic · Fix: tighten the immediate-tick test's timeout to something close to the period (e.g. 200ms), add a selection assertion that actually shrinks the list out from under a nonzeroinstance_sel, and assert the full remedy string (or at least the tab reference) in the empty-state test.
Non-blocking
None beyond what's listed under Decisions for the author below.
Decisions for the author
- Silent, unlogged panic-swallow in the poller — non-blocking-improvement.
crates/rocm-dash-tui/src/app/event_loop.rs:97'slet Ok(snapshot) = tokio::task::spawn_blocking(move || probe.snapshot()).await else { continue; }has no logging, unlike the sibling Windows GPU-collection failure path inclient.rs, which doeswarn!. A probe that panics on every tick (e.g. a persistently unreadable services directory) would silently and permanently freeze the instance list with zero diagnostic trace. Worth atracing::warn!on that branch. - The "~once a second" staleness prose is hand-copied, not tied to the actual period — non-blocking-improvement.
app/quit_confirm.rsandui/quit_confirm.rsboth restate "a background poller once a second... can trail by about a second" as free text, while the real period is a bareDuration::from_secs(1)literal at the single call site (event_loop.rs:290), with no shared constant tying the two together. If that period is ever retuned, the docs would silently go stale — exactly the drift class this repo's ownAGENTS.md§5 names ("the same behavior claim... repeats across surfaces; each drifts independently"). A named constant the comments reference would close that gap. with_registry_probe's test helper has no way to setinstances— non-blocking-improvement.event_loop.rs's own poller tests had to hand-roll a near-identical second helper (probe_with) specifically to cover that field. Extending the shared helper would remove the duplication.
Positive signals
polls_managed_registry(focus, replay, windows: bool)(event_loop.rs:75) takeswindowsas a plain parameter instead ofcfg!, so the entire gating matrix is unit-tested on every CI platform rather than only the Windows one — exactly the pattern this project's ownAGENTS.mdasks for with platform-gated logic.set_managed_instances(app/mod.rs) refills the existingHashMapin place instead of rebuilding it, specifically to avoid a freshRandomStatereordering the Home tile's displayed model on every poll — traced and confirmed correct, and backed by a test that would actually fail if this regressed.managed_instances()reuses the exact samemerge_instancecall the daemon itself applies to a newly discovered service, rather than a second hand-rolled mapping that could drift — verified byte-for-byte identical in its arguments to the daemon's own call site.
Deployment notes
Windows-only behavior change; the Linux daemon path itself is untouched, except for the launcher-side refactor noted under Blocking (reachable on every platform, but with no current observable effect since nothing renders the newly-populated fields yet). CI is green at this head across all required checks (clippy, build-and-test, windows-build-and-test, Windows release build and lifecycle, E2E consolidated report, security scans including gitleaks); one job, "E2E tests (MI300X, current)", remained queued/incomplete as of this review — an unrelated GPU-hardware-matrix lane, not implicated by this Windows-dash-only change.
What this covered
All 14 changed files read in full by independent fan-out workers grouped by coupling: (1) apps/rocm/src/dash.rs + registry_probe.rs; (2) event_loop.rs + client.rs + app/mod.rs; (3) app/quit_confirm.rs + app/types.rs + app/test_support.rs + ui/quit_confirm.rs (reviewed twice, independently, by two separate workers); (4) ui/launcher.rs + ui/tabs/instances.rs; (5) README.md + docs/manual-testing.md + docs/rocm-docs/install/installation.md. Reviewed against 691834a0…3eab1dbb. Agent-instruction pass: this repo's root AGENTS.md was read in full and applied (module-size limit checked and not exceeded, platform-gated-test convention cross-checked positively against this PR, the "a message about the CLI's own behavior is asserted together with the behavior" convention applied to the test-gap finding above). History/prior-changes passes were light (git log/blame used incidentally, e.g. confirming the quit-confirm doc edits are comment-only against an unchanged branch); no standalone findings came from them. Design review (Step 7): no fundamental approach problem — the polling/refill-in-place/shared-merge_instance design is sound; what surfaced was a description-accuracy gap and test-assertion gaps, not a wrong architecture.
Did not run cargo test/cargo clippy directly; relied on GitHub's own CI results for this head (confirmed green, see Deployment notes) plus static tracing elsewhere — no finding above is scored 100.
Disclosure on blindness: this process's own mandatory pre-publish duplicate-review check (confirming no automated review already existed at this exact head commit) necessarily surfaced one existing human review and one existing automated review, both anchored to an earlier commit that predates a later merge-from-main bringing the branch to this head — neither is a duplicate of this review at the current head. My own fan-out workers never saw either, had no access to this PR's description or discussion, and their findings were already settled before that check ran. On reading what the check surfaced, I independently re-verified two of its points directly against the raw source myself before including them above (the launcher Linux-reachability point and the three test-assertion gaps); I did not adopt its other points on faith — in particular, a CI-red claim in the older review is now stale and contradicted by this review's own direct, fresh check of the current head's CI results, so it is not repeated here.
Not reconciled against any other open review-thread discussion; no reply threads were read.
Not a human review. This is an automated code review; please verify findings independently before acting on them.
…ior breaks Each of these named a behavior it could not actually observe, so the bug it was written against would have slipped through it. The poller test timed out at 5s against a 20ms period: a first read delayed a full period cleared that bound just as easily as an immediate one, so the "immediate" in its name was unasserted. Period and deadline now straddle each other (1s vs 250ms) so only an immediate first read passes. The selector test left `instance_sel` at its default 0 before shrinking the list, which makes `clamp_selectors` unobservable — drop the call and nothing changes. It now selects a second row first, then empties the list under it. The empty-state test asserted only the diagnosis half of the message and rendered at 80 columns, truncating the remedy it never checked. It now renders wide enough for the whole line and asserts it, tab digit included, so a tab reorder that leaves this string behind is caught. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
|
Thanks — both blocking findings were right. Addressed at 1. The "Windows only" scope claim (PR body, now rewritten)Verified the claim before rewriting it, and it is false as you said. 2. The three tests — each broken on purpose to prove it now discriminatesRun on a Linux box against this head, production code mutated and then restored. a. Period and deadline now straddle each other instead of both being slack: period Mutation: The old form (5s bound, 20ms period) passes unchanged under that same mutation. b. Now posts a two-instance list, sets Mutation: deleted c. Now asserts the whole line, tab digit included. The backend also had to go from 80 to 160 columns — at 80 the remedy half was being truncated off the buffer entirely, which is part of why it went unasserted. Mutation: production Gates run at this head (Linux, x86_64)All exit 0: What I did not verifyThe Windows Still openNot addressed here — your three Decisions for the author, all non-blocking: the unlogged |
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review · head 5ab336d2a082
This automation never files a GitHub approval, so no approving review will appear here whatever the outcome — the merge decision stays with a human reviewer.
Review — needs work
Full review of the whole change (base 691834a0…head 5ab336d2a082, apps/rocm/src/dash.rs, crates/rocm-dash-tui/src/{app/event_loop.rs,app/mod.rs,app/quit_confirm.rs,app/test_support.rs,app/types.rs,client.rs,registry_probe.rs,ui/launcher.rs,ui/quit_confirm.rs,ui/tabs/instances.rs}, README.md, docs/manual-testing.md, docs/rocm-docs/install/installation.md).
Implements ROCMAI-862 ("rocm dash on Windows: running managed models never appear") — the PR's title, description and the ticket's own summary all agree; this change is the fix, not a partial step toward something larger.
Blocking
-
Empty-state message is clipped at realistic terminal widths, hiding the new remedy text —
crates/rocm-dash-tui/src/ui/tabs/instances.rs:219-223(draw_empty), test around the same file.
The new in-process empty-state string is"no managed services running · serve one from 3 Serving · vLLM containers aren't available here"(94 chars), rendered viaParagraph::new(Line::from(Span::styled(body, ...)))with no.wrap()call — ratatui clips an unwrappedParagraphrather than wrapping it. The accompanying test was widened fromTestBackend::new(80, 20)toTestBackend::new(160, 20), with a comment explicitly stating "80 columns would truncate it away unasserted". 80 columns is used elsewhere in this same test suite as a realistic width (crates/rocm-dash-tui/src/ui/tabs/mod.rs:266), and the panel's own border further narrows the usable width. The whole point of this change's longer message is to tell the user where to go ("serve one from 3 Serving"); at a normal terminal size that clause is exactly what gets cut off, and the test was adjusted to avoid catching it rather than fixing it.
Confidence 85 · mechanical · Fix: wrap the paragraph (e.g..wrap(Wrap { trim: true })) or shorten the message to fit 80 columns, and test against a realistic width rather than one chosen to make the assertion pass. -
A panicking registry probe is silently swallowed with no log line —
crates/rocm-dash-tui/src/app/event_loop.rs:98(thecontinuearm insidespawn_managed_registry_poller).
On aspawn_blockingjoin failure the poller doescontinuewith only a comment ("the probe panicked; keep polling..."), notracing::warn!/debug!. This is inconsistent with this exact crate's own convention for the analogous Windows per-tick failure:crates/rocm-dash-tui/src/client.rs:211logswarn!(error = %e, "windows GPU perf-counter query failed"), andevent_loop.rsitself usestracing::warn!/tracing::debug!for comparable failure paths elsewhere (e.g. lines ~610, ~739). A probe that panics on every call would then degrade this feature for an entire session with zero operator-visible signal.
Confidence 80 · logic · Fix: add atracing::warn!(or similar) alongside thecontinue, naming what happened, matching the sibling convention.
Non-blocking
-
New test's doc comment cites the wrong function —
apps/rocm/src/dash.rs:1313-1316(live_registry_probe_carries_the_live_managed_instances).
The comment says "seeAppState::push_host_gpu_snapshot", butpush_host_gpu_snapshotexplicitly leavesinstancesuntouched (its own doc comment and a dedicated test pin this). The function that actually does what the comment describes isAppState::set_managed_instances, which every other doc comment touched by this diff correctly names (client.rs,app/types.rs). Purely a comment nit in brand-new code, not a behavior issue.
Confidence 85 · mechanical · Fix: point the cross-reference atAppState::set_managed_instances. -
docs/architecture.md's Windows note is now incomplete —docs/architecture.md:584.
"There is no daemon socket on Windows: ... the snapshot it posts does not replace the instance list" is still literally true (theHostGpuSnapshotitself still carries no instances) but no longer tells the whole story: it doesn't mention thatinstancesnow arrives through the new registry-poller this PR adds. This is exactly the class of staleness this project's own tooling note says it cannot catch (a file with an entry whose description goes stale, as opposed to a missing entry).
Confidence 72 · mechanical · Fix: add a sentence noting instances arrive separately via the registry poller /ClientMsg::ManagedInstances.
Decisions for the author
-
No Linux/WSL2 e2e scenario for this Windows-only behavior change — answered-by-intent.
Would otherwise be a gap under this project's "user-observable behavior needs a scenario" convention, since this changes what the Windows dashboard shows. The PR description answers it directly: "tests/e2e-cucumber is Linux-only...dash-07already covers 'a managed model is visible in the dashboard' but is@requires-os:linux, because the PTY harness is not promoted on Windows... The Windows path here is therefore covered at unit level only. Those unit tests do run on Windows."tests/e2e-cucumber/features/dash.feature's own header independently confirms the ConPTY-on-Windows gap is a pre-existing, tracked limitation, not something new this PR introduces or dodges. -
Hardcoded
"3"in the new empty-state message's "serve one from 3 Serving" clause — tradeoff.
ActiveTab::from_digit('3') == Servingtoday, confirmed correct, but it's a literal rather than a derived reference to a single source of tab-digit truth. The author already flagged this themselves in the test comment ("a tab reorder that left this line behind would send the user to the wrong tab, and nothing else here would catch it") — a deliberate, disclosed tradeoff rather than a hidden gap, so left to the author's judgment rather than filed as a defect.
Positive signals
AppState::set_managed_instancesrefills the existingHashMapin place (clear()+extend()) instead of rebuilding it, specifically to keep iteration order stable across polls (a freshHashMapreseeds itsRandomState) — a deliberate, non-obvious, well-tested choice (set_managed_instances_keeps_instance_order_stable_across_pollswould plausibly fail without it).polls_managed_registry(focus, replay, windows: bool)takes the platform as a plain parameter instead ofcfg!, so the whole decision matrix runs on every CI job rather than only a Windows-only lane — directly matches this project's own "platform-gated code gets a test that runs on its gate" convention.- The new
managed_instances()helper (apps/rocm/src/dash.rs) builds instances throughrocm_dash_core::traits::merge_instance— the exact mapping the daemon itself already applies to a newly discovered service — replacing what had been a second, hand-rolled, drift-proneInstance { .. }literal inlauncher_serving_instances. docs/rocm-docs/install/installation.mdandgetting-started.mdpull the edited README paragraphs in via Sphinx{include}directives keyed on literal anchor strings that still exist verbatim post-edit, so the three public docs structurally cannot drift from one another despite reading as independent prose.
Deployment notes
None. Windows-only, additive behavior change (an always-empty instance list now shows real managed services); no daemon, wire-protocol, or Linux/WSL2 behavior changes; no migration.
What this covered
Every file in the diff, read completely, split across three independent fan-out passes grouped by coupling (probe/client/types plumbing; event-loop/app-state/quit-confirm; UI layer + docs), plus this orchestrating pass's own direct verification of each surviving finding against the source (merge_instance, discover_managed_services, clamp_selectors, should_skip_daemon, ratatui Paragraph wrap behavior, logging conventions elsewhere in the crate) and a repo-wide grep for stale pre-PR wording ("no instance registry on this platform", "serving-instance registry") confirming none remains outside this diff. Checked AGENTS.md for project-specific conventions (module-size limits N/A — no file added/renamed; architecture-doc entries present for all touched files, one flagged stale above; platform-gate-testing convention followed). CI: all required checks green (clippy, full test suite, Windows build/test/lifecycle, coverage ratchet, E2E Linux/WSL2/Strix-Halo-Windows); one GPU-hardware lane (MI300X) was still queued at review time and is not a required gate for this kind of change.
Did not run: history pass beyond git log/git grep spot checks (nothing notable surfaced); prior-changes pass against other PRs' review threads (not available to a blind review by design). Not reconciled against any prior discussion on this PR.
Not a human review. This is an automated code review; please verify findings independently before acting on them.
…ry probe The in-process empty-state message is 94 characters rendered through an unwrapped `Paragraph`, which ratatui clips rather than wraps. An earlier round on this branch widened that test's backend from 80 to 160 columns so the assertion would pass; that documented the clipping instead of fixing it. Wrap the paragraph the way every other prose paragraph in this UI already does, and assert at 80 columns — reading the panel back through the wrap, so a clipped render still cannot pass. The registry poller's `spawn_blocking` join-failure arm swallowed a probe panic with only a comment. A probe that panics every tick would leave the instance list empty for a whole session with nothing in the log; warn instead, matching `client.rs`'s per-tick Windows failure, and assert the warning fires. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
|
Both blocking findings were right, and the first one was right in a way worth stating plainly. Addressed at 1. The clipped empty state — and the test that was widened to hide itYou are correct, and the history is worse than "a test at an unrealistic width". An earlier round on this PR widened Fix chosen: wrap, not shorten.
Test now runs at 80 columns, the same realistic width Mutation evidenceProduction Restored, same command: One correction to the finding, for the record: at exactly 80 columns the clause that is lost is the tail — the render stops dead at 2. The swallowed probe panic — now logged, and the log line is test-covered
tracing::warn!(error = %e, "{MANAGED_REGISTRY_PROBE_PANIC}");The message text is a named constant so a test can assert the exact diagnostic rather than "something was logged". Yes, it is test-covered. Mutation: the One non-obvious thing that writing this test surfaced, flagged here because it is a trap: the new test passed in isolation but failed when run alongside Gates (Linux x86_64, this head, each run separately, all exit 0)
Still open
|
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review · head de4ed14b
This automation never files a GitHub approval, so no approving review will appear here whatever the outcome — the merge decision stays with a human reviewer.
Review — needs work
Full review of the whole change (base 691834a0…head de4ed14b). Implements ROCMAI-862 ("rocm dash on Windows: running managed models never appear"); the title, body and diff agree, including an already-self-corrected caveat in the body's own "Scope" section acknowledging the launcher_serving_instances refactor runs on every platform (not just Windows), which an earlier version of that paragraph had wrongly denied.
Blocking
- A required-looking CI check is red on this exact head commit:
E2E consolidated report (self-hosted). Its job log readslane e2e-gpu ran (needs result: cancelled) but uploaded no e2e-gpu-report, so it is missing from the consolidated report, i.e. theE2E tests (MI300X, current)GPU-hardware lane was cancelled (no hardware available) rather than failing on its own merits, and the consolidation step hard-fails whenever a lane it expects a report from produced none. This looks like a self-hosted-runner/hardware-availability issue rather than a regression this diff introduces — it matches what the PR body already says about GPU‑hardware E2E not being run — but it is a currently failing status check on this head, not merely "queued" as an earlier review round at an older commit on this same PR described it.
Confidence 100 · mechanical · Fix: not something a diff-level code change fixes — confirm whether this check is a required merge gate; if so, get the MI300X lane rerun or the gate waived with that context, rather than merging past a red check silently.
Non-blocking
docs/architecture.md:584's Windows boundary note is now incomplete. "There is no daemon socket on Windows: … the snapshot it posts does not replace the instance list" is still narrowly true ofclient.rs's ownHostGpuSnapshot(still ignored bypush_host_gpu_snapshot), but as the one place this doc describes Windows instance handling, it now reads as "Windows has no instance list," which is no longer the whole picture now that a separate registry poller (event_loop::spawn_managed_registry_poller→ClientMsg::ManagedInstances) fillsinstancesthere.AGENTS.md§5 itself flags this exact class of gap ("the check reads no prose, so keeping an entry's description true is still on you").
Confidence 72 · mechanical · Fix: add a clause noting instances now arrive separately via the registry poller.
Decisions for the author
- Hardcoded
"3"in the new empty-state message's "serve one from 3 Serving" clause — tradeoff.ActiveTab::from_digit('3') == Servingtoday, confirmed correct, but it's a literal rather than a derived reference to the tab-digit source of truth (TAB_LABELS), and the same pattern already exists pre-PR elsewhere in this UI (ui/tabs/home.rs). The new test's own comment discloses the risk ("a tab reorder that left this line behind would send the user to the wrong tab, and nothing else here would catch it") — a deliberate, self-aware tradeoff consistent with existing convention, not a hidden gap. Confirm it's still an acceptable risk, or derive the digit fromTAB_LABELS. launcher_serving_instancesnow exposeslaunch_args/env_vars/gpu_ids/quantization/tensor_parallel_size/log_filethrough the sharedmerge_instancemapping, and — via this same PR's new Windows poller — those same fields reachui/instance_detail.rs's launch_args/env_vars panes for Windows instances for the first time (that modal already renders both panes for Linux/daemon-sourced instances; nothing in this diff changes rendering, only which platform now has instances to view). Not a new exposure path to a different principal — the operator viewing the dashboard already has filesystem access to the on-disk registry recordmerge_instancereads from — but worth a conscious note givenenv_varscan carry secrets.- No Linux/WSL2 e2e scenario for this Windows-only behavior change — answered-by-intent. Would otherwise be a gap under
AGENTS.md§3's "user-observable behavior needs a scenario" rule. The PR body answers it directly: "dash-07… already covers 'a managed model is visible in the dashboard' but is@requires-os:linux… The Windows path here is therefore covered at unit level only. Those unit tests do run on Windows."
Positive signals
polls_managed_registry(focus, replay, windows: bool)(event_loop.rs) takes the platform as a plain parameter instead ofcfg!, so the whole gating matrix (verified: flipping any single conjunct independently fails its own test row) runs on every CI job — exactlyAGENTS.md's own "platform-gated code gets a test that runs on its gate" pattern.AppState::set_managed_instancesrefills the existingHashMapin place instead of rebuilding it, specifically to avoid a freshRandomStatereordering the Home tile's displayed model on every poll — traced and confirmed correct, and it funnels through the sameclamp_selectors()every otherinstancesmutator already uses rather than a divergent clamp.- The three test-quality gaps an earlier human review round (
#pullrequestreview-5840255013) and earlier automated rounds on this PR raised — the immediate-poll test's timing tolerance, the selector-clamp test never movinginstance_seloff 0, and the silently-swallowed poller panic with no log line — are all independently re-verified fixed and solid at this head: the immediate-read test's 250ms/1s straddle genuinely discriminates, the selector test now setsinstance_sel = 1before shrinking the list, and a panicking probe now logs aWARNasserted by a dedicated test (managed_registry_poller_warns_when_the_probe_panics). managed_instances()reuses the exact samemerge_instancecall the daemon itself applies to a newly discovered service (verified byte-for-byte identical call shape againstrocm-dash-daemon/src/runner.rs), and in doing so also fixes a pre-existing bug inlauncher_serving_instances's old hand-rolled literal, which silently dropped those same fields.
Deployment notes
Windows-only additive behavior change; Linux/daemon path untouched except the already-disclosed, currently-inert launcher_serving_instances refactor. No migrations, no new runtime dependencies. The one red CI check above should be resolved or explicitly waived before merge.
What this covered
All 14 changed files read in full against de4ed14b1a997c23d4e77ee0e08b2bb5cc85fdfe (via git show against a local read-only clone, never checked out), by 4 independent blind fan-out workers grouped by coupling — (1) apps/rocm/src/dash.rs + registry_probe.rs + client.rs; (2) app/event_loop.rs alone; (3) app/mod.rs + app/types.rs + app/quit_confirm.rs + app/test_support.rs; (4) ui/launcher.rs + ui/quit_confirm.rs + ui/tabs/instances.rs — none of which were given this PR's description, comments, or any prior review. The docs group (README.md + docs/manual-testing.md + docs/rocm-docs/install/installation.md) could not be dispatched as a 5th blind worker (a shared subagent-concurrency limit was exhausted by other work on the same host) and was instead read and cross-checked directly by this orchestrating pass, which is a weaker form of independence than the other four groups — flagged here rather than silently absorbed. Plus this pass's own direct verification of every surviving candidate (raw CI job logs, docs/architecture.md, ui/instance_detail.rs's rendering, quit_confirm.rs's snapshot-staleness logic against the new manual-testing.md wording, and a repo-wide grep confirming no stale pre-PR "only GPU/CPU/memory" wording remains).
Agent-instruction pass: this repo's root AGENTS.md was read in full and applied (module-size limits checked and not exceeded — dash.rs's production-line count, test module excluded, is well under 1,500; platform-gated-test convention followed; doc-sync convention applied to the finding above). History pass: light git log on the touched files; nothing notable beyond an experienced, dead-code-conscious commit history. Prior-changes pass: not applicable (no other PRs examined). Design review (Step 7): no fundamental approach problem; the poll/refill-in-place/shared-merge_instance design is sound, and the one real design question (a ~1s disk-polling staleness window) is already a disclosed, deliberate tradeoff, not a defect.
This PR carries three earlier review rounds from this same automated-review identity, at commits 91964318, 3eab1dbb and 5ab336d2, all now stale (superseded by two further pushes, the most recent of which — per its own commit message — specifically fixed the wrap/truncation and panic-logging issues those rounds raised). This review did not read any of that prior discussion as input; it was re-derived blind from the current code, and the one place its own process necessarily surfaces prior review text (the pre-publish duplicate-head check) happened only after the findings above were already settled.
Not reconciled against any open discussion on this PR beyond that pre-publish check.
Not a human review. This is an automated code review; please verify findings independently before acting on them.
🤖 Automated by an AI agent
Three conflicts, all where main reworked the same managed-instance surfaces
this branch rewrites:
- apps/rocm/src/dash.rs: main added `managed: svc.managed` to the inline
registry->Instance map in `launcher_serving_instances`; this branch had
already replaced that map with `managed_instances()`, which maps through
`rocm_dash_core::traits::merge_instance` — and that already sets
`managed: svc.managed`. Kept this branch's call; main's field is carried.
- crates/rocm-dash-tui/src/ui/tabs/instances.rs: both sides independently
added `.wrap(Wrap { trim: false })` to `draw_empty` (the code line merged
clean); only the explanatory comments conflicted. Kept this branch's
rationale, correcting its "(79)" — that measured the old `Connected`
string, which main replaced with a 99-char one that runs further past the
same cliff.
- docs/manual-testing.md: main documented the Services `s` offer as absent on
Windows; this branch is what makes it work there, so main's Windows clause
is superseded. Kept main's independent timing caveat (the offer appears
once the dashboard lists the service as managed).
No feature files or numbered doc sections were touched by this branch, so no
scenario or section renumbering was needed.
Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
The merge of main auto-merged app/mod.rs and app/quit_confirm.rs with no conflict, but main had tightened `has_stoppable_managed_instance_with` to screen on `is_listed_service` (i.e. `Instance::managed`), because the Services overlay that `s` jumps to lists only managed rows. `set_managed_instances_follows_the_polled_registry_list` hand-builds its instance with `..Default::default()`, which leaves `managed` false — a shape the poller cannot actually produce, since it maps through `merge_instance`, which copies `managed` from the record, and `discover_managed_services` only ever emits `managed: true`. So the test's own assertion that a registry-sourced instance is offered for stopping on quit began failing on a merge that compiled clean. Set `managed: true` on the fixture so it matches what the poller produces. The production path was already correct; only the fixture was unrealistic. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
|
Merged Conflicts and how each was resolved
A clean auto-merge that was semantically broken
Verification
Gates (remote Linux)
This PR touches Windows Still open from the 2026-11-16 reviewNeither is addressed by this merge:
|
|
Thanks. Taking the blocking finding first, because it has since resolved itself. Blocking: Non-blocking:
Decisions you raised:
The doc fix is not pushed yet; it goes up with the next verified push. One process note, since it affects how I read these: the header says this automation never files a GitHub approval. On #1041 a review from this same automation did register as |
Review finding: architecture.md's Windows boundary note was narrowly true of client.rs's own HostGpuSnapshot, but as the only place the doc describes Windows instance handling it had come to read as "Windows has no instance list" — which this PR's registry poller makes false. It now names spawn_managed_registry_poller and ClientMsg::ManagedInstances as the path the list arrives by, so the boundary the note draws is about the metrics snapshot rather than about Windows. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
juhovainio
left a comment
There was a problem hiding this comment.
Re-reviewed at 75d72ee. No blocking defects found in the diff; requesting changes for the items below, mainly the first, which are cheap to settle.
Should address
docs/manual-testing.mdsays the heroT/Srow reads—, never0, because listed servers carry no throughput. Listed instances now come throughmerge_instancewith a default sample and status Ready, so that is no longer structurally guaranteed, and no test pins the hero output for a registry-sourced Ready instance. Please add a test over a polled Ready instance or soften the sentence (a message about CLI behavior should be asserted together with the behavior).launcher_serving_instancesnow goes throughmerge_instanceon every platform. Please confirm the0, 0arguments and the newly populated fields change nothing the launcher draws, and that no launcher test pinned the old literal.- Docs wording: some places say the Windows dashboard shows "the managed servers
rocm services listreports". The probe lists only live, bound-port records, so "running managed servers" is accurate and the broader phrasing overstates it. Worth a grep across README, installation.md and docs/ for any remaining variant of the old claims.
Nits / robustness
4. managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly uses real time with a 250ms first-read deadline including a spawn_blocking round trip; it can flake on a loaded Windows runner. Consider paused time or a looser bound relative to the period.
5. The test helper installs a process-global tracing subscriber (set_global_default, result ignored); fragile if any other test in the crate depends on the default subscriber.
6. Please confirm chat_tx is the same ClientMsg channel the event loop reads (the name suggests chat-only), and note the poller's JoinHandle is dropped so it only stops once the receiver drops.
7. The ~12-line comment in draw_empty narrating a width regression can be trimmed.
Not verifiable from the diff: whether event_loop.rs stays under the 1,500 production-line limit (about 60 lines added); the clippy job runs that check. Windows and clippy CI were still running when I looked.
| sidebar, never `0.0%`. | ||
| - The hero's `T/S` row reads `—`, never `0` or `-0`: Windows has no | ||
| serving-instance view, so no throughput is ever measured there. | ||
| - The hero's `T/S` row reads `—`, never `0` or `-0`: a managed server is |
There was a problem hiding this comment.
Is this still guaranteed? A listed Ready instance now exists with a default sample, so the hero may compute 0 rather than unmeasured. Please pin the hero output for a registry-sourced instance with a test, or reword.
| if polls_managed_registry(args.focus, state.simulated, cfg!(windows)) | ||
| && let Some(probe) = args.managed_registry_probe.clone() | ||
| { | ||
| spawn_managed_registry_poller(probe, chat_tx.clone(), Duration::from_secs(1)); |
There was a problem hiding this comment.
Please confirm chat_tx is the same ClientMsg channel the loop's recv arm reads; the name suggests chat-only. The poller's JoinHandle is also dropped, so it only stops once the receiver drops.
| // whole session with nothing in the log to explain it. | ||
| // Same shape as `client.rs`'s per-tick Windows | ||
| // perf-counter failure. | ||
| tracing::warn!(error = %e, "{MANAGED_REGISTRY_PROBE_PANIC}"); |
There was a problem hiding this comment.
If the probe panics persistently this warns once per second for the whole session. Consider logging once per streak.
juhovainio
left a comment
There was a problem hiding this comment.
🤖 Automated review · head 75d72eeb
Review — no blocking findings
Full review of the whole change (merge-base 3e00084c41c982c5d2f395bcda4c6c8e371c1588 … head 75d72eeb590fdec5901deddedacda14f20ea1173). Implements ROCMAI-862 per the title; the bare ticket identifier is an internal-tracker reference and was not retrieved for this review (public repo). The title/body's description ("list running managed services in the Windows dashboard") matches what the diff does, and the body's own "Scope" section already states — correctly, verified independently below — that the launcher_serving_instances refactor runs on every platform, not just Windows.
Blocking
None.
Non-blocking
docs/architecture.md'sapp/event_loop.rstable row (line 508) still describes its registry-probe interaction as one-time "seeding." This PR addsspawn_managed_registry_poller, a standing ~1Hz poller that is the mechanism the whole PR exists to add — not a one-shot seed. (The Windows boundary-note bullet a few lines below, at line 586, was fixed in the latest push and now correctly names the poller; this table row for the file itself wasn't updated to match.) Could not anchor an inline comment here since the diff only touches line 586 of this file. Confidence 70 · mechanical · Fix: mention the periodic poller explicitly in this row too.- See inline comments for three more:
event_loop.rs's immediate-poll test only bounds the second poll from above, so it can't catch a "lost pacing"/busy-loop regression in the new ~1s period (confidence 78); adocs/manual-testing.mdrace-condition caveat whose described sequence doesn't match the test procedure it sits under (confidence 70); and none of the three edited user-facing docs mentioning the PR's own disclosed "known divergence" (on-disk status vs. real process liveness) (confidence 72).
Decisions for the author
- Hardcoded
"3"in the empty-state message's "serve one from 3 Serving" clause — tradeoff. Verified correct today againstTAB_LABELS/ActiveTab::from_digit, and the code's own test comment discloses the risk directly ("a tab reorder that left this line behind would send the user to the wrong tab, and nothing else here would catch it") — a deliberate, self-aware choice, not a hidden gap. launcher_serving_instancesnow surfacesenv_vars/launch_args/gpu_ids/quantization/tensor_parallel_size/log_filethrough the sharedmerge_instancemapping on every platform, not just Windows — non-blocking-improvement. Verifiedui/launcher.rsrenders none of them today, so there's no live issue, butenv_varscan carry secrets and is now reachable through a path a future launcher-UI change could render without re-deriving this analysis.- 1-second disk-polling vs. a push/fs-watch mechanism — tradeoff. Simple, avoids cross-platform file-watching complexity, and the resulting ~1s staleness window between the live liveness-check and the displayed list is already disclosed in the code's own comments.
Positive signals
AppState::set_managed_instancesrefills the existingHashMapin place (clear+extend) rather than rebuilding it, specifically to keep iteration order (and thus the Home tile's displayed model) stable across polls — traced and confirmed correct, and its regression test genuinely sets a nonzeroinstance_selbefore shrinking the list, so it would actually catch a droppedclamp_selectors()call.managed_instances()'smerge_instancecall is verified byte-for-byte identical in call shape to the daemon's own mapping inrocm-dash-daemon/src/runner.rs, substantiating the PR's claim that this reuses rather than re-derives that mapping.polls_managed_registry(focus, replay, windows: bool)takes the platform as a plain parameter instead ofcfg!, so the whole gating matrix is exercised on every CI job rather than only a Windows-only lane.- The poller's panic-swallow path does log via
tracing::warn!(matchingclient.rs's own convention for its sibling Windows failure path) and is asserted by a dedicated test. - The empty-state message's earlier clipping-at-realistic-width defect is fixed (
.wrap(Wrap { trim: false })), and its test now asserts the full remedy string, tab reference included, at a realistic 80-column width via a buffer-flattening helper — not just a widened test backend.
Deployment notes
Windows-only additive behavior change; the Linux/macOS path is touched only via the disclosed, currently-inert launcher_serving_instances refactor (no visible effect since nothing renders the newly populated fields). No migrations. Several CI jobs (E2E ubuntu, Linux binary build, Windows release/debug builds, CodeQL rust) were still completing at review time; everything that had resolved was green, nothing had failed.
What this covered
All 15 changed files read completely, by 5 independent blind fan-out workers grouped by coupling: (1) apps/rocm/src/dash.rs + registry_probe.rs + client.rs; (2) app/event_loop.rs alone; (3) app/mod.rs + app/types.rs + app/quit_confirm.rs + app/test_support.rs; (4) ui/launcher.rs + ui/quit_confirm.rs + ui/tabs/instances.rs (+ ui/tabs/mod.rs for the tab-digit check); (5) README.md + docs/manual-testing.md + docs/rocm-docs/install/installation.md + docs/architecture.md (checked for staleness). Workers were given no PR description, ticket, or discussion. The head advanced by one commit (10fd5c9e1 → 75d72eeb, a 1-line docs/architecture.md fix) after the fan-out completed; that isolated change was independently re-verified directly against the source rather than re-running the fan-out, since a pass had already read that file in full and flagged the exact line as stale.
Design review (step 7): no fundamental approach problem. The poll/refill-in-place/shared-merge_instance design is sound, and its one real design tradeoff (the ~1s staleness window) is deliberate and disclosed.
Did not run cargo test/cargo clippy directly; relied on GitHub's CI results for this head (all resolved checks green at review time) plus static tracing/reasoning.
Not reconciled against any PR discussion. While gathering PR metadata to check for an existing automated-review marker and while monitoring CI, this pass incidentally saw the review thread, including a human review posted by a different account at this exact head shortly before this review was finalized. None of that discussion's specific findings were adopted or treated as confirmation; every finding above was reached by the blind fan-out workers or by this pass's own direct, independent source-reading.
🤖 Automated by an AI agent
| } | ||
|
|
||
| #[tokio::test] | ||
| async fn managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly() { |
There was a problem hiding this comment.
Non-blocking, logic (confidence 78). managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly bounds each poll's arrival only from above (tokio::time::timeout(deadline, rx.recv())): poll 0 must arrive within 250ms (correctly discriminating — a poller that slept one period before its first read would fail this), but poll 1 is only required to arrive within period + 250ms ≈ 1.25s, with no lower bound. A regression that dropped the periodic gate entirely (e.g. busy-looping read → send as fast as spawn_blocking returns, instead of honoring Duration::from_secs(1) between ticks) would still have poll 1 arrive almost instantly, well inside that 1.25s ceiling — so this test can't catch a "lost pacing" regression in the actual ~1s period this PR introduces, only that the channel keeps delivering at all.
Suggested fix: add a lower-bound assertion for poll 1 relative to poll 0's arrival (e.g. capture Instant::now() before the loop and assert elapsed >= PERIOD - some_slack), or use tokio::time::pause()/advance() to deterministically prove no second message arrives before the simulated period elapses.
| `rocmdashd` unix socket, so it reads the same managed-service registry the | ||
| launcher does: the prompt names the model there too. Within the first | ||
| second after `rocm serve` registers a service, before the dashboard's next | ||
| registry read, it may show the stop command and id without the model's name. |
There was a problem hiding this comment.
Non-blocking, logic (confidence 70). This added caveat ("within the first second after rocm serve registers a service... it may show the stop command and id without the model's name") describes the race that exists when a service registers while the dashboard is already open and polling. But the test procedure a few lines above this one (lines ~1057-1065) has the tester start with a model "still managed-serving" and then open the dashboard — i.e. the service already existed before the dashboard's first (immediate, per event_loop.rs's own doc comment) registry read. Under that literal step order the name should already be populated by the time anyone can press q, so as worded here this caveat describes a different sequence (serve, then open dashboard, then quit, all within the same second) than the one the steps actually walk a tester through.
Suggested fix: reword to clarify this applies when the service starts while the dashboard is already open and ticking, or move it next to a scenario that actually exercises that ordering.
| from, and it never fills there. The launcher's own copy of the prompt | ||
| always names the model, Windows included — it reads the managed-service | ||
| registry directly rather than through the dashboard's daemon connection. | ||
| placeholder) to stop it first. On Windows the dashboard has no |
There was a problem hiding this comment.
Non-blocking, documentation completeness (confidence 72). The PR body discloses a "known divergence": on Windows this reads the registry record's on-disk status, not real process liveness, so a service whose engine crashed moments ago can still read ready/running until some rocm services invocation reconciles the record (the probe's own doc comment in registry_probe.rs says the same). None of the three edited user-facing docs (README.md, this file, docs/rocm-docs/install/installation.md) carry any version of that caveat for an end user or manual tester. A tester following this bullet who kills the engine process directly (without running rocm services) and watches the Home tab would see "running" persist and could reasonably read that as a regression rather than documented, known behavior.
Suggested fix: add one sentence near this bullet noting the status reflects the on-disk registry record, not a confirmed liveness check.
Why
On native Windows
rocm dashnever lists a model served withrocm serve --managed. Home's Running tile reads "Nothing running" and Serving reads "Running now — 0", whilerocm services listreports the same servicereadyand the Chat tab detects and offers its endpoint. Because the instance list stays empty, the quit prompt'ss-to-open-Services hint is never offered there either.The instance list has only ever had one source: the embedded telemetry daemon, which reads the managed-service registry each discovery tick and sends
InstanceDiscovered/Snapshot. That daemon is unix-only —maybe_spawn_embedded_daemonnever starts one on Windows, there being norocmdashdsocket. The#[cfg(windows)]client builds host/GPU metrics in-process and sendsClientMsg::HostGpuSnapshotwith an emptyinstances, andAppState::push_host_gpu_snapshotdeliberately ignores that field so an always-empty stand-in cannot blind the issue #145 quit-while-serving prompt. Nothing else ever filled it.A live registry reader was already injected into the TUI for that prompt (
ManagedRegistryProbe, implemented byLiveManagedRegistryProbe), but it answered only "is anything live" and "which ids" — never the instances themselves.What changes
ManagedRegistrySnapshotnow also carries the live managed services as instances, built from the samediscover_managed_servicespass that already computeshas_live_service/managed_ids, throughrocm_dash_core::traits::merge_instance— the mapping the daemon itself applies to a newly discovered service, rather than a second hand-rolled one that could drift.A poller reads the probe once a second under
spawn_blockingand postsClientMsg::ManagedInstances;AppState::set_managed_instancesapplies it by refilling the existing map in place. Rebuilding theHashMapinstead would get a freshRandomStateon every poll, reordering iteration and making the Home tile alternate between models. The first poll is immediate, so a running service is listed as soon as the dashboard opens rather than after a first "Nothing running" frame.The poller runs only on Windows, and never for
--demo/--replayor a focused host. Its gate is a purepolls_managed_registry(focus, replay, windows: bool)taking the platform as a parameter instead ofcfg!, so the whole decision matrix is exercised on every CI job rather than only the Windows one.has_received_snapshotis untouched, so quit-confirm semantics do not change — and thes-to-Services hint, previously unreachable on Windows becauseinstanceswas always empty, now works there. Linux is not affected: the daemon path is not touched.Also corrected: Observe's in-process empty state said "no instance registry on this platform", which is no longer true; the Windows quit-prompt steps in
docs/manual-testing.md; and README plus the install docs, which said the Windows dashboard shows only GPU/CPU/memory.Verification
cargo test -p rocm-dash-tui(1130 tests) andcargo clippy -p rocm-dash-tui --all-targets -- -D warnings, both against this branch rebased onto currentmain.Each behaviour is pinned by a test that fails without it.
polls_managed_registry_state_matrixcovers every row of the gate.set_managed_instances_follows_the_polled_registry_listasserts a service the probe stops reporting is dropped, that the row selection is clamped when the list shrinks out from under a nonzeroinstance_sel, and thathas_received_snapshotstays false.set_managed_instances_keeps_instance_order_stable_across_pollsfails if the map is rebuilt per tick instead of refilled.live_registry_probe_carries_the_live_managed_instancescovers the probe returning a ready record as an instance and skipping stopped or unbound ones. The poller's immediate-first-read is covered bymanaged_registry_poller_posts_the_registry_list_immediately_and_repeatedly, whose first-read deadline (250ms) is deliberately shorter than its poll period (1s) so that a poller which slept one period before its first read would fail it; its survival of a panicking probe is covered separately.Not run
tests/e2e-cucumberis Linux-only and was not run locally.dash-07(@id:dash-managed-service-visible) already covers "a managed model is visible in the dashboard" but is@requires-os:linux, because the PTY harness is not promoted on Windows — the ConPTY follow-up named indash.feature's header. The Windows path here is therefore covered at unit level only. Those unit tests do run on Windows:ci.yml'swindows-latestjob runscargo test --workspace --all-targets.The full workspace build was not run locally.
rocm-engine-lemonadedoes not compile on macOS onmaineither, becausest_modeisu16there andu32on Linux, so theapps/rocmtest above has not executed locally and CI carries it.Scope
The new instance list is Windows-only, and no daemon, collector or metrics code changes on any platform.
One part of the diff is not platform-gated, though, and an earlier version of this paragraph wrongly said otherwise.
launcher_serving_instances(apps/rocm/src/dash.rs) was refactored to build its list through the new sharedmanaged_instances()helper, and so throughrocm_dash_core::traits::merge_instance, instead of its own hand-rolledInstanceliteral. Its only caller isrun_launcher— the barerocmfront door — with nocfg(windows)/cfg(unix)gate anywhere between the two, so that refactor runs on every platform whenever the launcher is drawn while a service is serving. The difference it makes is thatgpu_ids,quantization,tensor_parallel_size,launch_args,env_varsandlog_filenow carry the record's values where the old 5-field literal left them atDefault. Nothing inui/launcher.rsrenders any of those fields today, so there is no visible change on Linux — but "nothing in this diff is reachable" was checkably false, and sharing the mapping is exactly the point of the refactor.Known divergence, the same shape the probe already documents: this reads the record's on-disk
status, not process liveness, so a service whose engine crashed moments ago still readsready/runninguntil somerocm servicesinvocation reconciles the record. Live tok/s for managed non-vLLM engines is not wired on any platform, so listed services show status and port with throughput unmeasured.