feat(fix): publish the Doctor catalog as a manifest tools can read - #400
Draft
volen-silo wants to merge 1 commit into
Draft
volen-silo wants to merge 1 commit into
volen-silo wants to merge 1 commit into
Conversation
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
from
September 15, 2026 13:06
9c0ce1a to
d1d8caf
Compare
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
September 15, 2026 13:30
7da1786 to
f6aed9f
Compare
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
from
September 28, 2026 07:43
d1d8caf to
c8c891b
Compare
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
September 28, 2026 07:49
f6aed9f to
17b19ad
Compare
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
from
September 29, 2026 11:49
c8c891b to
842617a
Compare
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
September 29, 2026 12:38
17b19ad to
4325ff5
Compare
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
from
September 29, 2026 13:05
842617a to
436a36a
Compare
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
September 29, 2026 13:13
4325ff5 to
c022b9a
Compare
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
from
September 30, 2026 06:19
436a36a to
71544ea
Compare
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
September 30, 2026 06:21
c022b9a to
bbc17fd
Compare
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
from
October 1, 2026 13:14
71544ea to
7a45761
Compare
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
October 2, 2026 06:26
bbc17fd to
a668ba1
Compare
volen-silo
force-pushed
the
fix/overstated-fix-applicability
branch
3 times, most recently
from
October 2, 2026 13:53
7c845c8 to
e7f9b7f
Compare
The skill that drives this CLI states, in prose, which entries exist, how many there are, which the CLI carries out, which platform each applies on, and what each exit code means. Every one of those is a copy of something the binary already knows, and a copy can go stale with nothing comparing the two. `rocm fix --json` now publishes that as one machine-readable manifest -- every entry, what the CLI does with each on each platform, and the meaning of every exit code -- rendered from the compiled catalog on every call rather than stored beside it. Per platform, not per entry. An entry applies on Linux as print-only and on Windows as auto, and a manifest that flattened that would reintroduce the defect the class model was added to remove. Exit codes move from a module comment into named constants that both `apply` and the manifest read. A published number whose meaning is maintained separately from the code that returns it is the same drift one level up. The catalog is also published to a checked-in file, regenerated by `cargo xtask catalog` and verified by `--check` in prek and CI, following the existing `xtask manifest` pattern. That file is a guard rather than the contract: its value is that a catalog change appears in the pull request diff, in the form a consumer reads, which makes deciding whether to raise contract_version deliberate instead of something noticed later. `doc_url` ships optional and is filled for the six entries that already carried a URL. An invented one would send a reader somewhere wrong with an air of authority, and because the file is checked in the seventeen blanks are visible and countable. Filling them later is an addition and keeps the version at 1. Combining `--json` with a fix id is refused rather than ignored: "apply this fix, as JSON" has no answer, and a caller that asked for machine-readable output and silently got something else cannot tell. The skill half -- declaring a minimum contract_version and stopping below it -- needs the skill and the binary in one CI job and follows separately. Signed-off-by: Eugene Volen <Eugene.Volen@amd.com>
volen-silo
force-pushed
the
feat/publish-catalog-manifest
branch
from
October 2, 2026 14:01
a668ba1 to
3aa92e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The skill that drives this CLI states, in prose, which entries exist, how many there are, which the CLI carries out, which platform each applies on, and what each exit code means. Every one of those is a copy of something the binary already knows, and a copy can go stale with nothing comparing the two.
rocm fix --jsonnow publishes that as one machine-readable manifest — every entry, what the CLI does with each on each platform, and the meaning of every exit code — rendered from the compiled catalog on every call rather than stored beside it.Non-obvious decisions
Per platform, not per entry. An entry applies on Linux as print-only and on Windows as auto. A manifest that flattened that would reintroduce the exact defect #382 exists to remove, one level up.
Exit codes became named constants. They lived only in a module comment. A published number whose meaning is maintained separately from the code that returns it is the same drift this change exists to end, so
applyand the manifest now read the same constants — and a test asserts the published codes are the onesapplyactually returns.The checked-in file is a guard, not the contract.
cargo xtask catalogregeneratesdoctor-catalog.json;--checkverifies it, in prek and in theclippyCI job, following the existingxtask manifestpattern. Its value is that a catalog change appears in the PR diff, in the form a consumer reads, which makes deciding whether to raisecontract_versiondeliberate rather than something noticed later. The failure message says so explicitly.doc_urlis optional and mostly empty. Six of 23 entries carry a URL today; those are filled from URLs already in the recipe. An invented one would send a reader somewhere wrong with an air of authority. Because the file is checked in, the seventeen blanks are visible and countable — a to-do list rather than a silent gap. Filling them later is an addition, which keepscontract_versionat 1.--jsonwith a fix id is refused, not ignored. "Apply this fix, as JSON" has no answer, and a caller that asked for machine-readable output and silently got something else has no way to notice. The refusal also emits nothing parseable, so a caller cannot mistake it for a catalog.Verification
cargo test --workspace --all-targets --exclude e2e-cucumber— clean;rocm-core380 passedcargo clippy --locked --workspace --all-targets,cargo fmt --all --check, fullprekrun — clean, including the new hookcargo xtask e2e -- -n diagnose— 23 scenarios, 18 passedThe 5 failures are pre-existing on this host and were measured, not assumed. I ran the same command on the base commit: 16/21 with exactly the same five failure names. This dev host is WSL2 inside a container — no GPU, no
/dev/dxg— and CI's own WSL2 lane passes them.Every new assertion was mutation-checked.
the_manifest_repeats_the_catalog_rather_than_reinterpreting_it, and only that.unknown_idfailsthe_published_exit_codes_are_the_ones_apply_returns.xtask catalog --checkexit 1 with the contract-version message.One of those checks initially appeared to prove the guard was broken — the entry I mutated was already
autoon that platform, so my "mutation" changed nothing. Worth recording because the guard was fine and the test was not.Scope
This is the producer and its drift guard. The other half — the skill declaring a minimum
contract_versionand stopping below it — needs the skill and the binary in one CI job, which is parked on the skill move, so the Epic's "stops rather than guess against an older tool" scenario stays unclaimed here rather than looking covered.Risk
Low. Additive: a new flag, a new xtask subcommand, a generated file, and a field defaulted to
None. The only change to existing behaviour isapplyreturning named constants in place of the same literals.