Repository navigation
Check every pinned tool against the lock; add cargo tops lock - #59
Open
VirtualMachinist wants to merge 4 commits into
Open
VirtualMachinist wants to merge 4 commits into
VirtualMachinist wants to merge 4 commits into
Conversation
Each pinned tool a running layer needs is asked once before the layer runs. A mismatch is the tool-mismatch verdict: kind environment, exit 3, naming the tool, the pin and the version found. The cargo-crap-only check is gone. cargo tops lock --verify exits 0, 2 or 3, and --write rewrites values only. The kit and drop-in workflows run lock --verify before the gate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pins A pin that is not a string, a tools key that is not a table, a pin that is not dot-separated digits, and a lock with no tools table are errors naming the key (exit 2) in lock, check and the gate. A pre-release never matches a pin. An unknown key prints a warning, and only the three named libraries print skipped. A failed probe names its command and how it failed, in the same words on stdout, in the detail and in the problems, and each probe has ten seconds. lock --write rewrites only plain key = "value" lines under tools, refuses every other form by name without changing the file, reads the edited text back, prints wrote only for changed values, and leaves a partial pin that already matches. The protocol text follows what the gate asks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The gate tests run the whole gate several times against stubs, and each gate now asks the pinned tools for their versions. Three test binaries get a longer limit in the kit config, with the measured times in the comment. The version ask looks for its answer sooner and backs off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The backoff was no faster and left a mutation that no test could tell apart. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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.
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