Repository navigation
Check every pinned tool against the lock; add cargo tops lock - #58
Closed
VirtualMachinist wants to merge 8 commits into
Closed
VirtualMachinist wants to merge 8 commits into
VirtualMachinist wants to merge 8 commits into
Conversation
New files only. The table holds the eleven pinned tools, each with its version argv and parse rule, tested against lines captured from real tools. The lock command and the gate check are not wired yet; the CLI tests stay red until they are. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Kani row reads the line a real cargo kani printed. The clippy and rustfmt rows are judged by the toolchain line and are missing when cargo clippy or cargo fmt will not run. Test directories are unique per test and per process. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The gate asks each pinned tool a layer needs for its version before the layer runs. A tool at another version is a tool-mismatch (environment, exit 3) naming tool, pin and found, in the same words on stdout, in the layer detail and in the problems. A tool that will not run is a missing tool. The crap pin check moves onto this path and run_pinned_crap is gone. cargo tops lock --verify [--max-tier N] [--path P] checks the pins, and --write replaces the values the tools print, keeping comments and order. The kit workflow runs init and lock --verify in a temp crate after the pinned tools install, and the drop-in runs lock --verify before the gate. The gate tests answer the pins from stubs, so none depends on the host toolchain. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…shold The version parser keeps one check, since only digits and dots reach it. The lock command builds its report lines in functions with their own tests. The project commands are one group in the command line, and the pinned tools of a layer are asked in the run loop, so no function rose above its score. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Author
|
Recut as a single commit with the same tree: #59 |
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.
Slice 1.6: every pinned tool a running layer needs is checked against
rust-tops.lock, andcargo tops lockverifies or rewrites the lock.src/lock.rshas one row for each of the eleven CLI tools, each with its version argv and parse rule, tested against version lines captured from the real tools. Partial pins match whole parts only, so0.12matches0.12.3and not0.120.0.rustc --versionjudges the toolchain pin forrustc,clippyandrustfmt, andcargo clippy --versionandcargo fmt --versionmust also succeed. Library and name rows (proptest,criterion,callgrind-runner) are skipped.tool-mismatchverdict (kindenvironment, exit 3), worded the same in stdout, the detail andproblems:mismatch cargo-deny: pin 0.18.9, found 0.18.8. A tool that won't run staystool-missing. The old cargo-crap-only check is gone; a crap pin mismatch was exit 1 and is now exit 3, like every other tool.cargo tops lock --verify [--max-tier N] [--path P]exits 0 when every pin matches, 2 for a lock that does not parse, and 3 for a missing or wrong tool.--writerewrites values only, keeping comments, order and other tables.tops-gatejob runs a freshinit, thenlock --verify --max-tier 1, before the gate. The drop-in runscargo tops lock --verify --max-tier 1before its gate.--max-tier 1is there because those jobs don't installcargo-fuzz, Kani or Nushell.The drop-in on
mainneeds the next cargo-tops release forlock, as with--base.Gate at the head:
142 mutants tested in 21m: 118 caught, 24 unviable;ok: 8 command(s) passed.🤖 Generated with Claude Code