Repository navigation
Conversation
Christian set `cargo xtask` as the one build entrypoint for all estate repos on 2026-10-13. Spec 0002 now states the xtask gates as EARS clauses: tools, toolchain-check, fmt, fmt-check, clippy, test, doc-test, deny, typos, machete, ci and install, and the CI job xtask-ci. Spec 0004 records the four gate tools and their pins. The make and just targets stay. Nothing is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RqcQN6pUxehj669b4mRg
Tests for spec 0002, XT-1 to XT-8, named for the clauses they prove: command names and parsing (XT-1), the one pinned tool table (XT-2), version matching, the install command and PATH order (XT-3), the job count and each gate's command line (XT-6), ci's step order, its stop at the first failure and its summary lines (XT-7), and install's release build (XT-8). main.rs dispatches the gate names. The bodies are stubs, so the tests run red first: 12 of 15 fail on rustc 1.94.1. The three that pass are the tool table (data) and two that a stub returning None satisfies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RqcQN6pUxehj669b4mRg
cargo sets CARGO_PKG_NAME and the other package variables for the xtask binary. A child inherits them, and cargo-machete reads CARGO_PKG_NAME to tell whether cargo started it. With the variable set, `cargo machete --version` treats `machete` and `--version` as paths and fails. XT-6 now says the gates run without them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RqcQN6pUxehj669b4mRg
The gates of spec 0002, XT-1 to XT-8, beside spec-check, toolchain-check, pin-check and fetch-contracts, which keep their names and behaviour. - tools: one table pins cargo-deny 0.19.9, typos-cli 1.49.0, cargo-machete 0.9.1 and cargo-nextest 0.9.104. A tool that is missing or at another version is built with `cargo install --locked --version X --root .tools --force` under Rust 1.94.1, and asked again; a copy ahead of .tools/bin fails the step. - Each gate runs from the root with .tools/bin first on PATH, -j JOBS (default 2), and without the package variables cargo sets for xtask itself (cargo-machete misreads its arguments when CARGO_PKG_NAME is set). - test runs nextest when it is there, else cargo test. nextest reads NEXTEST_PROFILE itself. - ci runs tools, toolchain-check, fmt-check, clippy, test, doc-test, deny, typos and machete in that order, stops at the first failure, prints one summary line per step and exits non-zero on a failure. - install runs ci, then `cargo build --release --locked --workspace --exclude xtask --bins`. Green: the 16 gate tests pass on rustc 1.94.1 (12 of 15 were red against the stubs; the env test was red before its fix). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RqcQN6pUxehj669b4mRg
One new job on ubuntu-latest, the runner the existing Rust jobs use (spec 0002, XT-9). rustup installs the rust-toolchain.toml pin, rust-cache also keeps .tools/ so the pinned tools are built once, and NEXTEST_PROFILE=ci picks the ci profile. The new actions are pinned by SHA. The existing jobs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RqcQN6pUxehj669b4mRg
README names the two commands and what they need (cargo and rustup), and CHANGELOG records the new gates under Unreleased. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RqcQN6pUxehj669b4mRg
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.
What
On 2026-10-13 Christian set
cargo xtaskas the one build entrypoint for every estate repo, with nothing behind it but cargo and rustup. This PR adds that entrypoint to kd beside the existing tooling. Nothing is removed or renamed: the Makefile, the Justfile, lefthook,spec-check,toolchain-check,pin-check,fetch-contractsand every existing CI job are unchanged.xtask/src/gates.rsaddstools,fmt,fmt-check,clippy,test,doc-test,deny,typos,machete,ciandinstall.toolchain-checkis the existing one.cirunstools,toolchain-check,fmt-check,clippy,test,doc-test,deny,typosandmachete, in that order. It stops at the first failure, prints one summary line per step, and exits non-zero when a step fails.installrunsci, thencargo build --release --locked --workspace --exclude xtask --bins.toolsinstalls cargo-deny 0.19.9, typos-cli 1.49.0, cargo-machete 0.9.1 and cargo-nextest 0.9.104 from one const table. It usescargo install --locked --version X --root .tools --force, and only for a tool that is missing or at another version.xtask-ci, runscargo xtask cion ubuntu-latest, the runner the existing Rust jobs use. It uses SHA-pinned checkout and rust-cache, with.toolscached.Evidence
Unit tests, red then green. 16 tests carry their clause in their names.
cargo xtask ciran on headd8d89a9in a Linuxrust:1.94.1container. kd's pidfd and prctl code only compiles on Linux. All 9 steps passed:Other checks:
cargo xtask spec-checkandcargo xtask pin-checkpass.actionlintis clean.cargo xtask installwas not run. Its release-build command line is unit-tested (XT-8), and it starts with the sameci.Decisions
rustup run --install 1.94.1 cargo install ...). That is the pin here, and the ci-rust image's Rust. typos-cli 1.49.0 needs rustc 1.91..tools/, which is already gitignored, and.tools/bingoes first on PATH for every gate.CARGO_PKG_*andCARGO_MANIFEST_*variables that cargo sets for xtask itself. cargo-machete readsCARGO_PKG_NAMEto decide whether cargo started it, and misparses its arguments when it is set (XT-6).-jcomes fromJOBS, default 2 (spec 0002's-jrule).testuses nextest when it is installed, otherwisecargo test. CI setsNEXTEST_PROFILE=ci, asmake cidoes.🤖 Generated with Claude Code
https://claude.ai/code/session_016CEVHJcKc5vyDHPYDF9oVc