Repository navigation
fix(version): report the release tag instead of the frozen 0.1.0 - #818
Conversation
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review (Claude Code) · b003c58
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 (10 files, b003c58 vs. base cc56179).
No ticket named in the PR body. The description's "update report" claim checks out (rocm update's own report, apps/rocm/src/update_cmd.rs, is correctly fixed) — but the new README text separately and explicitly claims the rocm diagnose --report/--send surface shares the same string, and that one was not fixed (see Blocking #1).
Blocking
-
rocm diagnose --report/--sendstill emits the frozen workspace version, contradicting the PR's own new README text —crates/rocm-core/src/report.rs:405,README.md(new paragraph added by this diff).
prepare_report()still setscli_version: env!("CARGO_PKG_VERSION").to_owned()— confirmed viagit diffthatcrates/rocm-core/src/report.rsis untouched by this PR.rocm-core'sCargo.tomlinherits the same frozen workspace version (0.1.0) the PR's own commit message names as the bug it fixes. The call path (apps/rocm/src/main.rs:3216'sshow_prepared_report→rocm_core::prepare_report) never overrides this field with the newcli_version_string()/cli_version_number(). Meanwhile this diff adds a new README paragraph describing exactly this--reportcontent and states: "That value is the same stringrocm versionprints" — which is false for this surface as shipped. This is doubly significant because the module doc forreport.rssays this report is "destined for a public, indexed issue tracker" — so public triage reports will keep showing a meaningless, frozen0.1.0for every build, release or not, the exact problem this PR exists to fix.
Confidence 100 (traced the full call path; confirmed empty diff on the file; cross-checked against the new README wording). Category: architectural (missed consumer of the new shared version string).
Fix: threadcli_version_string()/cli_version_number()fromapps/rocmintoprepare_report'scli_version(e.g. as a parameter, sincerocm-corehas no way to readapps/rocm's build-script env var itself), or narrow the new README claim to the surfaces this PR actually fixes. -
Required CI check "Commit signatures + sign-off" is failing on this commit —
b003c58a8c9d1ef0d4a0d8f434c5c8063d498e53.
Job log:verify-commits: 1 check(s) failed: b003c58a ... -> signature is not GitHub-"Verified". The commit does carry an SSH signature and aSigned-off-bytrailer, but GitHub does not recognize the signature as "Verified" (likely an unregistered signing key or an unverified committer email). AGENTS.md documents this as an enforced, blocking CI gate (docs/commit-signatures.md), and the PR'smergeable_stateisblocked.
Confidence 100 (read directly from the job log). Category: mechanical/process.
Fix: register the SSH/GPG signing key on the author's GitHub account (or correct the committer email verification) and re-push so the commit shows "Verified".
Non-blocking
-
The release-tag half of the new behavior is never exercised by CI end-to-end, only by unit tests —
apps/rocm/build.rs(format_cli_version_reports_a_release_tag_without_its_leading_v),.github/workflows/release.yml.
ref_descriptor()resolves to a branch name ormainin every workflow that runsscripts/smoke_local.pyor the@id:examine-versione2e scenario (push/PR/merge_group triggers);release.yml, the only tag-triggered workflow, runs neithersmoke_local.pynor the e2e-cucumber suite — onlyscripts/release_readiness.py, which has no version assertions. So thevX.Y.Z (vX.Y.Z, <hash>)shape is solidly unit-tested but never produced and checked from an actual tagged build.
Confidence 85 (confirmed workflow trigger conditions and greppedrelease_readiness.py/release.ymlfor version-related calls). Category: test-coverage.
Fix: haverelease.ymlrunassert_version_string/smoke_local.py(or an equivalent check) against the built release binary before publishing. -
The
"unknown"sentinel is indistinguishable from a resolved ref literally namedunknown—apps/rocm/build.rs'sdisplayed_version/ref_descriptor.
A local branch namedunknown, orROCM_CLI_RELEASE_REF=unknown/GITHUB_REF_NAME=unknown, would take the "ref did not resolve" fallback path (display the package version) rather than the correct "non-release dev build" path (0.0.0-dev), even though the ref actually resolved. Real-world likelihood is very low, and an existing test already encodes this as current behavior, but the module doc never calls out the ambiguity.
Confidence 78. Category: logic (edge case).
Fix: useOption<String>internally for "ref not resolved" instead of overloading the string"unknown", or document the limitation. -
A few edge cases of
release_versionare correct but untested —apps/rocm/build.rstests module.
v1.2.3.4(too many components — explicitly called out by the function's own code comment), a combined-rc.1+buildsuffix, and the symmetricv1.2.3+(empty build suffix) all parse correctly today (verified by hand-tracing/simulation) but have no regression test, unlike their sibling cases.
Confidence 80. Category: test-coverage.
Fix: add these three cases to the existingformat_cli_version_reports_main_as_a_dev_build/...without_its_leading_vtests. -
A unit test's doc comment overclaims what it verifies —
apps/rocm/src/main.rs:5546,version_surfaces_share_one_build_script_string.
Its doc comment says-V/--versionandrocm version"cannot disagree," but the test never capturesrocm version's actual printed stdout — it only checkscli_command().get_version()and shape/derivation consistency against the build-script env vars. The real cross-surface guarantee comes from the e2eassert_version_returnedstep, which does run the compiled binary.
Confidence 75. Category: mechanical (doc/test-claim mismatch).
Fix: narrow the doc comment to what this specific unit test checks.
Decisions for the author
None.
Positive signals
release_version'svX.Y.Z/pre-release/build-suffix parsing logic was independently traced and simulated against roughly 20 edge cases (too-few/too-many components, combined-/+suffixes, empty suffixes, non-digit components, names merely starting withv) by two independent reviewers and holds up in every case.scripts/smoke_local.py'sassert_version_stringand the e2eassert_version_returnedstep compare the parsedversion/refagainst each other from the binary's own actual output, rather than re-implementingrelease_version's parsing independently — this avoids the Python/Rust parser drift that would otherwise be a real risk.- The
chat.rsMCP test change from a weak substring check to an exact-line match is a genuine strengthening, not just different brittleness — traced the real code path and confirmed no incidental formatting could cause a false pass. ROCM_CLI_VERSIONis computed exactly once inbuild.rsand exported as a single cargo env var, andembedded_cli_version_uses_format_cli_versionties the real build output to the tested function so the two can't silently drift.
Deployment notes
- For every non-tag build (branches,
main, local dev, standard CI), the CLI's reported leading version changes from the frozen0.1.0to0.0.0-devacrossrocm version,-V/--version, the MCP version tool, androcm update'scli: installed=field. Anything downstream that parses or compares against a literal0.1.0CLI version string needs updating. - The
rocm diagnose --report/--sendsurface (crates/rocm-core) is unaffected by this PR (see Blocking #1) and will keep reporting0.1.0regardless of build, contrary to the PR's own new documentation.
What this covered
Read all 10 changed files completely (README.md, apps/rocm/build.rs, apps/rocm/src/chat.rs, apps/rocm/src/main.rs, apps/rocm/src/update_cmd.rs, apps/rocm/tests/build_metadata.rs, scripts/smoke_local.py, tests/e2e-cucumber/features/examine.feature, tests/e2e-cucumber/tests/e2e/examine_steps.rs, xtask/src/e2e_prewarm.rs), plus surrounding/caller context: ref_descriptor, every cli_version_string/cli_version_number call site, rocm_core::prepare_report and its one call site, the repo's AGENTS.md conventions, CI workflow trigger conditions (ci.yml, release.yml, e2e-selfhosted.yml, nightly.yml), and git history of apps/rocm/build.rs. Diffed against base cc56179ced9dd1be42a3000b2592ace9394dbff1. Work was split across three independent fan-out workers (core build.rs logic; main.rs/update_cmd.rs/chat.rs consumers; docs/e2e coverage) plus this driver's own consolidation and impact-analysis pass.
Read CI check-runs directly: all required checks pass (build-and-test, clippy, Windows build, Test (affected crates), Coverage, E2E tests, CodeQL, etc.) except "Commit signatures + sign-off" (failing, see Blocking) and a few hardware-gated E2E jobs still in progress/queued at time of review.
Did not run: a separate "prior changes" pass (no prior review threads existed on this PR to check against at review time, confirmed via get_reviews). Did not execute cargo test/clippy locally; relied on the PR's own CI check-run results instead. Not reconciled against any PR discussion (none existed at time of this review).
🤖 Generated with Claude Code
juhovainio
left a comment
There was a problem hiding this comment.
Two things need to change before this can merge.
Blocking
- The README and PR body say the
--reportCLI version is the same stringrocm versionprints, butcrates/rocm-core/src/report.rsstill setscli_version: env!("CARGO_PKG_VERSION")(0.1.0). rocm-core never seesROCM_CLI_VERSION, and the report tests pin "9.9.9" rather than the real value. Either plumb the version through with a test on the real value, or drop the claim. - The
Commit signatures + sign-offcheck fails: the commit is not GitHub-Verified (unknown_key). The sign-off is present, so the commit needs re-signing with a key GitHub knows.
Non-blocking
- The e2e step, smoke script and
main.rsunit test would still pass if a tag build printed0.0.0-dev (vX.Y.Z, h), since the else-branch asserts exactly that. Only thebuild.rsunit tests cover the tag shape; please say so in the PR text and show that the new tests go red when the target is broken. rocmdMCPserverInfo,DAEMON_VERSIONand the dash client string still report 0.1.0, which conflicts with "every CLI surface". Fix them or say they are out of scope.cli_version_number()splits on the first space, an implicit coupling to the formatupdate_cmdrelies on.- Please check
docs/testing.mdanddocs/manual-testing.mdfor claims about the version shape. - The two Strix Halo Ubuntu nightly/release e2e jobs fail on an HTTP 404 fetching llama.cpp b9752; that looks unrelated to this diff but needs a rerun.
b003c58 to
82d3a76
Compare
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review (Claude Code) · 82d3a76
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 (15 files, 82d3a76 vs. base 3dec0eb). No ticket named in the PR body. The PR's own claims are scoped correctly this round (it no longer overclaims "every CLI surface" beyond the rocm binary, and the README/docs text matches the implemented behavior).
Both blocking issues from the prior review round on this PR are now resolved: crates/rocm-core/src/report.rs's prepare_report now takes cli_version as a parameter threaded from the real build-time version string (traced the full call path fresh, with non-vacuous tests asserting real version shapes, not a pinned placeholder), and the "Commit signatures + sign-off" CI check now passes. Two new issues surfaced in this round instead.
Blocking
-
A new clippy lint violation in this PR's own new e2e code fails required CI gates —
tests/e2e-cucumber/tests/e2e/diagnose_steps.rs:3340-3344.let leading = first_line .strip_prefix("rocm-cli ") .and_then(|rest| rest.split_once(" (")) .map(|(version, _)| version) .unwrap_or_else(|| panic!("expected 'rocm-cli <version> (<ref>, <hash>)': {first_line}"));
This is exactly the
.map(f).unwrap_or_else(g)shapeclippy::map_unwrap_orflags, and the workspace denies clippy warnings (-D warnings). Read directly from the live CI job logs: theclippyjob and thewindows-build-and-test→Windows build and test (debug)job both fail on this identical line. Per.github/workflows/ci.yml,build-and-test,test,pr-linux-binaries, andremote-sshall declareneeds: [changes, clippy, prek], so the clippy failure cascades into those being skipped rather than run — this single line is responsible for the large majority of this run's red/skipped checks. AGENTS.md §8/§12 makecargo clippy --workspace --all-targets -- -D warningsa required local gate and CI a required "drive to green" gate.
Confidence 100 (read the exact failing line directly from two independent live job logs, confirmed the lint's syntactic match, confirmed theneeds:graph inci.ymldirectly). Category: mechanical.
Fix: replace with.map_or_else(|| panic!(...), |(version, _)| version)as clippy itself suggests. -
The PR branch currently has real merge conflicts with the current tip of
main, independent of GitHub'smergeable_statelabel —tests/e2e-cucumber/features/diagnose.feature,tests/e2e-cucumber/tests/e2e/diagnose_steps.rs.
Verified directly rather than trusting the API's"mergeable_state": "dirty"field: rangit merge-treebetween this PR's head andmain's current tip (which has moved past this PR's merge-base) and got actualCONFLICT (content)markers in both files — almost certainly because another PR added differentdiagnose-NNscenarios to the same file regions in the meantime.
Confidence 100 (ran the merge directly and read the conflict output). Category: mechanical.
Fix: rebase onto currentmainand resolve the conflictingdiagnose.feature/diagnose_steps.rshunks.
Non-blocking
-
The release-tag half of the version logic is still never exercised end-to-end against a real tagged build, only by unit tests —
apps/rocm/build.rs,.github/workflows/release.yml(unchanged by this PR; re-confirmed fresh this round).
release.ymlis still the only tag-triggered workflow and still runs neitherscripts/smoke_local.pynor the e2e-cucumber suite — onlyrelease_readiness.py, which has no version assertions. Every push/PR/merge_group CI run can only ever resolve a branch ref, never a realvX.Y.Ztag, so the tag-shape branch offormat_cli_version/release_versionis solidly unit-tested but still never produced and checked from an actually-built release artifact.
Confidence 85 (confirmedrelease.ymlhas no diff in this PR and grepped it directly for version-related calls). Category: test-coverage.
Fix: haverelease.ymlrun an equivalent ofassert_version_stringagainst the built release binary before publishing. -
Sibling binaries still derive their version from the frozen workspace package version, the same bug class this PR fixes for
rocm—apps/rocmd/src/mcp.rs:96(MCPserverInfo.version),crates/rocm-dash-daemon/src/lib.rs:21(DAEMON_VERSION),crates/rocm-dash-tui/src/client.rs:160(dash client string) — all stillenv!("CARGO_PKG_VERSION").
Stated plainly as pre-existing and out of this PR's actual scope: unlike the prior review round, the current README/PR text no longer claims this fix covers "every CLI surface" unqualified — it's now scoped torocm version's output and the diagnose/reportcli_versionfield, both of which are genuinely fixed. No description/implementation mismatch here, just the same latent issue sitting one layer over in sibling binaries nobody has asked this PR to touch.
Confidence 80 (greppedCARGO_PKG_VERSIONacross the repo and confirmed each remaining call site directly). Category: test-coverage/architectural (pattern-relevant, pre-existing). -
A handful of hardware-gated E2E jobs are failing for reasons unrelated to this diff —
E2E tests (Strix Halo, Windows, current)(an existingruntime-09/runtime-resolve-canonical-releasescenario asserts a canonical AMD package-index URL but got back a different configured mirror URL),E2E tests (Strix Halo, Ubuntu, release, current)("No space left on device" on the runner), and the paired nightly job (cancelled as a consequence). None of the 15 changed files touch runtime/package-index resolution or disk usage, so these read as environmental/infra flakes rather than regressions from this change — consistent with a similar unrelated-failure note on the prior review round.E2E tests (MI300X, current)and(W7900, current)were still queued, not yet run, at review time.
Confidence 75 (read the job logs directly; no code-path connection to this diff). Category: test-coverage (flake, needs rerun not a code fix).
Decisions for the author
None.
Positive signals
report.rs'sprepare_reportnow requirescli_versionas a parameter (compiler-enforced), both production call site (main.rs) and the one test call site (report_delivery.rs) were updated, and the new validator/tests assert against real version shapes ("0.2.1","0.2.1-rc.1","0.0.0-dev", etc.), not a placeholder constant — a genuine fix, independently re-traced rather than taken on faith.build.rs'srelease_versionparser now has explicit regression tests for every edge case the prior review round flagged as untested (v1.2.3.4, combined-rc.1+build.5, empty-suffixv1.2.3+), and the"unknown"-sentinel collision limitation the prior round asked to be documented is now spelled out directly in the module doc comment.- The new
diagnose-48e2e scenario has real teeth: it independently re-derives the expectedcli_versionfrom a separately-runrocm versionrather than re-implementing the parsing logic, so it would have caught the exact bug the prior review round found. cli_version_number()'s previously-fragile string-splitting (flagged last round) is gone, replaced by a dedicatedROCM_CLI_VERSION_NUMBERbuild-script export used directly byupdate_cmd.rsand the report path.
Deployment notes
- For every non-tag build (branches,
main, local dev, standard CI), the CLI's reported leading version changes from the frozen0.1.0to0.0.0-devacrossrocm version,-V/--version, the MCP version tool,rocm update'scli: installed=field, and now also therocm diagnose --report/--sendpayload. Anything downstream parsing/comparing a literal0.1.0CLI version string needs updating. rocmd's MCP server info, the dash daemon, and the dash-TUI client string are unaffected by this PR and keep reporting the frozen0.1.0.- The branch needs a rebase onto current
mainbefore it can merge (see Blocking).
What this covered
Read all 15 changed files completely at 82d3a7635001a98831ed9430e6d77b6139411ae2 (README.md, apps/rocm/build.rs, apps/rocm/src/chat.rs, apps/rocm/src/main.rs, apps/rocm/src/update_cmd.rs, apps/rocm/tests/build_metadata.rs, crates/rocm-core/src/report.rs, crates/rocm-core/src/report_delivery.rs, docs/testing.md, scripts/smoke_local.py, tests/e2e-cucumber/features/diagnose.feature, tests/e2e-cucumber/features/examine.feature, tests/e2e-cucumber/tests/e2e/diagnose_steps.rs, tests/e2e-cucumber/tests/e2e/examine_steps.rs, xtask/src/e2e_prewarm.rs), plus surrounding/caller context (every cli_version_string/cli_version_number/prepare_report call site, repo-wide CARGO_PKG_VERSION grep, AGENTS.md, .github/workflows/ci.yml's job dependency graph). Diffed against merge-base 3dec0eb2ad9b1b6169cdc9fdd437203582b13379. Work was split across three independent blind fan-out workers (crates/rocm-core report path; apps/rocm consumers main.rs/update_cmd.rs/chat.rs; docs/scripts/e2e), each given only file scope and no prior-review content, plus this driver's own pass over apps/rocm/build.rs/build_metadata.rs (run directly by the driver, not by an independent worker, after repeated subagent-concurrency-limit errors from unrelated concurrent sessions on this host — disclosed as not independent) and the CI/merge-conflict verification.
Read CI check-runs and job logs directly rather than assuming: confirmed the clippy failure's exact code and the needs: dependency graph explaining the cascaded skips; confirmed the merge-conflict finding by running git merge-tree directly rather than trusting the API's mergeable_state field alone.
Did not run: a separate "history"/git-blame pass or a "prior changes" pass beyond what's disclosed above. Did not execute cargo test/cargo clippy locally in a full workspace build; relied on the PR's own live CI results instead.
One disclosure for transparency: this review's driver necessarily read the prior review round's full text (including its finding wording) while performing the required claim-check against the current head commit before starting. The actual findings in this report were independently re-derived — the report.rs fix and the CI/clippy status were confirmed fresh by blind workers and direct CI/git inspection that were not shown the prior review's text — but this is disclosed rather than silently presented as a fully blind pass throughout. Not reconciled against any PR discussion beyond that.
🤖 Generated with Claude Code
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review (Claude Code) · 861363c
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 (15 files, 861363c vs. merge-base 3dec0eb). No ticket named in the PR body.
Both blocking issues from the prior review round (82d3a76) are confirmed resolved: the clippy map_unwrap_or violation in diagnose_steps.rs is fixed by this round's own commit (861363c), and the rewrite is behaviorally identical to the original with the closure order clippy expects, independently re-traced. Two new issues surfaced in this round instead — one a re-verification of the merge-conflict finding against main's current tip, which has moved again since the last round.
Blocking
-
The branch still has real merge conflicts with the current tip of
main— now in different, unrelated files than the last round found.apps/rocm/src/gpu_policy.rs,tests/e2e-cucumber/features/dash.feature,tests/e2e-cucumber/tests/e2e/dash_steps.rs— none of which this PR touches.
Verified directly: rangit merge-tree <merge-base> pr-head main-tipfresh rather than trusting the API'smergeable_state: "dirty"field alone, and got real<<<<<<< .our/>>>>>>> .theirconflict markers in those three files. The PR's own diff never touches any of them (confirmed viagit diff <merge-base> <pr-head> -- <path>, empty on all three), so this isn't a conflict this PR's content causes —mainhas moved far enough past the merge-base (28 commits ahead of the PR's recorded base, confirmed viagit rev-list --count) that an unrelated refactor and unrelateddash-*e2e scenario additions onmainnow collide with this branch's stale state of those files on a straight merge. The previous round's conflict (indiagnose.feature/diagnose_steps.rs) is gone, but the branch is further behindmainnow than it was then.
Confidence 100 (ran the merge directly and read the conflict output, cross-checked that none of the conflicting files are in this PR's diff). Category: mechanical.
Fix: rebase onto currentmainand resolve the conflicts in those three files (none of which require touching this PR's own version-reporting logic). -
No CI has run at all on this commit (861363c), roughly a day after it was pushed.
ci.yml,codeql.yml, ande2e-selfhosted.ymleach show workflow runs only for the two earlier commits on this branch (82d3a763,b003c58a); none exist for861363cb. The Checks API (get_check_runs) returns zero check runs for this sha, and the combined-status API shows only a Read-the-Docs build, no GitHub Actions status at all..github/workflows/ci.ymltriggers on barepull_request:with no path filter, so an ordinary push to this branch should have triggered it; it did not. This means the very clippy fix this commit exists to make has never actually been verified by the requiredclippy/build-and-test/commit-signature gates, and AGENTS.md §12 ("Drive to green... A red check means 'not ready' until resolved") is not satisfiable for a commit with no checks at all.
Confidence 100 (read check-runs, combined status, and per-workflow run lists directly; confirmedci.yml's trigger has no path restriction that would explain the absence). Category: mechanical/process.
Fix: push a trivial change or otherwise re-trigger CI on the current head and confirm all required checks go green before merge; do not rely on the clippy fix being "obviously correct" in place of an actual run.
Non-blocking
-
The release-tag shape is still never exercised end-to-end against a real tagged build, and the one harness that could catch a regression there has a specific blind spot.
.github/workflows/release.ymlis unchanged and still runs neithersmoke_local.pynor the e2e-cucumber suite, so the tag-shape branch offormat_cli_versionis unit-tested only, as in both prior rounds. Additionally, traced directly:scripts/smoke_local.py'sassert_version_string(lines ~94-113) would not catch a release-tag build that regressed to printing0.0.0-devinstead of its real tag version — theif ref.startswith("v") and ref[1:] == versionbranch is skipped (version doesn't match), and theelif version != "0.0.0-dev"branch is also skipped (version is"0.0.0-dev"), so neither failure path fires. This exact gap is moot today only becauserelease.ymlnever calls this function at all.
Confidence 80 (traced the Python logic by hand against the stated scenario; confirmedrelease.yml's trigger/steps directly). Category: test-coverage.
Fix: haverelease.ymlrun an equivalent ofassert_version_stringagainst the built release binary, and tighten the smoke-script branch to require an explicit match whenreflooks like a release tag rather than falling through to "anything0.0.0-devis fine." -
diagnose-48's own feature comment overstates what the scenario checks.tests/e2e-cucumber/features/diagnose.feature(new scenario) and its stepreport_names_the_rocm_version_leading_versionindiagnose_steps.rscomparerocm diagnose --report --json'scli_versionfield only against the leading token of a separately-invokedrocm version— not against the expectedX.Y.Z/0.0.0-devshape itself. Both surfaces read the same build-time constant, so this scenario would still pass even if the entire PR were reverted to the old, uniform hardcoded0.1.0(both sides would read0.1.0and agree). It does catch a real, narrower regression — the report path falling back torocm-core's own separate frozenCARGO_PKG_VERSIONinstead of the shared value, which is exactly the bug the prior review round found and this round's predecessor commit fixed — but that's "agreement between two call sites," not "the version is shaped correctly," which is whatexamine-01'sassert_version_returnedstep actually verifies.
Confidence 80 (read both step implementations directly, traced the shared build-time constant backing both call sites). Category: test-coverage/doc-accuracy.
Fix: narrow the feature comment to "agrees with the versionrocm versionprints" rather than implying the CLI-version shape itself is being checked here. -
Two test assertions remain weak/tautological in the way CI actually runs them, carried over from the prior round.
main.rs'sversion_surfaces_share_one_build_script_stringonly exercises its "unknown ref" or "release tag" assertions when the resolved ref happens to match those shapes; in ordinary branch/PR CI (reference= a branch name), only the generic cross-field equality checks run. Separately,chat.rs's MCP version test derives its expected value by calling the samecli_version_string()function the production path also calls, rather than an independently-derived expectation — so it would not catch a regression in that shared function's content, only a chat.rs-specific divergence from it.
Confidence 60 (both traced directly; low severity since the shapes in question are independently covered bybuild.rs's own exhaustive unit tests andexamine-01's e2e step). Category: test-coverage.
Decisions for the author
None.
Positive signals
- The clippy fix in this round's own commit (861363c) is correct, not just syntactically different:
.map_or_else(|| panic!(...), |(version, _)| version)uses the closure ordermap_or_elseactually requires (default first, map second) — independently re-traced against the original.map(...).unwrap_or_else(...)to confirm identical panic message and short-circuit semantics, not a naive argument swap. diagnose-48exercises the real compiledrocmbinary on both sides of its comparison (--report --jsonandrocm version), via planted sysfs/os-release/PCI state matching the existingdiagnose-40pattern — not a mocked or stubbed path.release_version's tag/pre-release/build-suffix parsing was hand-traced against roughly 20 edge cases (v1.2.3.4, combined-rc.1+build.5, emptyv1.2.3+, non-digit components, leading-vnear-misses) across two independent passes and holds up in every case; all three edge cases the first review round flagged as untested now have explicit regression tests.crates/rocm-core/src/report.rs'scli_version()sanitizer (added in the previous round) is a correctly-restrictive allowlist — verified against path-traversal and oversized/malformed inputs — and follows the same established "don't let caller-supplied text reach a public tracker unsanitized" pattern as the module's pre-existingentry/is_catalog_idvalidation.- Git history confirms this PR is a direct, incremental fix of its own stated target, not a reintroduction of a previously-fixed bug elsewhere, and the
cli_versionfield was already excluded from the report's issue-grouping key before this PR, so varying its content per-build cannot fragment unrelated aggregation.
Deployment notes
- For every non-tag build (branches,
main, local dev, standard CI), the CLI's reported leading version changes from the frozen0.1.0to0.0.0-devacrossrocm version,-V/--version, the MCP version tool,rocm update'scli: installed=field, and therocm diagnose --report/--sendpayload. Anything downstream parsing/comparing a literal0.1.0CLI version string needs updating. rocmd's MCPserverInfo.version, the dash daemon'sDAEMON_VERSION, and the dash-TUI client string are unaffected by this PR and keep reporting the frozen0.1.0— unchanged from the prior round's note, still out of this PR's stated scope.- The branch cannot merge as-is: it needs a rebase onto current
main(conflicts above), and CI needs to actually run and go green on whatever commit results.
What this covered
Read all 15 changed files completely at 861363cb0d990d7df7b6dddd8dc7217c1bb234f6 (README.md, apps/rocm/build.rs, apps/rocm/src/chat.rs, apps/rocm/src/main.rs, apps/rocm/src/update_cmd.rs, apps/rocm/tests/build_metadata.rs, crates/rocm-core/src/report.rs, crates/rocm-core/src/report_delivery.rs, docs/testing.md, scripts/smoke_local.py, tests/e2e-cucumber/features/diagnose.feature, tests/e2e-cucumber/features/examine.feature, tests/e2e-cucumber/tests/e2e/diagnose_steps.rs, tests/e2e-cucumber/tests/e2e/examine_steps.rs, xtask/src/e2e_prewarm.rs), plus surrounding/caller context (every cli_version_string/cli_version_number/prepare_report/prepare_cli_report call site, repo-wide CARGO_PKG_VERSION grep, full AGENTS.md, .github/workflows/ci.yml's and release.yml's trigger/step definitions, and bounded git history of every changed file). Diffed against merge-base 3dec0eb2ad9b1b6169cdc9fdd437203582b13379 (current main tip 87251542, 28 commits ahead of the PR's API-reported base). Work was split across eight independent blind fan-out workers (build.rs/build_metadata.rs; main.rs/chat.rs/update_cmd.rs — run twice by two independent workers, consistent results; report.rs/report_delivery.rs; README/docs/smoke_local.py/xtask; e2e feature+step files; AGENTS.md adherence; git history/blame; code-comments compliance), each given only file scope and no prior-review content, plus this driver's own CI-check-run verification, merge-conflict verification via git merge-tree, and consolidation/impact-analysis pass.
Read CI state directly rather than assuming: get_check_runs/combined-status APIs and per-workflow (ci.yml, codeql.yml, e2e-selfhosted.yml) run lists filtered to this branch, confirming zero checks exist for the current head (see Blocking). Confirmed the merge-conflict finding by running git merge-tree directly against a fresh fetch of both refs, not by trusting the API's mergeable_state field alone.
Did not run: cargo test/cargo clippy locally in a full workspace build — no CI results exist for this commit to rely on either, which is itself the blocking finding above, not a gap in this review. One fan-out worker (main.rs/chat.rs/update_cmd.rs) was spawned twice due to transient subagent-concurrency-limit errors on this host; both runs completed and agreed, so this is disclosed as redundant coverage rather than a gap. Not reconciled against any PR discussion beyond the two existing review threads, which this review did not read (per method: discussion is excluded from the blind passes).
🤖 Generated with Claude Code
rocm version always led with the workspace package version, so a tagged release and a build from main both read as 0.1.0. A vX.Y.Z tag now leads with that version, and every other resolved ref leads with 0.0.0-dev. Signed-off-by: Roman Inflianskas <roman.inflianskas@amd.com>
`rocm diagnose --report` still published rocm-core's own package version (the frozen 0.1.0), so the README claim that the report carries the version `rocm version` prints was false. prepare_report now takes the version from its caller, and the rocm binary passes the leading version token its build script exports as ROCM_CLI_VERSION_NUMBER. Only that token is published: the ref and hash after it can carry a local branch name, and anything that is not a short version token is published as unknown. cli_version_number now reads that export instead of splitting the full string on its first space. Adds diagnose-48, which plants a released GPU on a simulated Linux host so a report is prepared on every Linux lane, plus build.rs cases for v1.2.3.4, v1.2.3+ and a combined pre-release and build suffix. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The diagnose scenario and examine-01 compared the CLI's surfaces with each other, so both regressing to the same wrong version (the frozen workspace one) still passed, and the smoke script accepted a tag build that printed 0.0.0-dev. All three now work out the expected leading version from the ref alone, with the same vX.Y.Z rule as build.rs, and the MCP test builds its expected line from the build script's exports rather than from the function it covers. CI only ever resolves a branch, so the release workflow now runs the Linux and Windows release binaries and fails unless --version leads with the tag's version. A tag that is not vX.Y.Z would ship as 0.0.0-dev, so it fails there too. The report scenario is renumbered diagnose-58: main now uses 48. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
…imit Replacing release_version's per-component digit check with `true`, or loosening the report's 64-character cli_version limit by one, left every test green: no near miss had three components with a non-digit one, and the over-long value was two characters over. Both are now pinned at the edge. The release workflow checks the tag's vX.Y.Z shape in "Determine version", so a bad tag fails before the Linux and Windows builds rather than after. Also corrects comments that called the unresolved-ref fallback version "not a release" (0.1.0 is also a release tag) and a test comment still pointing at main.rs. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
861363c to
c51f8b6
Compare
|
Reply to the automated review of 861363c. The review was posted as a body with no threads, so I'm answering it here. Blocking
Non-blocking
Local gate on the new head:
|
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
juhovainio
left a comment
There was a problem hiding this comment.
No blocking issues found in the diff. Notes, all non-blocking:
- The release-tag rule is copied into four places (
build.rs, the e2e step,smoke_local.py, therelease.ymlregex). The e2e and smoke copies are deliberate independent oracles, but nothing ties the workflow regex torelease_version. - A valid tag such as
v1.2.3-rc_1displays fine inrocm versionbut is published asunknownin problem reports (sanitizer allows letters, digits,.,-,+, max 64 chars). - Unresolved-ref builds still lead with
0.1.0, which is also a published tag. Documented and pinned by a unit test; a follow-up may be worth it. - The release-workflow steps only run on a tag push and the PowerShell step has not been run; a
workflow_dispatchdry run before the next tag would cover it. rocmd, the dash daemon and the dash client still report the workspace0.1.0(declared out of scope); worth confirming a follow-up ticket exists.- CI:
Security scan / gitleaksis failing and I could not see why; please check or rerun before merge.
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review · review-code · head c51f8b6c
Review — needs work
Full review of the whole change (19 files, c51f8b6cefd37b111971ac58844a5a3ee3c1256c vs. merge-base d027ff8e3ad9220ebb622667c97ed227d4b6c3e1).
No ticket named in the PR body. The PR's stated scope (rocm version/-V/--version, the chat MCP version tool, rocm update's cli: installed= field, rocm diagnose --report/--send's cli_version field, and the release workflow's tag validation) matches the diff; sibling binaries (rocmd, the dash daemon, the dash-TUI client) are explicitly declared out of scope and confirmed untouched. The PR's own "Known limitation" about the unresolved-ref/0.1.0 collision is accurately documented in build.rs and not contradicted by the code.
Blocking
- A branch whose name is textually shaped like a release tag is misreported as a genuine release — a regression introduced by this PR.
apps/rocm/build.rs'srelease_version(lines ~139-154) andref_descriptor(lines ~174-196).
ref_descriptor()returns a plain string for "the release tag, otherwise the branch name, otherwise unknown," with nothing in the returned value marking which of those it was — only an earlier, separate check (GITHUB_REF_TYPE == "tag") distinguishes a real tag internally, and that distinction is discarded before the string reachesrelease_version().release_version()then classifies any string shapedvX.Y.Z[(-|+)suffix]as a release regardless of how it was resolved. Before this PR, the leading version was always the frozenCARGO_PKG_VERSION, so a branch named e.g.v1.2.3printed"0.1.0 (v1.2.3, <hash>)"— odd but not self-reporting as a release. After this PR, the same branch build prints"1.2.3 (v1.2.3, <hash>)", byte-for-byte indistinguishable from an actualv1.2.3tag build, directly contradicting the module's own doc comment: "any other resolved ref, includingmainand feature branches →0.0.0-dev, which is not a release." The module doc explicitly acknowledges and mitigates one ref-collision risk (the literal nameunknown) but not this one. Note this is confined to ordinary branch/CI/local-dev builds —release.yml's own gate is unaffected, since it only ever validates an explicit, separately-sourced tag input.
Confidence 80 (tracedref_descriptor/release_versiondirectly; confirmed no tag/branch disambiguation survives into the returned ref string). Category: logic.
Fix: haveref_descriptor()(or a wrapper) carry forward whether the ref actually came from a tag (GITHUB_REF_TYPE == "tag", orgit describe --exact-match) as an explicit flag, and gaterelease_version's classification on that flag rather than on text shape alone.
Non-blocking
-
The
vX.Y.Ztag-acceptance rule is duplicated across four independent places with nothing tying the workflow's copy to the source of truth.apps/rocm/build.rs'srelease_version,.github/workflows/release.yml's bash regex (^v[0-9]+\.[0-9]+\.[0-9]+([-+].+)?$),tests/e2e-cucumber/tests/e2e/examine_steps.rs'sexpected_leading_version, andscripts/smoke_local.py'sassert_version_string. The e2e and smoke-script copies are deliberate independent oracles (by design, so they don't trivially agree with a regressed shared function) and were hand-verified to matchrelease_versionon every near-miss case. Butrelease.yml's copy is a plain duplication with only a code comment ("same rule asrelease_version") tying it tobuild.rs, and nothing in CI cross-checks the two — a future edit to either side could drift silently.
Confidence 80. Category: test-coverage/architectural.
Fix: add a small check (acargo xtaskstep or a script invoked from both places) that extracts the workflow's regex and asserts it against the same fixture listbuild.rs's own near-miss tests use. -
A release tag whose suffix is valid for display is rejected as
unknownby the report's sanitizer — a real inconsistency between the two surfaces this PR is meant to keep in sync.apps/rocm/build.rs'srelease_version(any non-empty suffix after-/+is accepted) vs.crates/rocm-core/src/report.rs'scli_version()(only ASCII alphanumerics plus.,-,+). A tag such asv1.2.3-rc_1is a valid release perrelease_version(the underscore sits inside the unchecked suffix), sorocm version/-Vcorrectly prints1.2.3-rc_1 (v1.2.3-rc_1, <hash>)— but the same string failscli_version()'s charset check (underscore isn't allowed), sorocm diagnose --reportfor that exact build would publishcli_version: "unknown"instead, undermining the PR's own goal of making the report "the same stringrocm versionprints." Verified by hand-tracing both functions' character rules directly. Likely low real-world frequency (this project's own tag examples throughout the PR use./-conventions, not underscores), and it fails safe (falls back to the already-acceptedunknownsentinel) rather than corrupting the report.
Confidence 80. Category: logic/architectural.
Fix: either tightenrelease_version's suffix grammar to the same charsetcli_version()accepts, or loosencli_version()to match whateverrelease_versionactually allows, so "valid release tag" means the same thing on both sides. -
README.md and docs/testing.md omit one of the three conditions the
cli_versionreport sanitizer actually enforces. README.md:404-405 and the equivalent docs/testing.md passage say a value is published asunknownwhen it has "characters other than letters, digits,.,-and+, or longer than 64 characters" — true but incomplete:crates/rocm-core/src/report.rs'scli_version()(and its own doc comment at line ~339) also requires the value to start with a digit. The unit testa_cli_version_that_is_not_a_version_token_is_published_as_unknownexercises exactly this gap ("SENTINEL-USER"is all allowed characters and under 64 chars, yet published asunknownsolely for not starting with a digit) — a reader going by the docs alone would expect it to pass through. Practical impact is low since the only production caller always passes a digit-leading string.
Confidence 75. Category: doc-accuracy.
Fix: add "and starts with a digit" to both doc passages, matching the code comment inreport.rs.
Decisions for the author
release_version's suffix grammar accepts any non-empty content after-/+, rather than validating real semver pre-release/build-metadata character rules — tradeoff. The current simplicity is defensible (real release tags are created by maintainers following convention, and the release workflow's own gate already restricts what ships), but it's the direct cause of the non-blocking inconsistency above with the report sanitizer's stricter charset. Worth confirming this gap is accepted as-is or tightened alongside that finding.
Positive signals
- This round's four commits systematically close every open item from all three prior review rounds:
prepare_reportnow threads the real build-time version (not a frozen constant) with non-placeholder tests; theclippy::map_unwrap_orfix is stable; the e2ediagnose-58/examine-01scenarios now independently re-derive the expected version from the ref rather than comparing two values that could both regress together; the three previously-untestedbuild.rsedge cases (v1.2.3.4, combined-rc.1+build,v1.2.3+) now have regression tests; andrelease.ymlnow runs the actual release binary on Linux and Windows and checks its--versionoutput end-to-end, closing the "tag shape never exercised against a real build" gap every prior round flagged. cli_version()'s allowlist sanitizer is boundary-exact (64 accepted, 65 rejected, pinned by a dedicated test) and correctly blocks path traversal and injection into a report destined for a public tracker.cli_versionis verifiably excluded from the report's aggregationgroup_key, confirmed by a dedicated test — varying it per build cannot fragment unrelated issue aggregation.- No merge conflicts with the current
maintip (verified directly viagit merge-tree, not just the API'smergeable_statelabel) — the conflict that recurred (in different files) across both of the last two rounds is gone this time. - CI has actually run end-to-end on this head commit and is green across every code-correctness gate (clippy, both
build-and-testjobs, Windows build/test, commit signatures, CodeQL, coverage, skill checks) — resolving the previous round's "no CI ran at all" blocking finding.
Deployment notes
- For every non-tag build (branches,
main, local dev, standard CI), the CLI's reported leading version changes from the frozen0.1.0to0.0.0-devacrossrocm version,-V/--version, the MCP version tool,rocm update'scli: installed=field, and therocm diagnose --report/--sendpayload. Anything downstream parsing/comparing a literal0.1.0CLI version string needs updating. rocmd's MCPserverInfo.version, the dash daemon'sDAEMON_VERSION, and the dash-TUI client string are unaffected by this PR and keep reporting the frozen0.1.0, as the PR itself states.Security scan / gitleaks(and theSecurity scan / Security scannersjob that depends on it) is currently failing, but this is confirmed pre-existing and unrelated to this diff: the flagged matches are inapps/rocm/src/runtime_install_finalize.rs/apps/rocm/src/serve_summary.rsat commit07c93f32("ci: run the nightly GPU E2E lanes on a shared GPU queue (#950)"), already onmain's history before this PR's merge-base; neither file is touched by this PR's diff. This will likely still block merge via required status checks regardless of this PR's own quality until addressed separately onmain.- Four self-hosted GPU-hardware E2E lanes (MI300X, Strix Halo Ubuntu nightly/release, W7900) were still queued or in progress at review time; the Windows and WSL2 self-hosted lanes already passed.
What this covered
Read all 19 changed files completely at c51f8b6c (README.md, apps/rocm/build.rs, apps/rocm/tests/build_metadata.rs, apps/rocm/src/cli.rs, apps/rocm/src/main.rs, apps/rocm/src/update_cmd.rs, apps/rocm/src/chat/mcp_bridge.rs, apps/rocm/src/diagnose_cmd.rs, crates/rocm-core/src/report.rs, crates/rocm-core/src/report_delivery.rs, docs/architecture.md, docs/testing.md, scripts/smoke_local.py, .github/workflows/release.yml, tests/e2e-cucumber/features/diagnose.feature, tests/e2e-cucumber/features/examine.feature, tests/e2e-cucumber/tests/e2e/diagnose_steps.rs, tests/e2e-cucumber/tests/e2e/examine_steps.rs, xtask/src/e2e_prewarm.rs), diffed against merge-base d027ff8e3ad9220ebb622667c97ed227d4b6c3e1 (current main tip 0d5a0447). Work was split across five independent blind fan-out workers grouped by coupling (build.rs/build_metadata.rs/release.yml; cli.rs/main.rs/update_cmd.rs/chat-mcp_bridge.rs; diagnose_cmd.rs/report.rs/report_delivery.rs; README/testing.md/architecture.md/smoke_local.py; e2e feature+step files+e2e_prewarm.rs), each given only file scope and zero prior-review content, plus this driver's own verification of every surviving finding directly against source, git history of this branch's 4 commits, a leak-scan of the full diff per this repo's own contribution guardrails (clean), a live CI check-run read (gh pr view --json statusCheckRollup, 49 checks), and a direct git merge-tree conflict check (clean).
Did not run: cargo test/cargo clippy locally — relied on the PR's own live, green CI for those gates instead. A separate "prior changes" pass was not run as its own blind worker; as the mandatory claim-check, this driver necessarily read this PR's three earlier nowycondro review rounds' text before launching the blind passes, solely to confirm none already covers this exact head commit — the findings above were independently re-derived by workers given none of that text, and by this driver's own direct source/CI/git verification. A concurrent human review (APPROVED) landed on this exact head while this review was in progress; this review was conducted blind to its text, and the one overlapping observation included above (the release-tag suffix charset vs. report-sanitizer mismatch) was independently re-derived from source before being included, not taken on trust. Not reconciled against any other PR discussion or comment thread.
Not a human review. This is an automated code review; please verify findings independently before acting on them.
release.yml's tag check had to stay equal to release_version in build.rs, and nothing enforced it. The suffix rules also differed: build.rs accepted any suffix, while a problem report only publishes letters, digits, '.', '-' and '+' up to 64 characters, so a tag such as v1.2.3-rc_1 passed the release check and then reported itself as unknown. A release tag now uses the report's rule: a suffix of letters, digits, '.', '-' and '+', and at most 64 characters after the 'v'. build.rs states the pattern once, and release.yml and smoke_local.py carry it verbatim. The new release_tag_grammar_is_the_same_everywhere test checks both copies against it, and checks that the pattern accepts exactly what release_version accepts. The e2e helper follows the same rule. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
format_cli_version turned an empty ref into "unknown" and then passed that to cli_version_number, which checked again. Both now take the raw ref, and one helper does the check, used both for the version and for the displayed ref and hash. Behaviour is unchanged: the format_cli_version_* tests, including the empty-input case, pass as before. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
nowycondro
left a comment
There was a problem hiding this comment.
🤖 Automated review · review-code · head 076c281f
Review — no blocking findings
Full review of the whole change (21 files, 573027c5...076c281f).
No ticket named in the PR body. The description is an accurate account of the change: the claimed fix (every version surface leads with the release tag or 0.0.0-dev instead of the frozen 0.1.0) is implemented and wired through to every surface it lists, including the rocm diagnose --report/--send path that an earlier round of review on this PR had found still emitting the frozen version — that is now fixed (prepare_report takes cli_version from its caller; diagnose_cmd.rs's prepare_cli_report passes cli_version_number(), the leading token only, never the full ref+hash string).
Blocking
None
Non-blocking
None
Decisions for the author
- An unresolved ref (no git, or a detached checkout with no exact tag) still falls back to the frozen workspace version
0.1.0, which is indistinguishable from the real release tagv0.1.0in a problem report — tradeoff/answered-by-intent. The PR's own description names this explicitly: "Known limitation: a build whose ref did not resolve at all ... keeps leading with the workspace version,0.1.0, which is also a published release tag. Only its(unknown, <hash>)suffix tells it apart from v0.1.0, and a problem report, which carries only the leading token, cannot." Would otherwise be worth raising as a gap in the fix's completeness; since it is disclosed and documented inbuild.rs's module docs, this is the author's call to confirm rather than a defect. (An alternative would be a distinct sentinel such as0.0.0-unresolvedfor this one case, at the cost of changing long-standing behavior for a narrow, already-rare build configuration.) - The tag-format leading-version path (
X.Y.Zfor avX.Y.Zrelease) is never exercised in CI's e2e suite, only inbuild.rsunit tests and a manual local run against the real release binaries — tradeoff/answered-by-intent. The description states this directly: "CI lanes build from a branch, so these scenarios andscripts/smoke_local.pycheck the0.0.0-devhalf. The tag half is checked by theformat_cli_version_*unit tests ... and, on the shipped binaries, by the new release-workflow steps... The Windows step is the same logic in PowerShell and has not been run." This is an inherent consequence of CI never building from a tag, not an oversight, and is honestly disclosed rather than left implicit.
Positive signals
- The release-tag grammar (
RELEASE_TAG_PATTERN/RELEASE_VERSION_MAX_LEN) is stated once inapps/rocm/build.rsand held in sync with.github/workflows/release.yml's bash check andscripts/smoke_local.py's Python regex byrelease_tag_grammar_is_the_same_everywhere, which does a real textual + table-driven behavioral comparison across all three — a genuine drift detector, not a placeholder test. crates/rocm-core/src/report.rs's newcli_version()sanitizer is strict (must start with a digit, only ASCII alphanumerics/./-/+, ≤64 bytes) specifically so a local branch name can never reach the public-tracker-facing report even if a caller passed the wrong value; a caller that passed the fullref, hashstring would be caught and degraded tounknownrather than leaking free text.- The new e2e scenarios (
examine-01,diagnose-58) compute their expected version independently from the resolved ref rather than comparing the CLI's own outputs to each other, so they would actually fail if the underlying fix were reverted — confirmed by tracing what each would assert against the old frozen-0.1.0behavior.
Deployment notes
rocm diagnose --report'scli_versionfield changes from a constant0.1.0to a value that varies by build (release version or0.0.0-dev); anything downstream that groups or filters public triage reports by this field should expect new values to start appearing after this ships.- The release workflow now hard-rejects any tag pushed to trigger a release that isn't shaped
vX.Y.Z(with an optional-pre/+buildsuffix) before any build starts — a release manager using a different tag convention will have the pipeline fail at the new "Determine version" step.
What this covered
Every file in the diff (apps/rocm/build.rs, apps/rocm/Cargo.toml, Cargo.lock, apps/rocm/tests/build_metadata.rs, apps/rocm/src/cli.rs, apps/rocm/src/main.rs, apps/rocm/src/chat/mcp_bridge.rs, apps/rocm/src/update_cmd.rs, crates/rocm-core/src/report.rs, crates/rocm-core/src/report_delivery.rs, apps/rocm/src/diagnose_cmd.rs, .github/workflows/release.yml, scripts/smoke_local.py, the e2e feature/step files, xtask/src/e2e_prewarm.rs, README.md, docs/architecture.md, docs/testing.md), read completely by six independent workers grouped by shared contract, plus direct verification of the central prepare_report call path and README wording by the driver. Checked against this repo's AGENTS.md rules on test-pinning specificity, cross-file value consistency, documentation drift, and the architecture-doc/build.rs exemption. Design review covered build-time vs. runtime version resolution (compile-time is clearly the right altitude here) and the two residual gaps above, both of which the PR discloses rather than hides.
All 42 applicable CI checks on this commit report success (one unrelated Dependabot job was skipped).
Did not run: a dedicated git-blame/history pass or a prior-PR-review-comment pass on these files — this review's own blind-pass constraint means it cannot read this PR's own discussion threads, and no efficient path exists here to unrelated prior PRs' review comments on these files; spot checks of git log/file sizes at base vs. head were used instead where relevant (e.g. confirming report.rs's pre-existing 1,500-line overage predates this PR). Not reconciled against any discussion on this PR.
Not a human review. This is an automated code review; please verify findings independently before acting on them.
main changed scripts/smoke_local.py, which this branch deletes: #818 made it require the version the build's ref calls for (a release tag's own version, `0.0.0-dev` for any other ref), and build.rs's `release_tag_grammar_is_the_same_everywhere` read the script to hold its copy of the release-tag grammar equal to build.rs and release.yml. Keep the deletion and carry the check into `cargo xtask smoke`, with the pattern and length bound as constants in xtask/src/smoke.rs, and point the grammar test at that file instead. Changing either constant turns the grammar test red; skipping the version comparison turns the new smoke test red. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Summary
rocm versionalways led with the workspace package version, so a tagged release and a build frommainboth read as0.1.0. AvX.Y.Ztag (optional-preor+buildsuffix) now leads with that version,X.Y.Z (vX.Y.Z, <hash>). Every other resolved ref, includingmainand feature branches, leads with0.0.0-dev. Only a ref that did not resolve at all keeps the workspace package version.apps/rocm/build.rsformats the string once (format_cli_version) and exports it with its leading version, so-V/--version,rocm version, the chat MCProcm_command versiontool,rocm update'scli: installed=field and therocm diagnose --report/--sendreport all print the same value.rocm diagnose --reportused to publishrocm-core's own frozen package version.prepare_reportnow takes the version from its caller, and the report carries only the leading version token: the ref and hash after it can carry a local branch name. Anything that is not a short version token is published asunknown.vX.Y.Zin "Determine version", before anything is built, because such a tag would ship binaries that report0.0.0-dev. An optional-preor+buildsuffix may use letters, digits,.,-and+, and the version is at most 64 characters. That is the problem report's own rule, so a release never reportsunknown. The grammar is stated once inbuild.rs;release_tag_grammar_is_the_same_everywhereholds release.yml andscripts/smoke_local.pyto it. Every existingv*tag matches. It also runs the Linux and Windows release binaries and fails if--versiondoes not lead with the tag's version.rocmd --version,rocmd's MCPserverInfo, the dash daemon'sDAEMON_VERSIONand the dash client string still report the workspace version.0.1.0, which is also a published release tag. Only its(unknown, <hash>)suffix tells it apart from v0.1.0, and a problem report, which carries only the leading token, cannot. This is documented in thebuild.rsmodule docs.Coverage
@id:examine-version(examine-01) checks every CLI surface prints one string, and that its leading version is the one its ref calls for, worked out from the ref alone.@id:diagnose-report-names-the-cli-version(diagnose-58) plants a released GPU on a simulated Linux host, so a report is prepared on every Linux lane, GPU or not. It checks that the report'scli_versionequals whatrocm versionleads with and is the version that ref calls for.scripts/smoke_local.pycheck the0.0.0-devhalf. The tag half is checked by theformat_cli_version_*unit tests inbuild.rs(run throughtests/build_metadata.rs) and, on the shipped binaries, by the new release-workflow steps. Those steps run only on a tag push, never on this PR; their Linux body was run locally against a build made withROCM_CLI_RELEASE_REF=v9.9.9-rc.1(pass) and against a branch build and a mismatched tag (each fails). The Windows step is the same logic in PowerShell and has not been run.format_cli_version_*tests (tag, branch, unknown, and near misses such asv0.2,v1.2.3.4,v1.x.3andv1.2.3-rc_1),release_tag_grammar_is_the_same_everywhere,version_surfaces_share_one_build_script_string,a_problem_report_names_the_version_rocm_version_leads_with, therocm-corereport tests for the version sanitizer (including a value one character over the limit), the MCP in-process version test and the update-report surface test.Test plan
cargo fmt --all --check,cargo clippy --locked --workspace --all-targets -- -D warnings, andcargo clippy --locked -p e2e-cucumber --test e2e -- -D warningscargo test --locked --workspace --all-targets: everything passes except three tests that fail only on this host (build_metadata's twogit_watch_paths_*tests, because of this host's commit-signing setup, andstop_of_a_container_engine_is_unconfirmed_when_the_engine_stop_fails)python scripts/smoke_local.py: every version step passes; it then stops at therocmdsandbox step, because bubblewrap cannot create a network namespace on this host (bwrap --unshare-netfails the same way on its own)cargo xtask e2e -- -n '(diagnose-58|examine-01)'passes, and both scenarios fail when every branch build is made to report0.1.0