From 17d828ca94cdeb06183cd1d874e6c7bc6bfd5c28 Mon Sep 17 00:00:00 2001 From: UnbreakableMJ Date: Wed, 5 Aug 2026 09:08:35 +0000 Subject: [PATCH 1/3] ci: gate construct-cli with cargo fmt, clippy, test, and an MSRV check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit construct-cli/ is the only real build surface in this repo — everything else is markdown — and it was entirely ungated. The lint job never invokes cargo, which is how a clippy break (items_after_test_module in src/sources/skillmd.rs) sat unnoticed on main until #26 tripped over it. Two new jobs: - `cargo` — fmt --check, clippy --all-targets -D warnings, test. Runs on stable, since pinning the gate to the MSRV would freeze clippy lints and rustfmt output at whatever 1.82 emitted. - `msrv` — cargo check against the `rust-version` declared in Cargo.toml (1.82), kept separate so an MSRV bump is a visible, deliberate change rather than something that rides along with a dependency update. `check` rather than `test`, because dev-dependencies are not bound by the MSRV the crate advertises to consumers. Both use Swatinem/rust-cache. Deliberately not path-filtered: a filtered job reports nothing when skipped, which makes it unusable as a required status check, and the cache makes a markdown-only PR cheap enough that always running is the better trade. cargo audit is deliberately excluded. A newly published advisory would redden main for a reason unrelated to the change under review; it stays a local step before adding a dependency (Standard §3.3). If it belongs in CI later, a scheduled job is the right shape, not a PR gate. construct-cli/AGENTS.md and CLAUDE.md document what is gated and what is not. They remain identical apart from their self-reference line, as that file pair requires. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++ construct-cli/AGENTS.md | 9 ++++++ 2 files changed, 72 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d987ca8..02223dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,66 @@ jobs: run: | find . -name SKILL.md -not -path './.git/*' -print0 \ | xargs -0 python3 .githooks/check-description-length.py + + # construct-cli/ is the one real build surface in this repo — everything else + # is markdown. It went ungated until now, which is how a clippy break + # (items_after_test_module in src/sources/skillmd.rs) sat unnoticed on main: + # the lint job above never invokes cargo. + # + # Deliberately not path-filtered. A filtered job reports nothing at all when + # it is skipped, which makes it unusable as a required status check; the + # cache makes a markdown-only PR cheap enough that always running is the + # better trade. + cargo: + name: construct-cli — fmt + clippy + test + runs-on: ubuntu-latest + defaults: + run: + working-directory: construct-cli + steps: + - uses: actions/checkout@v4 + + # Stable, not the declared MSRV: clippy lints and rustfmt output drift + # between versions, so pinning the gate to 1.82 would freeze both. See + # the msrv job below for the compatibility check. + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: construct-cli + + - name: Format + run: cargo fmt --check + + # -D warnings matches construct-cli/CLAUDE.md; a warning is a failure. + - name: Clippy + run: cargo clippy --all-targets -- -D warnings + + - name: Test + run: cargo test + + # Separate from the gate above so an MSRV bump is a visible, deliberate + # change rather than something that silently rides along with a dependency + # update. Keep the version in step with `rust-version` in Cargo.toml. + msrv: + name: construct-cli — MSRV (1.82) + runs-on: ubuntu-latest + defaults: + run: + working-directory: construct-cli + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@1.82.0 + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: construct-cli + key: msrv + + # `check`, not `test`: dev-dependencies are not bound by the MSRV the + # crate advertises to consumers. + - name: Check against the declared MSRV + run: cargo check --all-features diff --git a/construct-cli/AGENTS.md b/construct-cli/AGENTS.md index 74464aa..7ff10de 100644 --- a/construct-cli/AGENTS.md +++ b/construct-cli/AGENTS.md @@ -17,6 +17,15 @@ cargo audit nix build .#construct && ./result/bin/construct --version ``` +`cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and +`cargo test` are gated in CI by the **`cargo`** job in +`.github/workflows/ci.yml`, and a separate **`msrv`** job runs `cargo check` +against the `rust-version` declared in `Cargo.toml` (1.82). The gate runs on +stable, so a clippy or rustfmt change can turn a green PR red — fix the finding +rather than pinning the toolchain. `cargo audit` is **not** in CI: a new +advisory would redden `main` for a reason unrelated to the change under review, +so run it locally before adding a dependency (Standard §3.3). + ## Architecture - `main.rs` is thin: parse → build `Context` → `commands::dispatch` → render. From c1640a1a228ab0861e20251231d78de0b1124953 Mon Sep 17 00:00:00 2001 From: UnbreakableMJ Date: Wed, 5 Aug 2026 09:11:33 +0000 Subject: [PATCH 2/3] fix(cli): correct the declared MSRV to 1.85, the real floor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new msrv job did its job on its first run: `cargo check` under 1.82 failed before compiling a single line of our code. The locked dependency tree pins indexmap 2.14.0, whose manifest requires the `edition2024` Cargo feature — stabilized in 1.85 — so 1.82 could not even parse the tree. `rust-version = "1.82"` was therefore a fiction, and had been for as long as that dependency had been locked. Nothing caught it because nothing ever built the crate on the version it claimed to support. Corrected to 1.85 and the job pinned to match, with the reasoning recorded in Cargo.toml so the next person raising it knows to re-measure rather than guess. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 4 ++-- construct-cli/AGENTS.md | 2 +- construct-cli/Cargo.toml | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02223dc..7e30175 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: # change rather than something that silently rides along with a dependency # update. Keep the version in step with `rust-version` in Cargo.toml. msrv: - name: construct-cli — MSRV (1.82) + name: construct-cli — MSRV (1.85) runs-on: ubuntu-latest defaults: run: @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.82.0 + - uses: dtolnay/rust-toolchain@1.85.0 - uses: Swatinem/rust-cache@v2 with: diff --git a/construct-cli/AGENTS.md b/construct-cli/AGENTS.md index 7ff10de..4444a34 100644 --- a/construct-cli/AGENTS.md +++ b/construct-cli/AGENTS.md @@ -20,7 +20,7 @@ nix build .#construct && ./result/bin/construct --version `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` are gated in CI by the **`cargo`** job in `.github/workflows/ci.yml`, and a separate **`msrv`** job runs `cargo check` -against the `rust-version` declared in `Cargo.toml` (1.82). The gate runs on +against the `rust-version` declared in `Cargo.toml` (1.85). The gate runs on stable, so a clippy or rustfmt change can turn a green PR red — fix the finding rather than pinning the toolchain. `cargo audit` is **not** in CI: a new advisory would redden `main` for a reason unrelated to the change under review, diff --git a/construct-cli/Cargo.toml b/construct-cli/Cargo.toml index ffd11e8..47efc00 100644 --- a/construct-cli/Cargo.toml +++ b/construct-cli/Cargo.toml @@ -4,7 +4,11 @@ name = "construct" version = "0.1.0" edition = "2021" -rust-version = "1.82" +# The real floor, measured by CI's `msrv` job rather than asserted. The locked +# dependency tree pins indexmap 2.14.0, whose manifest requires `edition2024` +# — a Cargo feature stabilized in 1.85 — so 1.82 could not even parse the +# tree, let alone build it. Raise this only alongside a green `msrv` run. +rust-version = "1.85" description = "Spacecraft Software Construct skills package manager (CLI + TUI)" homepage = "https://Construct.SpacecraftSoftware.org/" repository = "https://github.com/Spacecraft-Software/Construct" From e5aadd8d2b704af9ed5c5de966218c1b458420f9 Mon Sep 17 00:00:00 2001 From: UnbreakableMJ Date: Wed, 5 Aug 2026 09:12:56 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix(cli):=20MSRV=20is=201.88=20=E2=80=94=20?= =?UTF-8?q?cargo=20named=20the=20packages=20that=20set=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At 1.85 the resolver got far enough to report the real constraint instead of failing to parse: darling 0.23.0 and instability 0.3.12 — both transitive, via ratatui — require 1.88.0. So the floor is set by the locked dependency tree, not by this crate's own source, and 1.85 was only the first of two hurdles (indexmap's `edition2024` requirement). Recorded both in Cargo.toml so the next reader knows the number tracks dependencies and must be re-measured, not reasoned about. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 6 +++--- construct-cli/AGENTS.md | 2 +- construct-cli/Cargo.toml | 14 +++++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e30175..c4590e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: - uses: actions/checkout@v4 # Stable, not the declared MSRV: clippy lints and rustfmt output drift - # between versions, so pinning the gate to 1.82 would freeze both. See + # between versions, so pinning the gate to the MSRV would freeze both. See # the msrv job below for the compatibility check. - uses: dtolnay/rust-toolchain@stable with: @@ -83,7 +83,7 @@ jobs: # change rather than something that silently rides along with a dependency # update. Keep the version in step with `rust-version` in Cargo.toml. msrv: - name: construct-cli — MSRV (1.85) + name: construct-cli — MSRV (1.88) runs-on: ubuntu-latest defaults: run: @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.85.0 + - uses: dtolnay/rust-toolchain@1.88.0 - uses: Swatinem/rust-cache@v2 with: diff --git a/construct-cli/AGENTS.md b/construct-cli/AGENTS.md index 4444a34..112e2ed 100644 --- a/construct-cli/AGENTS.md +++ b/construct-cli/AGENTS.md @@ -20,7 +20,7 @@ nix build .#construct && ./result/bin/construct --version `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` are gated in CI by the **`cargo`** job in `.github/workflows/ci.yml`, and a separate **`msrv`** job runs `cargo check` -against the `rust-version` declared in `Cargo.toml` (1.85). The gate runs on +against the `rust-version` declared in `Cargo.toml` (1.88). The gate runs on stable, so a clippy or rustfmt change can turn a green PR red — fix the finding rather than pinning the toolchain. `cargo audit` is **not** in CI: a new advisory would redden `main` for a reason unrelated to the change under review, diff --git a/construct-cli/Cargo.toml b/construct-cli/Cargo.toml index 47efc00..c4aa1ff 100644 --- a/construct-cli/Cargo.toml +++ b/construct-cli/Cargo.toml @@ -4,11 +4,15 @@ name = "construct" version = "0.1.0" edition = "2021" -# The real floor, measured by CI's `msrv` job rather than asserted. The locked -# dependency tree pins indexmap 2.14.0, whose manifest requires `edition2024` -# — a Cargo feature stabilized in 1.85 — so 1.82 could not even parse the -# tree, let alone build it. Raise this only alongside a green `msrv` run. -rust-version = "1.85" +# The real floor, measured by CI's `msrv` job rather than asserted. It is set +# by the locked dependency tree, not by this crate's own source: darling 0.23 +# and instability 0.3.12 (transitive, via ratatui) both require 1.88, and +# indexmap 2.14 needs the `edition2024` Cargo feature from 1.85. The value that +# stood here before (1.82) could not even parse the tree. +# +# Raise or lower this only alongside a green `msrv` run — cargo's resolver +# reports the exact offending packages, so re-measure rather than guess. +rust-version = "1.88" description = "Spacecraft Software Construct skills package manager (CLI + TUI)" homepage = "https://Construct.SpacecraftSoftware.org/" repository = "https://github.com/Spacecraft-Software/Construct"