Repository navigation
fix: report the ComfyUI source folder consistently in status and install - #600
Conversation
`rocm comfyui status` and `rocm comfyui install` each printed a `folder:` line, but they disagreed on what it meant: `install` reported the app root (`<env>/apps/comfyui`), while `status` reported the runtime root (`<env>`). Neither was the actual ComfyUI source checkout that contains `main.py` (`<env>/apps/comfyui/source`). Since `models path:` is already printed as its own line, make `folder:` mean the ComfyUI source checkout (`source_path`) in both commands, so the two labels agree and both point at something a user can actually open and inspect. Tighten the existing `install_dry_run_uses_selected_runtime_folder` and `status_labels_managed_rocm_as_runtime_not_install` tests with exact `folder:` line assertions; their prior substring checks still passed on the old behavior. Signed-off-by: Jussi Elo <jussi.elo@amd.com>
rominf
left a comment
There was a problem hiding this comment.
🔴 Automated review · pr-review-watcher · 055b145
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.
Closes #391 as written: both folder: lines now print source_path, which is the fix the issue proposes. The PR doesn't claim to close #390, and it doesn't. The description matches the diff, including the side effect on the GPU script.
Blocking
- (new) The change alters command output but has no Gherkin scenario —
apps/rocm/src/comfyui.rs:148,apps/rocm/src/comfyui.rs:303,tests/e2e-cucumber/features/comfyui.featurerocm comfyui statusandrocm comfyui installnow print a differentfolder:value. The only check of that is two unit tests. No feature file or step definition reads the ComfyUIfolder:line:git grep "folder:" tests/e2e-cucumberfinds only unrelated hits, and comfyui-01 through comfyui-04 never check it.- AGENTS.md §3 says command output "must be covered by a Gherkin scenario … a unit test asserting the internal helper does NOT discharge this". It exempts only "purely internal changes (refactors, CI plumbing, docs)". Issue #391 itself says the change "would want a Gherkin scenario update".
- The description argues the change is "a pure string-formatting fix" with unit-test precedent from the
ROCm runtime:relabel. That argument doesn't match any exemption the rule lists, and it doesn't answer the rule. - The unit tests also only prove that a field gets echoed. The status test writes
source_path: source_path(&paths)into the manifest (:2090) and then asserts the same value comes back. Nothing tiesfolder:to the directory ComfyUI actually runs from (current_dir(&manifest.source_path),main.py). - Confidence 85 · architectural · Fix:
- Extend
@id:comfyui-uv-install-progress-streamed(comfyui-02), which already installs against a planted checkout atinstall_root/apps/comfyui/source(tests/e2e-cucumber/tests/e2e/comfyui_steps.rs:207). - Assert that the install's
folder:line equals that directory. - Optionally run
rocm comfyui statusafterwards and assert it prints the same line.
- Extend
Non-blocking
- (new) The status test uses a path layout production never writes, so it can't show status and install agree —
apps/rocm/src/comfyui.rs:2090,:688-691- The test builds
source_pathwith the#[cfg(test)]helpersource_path(&paths), which givesdata_dir/apps/comfyui/source. Real installs persistruntime_app_root(..).join("source")(:288-289,:402). - The PR's headline claim is that the two commands now print the same path. I confirmed that by tracing the code: install prints and saves the same value, and status echoes it back. No test asserts it, though.
- Confidence 70 · logic · Fix: in the status test, build the manifest's
source_pathfromruntime_app_root(&runtime). Better still, compare thefolder:line from an install dry-run with the one from status.
- The test builds
Decisions for the author
rocm comfyui statusno longer prints the runtime root — tradeoff- Cost: status used to print
manifest.runtime_root. Now it shows the runtime version, plus the active default runtime key (:208-211), and that key can differ from the runtime ComfyUI was installed against. - Why it's still fine: the runtime root is still visible as the prefix of the new
folder:path. The old line also didn't describe a ComfyUI folder at all. - Confirm that dropping it as a separate line is intended.
- Cost: status used to print
Positive signals
- Each tightened test fails when its own source line is reverted on its own: mutating
:148alone failsstatus_labels_managed_rocm_as_runtime_not_install, and mutating:303alone failsinstall_dry_run_uses_selected_runtime_folder. Each new assertion is a full line ending in\n, so themodels path:line can't satisfy it, and each has a negative counterpart for the old value. - The description states the side effect on
scripts/comfyui_therock_gpu_test.pyopenly and doesn't over-claim it.parse_comfyui_root→ensure_checkpointnow writes checkpoints into the realsource/models/checkpoints, which matches the script's own--comfyui-roothelp.
Deployment notes
- Anything parsing the
folder:line now gets<runtime>/apps/comfyui/source, where it used to get<runtime>(status) or<runtime>/apps/comfyui(install). The only consumer in the repo isscripts/comfyui_therock_gpu_test.py, and this makes it correct. CI runs only its--self-test, so the live--generate-catpath is still unverified.
What this covered
- What was read: the whole diff at prw-base
efcd4800…055b145f, plus the surrounding code incomfyui.rs,parse_comfyui_root/ensure_checkpointin the GPU script, the ComfyUI e2e feature and step definitions, and the output consumers inmain.rs. - Runs: both touched tests pass. I then reverted each production line on its own and confirmed its test fails.
- CI: all reported checks pass. "E2E tests (MI300X)" is still queued. "Sphinx docs build (-W)" and "Skill checks (skillscope)" were skipped, which is expected because no docs or skills changed.
What did not run, and why:
- The code pass (4a) wasn't run as a separate worker; I ran it myself because the change is one small file, so it isn't independent of my own judgment. Agent-instruction adherence plus impact analysis, history plus prior changes plus code comments, and the design questions each ran as independent workers.
- I didn't run the full workspace test, clippy or e2e gates.
- I saw the commit message body when I first ran
git log, before the findings were settled, so the "read the intent last" ordering was only partly kept for that one text. The PR description and issue #391 were read only at Step 9. - I found no prompt-injection content.
This report hasn't been reconciled against the PR's discussion.
To clear this change request: add (or extend) an e2e scenario that asserts the ComfyUI folder: line names the installed source directory, per AGENTS.md §3.
Extend e2e scenario comfyui-02 to assert the `install` `folder:` line names the planted source checkout and that `rocm comfyui status` reports the same line afterward -- the Gherkin coverage the pr-review-watcher review on ROCm#600 flagged as missing for a user-observable output change. Rebuild the `status_labels_managed_rocm_as_runtime_not_install` fixture's `source_path` from `runtime_app_root`/`source_path_from_app_root`, the same helpers `install()` uses, instead of the test-only, data-dir-rooted `source_path(&paths)` -- so the test can no longer pass on a manifest layout no real install produces. Signed-off-by: Jussi Elo <jussi.elo@amd.com>
|
Thanks for the review. Both findings confirmed and fixed in ef53b3f: Blocking — missing Gherkin scenario for the Non-blocking — status test's fixture used a path layout production never writes. Confirmed: Decision — Also re-read the PR description against the new diff and updated the Verified clean: |
rominf
left a comment
There was a problem hiding this comment.
🔴 Automated review · pr-review-watcher · ef53b3f
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 — no blocking findings
Full review of the whole change.
Fixes #391 and does close it: both folder: lines now print the ComfyUI source checkout, which is what the issue asks for. The description matches the diff, including the side effect on scripts/comfyui_therock_gpu_test.py, which it states without overclaiming.
Blocking
None
Standing objection from the previous round, now settled: "the change alters command output but has no Gherkin scenario" (filed at 055b145). This review didn't re-find it. After the review ended, I put the objection to the reviewer directly, and it no longer holds. comfyui-02 now asserts the install's folder: line and the matching rocm comfyui status line. Reverting either production line on its own makes the scenario fail at the matching new step: the install revert fails 1 of 5 steps, the status revert fails at step 6. At HEAD, 6 of 6 steps pass. That change request was already dismissed, so there is nothing left to withdraw.
Non-blocking
- (new) The new
Thenstep runs a command instead of only asserting.tests/e2e-cucumber/tests/e2e/comfyui_steps.rs:389-401,tests/e2e-cucumber/features/comfyui.feature:42status_reports_same_folder_linecallscrate::run_rocm(world, &["comfyui", "status"])inside a#[then].- That breaks the suite's own rule at
tests/e2e-cucumber/README.md:238: "Given = setup, When = action, Then = assertion". - Other steps already do this, but the README rule governs, and new steps should not copy the pattern.
- The step text also uses output-format wording (
folder: line, a literalrocm comfyui status) rather than describing behaviour. - Confidence 75 · mechanical · Fix: add
When the user checks ComfyUI statusto store the output, thenThen status names the same ComfyUI source folder as the install.
- (new) The doc comment on
expected_comfyui_folder_linereads backwards.tests/e2e-cucumber/tests/e2e/comfyui_steps.rs:367-370- "this fixture only plants
requirements.txtthere, not the runtime root or the bare app root" sounds as if the fixture planted something at the runtime root or app root. - What it means is that the line must name this directory and not those two.
- Confidence 80 · mechanical · Fix: reword, e.g. "…names this directory, not the runtime root or the bare app root; the fixture plants only
requirements.txthere (production also hasmain.py)."
- "this fixture only plants
Decisions for the author
- The folder check rides on an existing scenario — tradeoff
- Adding steps to
comfyui-02reuses the only success path that writes a manifest. That keeps the e2e lane cheap, and the feature comment explains the choice. - The cost: the scenario title "A dependency install streams progress output" and its
@id:comfyui-uv-install-progress-streamednow cover two behaviours. A failure in the folder check will be reported under a name about progress streaming. - A separate
comfyui-0Nscenario sharing the same Given steps would keep one behaviour per name.
- Adding steps to
Positive signals
- The added assertions match whole lines (
" folder: …\n") and include negative checks for the old values. A whole-line match is needed because the old paths are prefixes of the new one, which is why the earlier substring checks passed on the bug. A substring check would also match themodels path:line. - The status fixture's
source_pathis now built with the same helpersinstall()uses, so the unit test checks the layout a real install produces.
Deployment notes
rocm comfyui statusnow printsfolder: <env>/apps/comfyui/sourcewhere it used to print<env>, andinstallprints it where it used to print<env>/apps/comfyui. Anything that parsesfolder:sees a different path.- The only consumer in the repo is
scripts/comfyui_therock_gpu_test.py(parse_comfyui_root). That script now puts checkpoints in the right directory.
- The only consumer in the repo is
What this covered
- What was read. All three changed files, plus
render_status,install,start, the path helpers and the manifest struct inapps/rocm/src/comfyui.rs. Outside the diff: the e2e harness helpers (run_rocm,install_root), and every other place that prints or parsesfolder:(storage.rs,main.rs, the dash TUI and rocmd callers, and the GPU test script). Reviewed against24993519(merge base) toef53b3f1. - Two independent workers ran: a code pass, and a pass covering agent instructions, history and comments.
- Runs that back the findings:
- The two changed unit tests pass at HEAD (2 passed).
- Reverting the status line alone fails
status_labels_managed_rocm_as_runtime_not_install. Reverting the install line alone failsinstall_dry_run_uses_selected_runtime_folder. So neither test would pass with the fix reverted, and each guards one branch. cargo xtask e2e -- -n comfyui-02passes at HEAD (1 scenario, 6 steps).- With either production line reverted on its own, that scenario fails at the matching new step.
- CI at
ef53b3f1: every completed check passed.E2E tests (Strix Halo, Windows)andE2E tests (Strix Halo, WSL2)were still queued. The changed scenario is@requires-os:linux, so the Windows path layout is covered only by unit tests. - What did not run:
- The prior-changes pass, because earlier review comments are out of bounds for the blind review.
- Step 7 design questions were worked inline, without separate workers, because the production change is two lines.
- Discussion: the review itself wasn't reconciled against the PR discussion. The standing objection was settled afterwards, as described under Blocking.
status_reports_same_folder_line ran `rocm comfyui status` inside a #[then] step, which README.md's "Given = setup, When = action, Then = assertion" convention reserves for the When step -- flagged by the pr-review-watcher review on ROCm#600. Split it: a new "When the user checks ComfyUI status" step runs the command and stores its output on E2eWorld, same as the existing "When the user installs ComfyUI" step; the "Then status names the same ComfyUI source folder as the install" step only asserts. Reworded the expected_comfyui_folder_line doc comment, which the same review read backwards. Signed-off-by: Jussi Elo <jussi.elo@amd.com>
|
Thanks for the re-review. The two new non-blocking findings are confirmed and fixed in 8c6863d: Non-blocking — the Non-blocking — the Decision — folder check riding on the existing Verified clean on the new head: |
rominf
left a comment
There was a problem hiding this comment.
🔴 Automated review · pr-review-watcher · 8c6863d
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 — no blocking findings
Full review of the whole change.
This PR fixes #391 (open) as the issue proposes: both install and status now print source_path as folder:. It does not claim to close #390, and its description says so. The incidental claim about scripts/comfyui_therock_gpu_test.py holds: that script derives <folder>/models/checkpoints, and its --comfyui-root help already says "ComfyUI source folder".
Blocking
None
Non-blocking
None
The two non-blocking findings from the previous round (at ef53b3f1) were not re-found by this blind review, which read both files they were in.
Decisions for the author
comfyui-02is the only e2e coverage, and it is@requires-os:linux— tradeoff (the shared-scenario half is standing from the previous round, and the author has already accepted it; the Windows-coverage half is new)- For: folding the check into the existing install-through-to-manifest scenario avoids adding a new scenario and fixture.
- Against:
- Windows lanes never run the
install/statusagreement end to end. On Windows only the two unit tests cover it; the hostedwindows-build-and-testjob runs them. - The scenario's title ("A dependency install streams progress output") now describes only part of what it asserts.
- Windows lanes never run the
- Confirm both were deliberate.
Positive signals
- Both tightened unit tests assert the new
folder:line and also that the old value is absent (runtime.install_rootfor status,runtime_appfor install). The old values are prefixes of the new one, which is why the earlier substring checks missed the bug. - The status test fixture now builds
source_pathfromruntime_app_root, the same helperinstall()uses. So the manifest it plants has the layout a real install writes, not the#[cfg(test)]data-dir layout.
Deployment notes
- The
folder:line inrocm comfyui installandrocm comfyui statusnow prints<env>/apps/comfyui/source. Anything parsing that line sees a different path. The only in-repo consumer isscripts/comfyui_therock_gpu_test.py, and the change makes it correct.
What this covered
- Read: every file in the change, completely, against
c1c2aeb3…8c6863db(prw-base...HEAD). Also the surrounding code inapps/rocm/src/comfyui.rs:app_root,runtime_app_root,source_path_from_app_root, where the manifest is saved, and the otherruntime_rootuses. Also the e2e step helpers. - Searched for other
folder:/ ComfyUI output surfaces:main.rs, the dash,README.md,docs/testing.md,docs/manual-testing.md,docs/llm-tool-use.mdandskills/. None needed updating. - Test verdicts, both from runs:
- Revert the production change (each line on its own):
- Status line back to
manifest.runtime_root:status_labels_managed_rocm_as_runtime_not_installfails, and e2ecomfyui-02fails at "Then status names the same ComfyUI source folder as the install". - Install line back to
app_root:install_dry_run_uses_selected_runtime_folderfails, and e2ecomfyui-02fails at "And the install output's folder: line names the ComfyUI source checkout".
- Status line back to
- At HEAD: both unit tests pass (2 run).
cargo xtask e2e -- -n comfyui-02passes (1 scenario, 7 steps). - Branches left green by a mutation: none. The change has two branches, and each is caught at both unit and e2e level.
- Revert the production change (each line on its own):
- CI at 8c6863d: every reported check passes or was skipped. "E2E tests (MI300X)" was still queued, and "Sphinx docs build (-W)" and "Skill checks (skillscope)" were skipped.
- How it ran: single-pass mode for the code, because the change is small (3 files, +85/−4). Fan-out ran with two read-only workers: one for the code and ripple, one for instruction-adherence, history and code comments. Design questions (Step 7) were run in the driver context, not by independent workers.
- Did not run: the prior-changes pass. History shows both
folder:values came from the initial import, with no later PR deliberately setting them, so there were no earlier review comments to look up. - Prompt injection: none found.
- The blind review was not reconciled against the PR discussion.
|
Thanks for the re-review. Confirming both decisions:
Windows e2e gap: also deliberate, but not new to this PR — the whole |
Fixes #391
Bug
rocm comfyui installandrocm comfyui statuseach print afolder:line, but they report different things, and neither is the actual ComfyUI source checkout:rocm comfyui installprintedapp_root(<env>/apps/comfyui)rocm comfyui statusprintedmanifest.runtime_root(<env>)main.py— ismanifest.source_path/source_path(<env>/apps/comfyui/source)Fix
Since
models path:is already printed as its own line in both commands, this change makesfolder:mean the ComfyUI source checkout (manifest.source_pathinstatus,source_pathininstall) in both commands, so the two labels agree and both point at a directory a user can actually open and findmain.pyin.Incidental fix
This also happens to fix the
parse_comfyui_root→ensure_checkpointderivation inscripts/comfyui_therock_gpu_test.py(comfyui_root / "models" / "checkpoints"), which was wrong under both priorfolder:values and becomes correct oncefolder:is the source path. No changes were made to that script in this PR. This is not a claim that #390 (which originally reported the script-level symptom) is closed by this change.Tests
The two existing tests that covered this output,
install_dry_run_uses_selected_runtime_folderandstatus_labels_managed_rocm_as_runtime_not_install, only asserted loose substring matches that still passed under the old (buggy) behavior, becausesource_pathis literallyapp_root.join("source")— the old substring is a prefix of the new one. Both tests were tightened with exactfolder:line assertions. I verified red→green manually: reverting just the two source-line fixes (keeping the tightened tests) made both tests fail with the old values in the output; restoring the fix makes them pass.status_labels_managed_rocm_as_runtime_not_install's fixture also now derives itssource_pathfrom the sameruntime_app_root/source_path_from_app_roothelpersinstall()uses, rather than a test-only, data-dir-rooted path no real install produces — the manifest it plants, and the layout it checksstatusagainst, now matches what a real install actually writes.A Gherkin/e2e scenario now covers this as user-observable CLI output:
comfyui-02(@id:comfyui-uv-install-progress-streamed) runs a full (non-dry-run)rocm comfyui installthrough to a saved manifest, and asserts the install output'sfolder:line names the planted ComfyUI source checkout, then (via a separateWhen/Thenpair, per the suite's step-convention) that a subsequentrocm comfyui statusreports the identical line — provinginstallandstatusagree end to end, not just that each echoes its own stored value.Verification gates run
cargo test -p rocm --all-targets: 1013 passed, 0 failed, 1 ignored (one unrelated test,providers::tests::local_provider_stream_callback_receives_event_before_connection_closes, flaked once with anInterrupted system call (os error 4)under parallel execution on an earlier run; it passed in isolation and passed again on a clean full re-run, and is untouched by this diff)cargo test -p rocm comfyui::(after the fixture rebuild): 29 passed, 0 failedcargo clippy --workspace --all-targets -- -D warnings: clean, no warningscargo fmt --checkon the changed files: cleancargo xtask e2e -- -n comfyui-02(after extending the scenario): 1 scenario, 7 steps, all passedgit diff origin/main..HEAD | grep -inE 'internal|confidential|proprietary|private|jira|confluence|\.corp|\.internal|amd|silogen|xilinx'): no hits