Repository navigation
Breaking 0.x minor. First release shipping protocol 1.3.0 and protocol 1.4.0. Package plane moves to 0.5.0.
Added
-
Skills from BeautifulRust v1.5.0, rewritten in our own words and credited in
NOTICE(MIT). Nushell 0.108.0 is their required runtime ([tools] nushellinrust-tops.lock).cargo tops init --skillsnow writes five skills and the rule catalog, and prints a line naming the Nushell requirement.- Rule catalog (#40):
rules.tomlwith 75 rules, each an ID and a kind (lint,probeorjudgment), anddocs/beautifulrust-map.md, which maps the upstream bullets to rule IDs or todropped: <reason>. - Lint proof (#41): a test proves every lint rule in the catalog is a lint clippy knows and fires on a probe line.
rust-tops-style(#42):check [--path] [--base]runs clippy for the lint rules and twelve Nushell probes, prints sorted JSON findings with the catalog's fix text, and keeps only changed lines with--base.rust-tops-port(#44):inventorylists the original tests of a C, C++, Python, Go, JavaScript or TypeScript tree, andverifyfails when an original test has no passing Rust counterpart. The catalog gains the port rule PORT-13.rust-tops-review(#45): the newstylecommand gives the style findings on the review range, andanswerschecks that every judgment rule was answered.filesanddiffare unchanged byte for byte.- Eval regression (#46): fixtures that check the skills against upstream's eval cases.
- Rule catalog (#40):
-
Verdict pack (protocol 1.3.0). Protocol file rename and wiring: #53.
- Tidy-up (#49, #48):
port inventoryfinds C and C++ tests outsidetests/,answersprints relative paths, the skills share onecommandrule and one golden variable (RUST_TOPS_BLESS), the README pin table names Nushell andxtask docsguards it, the adopternextest.tomlcarries no kit-only overrides, theinitunsafe note is exact for theforbidfallback, and the toolchain-pin search walks up to the workspace or git root. - One report (#51): every
cargo tops gaterun writes<target>/rust-tops/report.json(schemaschema/gate-report.schema.json) with per-layer verdicts, commands, tool versions and seconds, and the law verdicts.cases.jsonis still written for Bend. - Exit codes (#51): 0 pass; 1 the gate ran and failed (including a dry run and the short-command rule); 2 the config is invalid; 3 the environment (a required tool, or
cargo metadata, is unavailable). Any non-zero exit still fails CI; the codes only say which kind. - Gate skill (#52):
rust-tops-gatereadsreport.json, notcases.json. - Fixed tiers (#50): a layer's tier comes from its id (§3), and
security-advisorymoved from tier 5 to tier 0 so the default--max-tier 1gate runs the advisory check.cargo tops checknow fails an instance whose layer tier differs from the table, whose floor is looser than its class profile, or that disables a layer its class requires. - Protocol file rename (#53):
RUST_TOPS.mdis nowPROTOCOL.md(§14.4 still requires each repo's rootRUST-TOPS.md). A test fails if a tracked file other than this changelog names the old file.
- Tidy-up (#49, #48):
-
Honest pack (protocol 1.4.0). The gate passes a layer only on evidence from the run.
- Mutation base (#55): the diff starts at the merge base with
--base <ref>, thengates.base_ref, thenorigin/HEAD. A missing base fails under CI (fix:fetch-depth: 0and--base) and isvacuousotherwise, and the report names the base used. - Credited layers (#56): a credited
propertyoracceptancelayer passes only when the credited run's nextest JUnit report holds a passed test with a::segment of its name starting withgates.<layer>.test_filter(default the layer id; letters, digits and underscore only). A layer that runs itself selects tests the same way, with-E 'test(/(^|::)<filter>/)'instead of a positional filter.acceptancenow runs (it wasNotRun). Fix for a failing layer: add a matching test, or set the filter. - Tidy-up (#54): the fresh-init test gets a nextest slow-timeout override, and the Bend script, its README and
BEND2-INTEGRATION.mduse neutral wording. - Exemptions and survivors (#57): an expired exemption, or one whose
expiresis not a real day, fails the gate with exit 1 whatever its layer, whether that layer is on, and whatever--max-tier;checkprints it as a warning. The mutation layer reads cargo-mutants'outcomes.jsonand judges each missed mutant per function: only a livelayer: mutationrecord whosesymbolnames the function and whosepathcovers the file explains it, andgates.mutation.unexplained_survivors_maxalways decides. A survivor outside any function is explained only by a record with nosymbol. Fix for a failing run: kill the mutant, or add a dated record that names the function. - Tool pins (#59): every tool in
rust-tops.lockthat a running layer uses is checked against its pin, not onlycargo-crap. A tool at another version fails its layer with the verdicttool-mismatchand exit 3 (thecargo-crappin mismatch exited 1 before). A newcargo tops lock --verifychecks the pins and--writerewrites them. Fix: install the pinned version, or runcargo tops lock --writeand review the diff. - Enforcement map and protocol 1.4.0 (#60):
schema/enforcement.jsonclasses every schema key as judged or declarative, with the reading file for the judged ones, andcargo run -p xtask -- docsprints the ratio and fails when the README table disagrees.cargo tops versionprints protocol 1.4.0. The schema changes are additive:gates.base_ref,gates.property.test_filterand the newgates.acceptanceobject withtest_filter; the gate report gains thetool-mismatchverdict and the survivor and exemption detail.
Behaviour changes in this group, each with its fix:
- A CI run with no resolvable base now fails the mutation layer (it used to be a silent
vacuouspass). Fix:fetch-depth: 0and--base. - A credited
propertyoracceptancelayer now needs a matching passed test in the credited run. Fix: add one, or settest_filter. - An expired exemption of any layer now fails the gate. Fix: renew it with a reason, or remove it.
- Mutation survivors are judged per function. Fix: name the function in the record's
symbol; use the qualified form (§19). - A
cargo-crappin mismatch now exits 3, not 1, and every pinned tool is checked. Fix: install the pinned version.
- Mutation base (#55): the diff starts at the merge base with
Changed
- The
AGENTS.mdtemplate (and its copies) no longer calls the upstream review skill an optional style pass;rust-tops-reviewruns it. .gitignorelists/mutants.out*, the output the gate's mutation layer leaves in the repository root.
Upgrade
cargo tops gate --baseandcargo tops lock --verifyrequirecargo-tops0.5.0 (earlier releases reject--basewith exit 2 and have nolocksubcommand).- Protocol 1.3.0: set
protocol.version: "1.3.0"(or"1.4.0").cargo tops checknow fails these, each with a message naming the file, key, class value and fix:layers[id=<layer>].tierthat differs from §3: set the table's tier or delete the key.- A floor looser than the class profile (
gates.coverage.line_min_pct,region_min_pct,gates.crap.threshold_agent,threshold_human,gates.mutation.kill_rate_min_pct,unexplained_survivors_max) or a missing one: set the class value, or add a dated exemption for that layer withpath: "**"and nosymbol. - A disabled or absent
security-advisorylayer, or a layer your class requires: add it withenabled: true. - Links to
RUST_TOPS.mdbreak: usePROTOCOL.md.