Adopt the phase 2 Rust baseline (toolchain, rustfmt, lints) - #35
Conversation
Adopt the estate's canonical rustfmt and clippy configuration verbatim, and bring the Cargo.toml lint tables up to the full canonical set (disallowed_methods, missing_assert_message under clippy; unknown_lints, renamed_and_removed_lints, unsafe_code under rust; the full rustdoc set). The repository had no [workspace] table, so the lints stay in the crate-level [lints] tables directly. Pin the toolchain's component list to exactly rustfmt, clippy, and rust-analyzer per canon, keeping the existing dated nightly. Drop llvm-tools-preview and rustc-codegen-cranelift-preview, which the baseline does not require. Remove the Cranelift dev-profile codegen backend from .cargo/config.toml. That opt-in belongs in tools/dev-fast/config.toml under the estate's dev-fast convention, added separately by a Wave 1 pull request; carrying it here duplicated a setting that is meant to be opt-in rather than baked into every clone.
The generated stub test read CARGO_MANIFEST_DIR at runtime via std::env::var_os, which the newly-adopted disallowed_methods lint now denies estate-wide (the mandate exists to force environment reads through an injectable reader). Swap it for the option_env! macro, which resolves the same value at compile time and needs no injected reader, keeping the stub disposable and dependency-free until real tests replace it.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (1)
SummaryAdopt the phase 2 Rust baseline for
WalkthroughRemove the unstable Cranelift setting. Add stricter Rust, Clippy and rustdoc lint policies. Document rustfmt usage, add ChangesRust tooling and lint enforcement
Possibly related PRs
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning, 3 inconclusive)
✅ Passed checks (15 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
The TC-002 baseline rule requires the component list to include rustfmt, clippy, and rust-analyzer; it does not require an exact match. The previous commit on this branch mistakenly dropped llvm-tools-preview and rustc-codegen-cranelift-preview, which this repository's own coverage and dev-fast tooling rely on. Restore both and keep the newly added rust-analyzer alongside them.
Reviewer's GuideThis PR aligns the Sequence diagram for the updated test stub environment resolution under disallowed_methodssequenceDiagram
actor Developer
participant Cargo
participant Clippy
participant TestStub
Developer->>Cargo: cargo clippy --all-targets --all-features
Cargo->>Clippy: run_disallowed_methods_lint
alt [before phase2_baseline]
Clippy->>TestStub: analyze_use_of_std_env_var_os
TestStub-->>Clippy: std::env::var_os("CARGO_MANIFEST_DIR")
Clippy-->>Developer: diagnostic "inject an environment reader"
else [after phase2_baseline]
Developer->>Cargo: cargo test --workspace
Cargo->>TestStub: execute_stub_test
TestStub->>TestStub: option_env!("CARGO_MANIFEST_DIR")
TestStub-->>Cargo: uses_compile_time_manifest_dir
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d629fef5d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Removing the default Cranelift codegen backend from .cargo/config.toml left this branch with no replacement for the accelerated debug build, and docs/developers-guide.md, docs/users-guide.md, and docs/repository-layout.md still described the old default. Bring in tools/dev-fast/config.toml, the Makefile's dev-build/dev-test targets, and AGENTS.md's matching section, copied byte-identical from the separate Wave 1 branch (parabellum-wave-1) so the two merge cleanly whichever lands first. Rewrite the affected prose: development builds now say they use the standard LLVM backend by default, with the Cranelift-plus-mold path described as the opt-in make dev-build/dev-test route that never touches release, coverage, or verification builds. The mold-linker sentences about .cargo/config.toml, which remain true, are kept. repository-layout.md drops the stale "code-generation settings" claim from the .cargo/config.toml bullet and documents the new tools/dev-fast/config.toml file and its tree entry. Add a typos.local.toml exception so "mold" is not corrected to "mould": it is the linker's name (https://github.com/rui314/mold), not a misspelling, and the new prose above uses it repeatedly. Regenerate typos.toml to pick up the exception. This does not touch the pre-existing, unrelated "color" spelling failure in docs/documentation-style-guide.md, which stays out of scope.
The phase 2 baseline landed a full set of clippy, rust, and rustdoc lint denies in Cargo.toml with no accompanying explanation of the maintainer convention behind them. Add a "Lint baseline" section to docs/developers-guide.md summarizing where the tables live (crate level, since this is a single crate with no workspace), what they enforce, and the #[expect(clippy::<lint>, reason = "...")] convention for genuine deferrals: never allow, so a fixed site's unfulfilled expectation warns instead of the deferral rotting silently. Cargo.toml stays the authoritative source; this section points at it rather than duplicating the lint list. Also cover clippy.toml's thresholds and its disallowed_methods environment-injection mandate, and the toolchain components the baseline depends on.
A review finding raised on a sibling repository's equivalent pull request applies here too: the tooling docs described the opt-in dev-fast path without naming which pinned toolchain components back it, and without stating explicitly that the pinned toolchain still carries the Cranelift and LLVM-coverage components even though the default activation was removed. In docs/developers-guide.md's Tooling section, name llvm-tools-preview and rustc-codegen-cranelift-preview as retained pinned components, and state that tools/dev-fast/config.toml is what actually controls the repository-local opt-in activation, not the toolchain pin by itself. In docs/users-guide.md's Generated Tooling section, say explicitly that only the default automatic Cranelift activation was removed from .cargo/config.toml: the Cranelift component remains pinned in rust-toolchain.toml and stays installed, so the capability is still available, just no longer applied automatically.
A sponsor ruling on a sibling repository's pull request, which supersedes earlier per-repository guidance where it conflicts, establishes that the users' guide must never mention Cranelift or mold: linker internals and the opt-in accelerated build path are developer concerns, and their only home is the developers' guide. Drop the Generated Tooling paragraphs describing the default LLVM backend, the component-retention note, the mold-linked debug builds, and the opt-in Cranelift-plus-mold path; replace them with a pointer to the developers' guide. Strip the Cranelift/mold explanation from the make dev-build/dev-test Makefile-targets entries, leaving bare descriptions that point at the developers' guide instead. Drop mold from the required-tooling install line; it stays required only in the developers' guide, which already lists it. Nothing here needed porting to docs/developers-guide.md: its Tooling section and Lint baseline section already cover the default LLVM backend, the mold linker, the retained llvm-tools-preview and rustc-codegen-cranelift-preview components, and the dev-build/dev-test mechanics in full. The typos.local.toml exception for "mold" stays, since the developers' guide still uses the word.
The header comment still read "Copy this file to the repository root as `.rustfmt.toml`" — a canon-template instruction left over from copying the file, which reads as nonsense once it is sitting at that very path. The canon source has been corrected to describe the file in place instead of instructing a copy that has already happened. Replace the header with the corrected wording, keeping every key unchanged; the file remains byte-identical to canon.
Sponsor decision, 2026-08-13: the dev-fast profile (Cranelift plus mold, tools/dev-fast/config.toml) is the standard local development path, not a side path opted into via separate dev-build/dev-test targets. Every cargo invocation the build, test, lint, and typecheck targets make now passes --config "$(DEV_FAST_CONFIG)", so a plain make build/test/lint/typecheck already gets the fast profile. release, coverage, and audit stay on the supported LLVM backend and platform linker, since accelerated debug output must never leak into those surfaces. build's own rule has no recipe of its own; it depends on the target/%/$(TARGET) pattern rule shared with release, so the --config flag there is conditional on the target not being the release path ($(if $(findstring release,$(@)),,--config ...)). Declare DEV_FAST_CONFIG near the top of the file, in addition to its existing definition in the appended Wave 1 block, so the standard targets (which sit above that block) can see it regardless of file order; the Wave 1 block itself is untouched, keeping that hunk identical to the parabellum-wave-1 branch so both pull requests merge cleanly in either order. Append a new "dev-fast is the standard development path" section to AGENTS.md (the existing "Fast development builds" section from Wave 1 is left alone for the same merge-cleanliness reason) telling an agent or human that direct cargo invocations for development builds, tests, lints, or typechecks must pass the same --config flag, since mixing direct-cargo and make invocations without it thrashes the incremental build cache. No changes were needed to rust-toolchain.toml (it already pins rustc-codegen-cranelift-preview) or to the CI workflows: ci.yml and act-validation.yml already reach build/test/lint through make targets (so they inherit the new --config wiring automatically), and ci.yml and coverage-main.yml already provision the mold linker on Linux runners, since .cargo/config.toml already sets mold as the default linker for this repository.
An over-eager future edit to the Makefile could silently drop the --config wiring added in the previous commit, and the estate-wide audit (concordat's forthcoming DF-004 rule) would not catch that until it next ran centrally. Add tests/makefile_contract.rs so the repository's own test suite fails first, locally. The test reads Makefile textually (no Makefile parser dependency) and asserts: each of the build, test, lint, and typecheck targets' recipe text references --config and the dev-fast fragment; build resolves to the target/%/$(TARGET) pattern rule that actually runs cargo, since build's own rule has no recipe of its own; coverage's recipe does not reference the fragment; and tools/dev-fast/config.toml exists. Read file access goes through cap_std::fs_utf8::Dir opened on CARGO_MANIFEST_DIR with camino::Utf8Path, per this repository's capability-filesystem convention (also enforced here by Whitaker's no_std_fs_operations lint) rather than std::fs. Helper functions return Result and let the #[test]/#[rstest] functions call .expect(), since allow-expect-in-tests only covers functions literally marked #[test], not helpers they call. Add rstest, cap-std (fs_utf8 feature), and camino as dev-dependencies.
make spelling has failed since before this branch existed: documentation-style-guide.md deliberately quotes `color` inside backticks as the US-spelling example the style guide itself tells contributors to keep verbatim, and the typos checker read it as prose needing correction to "colour". Inline code spans quote identifiers literally; they are not en-GB prose and should never be corrected, which is the estate's existing precedent (netsuke's typos.local.toml carries the same exemption). Add the backtick-span pattern to typos.local.toml's [patterns] ignore list and regenerate typos.toml through the repository's own generator, so the committed and regenerated configs agree. The existing "mold" word-correction exemption from an earlier commit is untouched and still resolves. make spelling now passes end-to-end for the first time on this branch.
|
@coderabbitai re:
Developer focused behaviour does not belong in the user's guide. |
|
Tip For best results, initiate chat on the files or code changes.
Update (ᵕ—ᴗ—) 🧠 Learnings usedYou are interacting with an AI system. |
The comment above whitaker-installer --cranelift claimed "this project builds with the Cranelift debug backend" without saying how, which read as though .cargo/config.toml still supplied it by default. It no longer does: an earlier commit on this branch removed that default, and Cranelift now only applies through the opt-in tools/dev-fast/config.toml fragment that the build/test/lint/typecheck Makefile targets pass explicitly with --config. This Lint step's own Whitaker invocation does not pass --config, so it lints under the default LLVM backend regardless of what --cranelift provisions. The --cranelift half of the comment is still accurate as written: Whitaker's dylint driver runs on its own pinned toolchain, separate from this project's rust-toolchain.toml pin, so the flag provisions rustc-codegen-cranelift there independently. Expand the comment to say so explicitly, and to spell out that this repository's Whitaker step does not currently rely on that provisioning, since it never requests the fragment. Verified there is no wiring bug to fix alongside the comment: `grep -n "WHITAKER" Makefile` confirms the lint target's Whitaker recipe line carries no --config flag, and the current PR head's CI run (leynos/evert build-test job) shows the Lint step compiling and finishing cleanly under Whitaker's own toolchain, so the two codegen backends are not being mixed on a clean runner.
The fragment still carried two stale comments: a "Copy this fragment to tools/dev-fast/config.toml" instruction that reads as nonsense sitting at that very path (the same class of staleness .rustfmt.toml carried before an earlier commit on this branch fixed it), and a mis-statement of Cargo's rustflags semantics claiming Cargo picks a single rustflags source rather than merging them. Canon has since been corrected: Cargo actually joins the rustflags of every matching [target.*] entry (target-triple and cfg tables alike), and the joined target rustflags take precedence over [build].rustflags rather than merging with it. Replace the file with canon's current bytes verbatim. Every key is unchanged; diffed against platform-standards/canon/build/rust/dev-fast.toml to confirm byte-identity. The Wave 1 branch gets the same bytes mechanically, so this stays merge-compatible regardless of landing order.
The blanket `mold = "mold"` word-correction under typos.local.toml's [words.corrections] disabled genuine "mold"-for-"mould" misspelling detection across the entire repository, not just the linker references it was meant to exempt. Replace it with pattern-scoped exemptions in [patterns] ignore: the five phrasings that actually name the linker (-fuse-ld=mold, "mold linker", "Cranelift + mold", "Cranelift and mold", and backtick-quoted `mold`), alongside the existing inline-code-span exemption, which already covers most of these but not AGENTS.md's unquoted "the mold linker" prose. Regenerated typos.toml through the repository's own generator so the committed and regenerated configs agree. Validated both directions: make spelling still passes end-to-end, and a scratch file containing "the bread had mold growing on it" (created outside the repository, never committed) is correctly flagged by typos under the regenerated config, confirming the exemption no longer swallows real "mould" misspellings.
Two comments in release.yml still described .cargo/config.toml as setting a Cranelift codegen backend and claimed rust-toolchain.toml "specifies nightly with Cranelift for development", both stale since an earlier commit on this branch removed the unconditional Cranelift default from .cargo/config.toml. Cranelift now lives solely in the opt-in tools/dev-fast/config.toml fragment, which release builds never read, so there is nothing here that needs isolating from it. Reword the "Install cross" step's env comment to say .cargo/config.toml contains the Linux mold linker configuration only. Reword the "Build release binary" step's comments similarly: drop the Cranelift claim about rust-toolchain.toml's nightly pin, and state plainly that this build's RUSTFLAGS clearing only needs to avoid mold's rustflags, since Cranelift was never in scope for it. Comment-only: confirmed with a diff restricted to added/removed lines that every changed line is a comment; no run: or env: values changed.
The appended dev-build/dev-test targets hard-coded cargo, even though the Makefile already exposes an injectable CARGO variable (CARGO ?= cargo) that every other target uses. Replace cargo with $(CARGO) in both recipes so overriding CARGO on the command line reaches these targets too, matching statelet's landed shape for the same cross-application finding. Nothing else in the block changes.
standard_targets_use_dev_fast checked whether the whole recipe block contained "--config", which passes even when only one of several cargo lines in a multi-line recipe (test's nextest run plus doc-tests, lint's cargo doc plus cargo clippy) carries the flag, per mutation testing on mpsc-log's equivalent test. Filter each resolved block down to its $(CARGO)-invoking lines and assert --config plus the dev-fast reference on every one individually, so a partial regression on any single line fails with a message that includes the offending line. Add substitution coverage for the dev-build/dev-test targets: run `make --dry-run <target> CARGO=probe-cargo` via std::process::Command and assert the emitted recipe contains the substituted binary name before --config, which comes before the dev-fast fragment reference. This proves CARGO actually reaches those targets without needing a nightly toolchain or mold installed, catching the previous commit's hard-coded-cargo bug the moment it might recur. Verified by hand, then reverted: stripping --config from test's doc-test line (leaving its nextest line untouched) failed standard_targets_use_dev_fast::case_2 by name; hard-coding cargo back into dev-build failed dev_fast_targets_honour_cargo_override::case_1 while case_2 (dev-test) stayed green. Both mutations were restored before this commit. make_dry_run returns Result rather than panicking internally, since Whitaker's no_unwrap_or_else_panic lint (like no_std_fs_operations for file access) only tolerates .expect() in functions actually marked #[test]/#[rstest], not in helpers they call.
Summary
Brings
evertinto line with Waves 2 and 3 of Operation Parabellum, theestate's phase 2 Rust baseline remediation.
evertis a greenfieldskeleton, so the change is entirely configuration: the canonical
rustfmt and Clippy configuration, the full canonical lint set in
Cargo.toml, a toolchain component list that now includesrust-analyzeralongside the repository's existing components, andthe replacement of the unconditional Cranelift dev-profile override
with the estate's opt-in dev-fast build. One genuine lint violation
surfaced once the canonical lints were applied and was fixed rather
than deferred. This branch is self-contained: it carries its own copy
of the opt-in dev-fast configuration rather than depending on the
separate Wave 1 pull request landing first. All Cranelift/
moldbuild-tooling detail now lives exclusively in the developers' guide;
the users' guide only points there, per a later sponsor ruling on the
correct audience boundary between the two documents. A further sponsor
decision makes dev-fast the standard local development path rather
than an opt-in side path:
make build,make test,make lint, andmake typechecknow pass--config tools/dev-fast/config.tomltoevery cargo invocation they make, guarded by a new contract test.
Review walkthrough
the
[lints.clippy],[lints.rust], and[lints.rustdoc]tables nowcarry every entry from the canonical lint sets (adding
disallowed_methods,missing_assert_message,unknown_lints,renamed_and_removed_lints,unsafe_code, and the five missingrustdoc lints).
everthas no[workspace]table, so the tablesstay at crate level per the brief's placement rule.
replaced verbatim with the canonical rustfmt configuration (it was
already byte-identical, so this was a no-op copy at the time). A
later commit re-synced the header comment after canon itself was
corrected; see Notes.
replaced with the canonical configuration, which adds the
disallowed-methodsenvironment-injection mandate the repositorydid not previously enforce.
kept the existing
nightly-2026-05-28pin and addedrust-analyzerto the component list. The TC-002 baseline rule requires the list to
include
rustfmt,clippy, andrust-analyzer, not matchexactly, so the repository's existing
llvm-tools-previewandrustc-codegen-cranelift-previewcomponents stay in place — anearlier version of this branch dropped them in error; that was
corrected before this pull request left draft (see Notes).
removed the
[unstable] codegen-backend = trueand[profile.dev] codegen-backend = "cranelift"stanzas, which hadapplied the Cranelift backend to every dev-profile build
unconditionally.
new. The estate's opt-in dev-fast fragment (Cranelift plus
mold),copied byte-identical from the separate Wave 1 pull request so the
two merge cleanly whichever lands first. A later commit refreshed
its two comments (a stale "copy this fragment" instruction, and a
corrected description of Cargo's rustflags-merging semantics) to
match an updated canon source, still byte-identical. See Notes.
gains the
dev-build/dev-testtargets that applytools/dev-fast/config.tomlexplicitly viacargo --config, alsocopied byte-identical from Wave 1.
gains the matching "Fast development builds" section, likewise
copied byte-identical from Wave 1.
corrected to say development builds use the standard LLVM backend by
default, with Cranelift-plus-
molddescribed as the opt-inmake dev-build/make dev-testpath (nightly toolchain required;never applied to release, coverage, or verification builds). The
mold-linker sentences about.cargo/config.toml, which remaintrue, are kept as-is. This is now the only place in the documentation
set that discusses Cranelift or
mold; see Notes.the users' guide no longer mentions Cranelift,
mold, dev-fast, orcodegen backends at all; every such sentence was replaced with a
pointer to the developers' guide. Its Makefile-targets list keeps
bare
make dev-build/make dev-testentries with no mechanismexplanation, likewise pointing at the developers' guide. See
Notes.
drops the stale "code-generation settings" claim from the
.cargo/config.tomlbullet, and documents the newtools/dev-fast/config.tomlfile in both the tree diagram and thepath-responsibilities list.
and
typos.toml —
add exemptions so
mold(the linker's name) is not corrected tomouldin the phrasings the new prose above uses repeatedly, and(separately) exempt inline code spans from the spelling gate
entirely. A later commit replaced an initial blanket
moldword-correction with five pattern-scoped phrase exemptions, since
the blanket form disabled genuine "mould" misspelling detection
everywhere, not just for the linker references it was meant to
cover; see Notes.
typos.tomlis regenerated from theexemptions each time.
the generated stub test read
CARGO_MANIFEST_DIRviastd::env::var_os, which the newly-adopteddisallowed_methodslint denies. Switched to the
option_env!macro, which resolves thesame value at compile time and needs no injected environment reader.
new "Lint baseline" section documenting the previously-undocumented
maintainer convention behind the
Cargo.tomllint tables: they liveunder
[lints.clippy]/[lints.rust]/[lints.rustdoc]at cratelevel (no workspace inheritance),
Cargo.tomlstays authoritativerather than the doc duplicating the list, genuine deferrals use
#[expect(clippy::<lint>, reason = "...")]rather thanallowso afixed site's unfulfilled expectation warns,
clippy.tomlcarries thethresholds and the
disallowed_methodsenvironment-injectionmandate, and the pinned nightly supplies the
rustfmt,clippy, andrust-analyzercomponents the baseline depends on.the
build,test,lint, andtypechecktargets now pass--config "$(DEV_FAST_CONFIG)"to every cargo invocation they make,so plain
make build/test/lint/typecheckalready use thedev-fast profile;
release,coverage, andauditare unaffected.buildresolves through thetarget/%/$(TARGET)pattern rule itdepends on, conditionally excluding
--configfor thereleasecase that rule also serves.
DEV_FAST_CONFIGis declared a secondtime near the top of the file so the standard targets, which sit
above the appended Wave 1 block, can see it. A later commit changed
the Wave 1 block itself, replacing its hard-coded
cargowith$(CARGO)in both recipes so the injectable variable every othertarget already honours reaches these two as well; see Notes for
both this and the earlier byte-identity note.
a new "dev-fast is the standard development path" section, appended
after (not editing) the existing Wave 1 "Fast development builds"
section, tells an agent or human that direct
cargo build/test/clippy/check/doccalls for development work need the same--configflag the Makefile targets now pass, and that mixingdirect-cargo and
makeinvocations without it thrashes theincremental build cache.
reads the
Makefiletextually and asserts thebuild,test,lint, andtypecheckrecipes reference--configand thedev-fast fragment, that
coverage's recipe does not, and thattools/dev-fast/config.tomlexists — so an over-eager future editfails this repository's own suite before the estate-wide audit
(concordat's forthcoming DF-004 rule) would catch it centrally. File
access goes through
cap_std::fs_utf8::Dirandcamino::Utf8Pathrather than
std::fs, per this repository's capability-filesystemconvention (also enforced here by Whitaker's
no_std_fs_operationslint). A later commit hardened the standard-target assertion to check each
$(CARGO)-invoking recipe lineindividually rather than the block as a whole, and added
substitution coverage for
dev-build/dev-testviamake --dry-run <target> CARGO=probe-cargo; see Notes.adds
rstest,cap-std(fs_utf8feature), andcaminoasdev-dependencies for the new contract test.
comment-only fix. The comment above
whitaker-installer --craneliftclaimed this project "builds with the Cranelift debug backend"
without saying how, which read as though
.cargo/config.tomlstillsupplied it by default; it does not, since an earlier commit on this
branch removed that default. Reworded to say Cranelift now only
applies through the opt-in
tools/dev-fast/config.tomlfragmentthat the
build/test/lint/typechecktargets pass explicitly,and that this Lint step's own Whitaker invocation does not pass
--config, so it lints under the default LLVM backend regardless.See Notes for the verification behind this being a comment-only
fix rather than a wiring bug.
comment-only fix, found while verifying the
ci.ymlcomment above.Two comments (near the "Install cross" and "Build release binary"
steps) still described
.cargo/config.tomlas setting a Craneliftcodegen backend and claimed
rust-toolchain.toml"specifies nightlywith Cranelift for development". Reworded to say
.cargo/config.tomlcontains the Linuxmoldlinker configurationonly; Cranelift now lives solely in the opt-in
tools/dev-fast/config.tomlfragment, which release builds neverread. See Notes.
Validation
cargo fmt --allunder the pinned nightly — no changes; the treewas already formatted to the canonical style.
cargo clippy --all-targets --all-features— clean after thetests/stub.rsfix, and re-verified clean after restoring thetoolchain components.
cargo test --workspace(unit, integration, and doc tests) — allpass.
make check-fmt— passes.make lint(cargo doc --no-deps,cargo clippy, Whitaker Dylintsuite) — passes.
make test(cargo nextest run,cargo test --doc) — passes.make audit(cargo audit) — passes, no advisories.make build,make test,make lint,make typecheckrun forreal under the wired Makefile (not just
cargodirectly), forcing arebuild each time (
make -B build) to confirm the actual recipetext executes: all four pass, and
make -ndry-runs confirm--config "tools/dev-fast/config.toml"appears in each one'sexpanded command line while
make -n releaseandmake -n coverageconfirm neither picks it up.
cargo --config "tools/dev-fast/config.toml" build -v --bin evert(forcing arebuild) shows
-Z codegen-backend=craneliftin the actualrustcinvocation, while a plain
cargo build -v --bin evert(also forced)shows zero matches for
codegen-backend=cranelift— the fastbackend only ever applies when the fragment is in play.
tests/makefile_contract.rssanity-checkedby hand: temporarily stripped
--configfrom thetypecheckrecipe, confirmed
cargo test --test makefile_contractfailed witha clear message (
standard_targets_use_dev_fast::case_4, "must pass--config to cargo..."), then restored the Makefile from
git show HEAD:Makefileand re-confirmed all six tests pass again.markdownlint-cli2 '**/*.md'— 0 errors.nixie --no-sandbox— all Mermaid diagrams validated successfully.make spelling— passes. It failed on one pre-existing finding formost of this branch's history; see Notes for how it was cleared.
make dev-buildandmake dev-testrun for real under the pinnedtoolchain (not dry-run): both succeed,
dev-testrunning all 9tests including the contract test's own 8 cases.
cargo test --test makefile_contractalso run directly: 8/8 pass, up from 6 beforethis round's hardening (the two new
dev_fast_targets_honour_cargo_overridesubstitution cases).make lint,make check-fmt,make typecheck,markdownlint-cli2,nixie,make spelling, andmake auditall re-run clean afterboth commits in this round; see Notes.
Notes
Toolchain components corrected before merge: the first version
of this branch narrowed
rust-toolchain.toml's component list toexactly
rustfmt,clippy, andrust-analyzer, dropping therepository's pre-existing
llvm-tools-previewandrustc-codegen-cranelift-preview. TC-002 only requires those threecanonical components to be present, not an exact match, and the
dropped components back this repository's own coverage and dev-fast
tooling. A follow-up commit on this branch restored them; the
component list now reads
clippy,llvm-tools-preview,rust-analyzer,rustc-codegen-cranelift-preview,rustfmt.Self-contained dev-fast build, added after review: removing the
Cranelift dev-profile default from
.cargo/config.tomlwithout areplacement would have left this branch, on its own, with no
accelerated debug build and docs that still described the removed
default. This branch now carries its own copy of
tools/dev-fast/config.toml, theMakefile'sdev-build/dev-testtargets, and
AGENTS.md's matching section — each verifiedbyte-identical to the corresponding file on the separate Wave 1
pull request's branch (
parabellum-wave-1), so the two mergecleanly regardless of landing order and do not conflict.
rustc-codegen-cranelift-preview(the compiler component that makesthe Cranelift backend available) was never removed; only the
.cargo/config.tomlstanza that switched every dev-profile build touse it unconditionally was.
No
#[expect]sites were added. The one lint violation found(
clippy::disallowed_methodsintests/stub.rs) had a direct fix(
option_env!instead ofstd::env::var_os) rather than needing adeferral.
make spellingnow passes end-to-end, a pre-existing failurecleared by a later commit at the sponsor's request:
docs/documentation-style-guide.mddeliberately quotescolorinside backticks as the US-spelling example the style guide itself
instructs contributors to keep verbatim, and the typos checker read
it as prose needing correction to
colour. Inline code spans quoteidentifiers literally and are not en-GB prose, so the fix is the
estate's existing backtick-span exemption (precedented in netsuke's
typos.local.toml) rather than an accepted-word entry forcolorrepo-wide, which would have weakened the check everywhere instead of
only inside code spans. Added
"`[^`\\n]+`"totypos.local.toml's[patterns]ignorelist and regeneratedtypos.tomlthrough the repository's own generator so the committedand regenerated configs agree.
docs/documentation-style-guide.mditself was not touched. Themoldfindings that this branch's new prose introduced, and thepre-existing
moldfindings indocs/developers-guide.mdanddocs/users-guide.md, were resolved at the time by amoldword-correction exemption; a later commit replaced that blanket form
with the scoped exemptions described in Notes below, without
reopening any of these findings.
Component-retention clarified in the developers' guide, added
after a second review pass: its Tooling section now names
llvm-tools-previewandrustc-codegen-cranelift-previewas thepinned toolchain components the dev-fast path depends on, and states
that
tools/dev-fast/config.toml— not the toolchain pin by itself —is what controls the repository-local opt-in activation. This
clarification originally also went into
docs/users-guide.md; theaudience-boundary ruling below removed it from there.
Users' guide/developers' guide audience boundary, established by a
later sponsor ruling that supersedes the component-retention note
above where the two conflict: the users' guide must not mention
Cranelift or
moldat all, because linker internals and the opt-inaccelerated build path are a developer concern, not a user concern.
Every Cranelift/
mold/dev-fast/codegen-backend sentence was removedfrom
docs/users-guide.md(verified with a case-insensitivegrep -ni "cranelift\|mold\|dev-fast\|codegen-backend" docs/users-guide.md, which now matches nothing) and replaced withpointers to the developers' guide. Nothing needed porting:
docs/developers-guide.md's Tooling and Lint baseline sectionsalready covered every fact the users' guide had stated, including
the component-retention clarification above, so the removal is
purely subtractive. The
typos.local.tomlexemptions formoldstay, because the developers' guide still uses the word.
.rustfmt.toml's header comment corrected, added after a furtherreview pass: the file originally carried canon's template
instruction verbatim — "Copy this file to the repository root as
.rustfmt.toml" — which reads as nonsense sitting at that verypath. Canon's own source has since been corrected to describe the
file in place rather than instruct a copy that has already happened;
this branch's header comment now matches it exactly, with every key
unchanged.
.rustfmt.tomlremains byte-identical toplatform-standards/canon/lint/rust/rustfmt.toml.tools/dev-fast/config.tomlwas not touched by this fix and remainsbyte-identical to
parabellum-wave-1.dev-fast is now the standard development path, a further sponsor
decision, 2026-08-13, that supersedes earlier framing of dev-fast as
purely opt-in:
make build,make test,make lint, andmake typecheckroute every cargo invocation through--config tools/dev-fast/config.toml, so a plainmake <target>already gets the fast profile — the separate
make dev-build/make dev-testtargets from Wave 1 still exist and behave the sameas before, they are just no longer the only way to get the fast
profile.
release,coverage, andauditare explicitly excludedand keep the supported LLVM backend and platform linker; a new
contract test (
tests/makefile_contract.rs) guards both theinclusion and the exclusion so a future edit cannot silently drop
either. CI needed no changes:
ci.ymlandact-validation.ymlalready reach
build/test/lintthroughmaketargets (so theyinherit the new wiring automatically, with no direct
cargoinvocation for a development build, test, lint, or typecheck run
anywhere in this repository's own workflow files), and
ci.ymlandcoverage-main.ymlalready install themoldlinker on Linuxrunners — verified by reading both workflows, not assumed, since
.cargo/config.tomlalready makesmoldthe default linker forevery build in this repository, dev-fast or not.
rust-toolchain.tomlalready pinnedrustc-codegen-cranelift-preview(restored in an earlier commit on this branch), so no toolchain
change was needed either. Recommended merge order is
parabellum-wave-1first, thenparabellum-wave-2-3, though theMakefile/AGENTS.md hunks are kept disjoint from the Wave 1 blocks so
either order merges cleanly.
ci.yml's Whitaker/Cranelift comment corrected, verified soundrather than a wiring bug: checked whether this repository has the
skyjoust-class bug where a Makefile's Whitaker recipe line is wired
with
--configeven though Whitaker's dylint driver runs on its ownpinned toolchain, separate from the project's. It does not:
grep -n "WHITAKER" Makefileconfirms thelinttarget's Whitakerline carries no
--configflag (only thecargo doc/cargo clippylines above it do), and the current PR head's CI run
(
leynos/evertbuild-testjob,Lintstep) compiled and finishedcleanly, confirming the combination is sound on a clean runner. The
--cranelifthalf of the original comment was accurate as writtenand is kept, expanded to say explicitly that Whitaker's own toolchain
pin is separate from this project's; only the second half's
implication about where Cranelift comes from was corrected.
release.yml's Cranelift comments corrected too, added afterthey were flagged: while verifying the
ci.ymlcomment, twostale comments were found in
release.ymlas well (around the"Install cross" and "Build release binary" steps), which still
described
.cargo/config.tomlas setting a Cranelift codegenbackend and claimed
rust-toolchain.toml"specifies nightly withCranelift for development". Neither is true any more: Cranelift now
lives solely in the opt-in
tools/dev-fast/config.tomlfragment,which release builds never read, so there is nothing to isolate it
from. Reworded both to say
.cargo/config.tomlcontains the Linuxmoldlinker configuration only. Comment-only: a diff restricted toadded/removed lines confirms every changed line is a comment, no
run:/env:values changed.tools/dev-fast/config.tomlrefreshed from canon: replaced twostale comments verbatim — a "Copy this fragment to
tools/dev-fast/config.toml" instruction that reads as nonsense
sitting at that exact path (the same class of staleness
.rustfmt.tomlhad before an earlier commit on this branch fixedit), and a mis-statement of Cargo's rustflags semantics claiming
Cargo picks a single rustflags source rather than merging them.
Canon now correctly says Cargo joins the rustflags of every matching
[target.*]entry, and the joined target rustflags take precedenceover
[build].rustflagsrather than merging with it. Every key isunchanged;
diffagainstplatform-standards/canon/build/rust/dev-fast.tomlconfirmsbyte-identity.
typos.local.toml's blanketmoldexemption replaced withpattern-scoped ones: the earlier
mold = "mold"entry under[words.corrections]disabled genuine "mold"-for-"mould" detectionrepository-wide, not just for the linker references it was meant to
cover. Replaced with five phrase-scoped entries in
[patterns]ignore, alongside the existing backtick-span entry (final bytes,in
typos.local.toml):Checked every "mold" occurrence in this repository's
.mdfiles(
docs/repository-layout.md,docs/developers-guide.md,AGENTS.md) against the five patterns plus the backtick-spanexemption; all are covered, so no sixth pattern was needed.
Validated both directions after regenerating
typos.toml:make spellingstill passes end-to-end, and a scratch file (createdoutside the repository at
/tmp/scratch-mold-check.md, nevercommitted, deleted immediately after the check) containing "the
bread had mold growing on it" is correctly flagged as
`mold` should be `mould`bytypos --config typos.tomlagainst theregenerated configuration.
Cross-application closing round:
$(CARGO)in the dev-fastblock, an Error-severity finding from a sibling repository's
(statelet's) PR. The appended
dev-build/dev-testrecipeshard-coded
cargoeven though the Makefile already defines aninjectable
CARGO ?= cargothat every other target honours.Replaced
cargowith$(CARGO)in both recipes; nothing else inthe block changed. This changes the Wave 1 block's bytes, which the
parabellum-wave-1branch mirrors — final block bytes (fromDEV_FAST_CONFIGthrough the last recipe line):(Recipe lines are tabs.) Verified with
make --dry-run dev-build CARGO=probe-cargo, which now emitsprobe-cargo --config "tools/dev-fast/config.toml" build.Cross-application closing round: contract test hardened to
per-line assertions, an mpsc-log finding. The prior
standard_targets_use_dev_fastchecked the whole recipe block for a--configsubstring, which is a whole-block match: a target withseveral
$(CARGO)lines (test's nextest-plus-doctest,lint's doc-plus-clippy) would still pass if only one of thoselines carried the flag. Rewrote it to filter each block down to its
$(CARGO)-invoking lines and assert--configplus the dev-fastreference on every line individually. Added the statelet-style
substitution cases too:
dev_fast_targets_honour_cargo_overrideruns
make --dry-run dev-build|dev-test CARGO=probe-cargoviastd::process::Commandand asserts the emitted line containsprobe-cargo, then--config, then a dev-fast reference, in thatorder — proving the fix above actually reaches the recipe, without
needing the pinned nightly or
moldinstalled.Mutation-tested by hand, then restored before committing: stripped
--configfromtest's doc-test line only (leaving its nextestline intact) —
standard_targets_use_dev_fast::case_2failed,naming the
testtarget and quoting the exact offending line;restored via
cpfrom a pre-edit backup, diffed to confirm an exactmatch, re-ran to confirm all 8 tests passed again. Then hard-coded
cargoback intodev-buildonly —dev_fast_targets_honour_cargo_override::case_1failed whilecase_2(dev-test, untouched) stayed green; restored andre-confirmed all 8 pass.
make_dry_runreturnsResultrather thanpanicking internally, since Whitaker's
no_unwrap_or_else_paniclint only tolerates
.expect()in functions literally marked#[test]/#[rstest], matching the same convention the file'sexisting helpers already followed for
no_std_fs_operations.make dev-buildandmake dev-testalso run for real (notdry-run) under the pinned
nightly-2026-05-28toolchain in thisenvironment: both succeed.
Cargo.lockis untracked in this repository; that predates thischange and was left as-is, since it is unrelated to the baseline
being adopted here.
No Concordat rule validation was run, per instruction; that happens
centrally afterwards.