From 2c64f7fc8d61f255fbd60ce1a97e447b81ef8367 Mon Sep 17 00:00:00 2001 From: Niessen Date: Mon, 24 Aug 2026 15:39:36 +0200 Subject: [PATCH 1/6] chore(release): prepare the 0.0.1 crate metadata --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ Cargo.toml | 2 ++ LICENSE | 16 ++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 LICENSE diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f96c76b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +All notable changes to ArchUnitRust are documented in this file. The project follows Semantic +Versioning; the `0.0.x` line deliberately signals that the public API is still experimental. + +## [Unreleased] + +## [0.0.1] - 2026-08-24 + +### Added + +- Deterministic Cargo package and workspace discovery with Rust module-tree and dependency + extraction. +- Fluent architecture rules for files, named layers, captured slices, and external Cargo modules. +- Public graph projections, cycle analysis, six offline report formats, and PlantUML policies. +- Rust-native count, cohesion, coupling, distance, custom-metric, and metrics-report APIs. +- Strict empty-test protection, reusable pattern exclusions, typed violations, deterministic + diagnostics, `assert_passes!`, and opt-in per-check logging. +- Self-hosting architecture tests, a cross-platform CI matrix, a source-checked user guide, and + generated API documentation. + +### Known limitations + +- Analysis is syntax-based and does not expand macros or build-script-generated source. +- Conditional compilation branches are modeled as a conservative union. +- Dependency nodes are source files rather than individual Rust items. + +[Unreleased]: https://github.com/LukasNiessen/ArchUnitRust/compare/v0.0.1...HEAD +[0.0.1]: https://github.com/LukasNiessen/ArchUnitRust/releases/tag/v0.0.1 diff --git a/Cargo.toml b/Cargo.toml index 4693cc4..327692d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,11 +5,13 @@ edition = "2024" rust-version = "1.85" description = "Architecture testing for Rust" repository = "https://github.com/LukasNiessen/ArchUnitRust" +homepage = "https://lukasniessen.github.io/ArchUnitRust/" documentation = "https://lukasniessen.github.io/ArchUnitRust/api/archunit/" license = "MIT" readme = "README.md" keywords = ["architecture", "testing", "dependencies", "static-analysis"] categories = ["development-tools::testing"] +publish = ["crates-io"] exclude = ["docs/assets/og.png"] [lib] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a1abd8a --- /dev/null +++ b/LICENSE @@ -0,0 +1,16 @@ +Copyright 2026 Lukas Niessen https://lukasniessen.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From b48667e9a6c064056d7db8f1c2bd67e38ed47a3e Mon Sep 17 00:00:00 2001 From: Niessen Date: Mon, 24 Aug 2026 15:42:24 +0200 Subject: [PATCH 2/6] ci(release): add trusted publishing workflow --- .github/workflows/release.yml | 104 ++++++++++++++++++ .../registry_consumer/Cargo.toml.template | 8 ++ tests/fixtures/registry_consumer/src/api.rs | 3 + tests/fixtures/registry_consumer/src/lib.rs | 4 + .../registry_consumer/src/persistence.rs | 3 + .../registry_consumer/tests/architecture.rs | 14 +++ 6 files changed, 136 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 tests/fixtures/registry_consumer/Cargo.toml.template create mode 100644 tests/fixtures/registry_consumer/src/api.rs create mode 100644 tests/fixtures/registry_consumer/src/lib.rs create mode 100644 tests/fixtures/registry_consumer/src/persistence.rs create mode 100644 tests/fixtures/registry_consumer/tests/architecture.rs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7ffd9b3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,104 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + description: Version from Cargo.toml, without a leading v + required: true + type: string + +concurrency: + group: crates-io-release + cancel-in-progress: false + +jobs: + publish: + name: Publish archunit ${{ inputs.version }} + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + timeout-minutes: 30 + environment: release + permissions: + contents: read + id-token: write + steps: + - name: Check out the release commit + uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install stable Rust with quality components + run: rustup toolchain install stable --profile minimal --component rustfmt,clippy --no-self-update + + - name: Verify the requested version and release inputs + env: + RELEASE_VERSION: ${{ inputs.version }} + run: | + actual_version=$(cargo +stable metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "archunit") | .version') + if [ "$actual_version" != "$RELEASE_VERSION" ]; then + echo "Requested $RELEASE_VERSION, but Cargo.toml contains $actual_version" >&2 + exit 1 + fi + if git rev-parse --quiet --verify "refs/tags/v$RELEASE_VERSION" >/dev/null; then + echo "Tag v$RELEASE_VERSION already exists" >&2 + exit 1 + fi + grep --fixed-strings "archunit = \"=$RELEASE_VERSION\"" tests/fixtures/registry_consumer/Cargo.toml.template + + - name: Re-run every release quality gate + run: | + cargo +stable fmt --all -- --check + cargo +stable clippy --workspace --all-targets --all-features --locked -- -D warnings + cargo +stable test --workspace --all-features --locked + RUSTDOCFLAGS="-D warnings" cargo +stable doc --workspace --all-features --no-deps --locked + cargo +stable publish --dry-run --locked + + - name: Acquire a short-lived crates.io token + id: auth + uses: rust-lang/crates-io-auth-action@v1 + + - name: Publish the immutable crate archive + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} + run: cargo +stable publish --locked + + verify: + name: Verify registry installation and create the GitHub release + needs: publish + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: write + steps: + - name: Check out the published commit + uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install stable Rust + run: rustup toolchain install stable --profile minimal --no-self-update + + - name: Install the exact registry version in a standalone project + run: | + consumer="$RUNNER_TEMP/archunit-registry-consumer" + mkdir -p "$consumer" + cp tests/fixtures/registry_consumer/Cargo.toml.template "$consumer/Cargo.toml" + cp -R tests/fixtures/registry_consumer/src "$consumer/src" + cp -R tests/fixtures/registry_consumer/tests "$consumer/tests" + for attempt in $(seq 1 18); do + if CARGO_TARGET_DIR="$RUNNER_TEMP/registry-consumer-target" cargo +stable test --manifest-path "$consumer/Cargo.toml"; then + exit 0 + fi + echo "Registry version is not visible yet (attempt $attempt of 18)" >&2 + sleep 10 + done + exit 1 + + - name: Tag the verified commit and create the GitHub release + env: + GH_TOKEN: ${{ github.token }} + RELEASE_VERSION: ${{ inputs.version }} + run: gh release create "v$RELEASE_VERSION" --target "$GITHUB_SHA" --title "archunit v$RELEASE_VERSION" --generate-notes diff --git a/tests/fixtures/registry_consumer/Cargo.toml.template b/tests/fixtures/registry_consumer/Cargo.toml.template new file mode 100644 index 0000000..a9d6120 --- /dev/null +++ b/tests/fixtures/registry_consumer/Cargo.toml.template @@ -0,0 +1,8 @@ +[package] +name = "archunit-registry-consumer" +version = "0.0.0" +edition = "2024" +publish = false + +[dev-dependencies] +archunit = "=0.0.1" diff --git a/tests/fixtures/registry_consumer/src/api.rs b/tests/fixtures/registry_consumer/src/api.rs new file mode 100644 index 0000000..58e22aa --- /dev/null +++ b/tests/fixtures/registry_consumer/src/api.rs @@ -0,0 +1,3 @@ +pub fn health() -> &'static str { + "ok" +} diff --git a/tests/fixtures/registry_consumer/src/lib.rs b/tests/fixtures/registry_consumer/src/lib.rs new file mode 100644 index 0000000..a846618 --- /dev/null +++ b/tests/fixtures/registry_consumer/src/lib.rs @@ -0,0 +1,4 @@ +mod api; +mod persistence; + +pub use api::health; diff --git a/tests/fixtures/registry_consumer/src/persistence.rs b/tests/fixtures/registry_consumer/src/persistence.rs new file mode 100644 index 0000000..fa8e454 --- /dev/null +++ b/tests/fixtures/registry_consumer/src/persistence.rs @@ -0,0 +1,3 @@ +pub fn schema_version() -> u32 { + 1 +} diff --git a/tests/fixtures/registry_consumer/tests/architecture.rs b/tests/fixtures/registry_consumer/tests/architecture.rs new file mode 100644 index 0000000..cee37a1 --- /dev/null +++ b/tests/fixtures/registry_consumer/tests/architecture.rs @@ -0,0 +1,14 @@ +use archunit::{assert_passes, project_files_in}; + +const PROJECT_ROOT: &str = env!("CARGO_MANIFEST_DIR"); + +#[test] +fn api_does_not_depend_on_persistence() { + let rule = project_files_in(PROJECT_ROOT) + .in_path("src/api.rs") + .should_not() + .depend_on_files() + .in_path("src/persistence.rs"); + + assert_passes!(rule); +} From 21e4b3b93e9fa40990b900e2db7b40f8ea145b28 Mon Sep 17 00:00:00 2001 From: Niessen Date: Mon, 24 Aug 2026 15:44:06 +0200 Subject: [PATCH 3/6] test(release): lock the crates.io publication contract --- tests/release_workflow.rs | 90 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 tests/release_workflow.rs diff --git a/tests/release_workflow.rs b/tests/release_workflow.rs new file mode 100644 index 0000000..16cb43c --- /dev/null +++ b/tests/release_workflow.rs @@ -0,0 +1,90 @@ +use std::fs; + +const VERSION: &str = "0.0.1"; + +#[test] +fn manifest_and_archive_metadata_are_ready_for_crates_io() { + let manifest = read("Cargo.toml"); + + assert!(manifest.contains("name = \"archunit\"")); + assert!(manifest.contains(&format!("version = \"{VERSION}\""))); + assert!(manifest.contains("rust-version = \"1.85\"")); + assert!(manifest.contains("license = \"MIT\"")); + assert!(manifest.contains("publish = [\"crates-io\"]")); + assert!(manifest.contains("homepage = \"https://lukasniessen.github.io/ArchUnitRust/\"")); + assert!( + manifest.contains( + "documentation = \"https://lukasniessen.github.io/ArchUnitRust/api/archunit/\"" + ) + ); + + let license = read("LICENSE"); + assert!(license.starts_with("Copyright 2026 Lukas Niessen")); + assert!(license.contains("Permission is hereby granted, free of charge")); + + let changelog = read("CHANGELOG.md"); + assert!(changelog.contains(&format!("## [{VERSION}] - 2026-08-24"))); + assert!(changelog.contains("### Known limitations")); +} + +#[test] +fn trusted_release_requires_main_and_revalidates_the_package() { + let workflow = read(".github/workflows/release.yml"); + + assert!(workflow.starts_with("name: Release\n\non:\n workflow_dispatch:\n")); + assert!(workflow.contains(" cancel-in-progress: false\n")); + assert!(workflow.contains("if: github.ref == 'refs/heads/main'")); + assert!(workflow.contains("environment: release")); + assert!(workflow.contains("contents: read\n id-token: write")); + assert!(workflow.contains("persist-credentials: false")); + assert!(workflow.contains("cargo +stable fmt --all -- --check")); + assert!(workflow.contains( + "cargo +stable clippy --workspace --all-targets --all-features --locked -- -D warnings" + )); + assert!(workflow.contains("cargo +stable test --workspace --all-features --locked")); + assert!(workflow.contains("cargo +stable publish --dry-run --locked")); + assert!(workflow.contains("uses: rust-lang/crates-io-auth-action@v1")); + assert!(workflow.contains("CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}")); + assert!(workflow.contains("cargo +stable publish --locked")); +} + +#[test] +fn release_is_tagged_only_after_the_registry_consumer_passes() { + let workflow = read(".github/workflows/release.yml"); + let publish = position(&workflow, "run: cargo +stable publish --locked"); + let verify = position(&workflow, " verify:\n"); + let consumer = position(&workflow, "cargo +stable test --manifest-path"); + let release = position(&workflow, "run: gh release create"); + + assert!(publish < verify); + assert!(verify < consumer); + assert!(consumer < release); + assert!(workflow.contains("needs: publish")); + assert!(workflow.contains("for attempt in $(seq 1 18)")); + assert!(workflow.contains("contents: write")); +} + +#[test] +fn standalone_fixture_pins_and_exercises_the_exact_registry_version() { + let fixture = read("tests/fixtures/registry_consumer/Cargo.toml.template"); + let architecture = read("tests/fixtures/registry_consumer/tests/architecture.rs"); + + assert!(fixture.contains("publish = false")); + assert!(fixture.contains(&format!("archunit = \"={VERSION}\""))); + assert!(architecture.contains("use archunit::{assert_passes, project_files_in};")); + assert!(architecture.contains(".should_not()")); + assert!(architecture.contains(".depend_on_files()")); + assert!(architecture.contains("assert_passes!(rule);")); +} + +fn read(path: &str) -> String { + fs::read_to_string(path) + .unwrap_or_else(|error| panic!("failed to read {path}: {error}")) + .replace("\r\n", "\n") +} + +fn position(content: &str, needle: &str) -> usize { + content + .find(needle) + .unwrap_or_else(|| panic!("missing expected release workflow fragment: {needle}")) +} From 4d259f9ef191169f5ef0b73501ef1249c4e01c8a Mon Sep 17 00:00:00 2001 From: Niessen Date: Mon, 24 Aug 2026 15:47:03 +0200 Subject: [PATCH 4/6] docs(release): document bootstrap and recovery --- CONTRIBUTING.md | 3 +- RELEASING.md | 53 +++++++++++++++++ ...5-bootstrap-then-use-trusted-publishing.md | 59 +++++++++++++++++++ docs/adr/README.md | 1 + 4 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 RELEASING.md create mode 100644 docs/adr/0025-bootstrap-then-use-trusted-publishing.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4ede3d..2125896 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ ArchUnitRust follows the same issue-driven product plan as the other ArchUnitEve an intentionally sequential delivery workflow while the initial public surface is being formed. Read [AGENTS.md](AGENTS.md), the [porting plan](docs/PORTING_PLAN.md), and the relevant issue before -changing code. +changing code. Release maintainers must also follow [RELEASING.md](RELEASING.md). ## Workflow @@ -39,6 +39,7 @@ cargo clippy --workspace --all-targets --all-features -- -D warnings cargo test --workspace --all-features cargo test --doc cargo doc --workspace --all-features --no-deps +cargo package --locked ``` Tests must be deterministic and independent of execution order. Public failures should assert the diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..393ca91 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,53 @@ +# Releasing ArchUnitRust + +Crates.io versions are immutable. A release is complete only when the registry archive can be +installed by a separate project, the matching Git tag and GitHub release exist, and the public +installation instructions name that published version. + +## One-time bootstrap for 0.0.1 + +Crates.io requires a crate's first version to be published manually before a trusted GitHub +publisher can be configured. From a clean, current `main` whose CI is green: + +1. Sign in to crates.io, verify the account email address, and create a short-lived API token that + is permitted to publish a new crate. Never put the token in Git, an issue, a workflow log, or a + chat message. +2. Store it with `cargo login`, run `cargo publish --dry-run --locked`, inspect the reported archive + contents, then run `cargo publish --locked` exactly once. +3. Copy `tests/fixtures/registry_consumer/` to a temporary directory, rename + `Cargo.toml.template` to `Cargo.toml`, and run `cargo test --manifest-path /Cargo.toml`. + Retry briefly if the crates.io index has not propagated yet. This fixture must resolve + `archunit = "=0.0.1"`; do not add a path or Git override. +4. Only after that test passes, create the matching release boundary: + + ```console + gh release create v0.0.1 --target main --title "archunit v0.0.1" --generate-notes + ``` + +5. Remove the local token with `cargo logout` if it is not needed for another crate. +6. In the crate's crates.io Trusted Publishing settings, add the GitHub repository owner + `LukasNiessen`, repository `ArchUnitRust`, workflow `release.yml`, and environment `release`. + +Do not invoke `.github/workflows/release.yml` for 0.0.1: the trusted publisher cannot exist until +that first version has reserved the crate name. + +## Later releases + +Prepare each version in its own reviewed branch and PR: + +1. Update `package.version` in `Cargo.toml` and refresh `Cargo.lock`. +2. Move the relevant changelog entries under a dated version heading and update comparison links. +3. Update the exact `archunit` version in + `tests/fixtures/registry_consumer/Cargo.toml.template` and the constant in + `tests/release_workflow.rs`. +4. Run the complete local gate set and merge only after CI is green. +5. From `main`, manually dispatch the Release workflow with the version number and no leading `v`. + +The publish job rechecks the version, tag absence, formatting, Clippy, all tests, rustdoc, and the +crate archive before obtaining a short-lived crates.io token through OpenID Connect. The verify job +then installs the exact registry version in the standalone fixture. Only after that succeeds does it +create the Git tag and GitHub release. + +If registry propagation delays the fixture, rerun only the failed verify job. The successful publish +job must not be rerun for an immutable version. If publication itself fails before crates.io accepts +the archive, correct the cause in a new PR; never reuse a version that the registry accepted. diff --git a/docs/adr/0025-bootstrap-then-use-trusted-publishing.md b/docs/adr/0025-bootstrap-then-use-trusted-publishing.md new file mode 100644 index 0000000..1af729f --- /dev/null +++ b/docs/adr/0025-bootstrap-then-use-trusted-publishing.md @@ -0,0 +1,59 @@ +# ADR 0025: Bootstrap once, then publish with short-lived credentials + +**Status:** accepted + +## Context + +Publishing a crates.io version is irreversible: its archive cannot be overwritten or deleted. A +long-lived repository secret would make later automation possible, but it would also remain useful +to an attacker until rotated or expired. Crates.io Trusted Publishing exchanges GitHub's OpenID +Connect identity for a short-lived token, but the trusted publisher can only be configured by an +owner after the crate's first version exists. + +A release also has two different success boundaries. Uploading the archive proves registry +acceptance; it does not prove that a clean consumer can resolve, compile, and exercise the exact +version. Combining upload and propagation-sensitive verification in one job makes recovery unsafe: +rerunning a failed job would attempt to publish the same immutable version again. + +## Decision + +Publish 0.0.1 manually from a clean, green `main` with a locally entered, short-lived crates.io token. +The token is never committed or transmitted through GitHub. Verify the accepted version through a +standalone fixture whose development dependency pins `archunit = "=0.0.1"`. Create the Git tag and +GitHub release only after that registry-backed test passes, then remove the local token. + +After the crate exists, configure crates.io to trust `.github/workflows/release.yml` in the GitHub +`release` environment. Later releases use manual workflow dispatch from `main`. The workflow denies +version drift and existing tags, repeats all quality gates, obtains an ephemeral token through the +Rust project's authentication action, and publishes with the lockfile enforced. + +Keep publication and verification in separate jobs. The second job polls registry installation, +runs a real fluent architecture rule, and creates the tag and GitHub release. A delayed registry +index can therefore rerun verification without rerunning a successful upload. + +## Consequences + +- The first release has one documented manual credential step; later releases store no crates.io + token in GitHub. +- A version tag means both crates.io acceptance and successful clean-consumer installation. +- The registry fixture is version-coupled release data and must change with every version bump. +- The `release` environment becomes part of the crates.io trust identity and cannot be renamed + casually. +- A publication accepted by crates.io remains released even if a later verification service is + temporarily unavailable; the split job makes completing that boundary safely rerunnable. + +## Alternatives considered + +### Store a crates.io token as a GitHub Actions secret + +Rejected. It solves the first upload but leaves a reusable credential in a second system for every +later release. + +### Create the tag before publishing + +Rejected. A rejected archive would leave a public release marker for a version users cannot install. + +### Publish and verify in one job + +Rejected. Registry propagation failure would make the failed job unsafe to rerun because its upload +step may already have succeeded. diff --git a/docs/adr/README.md b/docs/adr/README.md index db2e335..a0badc5 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -28,3 +28,4 @@ rewriting history after released behavior depends on it. - [0022: Enforce a Rust-aware self-architecture](0022-enforce-rust-aware-self-architecture.md) - [0023: Publish a source-checked guide beside rustdoc](0023-publish-a-source-checked-guide-beside-rustdoc.md) - [0024: Split CI by evidence and supported host](0024-split-ci-by-evidence-and-supported-host.md) +- [0025: Bootstrap once, then publish with short-lived credentials](0025-bootstrap-then-use-trusted-publishing.md) From c507c537a8179ddf4398678001b03c84b6981e0b Mon Sep 17 00:00:00 2001 From: Niessen Date: Mon, 24 Aug 2026 15:50:35 +0200 Subject: [PATCH 5/6] chore(release): trim the published crate archive --- Cargo.toml | 14 +++++++++++++- tests/release_workflow.rs | 13 +++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 327692d..491bbbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,19 @@ readme = "README.md" keywords = ["architecture", "testing", "dependencies", "static-analysis"] categories = ["development-tools::testing"] publish = ["crates-io"] -exclude = ["docs/assets/og.png"] +exclude = [ + ".github/**", + "AGENTS.md", + "CLAUDE.md", + "CONTRIBUTING.md", + "RELEASING.md", + "docs/PORTING_PLAN.md", + "docs/_config.yml", + "docs/_layouts/**", + "docs/adr/**", + "docs/assets/**", + "tests/**", +] [lib] path = "src/lib.rs" diff --git a/tests/release_workflow.rs b/tests/release_workflow.rs index 16cb43c..9bc43a8 100644 --- a/tests/release_workflow.rs +++ b/tests/release_workflow.rs @@ -11,6 +11,19 @@ fn manifest_and_archive_metadata_are_ready_for_crates_io() { assert!(manifest.contains("rust-version = \"1.85\"")); assert!(manifest.contains("license = \"MIT\"")); assert!(manifest.contains("publish = [\"crates-io\"]")); + for repository_only in [ + "\".github/**\"", + "\"AGENTS.md\"", + "\"RELEASING.md\"", + "\"docs/adr/**\"", + "\"docs/assets/**\"", + "\"tests/**\"", + ] { + assert!( + manifest.contains(repository_only), + "publish exclusions are missing {repository_only}" + ); + } assert!(manifest.contains("homepage = \"https://lukasniessen.github.io/ArchUnitRust/\"")); assert!( manifest.contains( From 9994a3a78078933a2ab8fa5ee79a3ad3c228b94f Mon Sep 17 00:00:00 2001 From: Niessen Date: Mon, 24 Aug 2026 15:56:56 +0200 Subject: [PATCH 6/6] test(release): keep the registry consumer warning-free --- tests/fixtures/registry_consumer/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fixtures/registry_consumer/src/lib.rs b/tests/fixtures/registry_consumer/src/lib.rs index a846618..cff31d2 100644 --- a/tests/fixtures/registry_consumer/src/lib.rs +++ b/tests/fixtures/registry_consumer/src/lib.rs @@ -2,3 +2,4 @@ mod api; mod persistence; pub use api::health; +pub use persistence::schema_version;