Skip to content

ROCMAI-862: list running managed services in the Windows dashboard - #1002

Merged
r0x0r merged 7 commits into
ROCm:mainfrom
r0x0r:fix/dash-windows-managed-instances
Nov 16, 2026
Merged

r0x0r merged 7 commits into
ROCm:mainfrom
r0x0r:fix/dash-windows-managed-instances

Conversation

@r0x0r

@r0x0r r0x0r commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Why

On native Windows rocm dash never lists a model served with rocm serve --managed. Home's Running tile reads "Nothing running" and Serving reads "Running now — 0", while rocm services list reports the same service ready and the Chat tab detects and offers its endpoint. Because the instance list stays empty, the quit prompt's s-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_daemon never starts one on Windows, there being no rocmdashd socket. The #[cfg(windows)] client builds host/GPU metrics in-process and sends ClientMsg::HostGpuSnapshot with an empty instances, and AppState::push_host_gpu_snapshot deliberately 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 by LiveManagedRegistryProbe), but it answered only "is anything live" and "which ids" — never the instances themselves.

What changes

ManagedRegistrySnapshot now also carries the live managed services as instances, built from the same discover_managed_services pass that already computes has_live_service/managed_ids, through rocm_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_blocking and posts ClientMsg::ManagedInstances; AppState::set_managed_instances applies it by refilling the existing map in place. Rebuilding the HashMap instead would get a fresh RandomState on 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/--replay or a focused host. Its gate is a pure polls_managed_registry(focus, replay, windows: bool) taking the platform as a parameter instead of cfg!, so the whole decision matrix is exercised on every CI job rather than only the Windows one.

has_received_snapshot is untouched, so quit-confirm semantics do not change — and the s-to-Services hint, previously unreachable on Windows because instances was 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) and cargo clippy -p rocm-dash-tui --all-targets -- -D warnings, both against this branch rebased onto current main.

Each behaviour is pinned by a test that fails without it. polls_managed_registry_state_matrix covers every row of the gate. set_managed_instances_follows_the_polled_registry_list asserts a service the probe stops reporting is dropped, that the row selection is clamped when the list shrinks out from under a nonzero instance_sel, and that has_received_snapshot stays false. set_managed_instances_keeps_instance_order_stable_across_polls fails if the map is rebuilt per tick instead of refilled. live_registry_probe_carries_the_live_managed_instances covers the probe returning a ready record as an instance and skipping stopped or unbound ones. The poller's immediate-first-read is covered by managed_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-cucumber is 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 in dash.feature's header. The Windows path here is therefore covered at unit level only. Those unit tests do run on Windows: ci.yml's windows-latest job runs cargo test --workspace --all-targets.

The full workspace build was not run locally. rocm-engine-lemonade does not compile on macOS on main either, because st_mode is u16 there and u32 on Linux, so the apps/rocm test 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 shared managed_instances() helper, and so through rocm_dash_core::traits::merge_instance, instead of its own hand-rolled Instance literal. Its only caller is run_launcher — the bare rocm front door — with no cfg(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 that gpu_ids, quantization, tensor_parallel_size, launch_args, env_vars and log_file now carry the record's values where the old 5-field literal left them at Default. Nothing in ui/launcher.rs renders 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 reads ready/running until some rocm services invocation 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.

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>
@r0x0r
r0x0r force-pushed the fix/dash-windows-managed-instances branch from aaf2570 to 9196431 Compare November 10, 2026 09:48
@r0x0r
r0x0r marked this pull request as ready for review November 10, 2026 10:05
@r0x0r
r0x0r requested a review from a team as a code owner November 10, 2026 10:05
@r0x0r
r0x0r requested a review from siloteemu November 10, 2026 10:05
@r0x0r

r0x0r commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

The red Security scan / gitleaks is a false positive from main, not from this branch

The scan range is 573027c5..91964318e, which includes main's current tip. The single rule hit is:

generic-api-key, d027ff8e3, apps/rocm/src/runtime_install_finalize.rs:1315
match: runtime_key: "..."

That line is a unit-test fixture, and the value is a ROCm wheel identifier rather than a credential:

fn sdk_install_finalization() -> SdkInstallFinalization {
    SdkInstallFinalization {
        runtime_key: "wheel-gfx942-7.13.0".to_owned(),

d027ff8e3 is the tip of main (from #914) and runtime_install_finalize.rs is not in this branch's diff. The same check is red on #919 for the same reason, so it will hit any PR whose scan range covers that commit. Re-running will not clear it; it needs an entry in .github/scan_tools_configs/.gitleaksignore on main, which I have deliberately not added here to keep this branch to one logical change.

Everything else is green, including all three Windows jobs and the Strix Halo Windows E2E lane.

@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.

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

  1. 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.
  2. Nothing exercises the event_loop wiring (the spawn_managed_registry_poller call and the ClientMsg::ManagedInstances arm). Removing either leaves every added test green.
  3. 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 failed status, and the rendered s hint in the quit prompt isn't asserted with registry-sourced instances.
  • A crashed service can show as ready on 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_snapshot refresh. It looks like the better design (disk I/O off the UI thread); should the ticket text be updated to match?
  • launcher_serving_instances now goes through merge_instance instead of a four-field literal. Please confirm merge_instance sets 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));

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.

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));

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.

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"),

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.

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 nowycondro 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.

🤖 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's launcher_serving_instances, called from the platform-neutral run_launcher (apps/rocm/src/dash.rs:655, no cfg(windows)/cfg(unix) gate anywhere between the two), was refactored by this diff to route through the new managed_instances() helper and merge_instance, which now populates gpu_ids, quantization, tensor_parallel_size, launch_args, env_vars and log_file on the launcher's serving-instance list (previously always defaulted by the old 4/5-field hand-rolled literal). This executes every time the bare rocm launcher front door runs with a service serving, on every platform, not only Windows. In practice ui/launcher.rs doesn'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 scanners and Security scan / gitleaks both fail. Read the raw gitleaks report directly: all 3 generic-api-key hits are on commit d027ff8e3ad9220ebb622667c97ed227d4b6c3e1 (apps/rocm/src/serve_summary.rs:557, :585, apps/rocm/src/runtime_install_finalize.rs:1315) — a commit already on main (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 tracing tokio::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::run or the private event_loop function (confirmed via repo-wide grep) — so the two lines that actually wire this feature together, event_loop.rs:290's spawn_managed_registry_poller(probe, chat_tx.clone(), ...) call and event_loop.rs:322's Some(ClientMsg::ManagedInstances(live)) => state.set_managed_instances(live) match arm, are each exercised only by directly unit-testing spawn_managed_registry_poller/set_managed_instances in 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 sets instance_sel to a nonzero value before shrinking instances to empty, so it cannot catch a dropped self.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 nonzero instance_sel, and add one test that drives the real event_loop/run entry 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_LABELS in ui/tabs/mod.rs, which does say Serving is 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 from TAB_LABELS instead of a bare literal.

  • docs/architecture.md was not updated for this PR's central change. Its entries for registry_probe.rs (line 294: "ManagedRegistryProbe::snapshot returns a ManagedRegistrySnapshot: whether any record is live, and the ids rocm services stop <id> can reach") and client.rs (line 289, describing ClientMsg's payloads) both omit the new instances: Vec<Instance> field / ClientMsg::ManagedInstances variant — which is the entire point of this PR. This project's own root AGENTS.md requires 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's let Ok(snapshot) = tokio::task::spawn_blocking(move || probe.snapshot()).await else { continue; } has no logging call, unlike the sibling Windows GPU-collection failure path in client.rs, which does warn!. 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 polled instances list used for its display/stop-ability (has_stoppable_managed_instance_with). Reads as a deliberate, reasonable choice — confirm it is.
  • launcher_serving_instances now exposes launch_args/env_vars/gpu_ids/quantization/tensor_parallel_size/log_file on every platform via the shared merge_instance mapping — 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, and ui/launcher.rs doesn't currently render them, so there's no live issue — but env_vars in 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) takes windows as a plain parameter instead of cfg!, so the entire gating matrix is unit-tested on every CI platform rather than only Windows — exactly the pattern this project's own AGENTS.md asks for with platform-gated logic.
  • set_managed_instances (app/mod.rs:621) refills the existing HashMap in place instead of rebuilding it, specifically to avoid a fresh RandomState reordering 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 its merge_instance call to the daemon's own mapping in crates/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.

@tomastola

Copy link
Copy Markdown
Collaborator

The E2E self-hosted run for this head (9196431) was cancelled by mistake during a queue cleanup; it has been re-queued.

@r0x0r

r0x0r commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

The gitleaks failure is a false positive on already-merged code, not this PR

Diagnosing rather than re-running, since a re-run cannot change the result.

Security scan / gitleaks and Security scan / Security scanners are one failure, not two: the latter is an aggregator whose only error is One or more matrix scanners did not succeed.

The gitleaks finding is:

generic-api-key, d027ff8e3ad9220ebb622667c97ed227d4b6c3e1,
apps/rocm/src/serve_summary.rs, line 557,
match: lemonade.api_model = "REDACTED"

That line is a test fixture setting a model name:

lemonade.api_model = "Qwen3-0.6B-GGUF".to_owned();

The generic-api-key rule fired on the identifier api_model containing "api". There is no secret.

Two things make it clearly not this PR's:

  1. The commit is already on main. d027ff8e3 is ROCMAI-861 / ROCMAI-861: fix the dash Home hero's -0 throughput and empty short-terminal card #914, merged. This PR does not touch serve_summary.rs.
  2. The scan runs --log-opts=573027c5..91964318e, i.e. every commit in this branch's range — which includes commits that arrived via a main merge. So the finding is inherited, not introduced.

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 .github/scan_tools_configs/.gitleaksignore. That is the right fix — a fingerprint entry for this match — but it is a repo-wide security-scanner config change that affects every PR, and slipping it into an unrelated dashboard PR is the wrong place for it. It wants its own change, with whoever owns the security config aware that an ignore entry is being added.

The remaining E2E consolidated report (self-hosted) failure on this PR is the same shape as the one on #919: a lane produced no artifact, so the report gate correctly flagged it missing. Also not a code defect.

@r0x0r

r0x0r commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

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 generic-api-key, and all three are from the same commit d027ff8e3 — ROCMAI-861 / #914, already merged to main and untouched by this PR:

File Match What it actually is
apps/rocm/src/serve_summary.rs:557 lemonade.api_model = "…" Test fixture setting "Qwen3-0.6B-GGUF"
apps/rocm/src/serve_summary.rs:585 summary.api_model = "…" Test fixture setting "Qwen3-4B-Instruct-2507-GGUF"
apps/rocm/src/runtime_install_finalize.rs runtime_key: … A String field on SdkInstallFinalization holding a runtime identifier, not a credential

So: two model names and a struct field whose name happens to contain key. The rule is firing on the identifiers (api_model, runtime_key), not on any secret-shaped value.

Your diagnosis of the mechanism was also right — the scan range is --log-opts=573027c5..91964318e, i.e. every commit in this branch's range, which includes commits that arrived via a main merge. A rebase would not clear it either, since the offending commit is in main; it would only move the range.

The companion Security scan / Security scanners failure is not independent: its only error is One or more matrix scanners did not succeed, i.e. it is reporting gitleaks.

Not fixed, deliberately. The real remedy is three fingerprint entries in .github/scan_tools_configs/.gitleaksignore. That is a repo-wide security-scanner config change touching every PR, and adding it from an unrelated Windows-dashboard PR is the wrong vehicle — it wants its own change, visible to whoever owns the security config, rather than riding along here.

I have not yet worked the three test findings (the poller test's period/timeout window, the untested event_loop wiring, and the wording-only Observe remedy). They look right to me on reading; flagging that they remain open rather than letting this comment imply the review is answered.

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>
@r0x0r

r0x0r commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Correcting myself: the gitleaks failure was fixable, and is now fixed

Earlier I said the three generic-api-key findings could not be cleared, because they live in d027ff8e3 (#914) which is already merged to main, so no rebase could remove them. That was wrong, and I should have checked it against the other PRs before saying it.

What actually gave it away: every other open PR — #678, #854, #919, #1036, #1054 — also contains d027ff8e3, and every one of them passes gitleaks. If the finding were an unavoidable consequence of carrying that commit, they would all be red too.

The real cause was a stale scan. d027ff8e3 landed on main on 2026-11-10 at 07:29, and this PR's last security scan ran at 10:06 the same morning (run 42796246562). At that moment the commit was on this branch but not yet on the base side of the comparison, so gitleaks attributed it to this PR. main has moved 53 commits since; the commit is now plainly in the base, and the scan no longer sees it as introduced here.

Merging origin/main was all it took. The scan is green:

Security scan / gitleaks -> pass

The findings themselves remain what I described — lemonade.api_model = "..." in serve_summary.rs and the neighbouring fixtures, which are model identifiers and a struct field name, not credentials. No .gitleaksignore entry was added and none is needed.

The merge itself was clean, with no conflicts. Verified on Linux before pushing: cargo fmt --all --check, clippy --workspace --all-targets -D warnings, clippy -p e2e-cucumber --test e2e -D warnings, test -p e2e-cucumber --test feature_naming, and xtask check-architecture-doc / check-crate-edges / check-module-size — all green. The Windows cfg path in winperf.rs is not reachable from a Linux clippy run, so windows-build-and-test in CI is the gate that covers it.

No review items were addressed by this push; the ones from the 2026-11-10 review still stand.

@r0x0r

r0x0r commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

The remaining lane is not going to start: the self-hosted runner pool is down

This PR has no failures left — the only thing outstanding is a GPU lane that has been queued for hours. That is not backlog. Querying the repo's self-hosted runners:

runner status busy labels
mi300x-0 online true mi300x
mi300x-1 online true mi300x
w7900-0 offline false w7900
strix-halo-ubuntu-2 offline false strix-halo, ubuntu-26.04
mi350p-0 offline false mi350p
strix-halo-windows-2 online false strix-halo, windows-11

Three of the six are offline. w7900-0 being down means every E2E tests (W7900, current) lane stays queued indefinitely — there is no runner that can claim it.

The MI300X pair is the stranger case: both report busy = true, yet no job anywhere in this repo is in progress on them. I walked the last 25 runs; the only in-progress jobs are on GitHub-hosted runners. So GitHub will not dispatch to them (it believes they are occupied) while nothing in this repo is using them. There are currently ~10 E2E self-hosted runs queued behind this, the oldest from 16:17 UTC, and they include runs on main — so it is repo-wide and not specific to my branches.

Nothing about this PR can clear it; it needs someone with runner access to restart the MI300X agents and bring w7900-0 back. Recording it here so the permanently-pending lane is not read as this change waiting on a result that is coming.

@r0x0r

r0x0r commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Correction: the MI300X runners were working, not wedged

In my previous comment I said both MI300X runners reported busy = true while "no job anywhere in this repo is in progress on them", and concluded they were stuck. That was wrong, and the error was in my check, not in the runners.

mi300x-0 was running E2E tests (MI300X, current) from 21:18 to 22:37 UTC — it was busy with exactly the work it should have been doing. I missed it because I walked only the 25 most recent runs, and that job's parent run was created at 11:18, far outside that window (it is not in the newest 60). The run list is ordered by creation, not by activity, so a long-lived run that is still working its way through the queue falls off the end while remaining active.

What actually stands from that comment:

  • w7900-0, strix-halo-ubuntu-2 and mi350p-0 are offline. queue-report-0 has since gone offline too. The W7900 lanes genuinely have no runner that can claim them.
  • The MI300X queue is deep, but it is moving. Each MI300X e2e job takes roughly 80 minutes and there are two runners against ~10 queued runs, which is why lanes sit for hours.

So the MI300X half needs patience, not an admin. The W7900 half still needs someone to bring that runner back.

@nowycondro nowycondro 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.

🤖 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's launcher_serving_instances, called from run_launcher (apps/rocm/src/dash.rs:655, no cfg(windows)/cfg(unix) gate anywhere between the two), was refactored by this diff to route through the new managed_instances() helper (apps/rocm/src/dash.rs:378) and merge_instance, which now populates gpu_ids, quantization, tensor_parallel_size, launch_args, env_vars and log_file on the launcher's serving-instance list — fields the old hand-rolled 4/5-field literal left at their defaults. This runs every time the bare rocm launcher front door executes with a service serving, on every platform, not only Windows. Nothing in ui/launcher.rs currently 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, correct tokio::time::interval behavior) 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 sets instance_sel to a nonzero value before shrinking instances to empty, so it cannot catch a dropped self.clamp_selectors() call inside set_managed_instances — with instance_sel already 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 against ActiveTab::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 nonzero instance_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's let Ok(snapshot) = tokio::task::spawn_blocking(move || probe.snapshot()).await else { continue; } has no logging, unlike the sibling Windows GPU-collection failure path in client.rs, which does warn!. 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 a tracing::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.rs and ui/quit_confirm.rs both restate "a background poller once a second... can trail by about a second" as free text, while the real period is a bare Duration::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 own AGENTS.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 set instances — 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) takes windows as a plain parameter instead of cfg!, so the entire gating matrix is unit-tested on every CI platform rather than only the Windows one — exactly the pattern this project's own AGENTS.md asks for with platform-gated logic.
  • set_managed_instances (app/mod.rs) refills the existing HashMap in place instead of rebuilding it, specifically to avoid a fresh RandomState reordering 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 same merge_instance call 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>
@r0x0r

r0x0r commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks — both blocking findings were right. Addressed at 5ab336d2.

1. The "Windows only" scope claim (PR body, now rewritten)

Verified the claim before rewriting it, and it is false as you said. apps/rocm/src/dash.rs: run_launcher is declared at line 655 and calls launcher_serving_instances(&paths) at line 698, inside its own loop {}; the only cfg attributes anywhere in the file are at lines 39 (comment), 345 (comment), 473 (an unrelated unix-only function), and 1051/1082/1823/2067/2117 (all in mod tests). Nothing gates the 655→698→727 path. So the merge_instance refactor does run on Linux and macOS, populating gpu_ids, quantization, tensor_parallel_size, launch_args, env_vars and log_file where the old 5-field literal left Default. ui/launcher.rs renders none of them today, so the effect is still nil — but the Scope paragraph now says that, instead of claiming nothing is reachable.

2. The three tests — each broken on purpose to prove it now discriminates

Run on a Linux box against this head, production code mutated and then restored.

a. managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly

Period and deadline now straddle each other instead of both being slack: period 1s, first-read deadline 250ms, second read allowed period + 250ms. (A 200ms timeout against the old 20ms period would not have fixed it — a one-period delay still fits inside 200ms. The bound only discriminates if one period does not fit in it.)

Mutation: interval(period) → interval_at(Instant::now() + period, period), i.e. the first tick delayed one full period.

test app::event_loop::tests::managed_registry_poller_posts_the_registry_list_immediately_and_repeatedly ... FAILED

thread '...' panicked at crates/rocm-dash-tui/src/app/event_loop.rs:1118:21:
poll 0 did not arrive within 250ms (period 1s)

test result: FAILED. 0 passed; 1 failed; ... finished in 0.25s

The old form (5s bound, 20ms period) passes unchanged under that same mutation.

b. set_managed_instances_follows_the_polled_registry_list

Now posts a two-instance list, sets instance_sel = 1, then empties the list under it and asserts the selector was clamped.

Mutation: deleted self.clamp_selectors(); from the end of set_managed_instances.

test app::tests::set_managed_instances_follows_the_polled_registry_list ... FAILED

thread '...' panicked at crates/rocm-dash-tui/src/app/mod.rs:815:9:
assertion `left == right` failed: the row selection must be clamped to the shrunken list, not left pointing past its end
  left: 1
 right: 0

c. draw_empty_names_the_platform_reason_for_the_in_process_collector

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 draw_empty's "serve one from 3 Serving" → "... 2 Serving" (the test's own literal left alone), simulating a tab reorder that leaves this string behind.

test ui::tabs::instances::tests::draw_empty_names_the_platform_reason_for_the_in_process_collector ... FAILED

thread '...' panicked at crates/rocm-dash-tui/src/ui/tabs/instances.rs:294:9:
should say nothing is served AND where to serve one from instead, not claim a daemon could be started; got:
│  no managed services running · serve one from 2 Serving · vLLM containers aren't available here

Gates run at this head (Linux, x86_64)

All exit 0: cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings; cargo clippy -p e2e-cucumber --test e2e -- -D warnings (run separately — the --all-targets sweep does not cover the e2e step files); cargo test -p e2e-cucumber --test feature_naming; cargo xtask check-architecture-doc; check-crate-edges; check-module-size; cargo test -p rocm-dash-tui (1177 tests passed, 0 failed).

What I did not verify

The Windows cfg paths. No machine available here can build the MSVC target, so client.rs's #[cfg(windows)] arm and everything reachable only from it are unbuilt and untested by me. CI's windows-build-and-test job is the only gate on them. The e2e suite was not run either (Linux-only lane, and dash-07 is @requires-os:linux regardless).

Still open

Not addressed here — your three Decisions for the author, all non-blocking: the unlogged spawn_blocking panic-swallow in the poller (a tracing::warn! on that branch), the hand-copied "~once a second" staleness prose in app/quit_confirm.rs / ui/quit_confirm.rs not tied to the Duration::from_secs(1) literal at event_loop.rs:290, and with_registry_probe lacking a way to set instances (which is why the poller tests hand-rolled probe_with). Happy to take any or all of them in this PR if you'd prefer them not deferred.

@nowycondro nowycondro 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.

🤖 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 via Paragraph::new(Line::from(Span::styled(body, ...))) with no .wrap() call — ratatui clips an unwrapped Paragraph rather than wrapping it. The accompanying test was widened from TestBackend::new(80, 20) to TestBackend::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 (the continue arm inside spawn_managed_registry_poller).
    On a spawn_blocking join failure the poller does continue with only a comment ("the probe panicked; keep polling..."), no tracing::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:211 logs warn!(error = %e, "windows GPU perf-counter query failed"), and event_loop.rs itself uses tracing::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 a tracing::warn! (or similar) alongside the continue, 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 "see AppState::push_host_gpu_snapshot", but push_host_gpu_snapshot explicitly leaves instances untouched (its own doc comment and a dedicated test pin this). The function that actually does what the comment describes is AppState::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 at AppState::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 (the HostGpuSnapshot itself still carries no instances) but no longer tells the whole story: it doesn't mention that instances now 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-07 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 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') == Serving today, 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_instances refills the existing HashMap in place (clear() + extend()) instead of rebuilding it, specifically to keep iteration order stable across polls (a fresh HashMap reseeds its RandomState) — a deliberate, non-obvious, well-tested choice (set_managed_instances_keeps_instance_order_stable_across_polls would plausibly fail without it).
  • polls_managed_registry(focus, replay, windows: bool) takes the platform as a plain parameter instead of cfg!, 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 through rocm_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-prone Instance { .. } literal in launcher_serving_instances.
  • docs/rocm-docs/install/installation.md and getting-started.md pull 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>
@r0x0r

r0x0r commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Both blocking findings were right, and the first one was right in a way worth stating plainly. Addressed at de4ed14b.

1. The clipped empty state — and the test that was widened to hide it

You are correct, and the history is worse than "a test at an unrealistic width". An earlier round on this PR widened draw_empty_names_the_platform_reason_for_the_in_process_collector from TestBackend::new(80, 20) to TestBackend::new(160, 20) specifically because the assertion failed at 80, and said so in a PR comment: "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." That sentence is a bug report. It was written as a test-setup note and the bug was left in place. The test was adjusted until it passed instead of the clipping being fixed, and your review is what caught it.

Fix chosen: wrap, not shorten. Paragraph::new(..).wrap(Wrap { trim: false }) in draw_empty. Reasons, in order:

  • Wrap { trim: false } is already what every other prose paragraph in this UI uses — ui/tabs/pane.rs, ui/tabs/hardware.rs, ui/tabs/chat.rs, ui/instance_detail.rs, ui/help_modal.rs, ui/warnings_modal.rs, ui/approval.rs, ui/examine_manager.rs. The instances empty state was the outlier, not the special case.
  • Shortening would have had to drop either the remedy ("serve one from 3 Serving") or the explanation ("vLLM containers aren't available here"). Both are the reason the string was lengthened in the first place.
  • Shortening also only moves the width at which the clipping comes back. Wrapping removes the cliff. Note the fix is not only about the in-process branch: the Connected branch ("no instances · start daemon with --enable-docker on a host with vLLM containers", 79 chars) sits on the same edge and was never covered.

Test now runs at 80 columns, the same realistic width ui/tabs/mod.rs's panel test uses. Because the message legitimately occupies two rows once wrapped, asserting only what lands on the first row would repeat the original mistake in a new form; the test reads the panel back through a small flatten_wrapped_prose helper that blanks box-drawing glyphs (U+2500–U+257F only, so the message's own · survives) and collapses whitespace, rejoining the wrapped rows at exactly the single spaces the source string had. A wrapped message is then assertable verbatim; a clipped one still is not, because the clipped characters are simply absent from the buffer.

Mutation evidence

Production .wrap(Wrap { trim: false }) removed (and the Wrap import with it), test untouched, at this head on Linux:

running 1 test
test ui::tabs::instances::tests::draw_empty_names_the_platform_reason_for_the_in_process_collector ... FAILED

failures:

---- ui::tabs::instances::tests::draw_empty_names_the_platform_reason_for_the_in_process_collector stdout ----

thread 'ui::tabs::instances::tests::draw_empty_names_the_platform_reason_for_the_in_process_collector' (546137) panicked at crates/rocm-dash-tui/src/ui/tabs/instances.rs:315:9:
should say nothing is served AND where to serve one from instead, not claim a daemon could be started; got:
╭─╮Instances╭──────────────────────────────────────────────────────────────────╮
│                                                                              │
│  no managed services running · serve one from 3 Serving · vLLM containers ar │

failures:
    ui::tabs::instances::tests::draw_empty_names_the_platform_reason_for_the_in_process_collector

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1147 filtered out; finished in 0.00s

error: test failed, to rerun pass `-p rocm-dash-tui --lib`

Restored, same command: test result: ok. 1 passed; 0 failed.

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 · vLLM containers ar, so "serve one from 3 Serving" does survive at that particular width and the user is instead never told why the vLLM containers they came looking for cannot appear. Narrower than that (or with this panel in a column) the remedy goes too. The defect, and the reason it went unasserted, are exactly as you described.

2. The swallowed probe panic — now logged, and the log line is test-covered

spawn_managed_registry_poller's join-failure arm now warns, in the same shape as client.rs:211's per-tick Windows failure (warn!(error = %e, ..)):

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. managed_registry_poller_warns_when_the_probe_panics drives a probe that panics on every call through the real poller under a capturing tracing::Subscriber and asserts an event at exactly Level::WARN whose message equals that constant — so the test fails if the line is deleted, reworded, or downgraded to debug!.

Mutation: the tracing::warn! replaced by let _ = e;, test untouched:

thread 'app::event_loop::tests::managed_registry_poller_warns_when_the_probe_panics' (546835) panicked at crates/rocm-dash-tui/src/app/event_loop.rs:1307:13:
a panicking probe must log "managed-service registry probe panicked; instance list not updated this poll" at WARN, not fail silently

failures:
    app::event_loop::tests::managed_registry_poller_warns_when_the_probe_panics

test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 1145 filtered out; finished in 5.00s

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 managed_registry_poller_survives_a_panicking_probe. That sibling test reaches the same warn! callsite with no subscriber installed, and under threaded cargo test whichever test registers the callsite first decides its cached Interest for the process — so "never interested" could be cached before the capturing test installed its own subscriber. This crate already hit and documented exactly this in agent/clients.rs::warm_tracing_interest_cache; the same remedy (one always-interested process-wide default, installed by both tests before either can reach the callsite) is applied here, with the reasoning written down rather than left as a mystery flake.

Gates (Linux x86_64, this head, each run separately, all exit 0)

cargo fmt --all --check · cargo clippy --workspace --all-targets -- -D warnings · cargo clippy -p e2e-cucumber --test e2e -- -D warnings (run separately — the --all-targets sweep does not build the e2e step files) · cargo test -p e2e-cucumber --test feature_naming · cargo xtask check-architecture-doc · check-crate-edges · check-module-size (423 files, none over 1500 production lines) · cargo test -p rocm-dash-tui (1178 passed, 0 failed) · cargo test -p rocm --bin rocm (1852 passed, 0 failed).

Still open

  • The ~once a second staleness prose in app/quit_confirm.rs / ui/quit_confirm.rs is still hand-copied rather than derived from the Duration::from_secs(1) literal at the poller's call site. Unchanged by this round.
  • with_registry_probe still has no way to set instances, which is why the poller tests hand-roll probe_with. Unchanged by this round.
    (The third item from that earlier non-blocking set — the unlogged spawn_blocking panic-swallow — is finding 2 above, and is now closed.)
  • The two non-blocking items from this review are also not addressed here: the dash.rs:1313 doc comment citing AppState::push_host_gpu_snapshot where it means AppState::set_managed_instances, and docs/architecture.md:584's Windows note not yet mentioning that instances now arrive via the registry poller. Happy to take either or both in this PR rather than defer them — say the word.
  • The Windows cfg paths in this change are gated only by CI. Nothing in the verification above touches them: the box these gates ran on is Linux with no MSVC target, so windows-build-and-test is their only gate. I did not verify them locally and am not claiming to have.

@nowycondro nowycondro 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.

🤖 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 reads lane e2e-gpu ran (needs result: cancelled) but uploaded no e2e-gpu-report, so it is missing from the consolidated report, i.e. the E2E 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 of client.rs's own HostGpuSnapshot (still ignored by push_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) fills instances there. 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') == Serving today, 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 from TAB_LABELS.
  • launcher_serving_instances now exposes launch_args/env_vars/gpu_ids/quantization/tensor_parallel_size/log_file through the shared merge_instance mapping, and — via this same PR's new Windows poller — those same fields reach ui/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 record merge_instance reads from — but worth a conscious note given env_vars can 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 of cfg!, so the whole gating matrix (verified: flipping any single conjunct independently fails its own test row) runs on every CI job — exactly AGENTS.md's own "platform-gated code gets a test that runs on its gate" pattern.
  • AppState::set_managed_instances refills the existing HashMap in place instead of rebuilding it, specifically to avoid a fresh RandomState reordering the Home tile's displayed model on every poll — traced and confirmed correct, and it funnels through the same clamp_selectors() every other instances mutator 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 moving instance_sel off 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 sets instance_sel = 1 before shrinking the list, and a panicking probe now logs a WARN asserted by a dedicated test (managed_registry_poller_warns_when_the_probe_panics).
  • managed_instances() reuses the exact same merge_instance call the daemon itself applies to a newly discovered service (verified byte-for-byte identical call shape against rocm-dash-daemon/src/runner.rs), and in doing so also fixes a pre-existing bug in launcher_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>
@r0x0r

r0x0r commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

Merged main (3e00084c4) into this branch. This is a merge only — no review item is addressed here.

Conflicts and how each was resolved

apps/rocm/src/dash.rs — in launcher_serving_instances. main added managed: svc.managed to the inline registry→Instance map; this branch had already replaced that map with a call to managed_instances(). That helper maps through rocm_dash_core::traits::merge_instance, which already sets managed: svc.managed (crates/rocm-dash-core/src/traits.rs:142), so main's field is carried, not dropped. Kept this branch's call.

crates/rocm-dash-tui/src/ui/tabs/instances.rs — in draw_empty. Both sides independently added .wrap(Wrap { trim: false }); the code line auto-merged identically and only the explanatory comments conflicted. Kept this branch's rationale, with one correction: its "Connected one (79)" measured the old string, which main replaced with a 99-char one, so that figure now reads 99 and says the string runs past the cliff rather than sitting at its edge. Main's test the_connected_empty_state_names_the_external_endpoint_path_at_80_columns is present and passing alongside this branch's own 80-column test.

docs/manual-testing.md — the quit-prompt s offer bullet. main documented the offer as absent on Windows "for the same reason the model's name is missing there"; this PR is precisely what makes the dashboard read the registry on Windows, so that clause is superseded and was dropped. Main's independent timing caveat was kept (the offer appears once the dashboard lists the service as managed; before that the printed stop command is the way).

A clean auto-merge that was semantically broken

app/mod.rs and app/quit_confirm.rs merged with no conflict and compiled clean, but main had tightened has_stoppable_managed_instance_with to screen on is_listed_service (i.e. Instance::managed). set_managed_instances_follows_the_polled_registry_list hand-builds its instance with ..Default::default(), leaving managed false — a shape the poller cannot produce, since it maps through merge_instance and discover_managed_services only ever emits managed: true (crates/rocm-dash-daemon/src/registry.rs:356). The test's own assertion therefore started failing. The production path was already correct; the fixture now sets managed: true to match what the poller produces (10fd5c9e1).

Verification

  • Every hunk was checked to land in the function it belongs to by name: the dash.rs resolution is inside fn launcher_serving_instances, the instances.rs one inside fn draw_empty, the docs one in the quit-prompt bullet list. No conflict markers and no unmerged paths remain.
  • The three review fixes survived: the wrapped empty-state paragraph (Wrap { trim: false }, still asserted at 80 columns through the flatten_wrapped_prose helper), the tracing::warn! on the panicking registry probe in event_loop.rs, and all three discriminating tests (managed_registry_poller_{posts_the_registry_list_immediately_and_repeatedly,survives_a_panicking_probe,warns_when_the_probe_panics}), plus live_registry_probe_carries_the_live_managed_instances, polls_managed_registry_state_matrix and the two set_managed_instances_* tests.
  • No renumbering was needed. This branch touches no .feature files and adds no numbered doc sections, so scenario numbers and @id: tags are untouched; the merged ## N. heading set is exactly main's (the duplicate ## 11 is the pre-existing one on main, left alone) and the ### 4d target of the agent/mod.rs reference still resolves. A loose sweep for section [0-9] references found none stale.

Gates (remote Linux)

Gate Result
cargo fmt --all --check pass
cargo clippy --workspace --all-targets -- -D warnings pass
cargo clippy -p e2e-cucumber --test e2e -- -D warnings pass
cargo test -p e2e-cucumber --test feature_naming pass (4/4)
cargo xtask check-architecture-doc / check-crate-edges / check-module-size pass
cargo test -p rocm-dash-tui pass (1181 tests, 0 failed)
cargo test -p rocm --bin rocm pass (1871 tests, 0 failed)

This PR touches Windows cfg code that cannot be built here (no MSVC target available). CI's windows-build-and-test lane remains its only gate — I have not verified the Windows paths.

Still open from the 2026-11-16 review

Neither is addressed by this merge:

  • docs/architecture.md:584 — the Windows boundary note is incomplete now that a registry poller fills instances.
  • The hardcoded "3" in the empty-state message.

@r0x0r

r0x0r commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. Taking the blocking finding first, because it has since resolved itself.

Blocking: E2E consolidated report (self-hosted) red. You reviewed head de4ed14b; the head is now 10fd5c9e1. On the current head nothing is red — the only check not green is E2E tests (MI300X, current), which is QUEUED. Your diagnosis was right about the mechanism: the consolidation step hard-fails when a lane it expects a report from produced none, and the MI300X lane had been cancelled for want of hardware rather than failing on its merits. That is a self-hosted runner availability condition, not something in this diff. I will keep watching it; if the lane gets cancelled again and the consolidated report goes red on a later head, I will say so here rather than merging past it quietly.

Non-blocking: docs/architecture.md's Windows boundary note — fixed. You were right that it had become misleading. The sentence was narrowly true of client.rs's own HostGpuSnapshot, but as the only place the doc describes Windows instance handling it now read as "Windows has no instance list". It now continues:

The instance list arrives separately: event_loop.rs's spawn_managed_registry_poller reads the on-disk managed-service registry on a timer and sends it as ClientMsg::ManagedInstances. So Windows does have an instance list — it is simply not carried by the metrics snapshot.

Decisions you raised:

  • Hardcoded "3" in the empty-state message. Keeping it, consciously. ActiveTab::from_digit('3') == Serving holds today, the same literal pattern already exists pre-PR in ui/tabs/home.rs, and the new test's comment discloses the risk rather than hiding it. Deriving it from TAB_LABELS would be the better shape, but doing it in one of the two places leaves the inconsistency and doing it in both widens this PR past its ticket. Worth a sweep of its own.
  • env_vars reaching instance_detail.rs's panes for Windows instances for the first time. Noted, and I agree with your framing: it is not a new exposure path to a different principal, since the operator viewing the dashboard already reads the same on-disk registry record merge_instance reads from. Recording the conscious note here is the right outcome.
  • No Linux/WSL2 scenario for a Windows-only change. Confirmed as answered-by-intent — dash-07 is @requires-os:linux and the Windows path is covered at unit level, with those unit tests running on Windows.

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 APPROVED and moved reviewDecision to APPROVED. Flagging in case the disclaimer and the actual review state have drifted apart, since I act on reviewDecision.

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

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

  1. docs/manual-testing.md says the hero T/S row reads —, never 0, because listed servers carry no throughput. Listed instances now come through merge_instance with 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).
  2. launcher_serving_instances now goes through merge_instance on every platform. Please confirm the 0, 0 arguments and the newly populated fields change nothing the launcher draws, and that no launcher test pinned the old literal.
  3. Docs wording: some places say the Windows dashboard shows "the managed servers rocm services list reports". 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.

Comment thread docs/manual-testing.md
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

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.

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));

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.

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}");

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.

If the probe panics persistently this warns once per second for the whole session. Consider logging once per streak.

@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.

🤖 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's app/event_loop.rs table row (line 508) still describes its registry-probe interaction as one-time "seeding." This PR adds spawn_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); a docs/manual-testing.md race-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 against TAB_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_instances now surfaces env_vars/launch_args/gpu_ids/quantization/tensor_parallel_size/log_file through the shared merge_instance mapping on every platform, not just Windows — non-blocking-improvement. Verified ui/launcher.rs renders none of them today, so there's no live issue, but env_vars can 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_instances refills the existing HashMap in 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 nonzero instance_sel before shrinking the list, so it would actually catch a dropped clamp_selectors() call.
  • managed_instances()'s merge_instance call is verified byte-for-byte identical in call shape to the daemon's own mapping in rocm-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 of cfg!, 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! (matching client.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() {

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.

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.

Comment thread docs/manual-testing.md
`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.

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.

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.

Comment thread docs/manual-testing.md
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

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.

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.

@r0x0r
r0x0r added this pull request to the merge queue Nov 16, 2026
Merged via the queue into ROCm:main with commit 46b9e3b Nov 16, 2026
40 checks passed
@r0x0r
r0x0r deleted the fix/dash-windows-managed-instances branch November 16, 2026 13:55
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.

4 participants