Repository navigation
Conversation
`--version 10.1` stayed on the canonical 7.x index because it did not parse as major.minor.patch, then suggested `--channel nightly`, which refuses ROCm 10. A numeric major.minor pin now selects the newest stable publish in that line, and a failed ROCm 10 pin no longer points at nightly. Signed-off-by: Roman Inflianskas <roman.inflianskas@amd.com>
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review (Claude Code) · a754cac
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 (apps/rocm/src/therock.rs, apps/rocm/src/main.rs, README.md, tests/e2e-cucumber/features/therock_next_generation.feature, tests/e2e-cucumber/tests/e2e/therock_steps.rs), base 3dec0eb → head a754cac.
No ticket named. The PR description accurately describes the change's scope and honestly flags its own test-plan gaps (clippy/full cargo test not run locally, GPU lanes not exercised) rather than overclaiming — no mismatch found.
Blocking
-
CI gate "Commit signatures + sign-off" is failing on the current head commit — this run
cargo xtask verify-commits --base origin/main --require-verifiedreports:a754cac3 ... -> signature is not GitHub-"Verified". The commit carries a DCOSigned-off-bytrailer but is not cryptographically signed / not GitHub-"Verified", which this repo's ownAGENTS.mddocuments as a required, blocking gate ("a blocking CI gate (commit-signatures) re-checks every PR with GitHub 'Verified' status").
Confidence 100 · mechanical · Fix: author signs the commit (SSH or GPG, with the key registered on GitHub) and re-pushes, per the job's own remediation text. -
published_in_stable_linecan't recognize a stable release published with more than three dot-separated components, contradicting its own sibling function's documented contract —apps/rocm/src/therock.rs:212-219(published_in_stable_line), viastable_release_line_pin(:199-204) and the strictparse_version(:7012-7047).version_request_matches's doc comment (:180-186) promises a two-component pin "selects every stable release in that major.minor line," butparse_version("7.2.4.70204")returnsNone(itssplitn(3,'.')leaves.70204as an unparseable stage suffix), andstable_release_line_pin's own fallback also returnsNoneon the same string (restafter major/minor is.4.70204, not empty). This exact 4-component shape is not hypothetical: this file's own long-standing doc comment onVersionOrderKey/parse_version_for_ordering(:6805-6876) states these strings "come from a Python simple index" and calls7.2.4.70204"the shape ROCm's own packages are named with." Every caller that reaches a line pin throughmatches_version(select_rocm_version,select_matching_pip_package_versions,select_tarball_candidate,highest_candidate_needs_next_python) inherits this gap: a release published in that shape would be silently invisible to amajor.minorpin aimed at its line.
Confidence 75 · logic · Fix: havepublished_in_stable_linecompare against the lenientparse_version_for_orderingrelease vector (release[0]==major && release[1]==minor && stage==Stable) instead of (or in addition to) the strictparse_version, the waycompare_version_stringsalready does for ordering. -
next_layout_unsatisfied_hint'sversion_selector = Nonebranch is new behavior introduced by this PR with no test exercising it —apps/rocm/src/therock.rs:7153-7172, the final_ =>arm. It's reachable viarocm update --apply:install_sdk_for_update(:1219) always passesversion_selector = Noneandlayout = Some(SourceLayout::from_generation(...))(:1235), and thatSome(layout)bypassesselect_source_layoutentirely in bothresolve_pip_runtime_with_timeoutandresolve_tarball_artifact_with_timeout. On a runtime previously installed under the Next layout, a later failed update-apply lands onwheel_resolution_failure_context/tarball_resolution_failure_contextwithlayout = Next, version_selector = None, hitting this branch. The only unit test of this function (unsatisfied_rocm_10_line_pin_does_not_suggest_nightly) coversSome(line pin),Some(exact pin), andCanonical + None, but neverNext + None; the two new BDD scenarios only drive theSome(Version)fresh-install-preview path. This is new, untested, user-observable CLI output on a real failure path.
Confidence 75 · logic · Fix: add a direct unit test fornext_layout_unsatisfied_hint(None)(and/or the two failure-context functions called withSourceLayout::NextandNone), asserting the wording and that it still avoids suggesting nightly.
Non-blocking
None
Decisions for the author
- The "exact pin failed on Next layout" hint always appends "...and an exact GPU arch, for example
--family gfx1200" — tradeoff/wording. By construction,select_source_layoutonly ever returnsOk(Next)after already confirmingfamily_resolution.raw_archis exact, so by the time this specific hint can fire for an exact version pin, the arch was already exact — the actual cause of failure is that the exact version itself isn't published. The advice isn't wrong, just not pointing at the real cause in that case. Confirm this one-size-fits-all phrasing (shared with the line-pin case, where it legitimately IS the needed fix) is the intended tradeoff rather than an oversight. - The two-component line-pin fix applies uniformly to every ROCm major, not just ROCm 10+ — tradeoff, confirmed deliberate and tested (the
older_line/"7.14" case intwo_component_version_pin_routes_and_matches_its_release_line). The PR's title/description frame the motivating bug around ROCm 10, but the fix also changes behavior for pre-10 two-component pins (e.g.--version 7.14), which previously never matched anything and now resolves. This is a desirable broadening, not a problem — flagging only so the author can confirm it's the intended scope, since the description doesn't call it out explicitly.
Positive signals
- The
select_tarball_candidatesort-order fix (by_version.then(by_mtime)vsby_mtime.then(by_version)) is genuinely exercised byrelease_line_pin_prefers_the_newest_stable_tarball_in_the_line: the fixture's10.1.2carries an older mtime than10.1.0, so the test actually discriminates version-first from mtime-first ordering rather than passing either way. - The whole feature funnels through the single
matches_version/version_request_matcheschoke point — every caller (select_rocm_version,select_matching_pip_package_versions,highest_candidate_needs_next_python,select_tarball_candidate,requested_source_layout) was checked and picks up the new line-pin semantics consistently, with no caller left on a stale exact-match assumption. - The two new BDD scenarios assert negative conditions as well as positive ones (e.g. scenario 16 explicitly asserts
--channel nightlyis not suggested and no install plan leaks out on failure), guarding against a vacuous pass. - README.md and the
main.rsclap doc-comment were updated consistently in both places that describe this behavior, with no contradiction between them.
Deployment notes
None beyond the CI gate above — no schema/migration change, no new dependency, no breaking change to an existing working flow (two-component pins were previously non-functional, so this only adds capability).
What this covered
Full read of all 5 changed files at a754cac vs merge-base 3dec0eb: apps/rocm/src/therock.rs (13,012 lines) was read in full by one independent worker focused on the core version-matching/layout-selection logic; README.md, apps/rocm/src/main.rs's relevant doc comment, tests/e2e-cucumber/features/therock_next_generation.feature, and tests/e2e-cucumber/tests/e2e/therock_steps.rs were read in full by a second independent worker cross-checking docs/CLI-help/e2e tests against the implementation. I independently traced the blast radius across every caller of matches_version/RuntimeVersionSelector, the rocm update --apply code path, and confirmed the CI check-run failure directly from its job log.
Did not run: an actual cargo test/cargo build myself for the two logic findings above — both are hand-traced against the source, not executed (scored 75, not 100). History pass (git blame on the modified region) found only this PR's own commit touching it, nothing notable. Prior-changes pass: this PR has zero existing reviews, nothing to reconcile. Agent-instruction adherence checked against the root AGENTS.md only (no directory-scoped AGENTS.md/CLAUDE.md applies to the touched paths). Not reconciled against any PR discussion (none exists yet).
Summary
--version 10.1stayed on the canonical 7.x index because it did not parse asmajor.minor.patch, then suggested--channel nightly, which refuses ROCm 10. A numericmajor.minorpin now selects the newest stable publish in that line. A failed ROCm 10 pin no longer points at nightly. An exact--version 10.1.0stays exact.rocm install sdkis unchanged here and still installs ROCm 7.14.@id:therock-next-15-two-component-line-pinand@id:therock-next-16-unsatisfied-line-pin-skips-nightlycover the line pin and the failed-pin message.two_component_version_pin_routes_and_matches_its_release_linecovers the resolver.Test plan
two_component_version_pin_routes_and_matches_its_release_line.ensure_uv_venv_recreates_on_interpreter_tag_mismatchfailed locally because it launchesuvfrom/tmp(noexec). That is an environment limit.@requires-gputag, so the default e2e lane covers them. Full workspacecargo testand clippy were not run.cargo build --workspace --all-targets. A later build of theorigin/maincheckout does not prove this branch compiles.