Skip to content

Adopt Netsuke build orchestration - #48

Open
lodyai[bot] wants to merge 7 commits into
mainfrom
adopt-netsuke
Open

lodyai[bot] wants to merge 7 commits into
mainfrom
adopt-netsuke

Conversation

@lodyai

@lodyai lodyai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This branch replaces Make-based orchestration with Netsuke so the repository has one YAML-defined build, validation, and documentation workflow. It preserves the existing public actions, makes the comprehensive default action sequential, and removes the legacy build file without a compatibility shim.

CI installs the pinned netsuke-build crate from crates.io with the required nightly toolchain and Polonius flag, caches the installed executable, and invokes Netsuke for repository gates.

Review walkthrough

Validation

  • netsuke generate --output /tmp/generate-catnap-adopt-netsuke.ninja: passed.
  • netsuke: passed the sequential formatting, rustdoc, Clippy, Whitaker, test, and spelling actions; 38 tests passed.
  • netsuke build typecheck: passed.
  • cargo test --doc: 14 doctests passed.
  • netsuke build markdownlint: passed, including three spelling-helper tests at 95% coverage.
  • netsuke build nixie: all Mermaid diagrams passed.
  • actionlint .github/workflows/ci.yml: passed.
  • git diff --cached --check: passed before commit.

Notes

The legacy Makefile is deleted. No backwards-compatible Make shim remains.

References

Summary by Sourcery

Adopt Netsuke as the repository-wide build and validation orchestration system, replacing the legacy Make workflow.

New Features:

  • Add a Netsukefile defining the repository’s public build, validation, testing, coverage, and documentation actions with a sequential default workflow.

Enhancements:

  • Replace Make-based repository orchestration and contributor commands with Netsuke actions.
  • Update CI to install and cache the pinned Netsuke toolchain and run repository gates through Netsuke.
  • Remove the legacy Makefile and update contributor, developer, user, and repository-layout documentation to describe Netsuke workflows.

Build:

  • Install Ninja alongside the existing Linux build tooling required by the Netsuke workflow.

CI:

  • Pin the Netsuke version and nightly toolchain used by CI, cache the executable, and invoke Netsuke for formatting, spelling, and linting gates.

Documentation:

  • Update contributor and user-facing documentation to use Netsuke actions and document their available workflows and installation requirements.

Chores:

  • Remove obsolete Makefile tooling references and ignore generated Netsuke artifacts as needed.

Replace the Makefile outright with a Netsukefile that preserves the public
build, test, lint, coverage, formatting, and documentation actions.

Install the pinned netsuke-build crate in CI and cache its executable. Update
current contributor and repository documentation to make Netsuke the sole
build entrypoint.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary

Replace Make-based orchestration with Netsuke.

  • Define build, test, lint, documentation, and release workflows in Netsukefile.
  • Make the comprehensive workflow sequential.
  • Remove the legacy Makefile without a compatibility shim.
  • Pin and cache netsuke-build in CI with the required nightly toolchain and Polonius flag.
  • Route CI checks and project documentation through Netsuke actions.
  • Add Netsuke-generated files to .gitignore.
  • Validate generation, execution, type checking, tests, doctests, Markdown, Mermaid, workflows, and whitespace.

Walkthrough

The repository replaces Make-based workflows with Netsuke. It adds build and validation actions, updates CI installation and caching, ignores Ninja files, and revises agent instructions and user and developer documentation.

Changes

Netsuke workflow migration

Layer / File(s) Summary
Netsuke build workflow
Netsukefile, Makefile
Netsuke now defines build, test, coverage, lint, formatting, spelling, diagram validation, and help actions. The Makefile is removed.
CI toolchain integration
.github/workflows/ci.yml, .gitignore
CI installs and caches the pinned Netsuke release, adds ninja-build on Linux, and runs validation through Netsuke actions. Ninja logs and dependency files are ignored.
Workflow guidance updates
AGENTS.md, docs/developers-guide.md, docs/users-guide.md
Instructions and guides replace Make commands with Netsuke actions and document required tooling and test behaviour.
Repository structure references
docs/repository-layout.md
The repository layout and ownership guidance identify Netsukefile as the build and validation entrypoint.

Possibly related PRs

Suggested reviewers: leynos

Poem

Make targets fade from view,
Netsuke builds the workflow anew.
Ninja logs stay out of sight,
CI checks run clean and right,
Guides now point the same way too.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 2 warnings, 3 inconclusive)

Check name Status Explanation Resolution
Testing (Overall) ❌ Error The PR adds Netsukefile and CI orchestration but changes no test files; existing tests do not exercise action mapping, sequencing, fallback behaviour, or CI installation. Add substantive automated tests that validate the generated Netsuke graph, default ordering, action commands, cargo-nextest fallback, and the pinned CI installation.
User-Facing Documentation ⚠️ Warning The users guide lists Netsukefile actions, but the removed Makefile has no migration note; no migration path exists, and public actions such as clean, typecheck, and fmt remain undocumented. Add a pre-1.0.0 migration document, link it from the users guide, state that Makefile is removed, map old targets to Netsuke commands, and document the remaining public actions.
Developer Documentation ⚠️ Warning The developer guide documents Netsuke, but the living ExecPlan still requires Makefile gates although the Makefile was deleted. Update the ExecPlan with the Netsuke workflow, current requirements, and validation commands. Add or reference an ADR if the tooling decision is substantive.
Testing (Compile-Time / Ui) ❓ Inconclusive Investigation has not finished. Inspect the PR diff and existing compile-time/UI tests before deciding applicability.
Security And Privacy ❓ Inconclusive Evidence collection is still in progress; no verdict has been submitted yet. Inspect the complete PR diff and CI trust boundaries before deciding.
Performance And Resource Use ❓ Inconclusive Investigation is still in progress; no verdict submitted yet. Gather evidence from the complete orchestration diff and command dependency behaviour.
✅ Passed checks (14 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Module-Level Documentation ✅ Passed All Rust and Python modules have module-level documentation; Rust headers describe purpose and utility, with component relationships stated where needed.
Testing (Unit And Behavioural) ✅ Passed The change only replaces build orchestration; existing unit, behavioural, end-to-end, UI, and script tests remain, and the PR reports successful test and validation gates.
Testing (Property / Proof) ✅ Passed Treat this check as not applicable: the PR changes only build configuration and documentation, with no new input/state-dependent algorithm, lemma, or proof assumption.
Unit Architecture ✅ Passed The change modifies only build orchestration, CI, and documentation; no src/, tests/, or scripts/ files changed. Netsukefile commands expose their external effects and dependencies explicitly.
Domain Architecture ✅ Passed Accept this check: the PR changes only Netsuke, CI, and documentation; src, tests, and scripts remain unchanged from main, so no domain boundary changes.
Observability ✅ Passed The change is limited to repository build and CI orchestration, not production runtime behaviour; CI steps and commands expose tool output and fail at clear step boundaries.
Concurrency And State ✅ Passed The PR adds no application concurrency or shared mutable state; the new action graph uses explicit && sequencing and linear deps, while CI has one sequential job.
Architectural Complexity And Maintainability ✅ Passed PASS: Netsukefile replaces Makefile directly, preserves all 17 public actions, uses one explicit acyclic dependency chain, and adds no Rust or Cargo dependency layer.
Rust Compiler Lint Integrity ✅ Passed No Rust or Cargo source changed; the tree has no Rust allow/expect suppressions, and Netsuke retains -D warnings for rustdoc, Clippy, tests, and typecheck.
Title check ✅ Passed The title clearly describes the main change: replacing Make-based orchestration with Netsuke.
Description check ✅ Passed The description accurately explains the Netsuke migration, CI updates, Makefile removal, documentation changes, and validation performed.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adopt-netsuke

Warning

Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice.


Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Reviewer's Guide

Replaces the Make-based build/test orchestration with a Netsuke-based workflow defined in a Netsukefile, updates CI to install and cache a pinned netsuke-build binary and to invoke Netsuke actions for gates, and refreshes contributor documentation and repository layout descriptions to reference Netsuke instead of Make.

Flow diagram for CI Netsuke installation and gate execution

flowchart TD
  A[Checkout repository] --> B[Setup Rust]
  B --> C[Cache Netsuke binary]
  C --> D[Install Netsuke from crates.io]
  D --> E[Install clang lld mold ninja-build]
  E --> F[netsuke build check-fmt]
  F --> G[netsuke build spelling]
  G --> H[netsuke build lint]
  H --> I[netsuke build coverage]
Loading

File-Level Changes

Change Details Files
Replace Makefile-driven local and CI workflows with a Netsuke-based Netsukefile workflow.
  • Introduce Netsukefile as the single source of build, lint, test, coverage, spelling, markdown, and diagram validation actions.
  • Remove the legacy Makefile without leaving a compatibility shim.
  • Update documentation to describe Netsuke actions (including default all, check-fmt, lint, test, coverage, markdownlint, nixie, spelling, fmt, build, release) as the public interface for contributors and CI.
Netsukefile
Makefile
docs/users-guide.md
docs/developers-guide.md
docs/repository-layout.md
AGENTS.md
Update CI to install, cache, and use a pinned netsuke-build crate with a specific nightly toolchain and Polonius flag.
  • Add NETSUKE_TOOLCHAIN and NETSUKE_VERSION environment variables to CI.
  • Add an actions/cache step to cache the ~/.cargo/bin/netsuke binary keyed by OS, architecture, Netsuke version, and toolchain.
  • Install netsuke-build from crates.io using the configured nightly toolchain and RUSTFLAGS=-Zpolonius=next when the cached binary is missing or the version does not match.
  • Extend the Linux dependencies step to install ninja-build in addition to clang, lld, and mold.
  • Switch CI format, spelling, and lint steps from make targets to the corresponding netsuke build actions.
.github/workflows/ci.yml
Align contributor contract and tooling documentation with Netsuke-based orchestration and updated lint/test commands.
  • Update AGENTS.md pre-commit guidance to use netsuke build check-fmt, lint, and test, clarifying their underlying cargo, rustdoc, Clippy, Whitaker, and nextest behaviour.
  • Document netsuke as a first-class tool in the agent environment and remove obsolete Make-specific tooling like checkmake.
  • Clarify spelling and markdown guidance to use netsuke build spelling/markdownlint and documentation formatting via netsuke build fmt and netsuke build nixie.
  • Document Netsukefile as the build/validation entrypoint in the repository layout and adjust path ownership guidance accordingly.
AGENTS.md
docs/developers-guide.md
docs/users-guide.md
docs/repository-layout.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

leynos and others added 2 commits August 9, 2026 18:00
Extract build recipes into named rules so public and aggregate actions share
commands without recursive Netsuke invocations.

Add a private order-only chain for the sequential comprehensive workflow while
standalone public actions retain their existing dependencies. Document the
rule ownership and reuse boundary in the developer guide.
Restore the direct default workflow while Netsuke gains a first-class way to
express serial action dependencies without duplicate rule definitions.
@leynos
leynos marked this pull request as ready for review August 9, 2026 17:13

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4499e3a7c

ℹ️ 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".

Comment thread .github/workflows/ci.yml Outdated
Prevent Cargo from selecting a later compatible release under the beta cache
key, keeping the installed Netsuke binary reproducible.
@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 156-165: Update the default test-gate documentation and contract:
in AGENTS.md lines 156-165, require the nextest path to also run cargo test
--doc --all-features; in docs/developers-guide.md lines 7-13, revise the
comprehensive-test wording and doctest command to include --all-features; and in
docs/users-guide.md lines 66-70, document the same all-features doctest behavior
for the public action contract.
- Around line 146-155: Update the documented rustdoc command in the netsuke
build lint description to include --all-features, keeping it consistent with the
stated all-features lint behavior.

In `@docs/developers-guide.md`:
- Around line 28-33: Update the netsuke-build installation command in the
developers guide to pass Cargo’s exact prerelease version requirement, changing
the --version value to the quoted form "=0.1.0-beta1" while leaving the
surrounding toolchain and install options unchanged.

In `@docs/repository-layout.md`:
- Line 114: Update the Netsukefile description to use parallel gerund terms:
building, linting, testing, measuring coverage, and validating documentation.
Preserve the existing meaning and line-wrapped documentation format.

In `@docs/users-guide.md`:
- Around line 58-75: Add the missing `netsuke build spelling` entry to the
public actions list in the “Netsukefile actions” section, describing that it
enforces en-GB-oxendict spelling and placing it alongside the other validation
actions.

In `@Netsukefile`:
- Around line 29-36: In Netsukefile lines 29-36, export
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER, RUSTFLAGS, CFLAGS, and LDFLAGS
before invoking cargo llvm-cov. In Netsukefile lines 38-44, export PATH and
RUSTFLAGS before invoking whitaker; update both command blocks so the
environment settings reach their respective tools.
- Around line 4-9: Update Netsukefile lines 4-9 in the all action to replace
netsuke build spelling with netsuke build markdownlint and then run netsuke
build nixie. Update .github/workflows/ci.yml lines 48-62 to replace the direct
Markdown lint action with netsuke build markdownlint and add a Mermaid
validation step running netsuke build nixie.
- Around line 14-20: Update both Netsukefile test command branches to run
doctests after the existing test command, chaining `cargo test --doc
--all-features` with `RUSTFLAGS='-D warnings'` using the existing
command-availability conditions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 01f14978-3dcc-41cb-a7dd-9b92e8e2de36

📥 Commits

Reviewing files that changed from the base of the PR and between 3734d0b and 7b17446.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • .gitignore
  • AGENTS.md
  • Makefile
  • Netsukefile
  • docs/developers-guide.md
  • docs/repository-layout.md
  • docs/users-guide.md
💤 Files with no reviewable changes (1)
  • Makefile

Comment thread AGENTS.md
Comment on lines +146 to +155
- `netsuke build lint` executes:

```sh
cargo clippy --workspace --all-targets --all-features -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
cargo clippy --all-targets --all-features -- -D warnings
RUSTFLAGS="-D warnings" whitaker --all -- --all-targets --all-features
```

linting every target with all features enabled and denying all Clippy
warnings.
- `make test` executes:
linting documentation and every target with all features enabled, and
denying all warnings from rustdoc, Clippy, and Whitaker.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'AGENTS.md snippets:\n'
nl -ba AGENTS.md | sed -n '136,170p'

printf '\nRelevant references:\n'
rg -n -C 2 -- 'netsuke build lint|cargo doc|cargo clippy|whitaker|all-features' AGENTS.md Netsukefile .github 2>/dev/null || true

printf '\nCargo version availability (read-only): '
command -v cargo >/dev/null 2>&1 && cargo --version || echo 'cargo not available'

python3 - <<'PY'
# Deterministic check from Cargo help URL text: commands are documented,
# but this small parser only validates that the source command does not include
# the --all-features feature selection token.
command = 'cargo doc --no-deps'
print('command_has_all_features=' + str('--all-features' in command))
print('command=' + command)
PY

Repository: leynos/catnap

Length of output: 211


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'AGENTS.md snippets:\n'
awk 'NR>=136 && NR<=170 { printf "%6d\t%s\n", NR, $0 }' AGENTS.md

printf '\nRelevant references:\n'
grep -n -C 2 -E 'netsuke build lint|cargo doc|cargo clippy|whitaker|all-features|RUSTDOCFLAGS|RUSTFLAGS' AGENTS.md .github 2>/dev/null || true

printf '\nCargo version availability (read-only): '
command -v cargo >/dev/null 2>&1 && cargo --version || echo 'cargo not available'

python3 - <<'PY'
command = 'cargo doc ++no-deps'
print('command_has_all_features=' + str('--all-features' in command))
print('command=' + command)
PY

Repository: leynos/catnap

Length of output: 4038


Run rustdoc with all features.

RUSTDOCFLAGS="-D warnings" cargo doc --no-deps does not pass --all-features, but the surrounding description says this lint block enables all features. Cargo uses only the default feature set for this command.

Add --all-features, or change the description to state that rustdoc checks only the default feature set.

Proposed command correction
-    cargo doc --no-deps
+    cargo doc --no-deps --all-features
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 146 - 155, Update the documented rustdoc command in
the netsuke build lint description to include --all-features, keeping it
consistent with the stated all-features lint behavior.

Comment thread AGENTS.md
Comment on lines +156 to +165
- `netsuke build test` executes `cargo nextest run` when cargo-nextest is
available:

```sh
cargo test --workspace
RUSTFLAGS="-D warnings" cargo nextest run --all-targets --all-features
```

running the full workspace test suite. Use `make fmt`
(`cargo fmt --workspace`) to apply formatting fixes reported by the
formatter check.
Otherwise, it falls back to `cargo test --all-targets --all-features`.
Use `netsuke build fmt` (`cargo fmt --all`) to apply formatting fixes
reported by the formatter check.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== candidates =="
git ls-files | rg '(^|^\.|^docs/|^AGENTS\.md$|^Netsukefile$|^\.github/workflows/ci\.ya?ml$)' | sed -n '1,200p'

echo
echo "== netsuke references =="
rg -n -C 3 \
  'netsuke|cargo nextest|cargo test --doc|--all-features|nextest|test:\s*$|name:\s*all|all:' \
  . \
  --glob '!target/**' --glob '!dist/**' --glob '!build/**' --glob '!node_modules/**' \
  | sed -n '1,260p'

echo
echo "== relevant files sizes =="
wc -l AGENTS.md docs/developers-guide.md docs/users-guide.md | sed -n '1,20p'

Repository: leynos/catnap

Length of output: 17415


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== Cargo.toml =="
cat -n Cargo.toml

echo
echo "== src/lib.rs overview =="
wc -l src/lib.rs
sed -n '1,220p' src/lib.rs | cat -n

echo
echo "== doctest references inside repo =="
rg -n --glob '!docs/rust-doctest-dry-guide.md' \
  '#\[doc\(|cargo-doc|cargo nextest run|cargo test --doc|cargo test --features "--doc"|cargo test \x27--features|--features' \
  src tests docs/Cargo.toml Cargo.toml | sed -n '1,240p'

echo
echo "== netsuke package metadata if present =="
if command -v cargo >/dev/null 2>&1; then
  cargo metadata --format-version 1 --no-deps --locked 2>/dev/null \
    | jq '.packages[] | select(.name=="netsuke-build") | {name,version,source,dependencies}' || true
fi
if cargo metadata --format-version 1 --no-deps 2>/dev/null >/tmp/netsuke-meta.json; then
  jq '.packages[] | select(.name=="netsuke-build") | {name,version,dependencies}' /tmp/netsuke-meta.json || true
fi

Repository: leynos/catnap

Length of output: 9621


🌐 Web query:

Cargo nextest run does not execute doc tests documentation

💡 Result:

Cargo nextest does not execute documentation tests (doc tests) because of limitations in stable Rust [1][2]. Unlike standard test binaries, doc tests are not exposed by the Rust compiler in a way that allows them to be discovered and executed by nextest [3][4]. To run your documentation tests, you must execute them as a separate step using cargo test [3][1]: cargo nextest run && cargo test --doc Running them this way does not incur a redundant build penalty, as cargo test --doc will leverage the artifacts already built by your workflow [3][4]. If you are collecting test coverage data, you will also need to handle doc tests separately, as nextest cannot include them in its coverage reports [5].

Citations:


🌐 Web query:

Cargo run cargo test --doc all features documentation

💡 Result:

To run documentation tests with all features enabled in Rust, use the following command: cargo test --doc --all-features [1][2] This command combines two distinct flags: 1. --doc: This flag instructs Cargo to test only the library's documentation [1][3]. Documentation tests are standard tests that extract and execute code samples from your documentation comments [1][3]. Note that --doc cannot be combined with other target selection flags (like --lib, --bins, or --tests) [1][4]. 2. --all-features: This flag tells Cargo to activate every available feature for the selected packages [1][5]. By default, Cargo only activates the default features [1][3]. When used together, Cargo will compile and execute your documentation tests with all package features enabled [1][6]. If you need more granular control, you can replace --all-features with --features "feature1 feature2" to enable only specific features [1][3].

Citations:


Make the default test gate include doctests with all features.

netsuke build test runs cargo nextest run --all-targets --all-features from the all action, but it has no doctest step. Add a doctest gate or fail the nextest branch so the default validation graph covers the same code when cargo-nextest is available.

  • AGENTS.md#L156-L165: Add and enforce cargo test --doc --all-features for the nextest path.
  • docs/developers-guide.md#L7-L13: Update the “comprehensive” wording and required doctest command to include --all-features.
  • docs/users-guide.md#L66-L70: Publish the same all-features doctest behaviour in the public action contract.
📍 Affects 3 files
  • AGENTS.md#L156-L165 (this comment)
  • docs/developers-guide.md#L7-L13
  • docs/users-guide.md#L66-L70
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 156 - 165, Update the default test-gate documentation
and contract: in AGENTS.md lines 156-165, require the nextest path to also run
cargo test --doc --all-features; in docs/developers-guide.md lines 7-13, revise
the comprehensive-test wording and doctest command to include --all-features;
and in docs/users-guide.md lines 66-70, document the same all-features doctest
behavior for the public action contract.

Comment thread docs/developers-guide.md
Comment on lines +28 to +33
```sh
rustup toolchain install nightly-2026-06-25
RUSTFLAGS=-Zpolonius=next \
cargo +nightly-2026-06-25 install --locked netsuke-build \
--version 0.1.0-beta1
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'Relevant version/dependency references:\n'
rg -n -C 3 -- '--version|NETSUKE_VERSION|netsuke-build|toolchain' .github/workflows/ci.yml docs/developers-guide.md || true

printf '\nCargo availability/version:\n'
command -v cargo || true
if command -v cargo >/dev/null 2>&1; then
  cargo --version
fi

printf '\nCargo help for install version option (if available):\n'
if command -v cargo >/dev/null 2>&1; then
  cargo install --help | sed -n '/version/,+6p'
fi

printf '\nCargo docs URL presence in local help:\n'
if command -v cargo >/dev/null 2>&1; then
  curl -fsSL https://static.rust-lang.org/doc/master/cargo/commands/cargo-install.html 2>/dev/null | sed -n '/<code>--version</code>,\|--version</,/<\/dl>/p' | head -80 || true
fi

Repository: leynos/catnap

Length of output: 5613


🌐 Web query:

Cargo install --version exact version requirement no operator documentation prerelease

💡 Result:

To install an exact version of a crate using cargo install, you must explicitly use the equality operator (=) followed by the full version string [1][2][3]. For example, to install version 1.2.3 of a crate: cargo install crate-name --version =1.2.3 If you provide a version string without an operator (e.g., --version 1.2.3), it is often treated as a semantic version requirement rather than an exact version [1][2]. Adding the = operator forces Cargo to treat the requirement as an exact match for that specific version [4]. Regarding pre-release versions: 1. Standard Requirement: By default, Cargo version requirements (including those used with cargo install) ignore pre-release versions (like 1.0.0-alpha) unless they are explicitly specified in the requirement [5][6]. 2. Installing Pre-releases: If you wish to install a specific pre-release version, you must include the full pre-release identifier in the version string [5][6]. Using the exact version syntax with the pre-release suffix is the recommended approach: cargo install crate-name --version =1.2.3-alpha.1 Cargo will generally avoid pre-releases unless the version provided in the command explicitly includes the pre-release tag [5][6]. When you provide an exact version requirement that includes a pre-release identifier, Cargo will attempt to install that specific version [4][5].

Citations:


Use Cargo’s exact prerelease requirement syntax.

Use --version "=0.1.0-beta1" in docs/developers-guide.md so the documented local install matches the exact requirement form used by CI.

Proposed installation correction
-  --version 0.1.0-beta1
+  --version "=0.1.0-beta1"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/developers-guide.md` around lines 28 - 33, Update the netsuke-build
installation command in the developers guide to pass Cargo’s exact prerelease
version requirement, changing the --version value to the quoted form
"=0.1.0-beta1" while leaving the surrounding toolchain and install options
unchanged.

Comment thread docs/repository-layout.md
configuration.
- `LICENSE`: Records the project licence text.
- `Makefile`: Provides the public build, lint, test, coverage, and
- `Netsukefile`: Provides the public build, lint, test, coverage, and

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use parallel terms in the path description.

Replace the mixed noun forms with a consistent verb structure.

Triage: [type:grammar] [type:docstyle]

Proposed wording
-`Netsukefile`: Provides the public build, lint, test, coverage, and
-  documentation validation commands.
+`Netsukefile`: Provides commands for building, linting, testing, measuring
+  coverage, and validating documentation.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~114-~114: Loose punctuation mark.
Context: ...he project licence text. - Netsukefile: Provides the public build, lint, test, ...

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~114-~114: The noun ‘lint’ is uncountable (mass noun), but the noun ‘test’ is a countable noun. An article may be missing before ‘test’, or at the start of the list of items. You could also use the plural of ‘test’.
Context: ...etsukefile`: Provides the public build, lint, test, coverage, and documentation validati...

(UNCOUNTABLE_COUNTABLE_MISMATCH)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/repository-layout.md` at line 114, Update the Netsukefile description to
use parallel gerund terms: building, linting, testing, measuring coverage, and
validating documentation. Preserve the existing meaning and line-wrapped
documentation format.

Sources: Path instructions, Linters/SAST tools

Comment thread docs/users-guide.md
Comment on lines +58 to +75
## Netsukefile actions

The generated `Makefile` exposes these public targets:
The repository's `Netsukefile` exposes these public actions:

- `make all` runs formatting checks, linting, and tests.
- `make check-fmt` verifies Rust formatting.
- `make lint` runs rustdoc, Clippy, and Whitaker with warnings denied.
- `make test` runs `cargo nextest run` when cargo-nextest is installed and
falls back to `cargo test` otherwise. Because `cargo nextest run` does not
execute doctests, a nextest-backed `make test` run skips them; run
- `netsuke` runs the default `all` action for formatting checks, linting, tests,
and spelling.
- `netsuke build check-fmt` verifies Rust formatting.
- `netsuke build lint` runs rustdoc, Clippy, and Whitaker with warnings denied.
- `netsuke build test` runs `cargo nextest run` when cargo-nextest is installed
and falls back to `cargo test` otherwise. Because `cargo nextest run` does
not execute doctests, a nextest-backed test action skips them; run
`cargo test --doc` separately as a required additional step when nextest is
present.
- `make build` builds the debug target.
- `make release` builds the release target.
- `make coverage` writes `lcov.info` using `cargo llvm-cov` and `lld`.
- `make markdownlint` checks Markdown files.
- `make nixie` validates Mermaid diagrams.

Install `clang`, `lld`, and `mold` before running the full generated workflow
locally on Linux.
- `netsuke build build` builds the debug target.
- `netsuke build release` builds the release target.
- `netsuke build coverage` writes `lcov.info` using `cargo llvm-cov` and `lld`.
- `netsuke build markdownlint` checks Markdown files.
- `netsuke build nixie` validates Mermaid diagrams.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

List netsuke build spelling.

This section claims to list the public actions, but it omits netsuke build spelling. Other repository guidance and the default all action use this validation action. Add it to keep the user-facing action reference complete.

Proposed documentation addition
 - `netsuke build markdownlint` checks Markdown files.
+- `netsuke build spelling` enforces en-GB-oxendict spelling.
 - `netsuke build nixie` validates Mermaid diagrams.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/users-guide.md` around lines 58 - 75, Add the missing `netsuke build
spelling` entry to the public actions list in the “Netsukefile actions” section,
describing that it enforces en-GB-oxendict spelling and placing it alongside the
other validation actions.

Comment thread Netsukefile Outdated
Comment on lines +4 to +9
- name: all
command: >-
netsuke build check-fmt &&
netsuke build lint &&
netsuke build test &&
netsuke build spelling

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Run all documentation validation gates through Netsuke.

Add markdownlint and nixie to the default action. Run those same actions in
CI. The current workflow lets Markdown and Mermaid failures pass both
netsuke build all and CI.

  • Netsukefile#L4-L9: Replace the direct spelling call with
    netsuke build markdownlint, which already depends on spelling, then run
    netsuke build nixie.
  • .github/workflows/ci.yml#L48-L62: Replace the direct Markdown action with
    netsuke build markdownlint, and add netsuke build nixie.

As per coding guidelines, use netsuke as the public entrypoint for Markdown
linting and validate Mermaid diagrams with netsuke build nixie.

Proposed fix
   - name: all
     command: >-
       netsuke build check-fmt &&
       netsuke build lint &&
       netsuke build test &&
-      netsuke build spelling
+      netsuke build markdownlint &&
+      netsuke build nixie
-      - name: Markdown lint
-        uses: DavidAnson/markdownlint-cli2-action@d36517c02f0ca87b17baeb4fabee83cd48490f38
-        with:
-          globs: |
-            **/*.md
-            !**/target/**
-            !**/dist/**
+      - name: Markdown lint
+        run: netsuke build markdownlint
+      - name: Mermaid diagram validation
+        run: netsuke build nixie
📍 Affects 2 files
  • Netsukefile#L4-L9 (this comment)
  • .github/workflows/ci.yml#L48-L62
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Netsukefile` around lines 4 - 9, Update Netsukefile lines 4-9 in the all
action to replace netsuke build spelling with netsuke build markdownlint and
then run netsuke build nixie. Update .github/workflows/ci.yml lines 48-62 to
replace the direct Markdown lint action with netsuke build markdownlint and add
a Mermaid validation step running netsuke build nixie.

Source: Coding guidelines

Comment thread Netsukefile Outdated
Comment on lines +14 to +20
- name: test
command: "RUSTFLAGS='-D warnings' cargo nextest run --all-targets --all-features"
when: command_available("cargo-nextest")

- name: test
command: "RUSTFLAGS='-D warnings' cargo test --all-targets --all-features"
when: not command_available("cargo-nextest")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '--- Netsukefile ---\n'
if [ -f Netsukefile ]; then
  cat -n Netsukefile
else
  fd -a 'Netsukefile' .
fi

printf '\n--- references to doctest/nextest/markdownlint/nixie in Netsukefile ---\n'
if [ -f Netsukefile ]; then
  rg -n "nextest|doctest|doc|--all-targets|markdownlint|nixie" Netsukefile || true
fi

printf '\n--- repository docs references ---\n'
rg -n "cargo nextest run|cargo test --doc|cargo-nextest|doctest|doctests|markdownlint|nixie" . \
  -g '!target/**' -g '!.git/**' --glob '!vendor/**' | head -200 || true

Repository: leynos/catnap

Length of output: 242


🌐 Web query:

cargo nextest run does not run doctests cargo test --all-targets includes doctests

💡 Result:

Cargo nextest does not support Rust documentation tests (doctests) because they are handled differently by the Rust compiler and are not exposed as standard test binaries in the same way as unit or integration tests [1][2][3]. While cargo test --all-targets includes doctests by default [4], cargo nextest is designed to run only standard test binaries [3][5]. To ensure full test coverage, the recommended practice is to run both tools in your workflow [2][3]: 1. Run standard tests with cargo nextest: cargo nextest run 2. Run doctests separately using the built-in cargo test runner: cargo test --doc Running these as separate steps does not incur a significant performance penalty compared to a single cargo test run, as the build artifacts are cached and reused [2]. This combined approach allows you to leverage the speed, parallelization, and process isolation of cargo nextest for your main test suite while still verifying the correctness of your documentation examples [3][6].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- Netsukefile ---'
if [ -f Netsukefile ]; then
  cat -n Netsukefile
else
  fd -a 'Netsukefile' . || true
fi

printf '%s\n' '--- references in Netsukefile ---'
if [ -f Netsukefile ]; then
  rg -n "nextest|doctest|doc|--all-targets|markdownlint|nixie" Netsukefile || true
fi

printf '%s\n' '--- repository references ---'
rg -n "cargo nextest run|cargo test --doc|cargo-nextest|doctest|doctests|markdownlint|nixie" . \
  -g '!target/**' -g '!.git/**' --glob '!vendor/**' | head -200 || true

Repository: leynos/catnap

Length of output: 17742


Run doctests in both test branches.

cargo nextest run does not execute doctests, and the current cargo test --all-targets command also omits doctests. Add RUSTFLAGS='-D warnings' cargo test --doc --all-features after both test commands.

Proposed fix
   - name: test
-    command: "RUSTFLAGS='-D warnings' cargo nextest run --all-targets --all-features"
+    command: >-
+      RUSTFLAGS='-D warnings' cargo nextest run --all-targets --all-features &&
+      RUSTFLAGS='-D warnings' cargo test --doc --all-features
     when: command_available("cargo-nextest")

   - name: test
-    command: "RUSTFLAGS='-D warnings' cargo test --all-targets --all-features"
+    command: >-
+      RUSTFLAGS='-D warnings' cargo test --all-targets --all-features &&
+      RUSTFLAGS='-D warnings' cargo test --doc --all-features
     when: not command_available("cargo-nextest")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Netsukefile` around lines 14 - 20, Update both Netsukefile test command
branches to run doctests after the existing test command, chaining `cargo test
--doc --all-features` with `RUSTFLAGS='-D warnings'` using the existing
command-availability conditions.

Comment thread Netsukefile Outdated
Comment on lines +29 to +36
command: >-
echo "coverage linker flags: -fuse-ld=lld" &&
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
RUSTFLAGS="-D warnings -C link-arg=-fuse-ld=lld"
CFLAGS="-fuse-ld=lld"
LDFLAGS="-fuse-ld=lld"
cargo llvm-cov --lcov --output-path lcov.info
--all-targets --all-features

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Export the environment settings before invoking the tool.

Join each environment assignment to its command, or export it first. The
standalone assignments do not reach cargo llvm-cov or whitaker.

  • Netsukefile#L29-L36: Export the linker and flag variables before
    cargo llvm-cov.
  • Netsukefile#L38-L44: Export PATH and RUSTFLAGS before whitaker.
Proposed fix
       echo "coverage linker flags: -fuse-ld=lld" &&
-      CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
-      RUSTFLAGS="-D warnings -C link-arg=-fuse-ld=lld"
-      CFLAGS="-fuse-ld=lld"
-      LDFLAGS="-fuse-ld=lld"
+      export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
+      export RUSTFLAGS="-D warnings -C link-arg=-fuse-ld=lld"
+      export CFLAGS="-fuse-ld=lld"
+      export LDFLAGS="-fuse-ld=lld"
       cargo llvm-cov --lcov --output-path lcov.info
-      PATH="{{ env('HOME') }}/.cargo/bin:{{ env('HOME') }}/.local/bin:{{ env('HOME') }}/.bun/bin:{{ env('PATH') }}"
-      RUSTFLAGS="-D warnings" whitaker --all --
+      export PATH="{{ env('HOME') }}/.cargo/bin:{{ env('HOME') }}/.local/bin:{{ env('HOME') }}/.bun/bin:{{ env('PATH') }}"
+      export RUSTFLAGS="-D warnings"
+      whitaker --all --
📍 Affects 1 file
  • Netsukefile#L29-L36 (this comment)
  • Netsukefile#L38-L44
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Netsukefile` around lines 29 - 36, In Netsukefile lines 29-36, export
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER, RUSTFLAGS, CFLAGS, and LDFLAGS
before invoking cargo llvm-cov. In Netsukefile lines 38-44, export PATH and
RUSTFLAGS before invoking whitaker; update both command blocks so the
environment settings reach their respective tools.

leynos added 3 commits August 20, 2026 18:09
Replace nested comprehensive checks with native serial dependencies and use
command lists for fail-fast multi-step recipes. Add descriptions for built-in
target help, and pin local and CI installation to the exact beta2 release.
Keep beta2-generated dyndep sidecars out of the working-tree status after
manifest generation and serial builds.
Use dependency-only aggregates and compile-time command discovery to
remove the remaining shell orchestration from the Netsukefile. Follow
beta3's corrected dollar escaping for recipe environment variables.

Pin CI and contributor installation guidance to beta3 and its required
nightly toolchain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants