Skip to content

Rename emit command to manifest#65

Merged
leynos merged 2 commits intomainfrom
codex/rename-emit-sub-command-to-manifest
Aug 6, 2025
Merged

Rename emit command to manifest#65
leynos merged 2 commits intomainfrom
codex/rename-emit-sub-command-to-manifest

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Aug 6, 2025

Summary

  • replace the emit subcommand with manifest
  • exercise the new subcommand and the --emit build flag with assert_cmd tests

Testing

  • make fmt
  • make lint
  • make test
  • make markdownlint
  • make nixie (fails: too many arguments)

https://chatgpt.com/codex/tasks/task_e_6892a963da54832290c55b0150ec0538

Summary by Sourcery

Rename the emit subcommand to manifest throughout the codebase and introduce end-to-end CLI tests using assert_cmd to validate both the new manifest subcommand and the existing --emit build flag.

New Features:

  • Add assert_cmd integration tests for the manifest subcommand and the --emit build option.

Enhancements:

  • Rename the CLI subcommand from emit to manifest across code, documentation, and tests.

Build:

  • Add the assert_cmd dependency to Cargo.toml for integration testing.

Tests:

  • Update Cucumber tests to use the manifest subcommand and add new end-to-end tests in tests/assert_cmd_tests.rs.

Switch the CLI subcommand to `manifest` and cover it with `assert_cmd` integration tests. Also test the `--emit` build option via `assert_cmd` and update documentation and fixtures.
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Aug 6, 2025

Reviewer's Guide

This PR renames the emit subcommand to manifest throughout the CLI, runner implementation, and documentation, updates existing tests to match this change, and adds new end-to-end integration tests using assert_cmd (with the corresponding dependency) for both the manifest command and the --emit build flag.

Sequence diagram for the new 'manifest' subcommand execution

sequenceDiagram
    actor User
    participant CLI
    participant Runner
    participant FileSystem
    User->>CLI: netsuke manifest FILE
    CLI->>Runner: run(Manifest { file })
    Runner->>Runner: generate_ninja(cli)
    Runner->>FileSystem: write_and_log(file, ninja)
    FileSystem-->>Runner: Success
    Runner-->>CLI: Ok
    CLI-->>User: Command completes
Loading

Class diagram for updated CLI Commands enum

classDiagram
    class Commands {
        +Graph
        +Manifest(file: PathBuf)
    }
Loading

File-Level Changes

Change Details Files
Replace emit subcommand with manifest in core CLI and runner
  • Rename Commands::Emit variant to Commands::Manifest and update matching logic
  • Update CLI enum doc comments and argument metadata to reference manifest
  • Adjust runner.rs arm to handle Manifest and write the Ninja file accordingly
  • Reflect the new subcommand in design docs and README help text
src/cli.rs
src/runner.rs
docs/netsuke-design.md
README.md
Update existing tests for the new manifest subcommand
  • Rename cucumber steps and feature scenarios from emit to manifest and update step function names
  • Change runner_tests to instantiate Commands::Manifest and rename related test functions and path variables
  • Modify cli_tests to expect the manifest command and variant in parsing scenarios
tests/steps/cli_steps.rs
tests/runner_tests.rs
tests/features/cli.feature
tests/cli_tests.rs
Add end-to-end integration tests with assert_cmd
  • Create tests/assert_cmd_tests.rs with assert_cmd-based tests for the manifest subcommand and the --emit build option
  • Introduce the assert_cmd dependency in Cargo.toml for these integration tests
tests/assert_cmd_tests.rs
Cargo.toml

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 6, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Summary by CodeRabbit

  • New Features

    • Added a new CLI command: netsuke manifest FILE, which writes the Ninja manifest to a specified file without invoking Ninja.
  • Documentation

    • Updated user documentation and CLI help to describe the new manifest command and its usage.
    • Renamed references from "emit" to "manifest" throughout the documentation for clarity.
  • Bug Fixes

    • Improved error handling for missing required arguments in the manifest command.
  • Tests

    • Added and updated tests to cover the manifest command and its argument requirements.
  • Chores

    • Improved Makefile behaviour for validating Mermaid diagrams by processing files individually.

Walkthrough

Rename the CLI subcommand and related enum variant from Emit to Manifest throughout the codebase, documentation, and test suite. Update all references, test cases, and documentation comments to use the new naming. Add integration tests for the CLI using assert_cmd as a new development dependency.

Changes

Cohort / File(s) Change Summary
CLI Subcommand and Enum Renaming
src/cli.rs, src/runner.rs, docs/netsuke-design.md, tests/cli_tests.rs, tests/runner_tests.rs, tests/features/cli.feature, tests/steps/cli_steps.rs
Rename the CLI subcommand and enum variant from Emit to Manifest. Update all references, test function names, variable names, and assertions accordingly in code, documentation, and tests.
Integration and Behavioural Tests
tests/assert_cmd_tests.rs, tests/runner_tests.rs, tests/cli_tests.rs, tests/features/cli.feature, tests/steps/cli_steps.rs
Add new integration tests using assert_cmd for the CLI. Update existing tests to use the new manifest command and variant. Rename test functions and update step definitions.
Documentation Updates
README.md, docs/netsuke-design.md
Update CLI usage instructions and documentation to reflect the new manifest command. Change command descriptions, scenario names, and command examples.
Development Dependency Addition
Cargo.toml
Add assert_cmd (v2.0.17) as a development dependency for integration testing.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant Runner
    participant FileSystem

    User->>CLI: netsuke manifest FILE
    CLI->>Runner: Commands::Manifest { file: FILE }
    Runner->>FileSystem: Write Ninja manifest to FILE
    FileSystem-->>Runner: File created
    Runner-->>CLI: Success
    CLI-->>User: Command completes
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

Rename the emit, now manifest's the name,
In code and in tests, all references the same.
Docs shine with clarity, commands now align,
Integration tests join, assert_cmd in line.
With each tidy change, the CLI's refined!
📝✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98047f0 and d105f20.

📒 Files selected for processing (4)
  • Makefile (1 hunks)
  • tests/assert_cmd_tests.rs (1 hunks)
  • tests/cli_tests.rs (2 hunks)
  • tests/features/cli.feature (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.rs: Clippy warnings MUST be disallowed.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider using Arc to reduce the amount of data returned.
Write unit and behavioural tests for new functionality. Run both before and after making any change.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Prefer immutable data and avoid unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not use return in single-line functions.
Use predicate functions for conditional criteria with more than two branches.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Prefer expect over allow.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums: Derive std::error::Error (via the thiserror crate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary: Use eyre::Report for human-readable logs; these should not be exposed in public APIs.
Never export the opaque type from a library: Convert to domain enums at API boundaries, and to eyre only in the main main() entrypoint or top-level async task.

Files:

  • tests/cli_tests.rs
  • tests/assert_cmd_tests.rs

⚙️ CodeRabbit Configuration File

**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.

  • Adhere to single responsibility and CQRS

  • Place function attributes after doc comments.

  • Do not use return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless absolutely necessary.

  • Every module must begin with a //! doc comment that explains the module's purpose and utility.

  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar

  • Lints must not be silenced except as a last resort.

    • #[allow] is forbidden.
    • Only narrowly scoped #[expect(lint, reason = "...")] is allowed.
    • No lint groups, no blanket or file-wide suppression.
    • Include FIXME: with link if a fix is expected.
  • Use rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for mocks/stubs.

  • Prefer .expect() over .unwrap()

  • Ensure that any API or behavioural changes are reflected in the documentation in docs/

  • Ensure that any completed roadmap steps are recorded in the appropriate roadmap in docs/

  • Files must not exceed 400 lines in length

    • Large modules must be decomposed
    • Long match statements or dispatch tables should be decomposed by domain and collocated with targets
    • Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.

Files:

  • tests/cli_tests.rs
  • tests/assert_cmd_tests.rs
🧠 Learnings (3)
📚 Learning: applies to **/*.md : validate mermaid diagrams in markdown files by running `make nixie`....
Learnt from: CR
PR: leynos/lille#0
File: AGENTS.md:0-0
Timestamp: 2025-07-27T12:14:14.253Z
Learning: Applies to **/*.md : Validate Mermaid diagrams in Markdown files by running `make nixie`.

Applied to files:

  • Makefile
📚 Learning: applies to **/*.md : validate markdown mermaid diagrams using the make nixie....
Learnt from: CR
PR: leynos/ddlint#0
File: AGENTS.md:0-0
Timestamp: 2025-07-18T18:35:14.639Z
Learning: Applies to **/*.md : Validate Markdown Mermaid diagrams using the make nixie.

Applied to files:

  • Makefile
📚 Learning: applies to **/*.md : validate mermaid diagrams in markdown files by running make nixie....
Learnt from: CR
PR: leynos/comenq#0
File: AGENTS.md:0-0
Timestamp: 2025-08-03T14:59:07.928Z
Learning: Applies to **/*.md : Validate Mermaid diagrams in Markdown files by running make nixie.

Applied to files:

  • Makefile
🔇 Additional comments (7)
Makefile (1)

38-38: LGTM: Improved error isolation for Mermaid validation.

Processing Markdown files individually provides better error isolation and clearer reporting when validation fails on specific files.

tests/cli_tests.rs (1)

31-37: LGTM: Command rename correctly implemented.

The test case properly reflects the rename from emit to manifest subcommand with consistent updates to both the input arguments and expected command variant.

tests/features/cli.feature (2)

33-37: LGTM: Feature scenario properly updated for command rename.

The scenario correctly reflects the rename from emit to manifest subcommand with appropriate updates to the scenario title, command invocation, and assertion steps.


39-42: LGTM: Error scenario added for missing argument validation.

The new scenario properly validates that the manifest command requires a file path argument and provides appropriate error messaging when omitted.

tests/assert_cmd_tests.rs (3)

1-6: LGTM: Proper module documentation follows guidelines.

The module-level comment correctly uses the //! format and clearly explains the module's purpose and utility as required by the coding guidelines.


13-26: LGTM: Well-structured integration test for manifest subcommand.

The test properly exercises the end-to-end behaviour using temporary directories for isolation and validates file creation. The use of .expect() over .unwrap() follows the coding guidelines.


28-48: LGTM: Comprehensive test for build with emit functionality.

The test correctly sets up a fake Ninja environment and validates the emit behaviour. The PATH manipulation ensures proper test isolation whilst maintaining the original environment.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/rename-emit-sub-command-to-manifest

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `src/cli.rs:103` </location>
<code_context>
-    /// Emit the Ninja manifest to the specified file without running Ninja.
-    Emit {
+    /// Write the Ninja manifest to the specified file without invoking Ninja.
+    Manifest {
         /// Output path for the generated Ninja file.
         #[arg(value_name = "FILE")]
</code_context>

<issue_to_address>
Add or update both behavioural and unit tests for the Manifest command.

You have renamed the Emit command to Manifest and changed its description. Ensure that both behavioural and unit tests cover the Manifest command, including its new name and any altered behaviour. Update or add tests as necessary to reflect this change.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/cli.rs
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
src/cli.rs (1)

102-107: Provide a backwards-compatibility alias for emit.

Renaming a public CLI subcommand is a breaking change for existing scripts. Restore compatibility by adding an alias:

-    /// Write the Ninja manifest to the specified file without invoking Ninja.
-    Manifest {
+    /// Write the Ninja manifest to the specified file without invoking Ninja.
+    #[command(alias = "emit")]
+    Manifest {

This keeps new naming while preventing sudden breakage.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9aae022 and 98047f0.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • Cargo.toml (1 hunks)
  • README.md (1 hunks)
  • docs/netsuke-design.md (2 hunks)
  • src/cli.rs (1 hunks)
  • src/runner.rs (1 hunks)
  • tests/assert_cmd_tests.rs (1 hunks)
  • tests/cli_tests.rs (1 hunks)
  • tests/features/cli.feature (1 hunks)
  • tests/runner_tests.rs (2 hunks)
  • tests/steps/cli_steps.rs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.rs

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.rs: Clippy warnings MUST be disallowed.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider using Arc to reduce the amount of data returned.
Write unit and behavioural tests for new functionality. Run both before and after making any change.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Prefer immutable data and avoid unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not use return in single-line functions.
Use predicate functions for conditional criteria with more than two branches.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Prefer expect over allow.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums: Derive std::error::Error (via the thiserror crate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary: Use eyre::Report for human-readable logs; these should not be exposed in public APIs.
Never export the opaque type from a library: Convert to domain enums at API boundaries, and to eyre only in the main main() entrypoint or top-level async task.

Files:

  • src/runner.rs
  • tests/cli_tests.rs
  • src/cli.rs
  • tests/assert_cmd_tests.rs
  • tests/runner_tests.rs
  • tests/steps/cli_steps.rs

⚙️ CodeRabbit Configuration File

**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.

  • Adhere to single responsibility and CQRS

  • Place function attributes after doc comments.

  • Do not use return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless absolutely necessary.

  • Every module must begin with a //! doc comment that explains the module's purpose and utility.

  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar

  • Lints must not be silenced except as a last resort.

    • #[allow] is forbidden.
    • Only narrowly scoped #[expect(lint, reason = "...")] is allowed.
    • No lint groups, no blanket or file-wide suppression.
    • Include FIXME: with link if a fix is expected.
  • Use rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for mocks/stubs.

  • Prefer .expect() over .unwrap()

  • Ensure that any API or behavioural changes are reflected in the documentation in docs/

  • Ensure that any completed roadmap steps are recorded in the appropriate roadmap in docs/

  • Files must not exceed 400 lines in length

    • Large modules must be decomposed
    • Long match statements or dispatch tables should be decomposed by domain and collocated with targets
    • Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.

Files:

  • src/runner.rs
  • tests/cli_tests.rs
  • src/cli.rs
  • tests/assert_cmd_tests.rs
  • tests/runner_tests.rs
  • tests/steps/cli_steps.rs
**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.md: Documentation must use en-GB-oxendict spelling and grammar, except for the naming of the "LICENSE" file.
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks in Markdown must be wrapped at 120 columns.
Tables and headings in Markdown must not be wrapped.
Use dashes (-) for list bullets in Markdown.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.

Files:

  • README.md
  • docs/netsuke-design.md

⚙️ CodeRabbit Configuration File

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
  • Code blocks should be wrapped to 120 columns.
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • README.md
  • docs/netsuke-design.md
Cargo.toml

📄 CodeRabbit Inference Engine (AGENTS.md)

Cargo.toml: Use explicit version ranges in Cargo.toml and keep dependencies up-to-date.
Mandate caret requirements for all dependencies: All crate versions specified in Cargo.toml must use SemVer-compatible caret requirements (e.g., some-crate = "1.2.3").
Prohibit unstable version specifiers: The use of wildcard (*) or open-ended inequality (>=) version requirements is strictly forbidden. Tilde requirements (~) should only be used where a dependency must be locked to patch-level updates for a specific, documented reason.

Files:

  • Cargo.toml
docs/**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
Proactively update the relevant file(s) in the docs/ directory to reflect the latest state when new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve.

Files:

  • docs/netsuke-design.md
🧬 Code Graph Analysis (1)
tests/runner_tests.rs (3)
tests/steps/cli_steps.rs (1)
  • manifest_path (104-107)
src/runner.rs (1)
  • run (71-108)
tests/steps/process_steps.rs (1)
  • run (81-122)
🪛 GitHub Check: build-test
tests/assert_cmd_tests.rs

[warning] 33-33:
Diff in /home/runner/work/netsuke/netsuke/tests/assert_cmd_tests.rs

🪛 GitHub Actions: CI
tests/assert_cmd_tests.rs

[error] 33-33: Prettier formatting check failed. Diff detected in line 33. Run 'cargo fmt --all' to fix code style issues.

🔇 Additional comments (14)
Cargo.toml (1)

67-67: Adhere to caret-semver – all good.

assert_cmd = "2.0.17" follows the mandated caret requirement style and stays within an up-to-date minor.
No action needed.

src/runner.rs (1)

94-98: Rename handled cleanly.

Commands::Manifest mirrors the previous Emit logic and keeps side-effects limited to file generation. Implementation is sound.

README.md (1)

150-158: Documentation aligns with code.

The CLI synopsis now lists manifest precisely as implemented. Good update.

tests/features/cli.feature (1)

33-37: LGTM! Consistent command renaming reflected in feature tests.

The scenario correctly updates both the command name and assertions to match the emit to manifest subcommand renaming.

docs/netsuke-design.md (2)

390-393: Documentation correctly updated for command rename.

The Manifest command documentation properly reflects the CLI change whilst maintaining the same functional behavior.


1425-1427: Command description accurately updated.

The description correctly states that manifest FILE writes the Ninja file without invoking Ninja, consistent with the renamed command.

tests/runner_tests.rs (3)

137-137: Function name appropriately updated.

The test function name correctly reflects the command rename from emit to manifest.


146-154: Variable and command structure consistently updated.

The variable rename from emit_path to output_path and the Commands::Manifest variant usage properly reflect the subcommand changes.


159-159: Assertion correctly uses updated variable.

The test assertion properly verifies the existence of the output file using the renamed variable.

tests/assert_cmd_tests.rs (3)

1-6: Excellent module documentation.

The doc comment clearly explains the purpose and scope of these integration tests.


13-26: Solid integration test for manifest subcommand.

The test properly sets up a temporary environment, isolates PATH, and verifies file creation without invoking Ninja.


28-49: Comprehensive test for build with emit functionality.

The test correctly sets up a fake ninja environment and verifies the emit functionality works as expected.

tests/steps/cli_steps.rs (2)

90-97: Step definition correctly updated for command rename.

The function name and Cucumber annotation properly reflect the change from emit to manifest, and the pattern match correctly handles the new Commands::Manifest variant.


148-155: Path extraction step definition properly updated.

The function name, step expression, and match arm are all consistently updated to handle the manifest command path extraction.

Comment thread tests/assert_cmd_tests.rs
Comment thread tests/cli_tests.rs
@leynos leynos merged commit be10bd6 into main Aug 6, 2025
3 of 4 checks passed
@leynos leynos deleted the codex/rename-emit-sub-command-to-manifest branch August 6, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant