Adopt Netsuke build orchestration - #48
lodyai[bot] wants to merge 7 commits into
Conversation
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.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
SummaryReplace Make-based orchestration with Netsuke.
WalkthroughThe 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. ChangesNetsuke workflow migration
Possibly related PRs
Suggested reviewers: Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 2 warnings, 3 inconclusive)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Reviewer's GuideReplaces 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 executionflowchart 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]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
There was a problem hiding this comment.
💡 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".
Prevent Cargo from selecting a later compatible release under the beta cache key, keeping the installed Netsuke binary reproducible.
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
.github/workflows/ci.yml.gitignoreAGENTS.mdMakefileNetsukefiledocs/developers-guide.mddocs/repository-layout.mddocs/users-guide.md
💤 Files with no reviewable changes (1)
- Makefile
| - `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. |
There was a problem hiding this comment.
🎯 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)
PYRepository: 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)
PYRepository: 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.
| - `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. |
There was a problem hiding this comment.
🎯 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
fiRepository: 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:
- 1: https://nexte.st/
- 2: https://nexte.st/docs/running/
- 3: Add support for doctests nextest-rs/nextest#16
- 4: Add support for doctests nextest-rs/nextest#16
- 5: https://nexte.st/docs/integrations/test-coverage/
🌐 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:
- 1: https://doc.rust-lang.org/stable/cargo/commands/cargo-test.html
- 2: https://doc.rust-lang.org/cargo/commands/cargo-test.html
- 3: https://github.com/rust-lang/cargo/blob/master/doc/man/generated_txt/cargo-test.txt
- 4: https://doc.rust-lang.org/1.67.1/cargo/commands/cargo-test.html
- 5: https://dev-doc.rust-lang.org/cargo/commands/cargo-test.html
- 6: https://users.rust-lang.org/t/how-to-enable-a-feature-flag-in-a-doc-test/116563
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 enforcecargo test --doc --all-featuresfor 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-L13docs/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.
| ```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 | ||
| ``` |
There was a problem hiding this comment.
🎯 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
fiRepository: 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:
- 1: https://doc.rust-lang.org/cargo/commands/cargo-install.html
- 2: https://github.com/rust-lang/cargo/blob/master/doc/man/generated_txt/cargo-install.txt
- 3: add note to cargo install --help that says cargo install --vers x.x.x requires =x.x.x to install specific version rust-lang/cargo#3321
- 4: https://github.com/rust-lang/cargo/blob/master/src/bin/cargo/commands/install.rs
- 5: https://doc.rust-lang.org/stable/cargo/reference/specifying-dependencies.html
- 6: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
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.
| 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 |
There was a problem hiding this comment.
📐 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
| ## 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. |
There was a problem hiding this comment.
📐 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.
| - name: all | ||
| command: >- | ||
| netsuke build check-fmt && | ||
| netsuke build lint && | ||
| netsuke build test && | ||
| netsuke build spelling |
There was a problem hiding this comment.
🎯 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 directspellingcall 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 addnetsuke 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
| - 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") |
There was a problem hiding this comment.
🎯 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 || trueRepository: 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:
- 1: https://nexte.st/
- 2: Add support for doctests nextest-rs/nextest#16
- 3: https://latchkey.dev/learn/tool-comparisons/cargo-nextest-vs-cargo-test
- 4: https://doc.rust-lang.org/stable/cargo/commands/cargo-test.html
- 5: https://nexte.st/docs/running/
- 6: https://blog.jetbrains.com/rust/2026/05/01/faster-rust-tests-with-cargo-nextest/
🏁 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 || trueRepository: 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.
| 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 |
There was a problem hiding this comment.
🎯 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: ExportPATHandRUSTFLAGSbeforewhitaker.
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.
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.
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-buildcrate 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
https://lody.ai/leynos/sessions/06a8bf0c-2b64-4717-8c7b-bd0f3a9402f4
https://lody.ai/leynos/sessions/b489a0aa-df1a-4619-b033-214ebf663dd0
Summary by Sourcery
Adopt Netsuke as the repository-wide build and validation orchestration system, replacing the legacy Make workflow.
New Features:
Enhancements:
Build:
CI:
Documentation:
Chores: