Skip to content

fix(version): report the release tag instead of the frozen 0.1.0 - #818

Merged
rominf merged 6 commits into
mainfrom
fix/cli-version-string
Nov 10, 2026
Merged

rominf merged 6 commits into
mainfrom
fix/cli-version-string

Conversation

@rominf

@rominf rominf commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • 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 (optional -pre or +build suffix) now leads with that version, X.Y.Z (vX.Y.Z, <hash>). Every other resolved ref, including main and feature branches, leads with 0.0.0-dev. Only a ref that did not resolve at all keeps the workspace package version.
  • apps/rocm/build.rs formats the string once (format_cli_version) and exports it with its leading version, so -V/--version, rocm version, the chat MCP rocm_command version tool, rocm update's cli: installed= field and the rocm diagnose --report/--send report all print the same value.
  • rocm diagnose --report used to publish rocm-core's own frozen package version. prepare_report now 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 as unknown.
  • The release workflow now rejects a tag that is not vX.Y.Z in "Determine version", before anything is built, because such a tag would ship binaries that report 0.0.0-dev. An optional -pre or +build suffix 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 reports unknown. The grammar is stated once in build.rs; release_tag_grammar_is_the_same_everywhere holds release.yml and scripts/smoke_local.py to it. Every existing v* tag matches. It also runs the Linux and Windows release binaries and fails if --version does not lead with the tag's version.
  • Out of scope: rocmd --version, rocmd's MCP serverInfo, the dash daemon's DAEMON_VERSION and the dash client string still report the workspace version.
  • Known limitation: a build whose ref did not resolve at all (no git, or a detached checkout with no exact tag) 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. This is documented in the build.rs module 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's cli_version equals what rocm version leads with and is the version that ref calls for.
  • CI lanes build from a branch, so these scenarios and scripts/smoke_local.py check the 0.0.0-dev half. The tag half is checked by the format_cli_version_* unit tests in build.rs (run through tests/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 with ROCM_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.
  • Unit: the format_cli_version_* tests (tag, branch, unknown, and near misses such as v0.2, v1.2.3.4, v1.x.3 and v1.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, the rocm-core report 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, and cargo clippy --locked -p e2e-cucumber --test e2e -- -D warnings
  • cargo test --locked --workspace --all-targets: everything passes except three tests that fail only on this host (build_metadata's two git_watch_paths_* tests, because of this host's commit-signing setup, and stop_of_a_container_engine_is_unconfirmed_when_the_engine_stop_fails)
  • python scripts/smoke_local.py: every version step passes; it then stops at the rocmd sandbox step, because bubblewrap cannot create a network namespace on this host (bwrap --unshare-net fails 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 report 0.1.0
  • CI

@rominf
rominf requested a review from a team as a code owner October 30, 2026 16:29
@rominf
rominf requested a review from siloteemu October 30, 2026 16:29

@nowycondro nowycondro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review (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/--send still 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 sets cli_version: env!("CARGO_PKG_VERSION").to_owned() — confirmed via git diff that crates/rocm-core/src/report.rs is untouched by this PR. rocm-core's Cargo.toml inherits 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's show_prepared_report → rocm_core::prepare_report) never overrides this field with the new cli_version_string()/cli_version_number(). Meanwhile this diff adds a new README paragraph describing exactly this --report content and states: "That value is the same string rocm version prints" — which is false for this surface as shipped. This is doubly significant because the module doc for report.rs says this report is "destined for a public, indexed issue tracker" — so public triage reports will keep showing a meaningless, frozen 0.1.0 for 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: thread cli_version_string()/cli_version_number() from apps/rocm into prepare_report's cli_version (e.g. as a parameter, since rocm-core has no way to read apps/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 a Signed-off-by trailer, 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's mergeable_state is blocked.
    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 or main in every workflow that runs scripts/smoke_local.py or the @id:examine-version e2e scenario (push/PR/merge_group triggers); release.yml, the only tag-triggered workflow, runs neither smoke_local.py nor the e2e-cucumber suite — only scripts/release_readiness.py, which has no version assertions. So the vX.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 grepped release_readiness.py/release.yml for version-related calls). Category: test-coverage.
    Fix: have release.yml run assert_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 named unknown — apps/rocm/build.rs's displayed_version/ref_descriptor.
    A local branch named unknown, or ROCM_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: use Option<String> internally for "ref not resolved" instead of overloading the string "unknown", or document the limitation.

  • A few edge cases of release_version are correct but untested — apps/rocm/build.rs tests module.
    v1.2.3.4 (too many components — explicitly called out by the function's own code comment), a combined -rc.1+build suffix, and the symmetric v1.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 existing format_cli_version_reports_main_as_a_dev_build/...without_its_leading_v tests.

  • 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/--version and rocm version "cannot disagree," but the test never captures rocm version's actual printed stdout — it only checks cli_command().get_version() and shape/derivation consistency against the build-script env vars. The real cross-surface guarantee comes from the e2e assert_version_returned step, 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's vX.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 with v) by two independent reviewers and holds up in every case.
  • scripts/smoke_local.py's assert_version_string and the e2e assert_version_returned step compare the parsed version/ref against each other from the binary's own actual output, rather than re-implementing release_version's parsing independently — this avoids the Python/Rust parser drift that would otherwise be a real risk.
  • The chat.rs MCP 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_VERSION is computed exactly once in build.rs and exported as a single cargo env var, and embedded_cli_version_uses_format_cli_version ties 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 frozen 0.1.0 to 0.0.0-dev across rocm version, -V/--version, the MCP version tool, and rocm update's cli: installed= field. Anything downstream that parses or compares against a literal 0.1.0 CLI version string needs updating.
  • The rocm diagnose --report/--send surface (crates/rocm-core) is unaffected by this PR (see Blocking #1) and will keep reporting 0.1.0 regardless 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 juhovainio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things need to change before this can merge.

Blocking

  1. The README and PR body say the --report CLI version is the same string rocm version prints, but crates/rocm-core/src/report.rs still sets cli_version: env!("CARGO_PKG_VERSION") (0.1.0). rocm-core never sees ROCM_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.
  2. The Commit signatures + sign-off check 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.rs unit test would still pass if a tag build printed 0.0.0-dev (vX.Y.Z, h), since the else-branch asserts exactly that. Only the build.rs unit 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.
  • rocmd MCP serverInfo, DAEMON_VERSION and 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 format update_cmd relies on.
  • Please check docs/testing.md and docs/manual-testing.md for 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.

Comment thread README.md Resolved
Comment thread apps/rocm/tests/build_metadata.rs Resolved
@rominf
rominf force-pushed the fix/cli-version-string branch from b003c58 to 82d3a76 Compare November 3, 2026 10:42

@nowycondro nowycondro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review (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) shape clippy::map_unwrap_or flags, and the workspace denies clippy warnings (-D warnings). Read directly from the live CI job logs: the clippy job and the windows-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, and remote-ssh all declare needs: [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 make cargo clippy --workspace --all-targets -- -D warnings a 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 the needs: graph in ci.yml directly). 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's mergeable_state label — 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: ran git merge-tree between this PR's head and main's current tip (which has moved past this PR's merge-base) and got actual CONFLICT (content) markers in both files — almost certainly because another PR added different diagnose-NN scenarios to the same file regions in the meantime.
    Confidence 100 (ran the merge directly and read the conflict output). Category: mechanical.
    Fix: rebase onto current main and resolve the conflicting diagnose.feature/diagnose_steps.rs hunks.

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.yml is still the only tag-triggered workflow and still runs neither scripts/smoke_local.py nor the e2e-cucumber suite — only release_readiness.py, which has no version assertions. Every push/PR/merge_group CI run can only ever resolve a branch ref, never a real vX.Y.Z tag, so the tag-shape branch of format_cli_version/release_version is solidly unit-tested but still never produced and checked from an actually-built release artifact.
    Confidence 85 (confirmed release.yml has no diff in this PR and grepped it directly for version-related calls). Category: test-coverage.
    Fix: have release.yml run an equivalent of assert_version_string against 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 (MCP serverInfo.version), crates/rocm-dash-daemon/src/lib.rs:21 (DAEMON_VERSION), crates/rocm-dash-tui/src/client.rs:160 (dash client string) — all still env!("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 to rocm version's output and the diagnose/report cli_version field, 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 (grepped CARGO_PKG_VERSION across 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 existing runtime-09/runtime-resolve-canonical-release scenario 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's prepare_report now requires cli_version as 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's release_version parser 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-suffix v1.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-48 e2e scenario has real teeth: it independently re-derives the expected cli_version from a separately-run rocm version rather 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 dedicated ROCM_CLI_VERSION_NUMBER build-script export used directly by update_cmd.rs and 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 frozen 0.1.0 to 0.0.0-dev across rocm version, -V/--version, the MCP version tool, rocm update's cli: installed= field, and now also the rocm diagnose --report/--send payload. Anything downstream parsing/comparing a literal 0.1.0 CLI 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 frozen 0.1.0.
  • The branch needs a rebase onto current main before 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 nowycondro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review (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: ran git merge-tree <merge-base> pr-head main-tip fresh rather than trusting the API's mergeable_state: "dirty" field alone, and got real <<<<<<< .our / >>>>>>> .their conflict markers in those three files. The PR's own diff never touches any of them (confirmed via git diff <merge-base> <pr-head> -- <path>, empty on all three), so this isn't a conflict this PR's content causes — main has moved far enough past the merge-base (28 commits ahead of the PR's recorded base, confirmed via git rev-list --count) that an unrelated refactor and unrelated dash-* e2e scenario additions on main now collide with this branch's stale state of those files on a straight merge. The previous round's conflict (in diagnose.feature/diagnose_steps.rs) is gone, but the branch is further behind main now 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 current main and 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, and e2e-selfhosted.yml each show workflow runs only for the two earlier commits on this branch (82d3a763, b003c58a); none exist for 861363cb. 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.yml triggers on bare pull_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 required clippy/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; confirmed ci.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.yml is unchanged and still runs neither smoke_local.py nor the e2e-cucumber suite, so the tag-shape branch of format_cli_version is unit-tested only, as in both prior rounds. Additionally, traced directly: scripts/smoke_local.py's assert_version_string (lines ~94-113) would not catch a release-tag build that regressed to printing 0.0.0-dev instead of its real tag version — the if ref.startswith("v") and ref[1:] == version branch is skipped (version doesn't match), and the elif 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 because release.yml never calls this function at all.
    Confidence 80 (traced the Python logic by hand against the stated scenario; confirmed release.yml's trigger/steps directly). Category: test-coverage.
    Fix: have release.yml run an equivalent of assert_version_string against the built release binary, and tighten the smoke-script branch to require an explicit match when ref looks like a release tag rather than falling through to "anything 0.0.0-dev is fine."

  • diagnose-48's own feature comment overstates what the scenario checks. tests/e2e-cucumber/features/diagnose.feature (new scenario) and its step report_names_the_rocm_version_leading_version in diagnose_steps.rs compare rocm diagnose --report --json's cli_version field only against the leading token of a separately-invoked rocm version — not against the expected X.Y.Z/0.0.0-dev shape 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 hardcoded 0.1.0 (both sides would read 0.1.0 and agree). It does catch a real, narrower regression — the report path falling back to rocm-core's own separate frozen CARGO_PKG_VERSION instead 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 what examine-01's assert_version_returned step 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 version rocm version prints" 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's version_surfaces_share_one_build_script_string only 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 same cli_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 by build.rs's own exhaustive unit tests and examine-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 order map_or_else actually 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-48 exercises the real compiled rocm binary on both sides of its comparison (--report --json and rocm version), via planted sysfs/os-release/PCI state matching the existing diagnose-40 pattern — 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, empty v1.2.3+, non-digit components, leading-v near-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's cli_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-existing entry/is_catalog_id validation.
  • 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_version field 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 frozen 0.1.0 to 0.0.0-dev across rocm version, -V/--version, the MCP version tool, rocm update's cli: installed= field, and the rocm diagnose --report/--send payload. Anything downstream parsing/comparing a literal 0.1.0 CLI version string needs updating.
  • rocmd's MCP serverInfo.version, the dash daemon's DAEMON_VERSION, and the dash-TUI client string are unaffected by this PR and keep reporting the frozen 0.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

rominf and others added 4 commits November 10, 2026 11:35
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>
@rominf
rominf force-pushed the fix/cli-version-string branch from 861363c to c51f8b6 Compare November 10, 2026 09:50
@rominf

rominf commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to the automated review of 861363c. The review was posted as a body with no threads, so I'm answering it here.

Blocking

  • Conflicts with main: rebased onto current main, with no change in behaviour. main had moved the code this PR touches, so the hunks went with it:

    • the Version doc comment and the CLI tests now live in apps/rocm/src/cli.rs;
    • the MCP in-process test is in apps/rocm/src/chat/mcp_bridge.rs;
    • show_prepared_report is in apps/rocm/src/diagnose_cmd.rs, so prepare_cli_report and its unit test are there too, and docs/architecture.md lists the new function.

    The new scenario was renumbered from diagnose-48 to diagnose-58, because main now uses 48. Its @id is unchanged. The clippy-only commit is folded into the commit it fixed.

  • No CI on the head: this force-push starts CI on the new head.

Non-blocking

  • The tag shape is never tested end to end, and the smoke script has a blind spot. Fixed both.

    • scripts/smoke_local.py and the examine-01 step now compute the expected leading version from the ref alone, using the same vX.Y.Z[-pre|+build] rule as release_version in build.rs. A tag build that prints 0.0.0-dev now fails both.
    • release.yml has a new "Check the release binary's version" step in the Linux job and in the Windows job. It runs the binary that is about to ship and fails unless --version leads with the tag's version. I ran the Linux step's body against a build made with ROCM_CLI_RELEASE_REF=v9.9.9-rc.1, and it passed. Against a branch build and a mismatched tag it failed, as it should. The Windows step uses the same logic in PowerShell and has not been run.
    • "Determine version" now rejects a tag that is not vX.Y.Z before anything is built. This is a behaviour change: such a tag used to produce a release that reported 0.0.0-dev. Every existing v* tag passes the check.
  • The diagnose-48 comment overclaims. The step itself had the gap the comment hid: two surfaces that regressed to the same frozen version would still agree. The step (now diagnose-58) also checks the report's cli_version against the version that rocm version's ref calls for, computed independently.

    • I changed build.rs to report 0.1.0 for every branch build. Diagnose-58 and examine-01 both then failed on the new check, while their agreement checks still passed.
    • The feature comment now says what the scenario checks, and that CI lanes only reach the 0.0.0-dev half.
  • Weak assertions.

    • The MCP test now builds its expected line from the build script's separate exports, not from cli_version_string() (the function under test). Breaking that function now fails the test; before, the test still passed.
    • version_surfaces_share_one_build_script_string is unchanged. Which version a ref calls for is decided by format_cli_version, and the format_cli_version_* tests in build.rs cover every shape. The e2e and release checks above now also cover the shapes that this unit test only sees for the ref CI resolves.
  • Two more gaps, found while re-reviewing these changes:

    • Every test still passed with release_version's per-component digit check removed. Fixed with cases like v1.x.3, v1..3 and vfoo.bar.baz.
    • Every test still passed with the report's 64-character limit loosened by one. The over-length test value is now exactly one character over.

    Both tests now fail when their target is broken.

Local gate on the new head:

  • fmt and workspace clippy pass.
  • e2e clippy passes.
  • cargo test --workspace --all-targets passes except three tests that fail only on this host (git_watch_paths_* because of the host's commit-signing setup, and one container-stop test).
  • cargo xtask e2e -- -n '(diagnose-58|examine-01)' passes.
  • scripts/smoke_local.py passes every version step. It stops later at the rocmd sandbox step, because bubblewrap cannot create a network namespace on this host.

@rominf
rominf requested a review from juhovainio November 10, 2026 09:50
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor
Security scan found no critical or high findings on lines changed by this pull request

View 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 juhovainio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, the release.yml regex). The e2e and smoke copies are deliberate independent oracles, but nothing ties the workflow regex to release_version.
  • A valid tag such as v1.2.3-rc_1 displays fine in rocm version but is published as unknown in 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_dispatch dry run before the next tag would cover it.
  • rocmd, the dash daemon and the dash client still report the workspace 0.1.0 (declared out of scope); worth confirming a follow-up ticket exists.
  • CI: Security scan / gitleaks is failing and I could not see why; please check or rerun before merge.

Comment thread .github/workflows/release.yml Resolved
Comment thread apps/rocm/build.rs Resolved
Comment thread apps/rocm/build.rs Resolved

@nowycondro nowycondro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review · review-code · head 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's release_version (lines ~139-154) and ref_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 reaches release_version(). release_version() then classifies any string shaped vX.Y.Z[(-|+)suffix] as a release regardless of how it was resolved. Before this PR, the leading version was always the frozen CARGO_PKG_VERSION, so a branch named e.g. v1.2.3 printed "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 actual v1.2.3 tag build, directly contradicting the module's own doc comment: "any other resolved ref, including main and feature branches → 0.0.0-dev, which is not a release." The module doc explicitly acknowledges and mitigates one ref-collision risk (the literal name unknown) 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 (traced ref_descriptor/release_version directly; confirmed no tag/branch disambiguation survives into the returned ref string). Category: logic.
    Fix: have ref_descriptor() (or a wrapper) carry forward whether the ref actually came from a tag (GITHUB_REF_TYPE == "tag", or git describe --exact-match) as an explicit flag, and gate release_version's classification on that flag rather than on text shape alone.

Non-blocking

  • The vX.Y.Z tag-acceptance rule is duplicated across four independent places with nothing tying the workflow's copy to the source of truth. apps/rocm/build.rs's release_version, .github/workflows/release.yml's bash regex (^v[0-9]+\.[0-9]+\.[0-9]+([-+].+)?$), tests/e2e-cucumber/tests/e2e/examine_steps.rs's expected_leading_version, and scripts/smoke_local.py's assert_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 match release_version on every near-miss case. But release.yml's copy is a plain duplication with only a code comment ("same rule as release_version") tying it to build.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 (a cargo xtask step or a script invoked from both places) that extracts the workflow's regex and asserts it against the same fixture list build.rs's own near-miss tests use.

  • A release tag whose suffix is valid for display is rejected as unknown by the report's sanitizer — a real inconsistency between the two surfaces this PR is meant to keep in sync. apps/rocm/build.rs's release_version (any non-empty suffix after -/+ is accepted) vs. crates/rocm-core/src/report.rs's cli_version() (only ASCII alphanumerics plus ., -, +). A tag such as v1.2.3-rc_1 is a valid release per release_version (the underscore sits inside the unchecked suffix), so rocm version/-V correctly prints 1.2.3-rc_1 (v1.2.3-rc_1, <hash>) — but the same string fails cli_version()'s charset check (underscore isn't allowed), so rocm diagnose --report for that exact build would publish cli_version: "unknown" instead, undermining the PR's own goal of making the report "the same string rocm version prints." 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-accepted unknown sentinel) rather than corrupting the report.
    Confidence 80. Category: logic/architectural.
    Fix: either tighten release_version's suffix grammar to the same charset cli_version() accepts, or loosen cli_version() to match whatever release_version actually 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_version report sanitizer actually enforces. README.md:404-405 and the equivalent docs/testing.md passage say a value is published as unknown when it has "characters other than letters, digits, ., - and +, or longer than 64 characters" — true but incomplete: crates/rocm-core/src/report.rs's cli_version() (and its own doc comment at line ~339) also requires the value to start with a digit. The unit test a_cli_version_that_is_not_a_version_token_is_published_as_unknown exercises exactly this gap ("SENTINEL-USER" is all allowed characters and under 64 chars, yet published as unknown solely 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 in report.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_report now threads the real build-time version (not a frozen constant) with non-placeholder tests; the clippy::map_unwrap_or fix is stable; the e2e diagnose-58/examine-01 scenarios now independently re-derive the expected version from the ref rather than comparing two values that could both regress together; the three previously-untested build.rs edge cases (v1.2.3.4, combined -rc.1+build, v1.2.3+) now have regression tests; and release.yml now runs the actual release binary on Linux and Windows and checks its --version output 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_version is verifiably excluded from the report's aggregation group_key, confirmed by a dedicated test — varying it per build cannot fragment unrelated issue aggregation.
  • No merge conflicts with the current main tip (verified directly via git merge-tree, not just the API's mergeable_state label) — 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-test jobs, 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 frozen 0.1.0 to 0.0.0-dev across rocm version, -V/--version, the MCP version tool, rocm update's cli: installed= field, and the rocm diagnose --report/--send payload. Anything downstream parsing/comparing a literal 0.1.0 CLI version string needs updating.
  • rocmd's MCP serverInfo.version, the dash daemon's DAEMON_VERSION, and the dash-TUI client string are unaffected by this PR and keep reporting the frozen 0.1.0, as the PR itself states.
  • Security scan / gitleaks (and the Security scan / Security scanners job that depends on it) is currently failing, but this is confirmed pre-existing and unrelated to this diff: the flagged matches are in apps/rocm/src/runtime_install_finalize.rs/apps/rocm/src/serve_summary.rs at commit 07c93f32 ("ci: run the nightly GPU E2E lanes on a shared GPU queue (#950)"), already on main'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 on main.
  • 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>
@rominf
rominf added this pull request to the merge queue Nov 10, 2026

@nowycondro nowycondro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review · review-code · head 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 tag v0.1.0 in 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 in build.rs's module docs, this is the author's call to confirm rather than a defect. (An alternative would be a distinct sentinel such as 0.0.0-unresolved for 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.Z for a vX.Y.Z release) is never exercised in CI's e2e suite, only in build.rs unit 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 and scripts/smoke_local.py check the 0.0.0-dev half. The tag half is checked by the format_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 in apps/rocm/build.rs and held in sync with .github/workflows/release.yml's bash check and scripts/smoke_local.py's Python regex by release_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 new cli_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 full ref, hash string would be caught and degraded to unknown rather 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.0 behavior.

Deployment notes

  • rocm diagnose --report's cli_version field changes from a constant 0.1.0 to a value that varies by build (release version or 0.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/+build suffix) 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.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@rominf
rominf added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 6e7cdf5 Nov 10, 2026
43 checks passed
@rominf
rominf deleted the fix/cli-version-string branch November 10, 2026 14:06
rominf added a commit that referenced this pull request Nov 11, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants