Repository navigation
fix: repair six stale documented commands and add a check so they stop rotting - #1635
Merged
Merged
Conversation
…p rotting Answering "is everything broken fixed?" properly meant checking rather than recalling, so I validated every `cargo` command written down in the repo against `cargo metadata`. 262 commands; six named something that does not exist. Two were my own fallout from the feature rename (#1629), which I missed because I updated `.github/skills/` and not `.agents/skills/`: - `.agents/skills/profiling/SKILL.md` still asked for `bench-native,cuda`. - `crates/onnx-genai-capi/README.md` still asked for `--features cuda`. One is a shell script with exactly the two bugs I fixed in #1630, which I should have found then by looking at the class of defect instead of the instance: - `scripts/build_real_model.sh` built `-p onnx-genai --bin onnx-genai` (that package ships only the diffusion bins) and called `generate --model DIR` (the model directory is positional). Three predate all of this and are worse than stale -- they were never true: - `docs/ep-plugin/EP_PLUGIN_EXPORT_TEST_PLAN.md` built a `plugin-export` feature on `onnx-runtime-ep-cpu` and grepped for `CreateEpApiFactories`. What shipped is a separate `onnx-runtime-ep-cpu-plugin` cdylib exporting `CreateEpFactories` and `ReleaseEpFactory`. Verified by building it and reading `nm -D`. - `docs/performance/CPU_MATMUL_ASSIGNMENT.md` gave a repro recipe using a `bench_prec` binary with `--native-threads` / `--ort-intra-threads`. `git log` finds no commit that ever added or removed it. The recipe is removed rather than annotated, because a command that cannot run is not worth keeping; the section now says plainly that those numbers cannot be reproduced as written. - A fixture generator credited its canonical output to `cargo run -p onnx-std --example convert_fixture`. That example has never existed either. The reason all six survived is that nothing ever checks a command that nothing ever runs; the failure then looks like the reader's environment rather than the line. `scripts/check_documented_commands.py` now validates the parts that can be checked statically -- package, `--bin`, `--example`, `--test`, `--bench`, `--features` -- and runs in the `rust-quality` lane. Dated docs and `.squad` archives are skipped: they record what was run at the time. Verification: - The check reports 262 commands, all resolving, on this branch. - It has teeth, by the same `--self-test` convention the dispatch-manifest lint uses: six cases, five that must be detected (bad feature, bad bin, unknown package, bad bench, bad `dep/feature`) and one valid command that must stay silent. Also confirmed by hand against the real tree, by breaking `docs/build-features.md` and the profiling skill and watching each get caught. - `bash -n` clean on the repaired script, and its new CLI form reaches model loading instead of being rejected by clap. - `ci.yml` parses as YAML. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0190e2eb-abe4-451f-b36d-44a035a99b7e
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1635 +/- ##
==========================================
- Coverage 81.63% 81.49% -0.15%
==========================================
Files 384 384
Lines 180249 180249
Branches 180249 180249
==========================================
- Hits 147150 146885 -265
- Misses 28155 28418 +263
- Partials 4944 4946 +2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
justinchuby
added a commit
that referenced
this pull request
Aug 21, 2026
Main's #1635 added a lint that resolves every documented `cargo` command against the actual workspace, and it caught two real inconsistencies this branch had left behind. `crates/onnx-genai/src/bin/run_diffusion.rs` was deleted here in "Remove legacy composite pipeline execution", because it drove the strategy/phase composite runtime that `pipeline.workflow` replaces. Ten `scripts/*.py` helpers still shelled out to `target/release/run_diffusion` and told the reader to build it with `cargo build -p onnx-genai --bin run_diffusion`. None of them could run: the binary they exec cannot be built. Delete them with the runner they drive rather than leaving instructions that cannot be followed -- exactly the rot the new lint exists to prevent. Nothing outside the group references them; the only mentions are among themselves and in a dated decisions archive. Also point the workflow performance doc at `native-cuda`, since main's #1629 renamed the feature its example passed to `cargo test`. `scripts/check_documented_commands.py` now exits clean, as do the other quality-gate lints. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chuby <justinchuby@users.noreply.github.com>
justinchuby
added a commit
that referenced
this pull request
Aug 21, 2026
Main's #1635 added a lint that resolves every documented `cargo` command against the actual workspace, and it caught two real inconsistencies this branch had left behind. `crates/onnx-genai/src/bin/run_diffusion.rs` was deleted here in "Remove legacy composite pipeline execution", because it drove the strategy/phase composite runtime that `pipeline.workflow` replaces. Ten `scripts/*.py` helpers still shelled out to `target/release/run_diffusion` and told the reader to build it with `cargo build -p onnx-genai --bin run_diffusion`. None of them could run: the binary they exec cannot be built. Delete them with the runner they drive rather than leaving instructions that cannot be followed -- exactly the rot the new lint exists to prevent. Nothing outside the group references them; the only mentions are among themselves and in a dated decisions archive. Also point the workflow performance doc at `native-cuda`, since main's #1629 renamed the feature its example passed to `cargo test`. `scripts/check_documented_commands.py` now exits clean, as do the other quality-gate lints. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chuby <justinchuby@users.noreply.github.com>
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.
Answering "is everything broken fixed?" properly meant checking rather than
recalling, so I validated every
cargocommand written down in the repo againstcargo metadata. 262 commands; six named something that does not exist.Two were my own fallout from the feature rename (#1629), which I missed because
I updated
.github/skills/and not.agents/skills/:.agents/skills/profiling/SKILL.mdstill asked forbench-native,cuda.crates/onnx-genai-capi/README.mdstill asked for--features cuda.One is a shell script with exactly the two bugs I fixed in #1630, which I should
have found then by looking at the class of defect instead of the instance:
scripts/build_real_model.shbuilt-p onnx-genai --bin onnx-genai(thatpackage ships only the diffusion bins) and called
generate --model DIR(themodel directory is positional).
Three predate all of this and are worse than stale -- they were never true:
docs/ep-plugin/EP_PLUGIN_EXPORT_TEST_PLAN.mdbuilt aplugin-exportfeatureon
onnx-runtime-ep-cpuand grepped forCreateEpApiFactories. What shippedis a separate
onnx-runtime-ep-cpu-plugincdylib exportingCreateEpFactoriesand
ReleaseEpFactory. Verified by building it and readingnm -D.docs/performance/CPU_MATMUL_ASSIGNMENT.mdgave a repro recipe using abench_precbinary with--native-threads/--ort-intra-threads.git logfinds no commit that ever added or removed it. The recipe is removed rather
than annotated, because a command that cannot run is not worth keeping; the
section now says plainly that those numbers cannot be reproduced as written.
cargo run -p onnx-std --example convert_fixture. That example has neverexisted either.
The reason all six survived is that nothing ever checks a command that nothing
ever runs; the failure then looks like the reader's environment rather than the
line.
scripts/check_documented_commands.pynow validates the parts that can bechecked statically -- package,
--bin,--example,--test,--bench,--features-- and runs in therust-qualitylane. Dated docs and.squadarchives are skipped: they record what was run at the time.
Verification:
--self-testconvention the dispatch-manifest lintuses: six cases, five that must be detected (bad feature, bad bin, unknown
package, bad bench, bad
dep/feature) and one valid command that must staysilent. Also confirmed by hand against the real tree, by breaking
docs/build-features.mdand the profiling skill and watching each get caught.bash -nclean on the repaired script, and its new CLI form reaches modelloading instead of being rejected by clap.
ci.ymlparses as YAML.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot-Session: 0190e2eb-abe4-451f-b36d-44a035a99b7e