Skip to content

Complete CLI config struct implementation with OrthoConfig (0.8.0)#273

Open
leynos wants to merge 19 commits into
mainfrom
add-cli-config-struct-vcf3xy
Open

Complete CLI config struct implementation with OrthoConfig (0.8.0)#273
leynos wants to merge 19 commits into
mainfrom
add-cli-config-struct-vcf3xy

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Mar 8, 2026

Summary

    • Completes the layered CLI configuration by introducing a canonical CliConfig derived via OrthoConfig and using it as the authoritative source for CLI configuration.
    • Splits Clap parsing from configuration merging into dedicated modules (parser, merge) and wires CliConfig through the OrthoConfig discovery/merge path.
    • Adds typed config enums (ColourPolicy, SpinnerMode, OutputFormat, Theme) with compatibility handling for existing surfaces like no_emoji.
    • Keeps the existing CLI surface stable while transitioning to a layered configuration model.
    • Upgrades ortho_config to 0.8.0 across Cargo.toml/Cargo.lock/build scripts and updates tests/docs accordingly.
    • Wires global and subcommand defaults (e.g. cmds.build.targets) through the layered config path.
    • Documentation and tests updated to reflect the new architecture and precedence rules.

Changes

  • New modules and schema:

    • src/cli/config.rs: defines CliConfig, BuildConfig, CommandConfigs, and the typed enums; implements defaults and post-merge validation hooks (Theme compatibility with no_emoji, Spinner/Progress compatibility, and unsupported OutputFormat).
    • src/cli/merge.rs: handles merging discovered layers with parsed CLI input, wiring into the CliConfig merge path and producing the runtime Cli state.
    • src/cli/parser.rs: Clap-facing parser types and helper localization utilities.
  • Refactor: moved merge logic and OrthoConfig-driven flow out of src/cli/mod.rs into dedicated modules for maintainability and testability.

  • Parser/merge wiring: CliConfig is wired into the OrthoConfig discovery/merge path so global values and subcommand defaults (e.g. cmds.build.targets) resolve through the same typed fields.

  • Compatibility: preserve hidden config-path behavior and keep --config handling out of scope for this milestone.

  • Tooling and dependencies:

    • Upgraded ortho_config to 0.8.0 across Cargo.toml/Cargo.lock/build.rs/docs.
    • Build script and tests updated to exercise the new layered configuration path.
  • Documentation and tests:

    • Added docs/execplans/3-11-1-cli-config-struct.md describing plan, decisions, and target architecture.
    • Updated docs/ortho-config-users-guide.md to reflect the upgrade to ortho_config 0.8.0 and corresponding guidance.
    • Expanded test coverage for configuration precedence, defaults, and validation; updated/added unit and behavioural tests.
    • Sample TOML config shows a global surface with per-subcommand defaults under [cmds.build].
  • Example config (TOML) (for reference):
    verbose = true
    locale = "es-ES"
    colour_policy = "auto"
    spinner_mode = "auto"
    output_format = "human"
    theme = "ascii"
    progress = true
    accessible = false

    [cmds.build]
    targets = ["all"]

This demonstrates a canonical view where global fields live at the root and subcommand defaults (like build targets) live under their respective sections.

Documentation impact

  • Added docs/execplans/3-11-1-cli-config-struct.md describing plan, decisions, and target architecture.
  • Updated docs/ortho-config-users-guide.md to reflect the upgrade to ortho_config 0.8.0 and related guidance.
  • Updated docs/users-guide.md to reflect the new layered CLI configuration model and precedence rules.
  • Roadmap entry 3.11.1 updated to reflect completion.

How to test locally

  • Run quality gates: make check-fmt, make lint, make test, make markdownlint, make nixie.
  • Validate CLI parsing and merge behavior with existing tests; ensure no regressions in top-level commands (build, clean, graph, manifest) and help/diagnostics messages.
  • Exercise precedence: file/env/CLI overrides against defaults using the new CliConfig paths.

Plan alignment and next steps

  • Stage A/B/C focused on splitting responsibilities and wiring CliConfig into the discovery/merge path.
  • Stage D adds unit and behavioural coverage; Stage E completes documentation and final verification.
  • This PR completes the core wiring and schema: CliConfig now governs the layered CLI configuration, while the parser and merge code remain focused on their respective responsibilities.

Idempotence and recovery

  • This work is implemented in small, reversible steps. If a stage fails, revert to the last green checkpoint and proceed with a narrower diff while updating the ExecPlan accordingly.
  • If formatting tools touch unrelated Markdown files, restore only the incidental edits created during the current turn before proceeding.

📎 Task: https://www.devboxer.com/task/c5d87114-1d80-439d-b1a9-21848725bc15

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Mar 8, 2026

Reviewer's Guide

Refactors the CLI into separate parser, config, and merge layers driven by a new OrthoConfig-derived CliConfig schema, wires layered configuration (including build subcommand defaults and typed presentation enums) through this path, upgrades ortho_config to 0.8.0, and updates tests and documentation to match the new precedence and configuration model.

Sequence diagram for CLI parse and layered configuration merge

sequenceDiagram
    actor User
    participant Main as main_rs
    participant Parser as parser_Cli
    participant Merge as merge_module
    participant Ortho as OrthoConfig_runtime
    participant Runner as runner_run

    User->>Main: invoke_netsuke(args)
    Main->>Parser: parse_with_localizer_from(args, localizer)
    Parser->>Parser: configure_validation_parsers()
    Parser->>Parser: Cli::from_arg_matches_mut()
    Parser-->>Main: (parsed_cli Cli, matches ArgMatches)

    Main->>Merge: merge_with_config(parsed_cli, matches)
    Merge->>Merge: config_discovery(directory)
    Merge->>Ortho: compose_layers(defaults, files, env, cli_overrides)
    Ortho-->>Merge: LayerComposition
    Merge->>Ortho: CliConfig::merge_from_layers(LayerComposition)
    Ortho-->>Merge: merged_config CliConfig
    Merge->>Merge: apply_config(parsed_cli, merged_config)
    Merge-->>Main: merged_cli Cli

    Main->>Main: init_tracing(merged_cli.verbose)
    Main->>Main: prefs = output_prefs::resolve(merged_cli.no_emoji_override())
    Main->>Runner: run(&merged_cli, prefs)
    Runner->>Runner: progress_enabled = merged_cli.progress_enabled()
    Runner-->>Main: Result
    Main-->>User: ExitCode
Loading

Class diagram for layered CLI configuration (CliConfig, parser Cli, and merge)

classDiagram
    class Cli {
        +PathBuf file
        +Option_PathBuf_ directory
        +Option_usize_ jobs
        +bool verbose
        +Option_String_ locale
        +Vec_String_ fetch_allow_scheme
        +Vec_HostPattern_ fetch_allow_host
        +Vec_HostPattern_ fetch_block_host
        +bool fetch_default_deny
        +Option_bool_ accessible
        +Option_bool_ no_emoji
        +Option_bool_ progress
        +Option_ColourPolicy_ colour_policy
        +Option_SpinnerMode_ spinner_mode
        +Option_OutputFormat_ output_format
        +Option_Theme_ theme
        +Option_Commands_ command
        +with_default_command() Cli
        +no_emoji_override() Option_bool_
        +progress_enabled() bool
    }

    class Commands {
        <<enumeration>>
        Build
        Clean
        Graph
        Manifest
    }

    class BuildArgs {
        +Option_PathBuf_ emit
        +Vec_String_ targets
    }

    class CliConfig {
        +PathBuf file
        +Option_usize_ jobs
        +bool verbose
        +Option_String_ locale
        +Vec_String_ fetch_allow_scheme
        +Vec_HostPattern_ fetch_allow_host
        +Vec_HostPattern_ fetch_block_host
        +bool fetch_default_deny
        +Option_bool_ accessible
        +Option_bool_ no_emoji
        +Option_bool_ progress
        +Option_ColourPolicy_ colour_policy
        +Option_SpinnerMode_ spinner_mode
        +Option_OutputFormat_ output_format
        +Option_Theme_ theme
        +CommandConfigs cmds
        +post_merge(ctx PostMergeContext) OrthoResult~()~
    }

    class CommandConfigs {
        +BuildConfig build
    }

    class BuildConfig {
        +Option_PathBuf_ emit
        +Vec_String_ targets
    }

    class ColourPolicy {
        <<enumeration>>
        Auto
        Always
        Never
    }

    class SpinnerMode {
        <<enumeration>>
        Auto
        Enabled
        Disabled
    }

    class OutputFormat {
        <<enumeration>>
        Human
        Json
    }

    class Theme {
        <<enumeration>>
        Auto
        Unicode
        Ascii
    }

    class MergeModule {
        +merge_with_config(cli Cli, matches ArgMatches) OrthoResult~Cli~
        +apply_config(parsed Cli, config CliConfig) Cli
        +resolve_command(parsed Option_Commands_, build_defaults BuildConfig) Commands
        +canonical_theme(theme Option_Theme_, no_emoji Option_bool_) Option_Theme_
    }

    class ParserModule {
        +parse_with_localizer_from(iter I, localizer Arc_Localizer_) Result~(Cli,ArgMatches),clap::Error~
        +validation_message(localizer Localizer, key str, args Option_LocalizationArgs_, fallback str) String
    }

    Cli --> Commands : uses
    Commands --> BuildArgs : Build(BuildArgs)

    CliConfig --> CommandConfigs : has
    CommandConfigs --> BuildConfig : has

    Cli --> ColourPolicy : uses
    Cli --> SpinnerMode : uses
    Cli --> OutputFormat : uses
    Cli --> Theme : uses

    CliConfig --> ColourPolicy : uses
    CliConfig --> SpinnerMode : uses
    CliConfig --> OutputFormat : uses
    CliConfig --> Theme : uses

    MergeModule --> CliConfig : merges
    MergeModule --> Cli : produces

    ParserModule --> Cli : parses
    ParserModule ..> MergeModule : passes Cli, ArgMatches
Loading

File-Level Changes

Change Details Files
Introduce CliConfig and layered configuration schema with typed enums and post-merge validation, and wire it into CLI merge flow.
  • Add src/cli/config.rs defining CliConfig, BuildConfig, CommandConfigs, and enums ColourPolicy, SpinnerMode, OutputFormat, Theme.
  • Derive OrthoConfig on CliConfig with NETSUKE prefix, defaults, merge strategies, and a PostMergeHook to validate theme/no_emoji, spinner/progress, and OutputFormat JSON rejection.
  • Switch merge defaults in tests and BDD steps from Cli::default to CliConfig::default and add helpers to merge defaults with file layers and assert validation errors.
src/cli/config.rs
tests/cli_tests/merge.rs
tests/bdd/steps/locale_resolution.rs
Split CLI module into parser-only and merge-only layers, keep Cli as runtime shape, and route configuration through CliConfig.
  • Replace monolithic src/cli/mod.rs implementation with thin module that re-exports submodules and types, and adds modules config, merge, parser while keeping parsing helpers in parsing.rs.
  • Move clap-facing Cli, BuildArgs, Commands, localized parsing, and validation parser wiring into src/cli/parser.rs; add no_emoji_override and progress_enabled helpers and extra skipped fields for resolved colour_policy/spinner_mode/output_format/theme.
  • Add src/cli/merge.rs to compose defaults, file, env, and CLI overrides into CliConfig, convert it back into a runtime Cli (including applying cmds.build defaults and canonicalizing theme/no_emoji), and preserve existing ConfigDiscovery/NETSUKE_CONFIG_PATH and env semantics.
  • Adapt parsing helpers in src/cli/parsing.rs to refer to parser::validation_message and parser::MAX_JOBS constants.
src/cli/mod.rs
src/cli/parser.rs
src/cli/merge.rs
src/cli/parsing.rs
Wire new merged Cli shape into main, runner, build script, and tests, including no_emoji/theme and progress behaviour.
  • Update main.rs to stop calling with_default_command after merge (now done in BDD helper) and to resolve output_prefs via Cli::no_emoji_override.
  • Update runner to use Cli::progress_enabled for progress toggling instead of inspecting progress Option directly.
  • In build.rs, reference new CLI symbols (CliConfig, BuildArgs, Commands) and helper methods (no_emoji_override, progress_enabled) and add rerun-if-changed lines for new CLI submodules.
  • Add BDD steps and feature file (configuration_preferences) that exercise build-target defaults via [cmds.build], locale/verbose precedence, unsupported output_format error, and no_emoji->Theme::Ascii compatibility; track EnvLock in TestWorld to serialize env mutations.
src/main.rs
src/runner/mod.rs
build.rs
tests/bdd/fixtures/mod.rs
tests/bdd/steps/mod.rs
tests/bdd/steps/configuration_preferences.rs
tests/features/configuration_preferences.feature
Upgrade ortho_config to 0.8.0 and expand its documentation, especially around derive semantics, cli_default_as_absent, and OrthoConfigDocs.
  • Bump ortho_config dependency (runtime and build-dependencies) from 0.7.0 to 0.8.0 in Cargo.toml and refresh Cargo.lock accordingly.
  • Expand docs/ortho-config-users-guide.md with 0.8.0 content: dependency architecture for derive macro users, troubleshooting, FAQ about figment/uncased/xdg deps, enhanced cli_default_as_absent behaviour and defaults inference, new OrthoConfigDocs and cargo-orthohelp sections (IR generation, man pages, PowerShell help), and updated notes on naming conventions.
  • Adjust existing examples in the OrthoConfig guide to use 0.8.0 versions and tweak compose_layers_from_iter docs and attribute table wording.
Cargo.toml
Cargo.lock
docs/ortho-config-users-guide.md
Document the new layered CLI config model, CliConfig responsibilities, and roadmap completion; add execution plan doc.
  • Update docs/netsuke-design.md to describe separation of parser Cli from CliConfig, new schema fields (colour policy, spinner mode, output format, theme, build defaults), and validation/conflict handling while keeping locale resolution and runner architecture notes consistent.
  • Extend docs/users-guide.md with an explicit CliConfig key list (global and [cmds.build]), example TOML, and explanations of theme/no_emoji, spinner_mode/progress, output_format constraints, and future colour_policy behaviour.
  • Mark roadmap item 3.11.1 and its sub-bullets as complete in docs/roadmap.md.
  • Add docs/execplans/3-11-1-cli-config-struct.md capturing the execution plan, constraints, decisions, and outcomes for the CliConfig work.
docs/netsuke-design.md
docs/users-guide.md
docs/roadmap.md
docs/execplans/3-11-1-cli-config-struct.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

codescene-delta-analysis[bot]

This comment was marked as outdated.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 8, 2026

Review Change Stack

Warning

Review limit reached

@lodyai[bot], we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 7 minutes and 26 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 99db63c0-082c-45fb-8f18-f59e4e29b1cd

📥 Commits

Reviewing files that changed from the base of the PR and between 82a1f69 and ffbf353.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (24)
  • Cargo.toml
  • build.rs
  • docs/execplans/3-11-1-cli-config-struct.md
  • docs/netsuke-design.md
  • docs/ortho-config-users-guide.md
  • docs/roadmap.md
  • docs/users-guide.md
  • src/cli/config.rs
  • src/cli/merge.rs
  • src/cli/mod.rs
  • src/cli/parser.rs
  • src/cli/parsing.rs
  • src/main.rs
  • src/output_mode.rs
  • src/runner/mod.rs
  • src/theme.rs
  • test_support/src/netsuke.rs
  • tests/bdd/fixtures/mod.rs
  • tests/bdd/steps/configuration_preferences.rs
  • tests/bdd/steps/locale_resolution.rs
  • tests/bdd/steps/mod.rs
  • tests/cli_tests/merge.rs
  • tests/cli_tests/parsing.rs
  • tests/features/configuration_preferences.feature

Walkthrough

Introduce an OrthoConfig-derived CliConfig, split src/cli into parser, config and merge, implement layered config discovery/merge with post-merge validation, update startup wiring and reporters, and add tests and docs describing the new layered schema.

Changes

CliConfig and CLI refactor

Layer / File(s) Summary
Dependencies & build script
Cargo.toml, build.rs
Update package.metadata.ortho_config.root_type to netsuke::cli::CliConfig; adjust minijinja and build-dependencies; refactor build.rs to generate man page, verify public API symbols, and extend cargo:rerun-if-changed coverage.
Core CLI: parser, config, merge
src/cli/config.rs, src/cli/mod.rs, src/cli/parser.rs, src/cli/parsing.rs, src/cli/merge.rs
Introduce CliConfig (OrthoConfig) and typed enums (ColourPolicy, SpinnerMode, OutputFormat, Theme); add localized Clap parser Cli/BuildArgs/Commands; implement merge_with_config and resolve_merged_diag_json to compose defaults, files, env and explicit CLI overrides and to apply post-merge validation and apply_config.
Application integration & runtime
src/main.rs, src/runner/mod.rs, src/output_mode.rs, src/theme.rs, test_support/src/netsuke.rs
Resolve diagnostic JSON pre-merge (resolve_merged_diag_json), centralise merge error handling with merge_cli_or_exit, remove NO_COLOR side-effects from main, and use cli.progress_enabled() / cli.no_emoji_override() accessors when initialising reporters.
Tests: BDD & fixtures
tests/bdd/fixtures/mod.rs, tests/bdd/steps/*, tests/features/*
Add EnvLock guard and workspace config helpers; add configuration_preferences BDD steps and feature scenarios; adapt locale-resolution steps to use CliConfig defaults and merge_from_layers.
Tests: unit/integration
tests/cli_tests/merge.rs, tests/cli_tests/parsing.rs
Migrate merge tests to CliConfig and Theme; add helpers to write temp netsuke.toml, assert merge results/rejections, and add emoji-resolution tests.
Docs & planning
docs/execplans/3-11-1-cli-config-struct.md, docs/netsuke-design.md, docs/ortho-config-users-guide.md, docs/roadmap.md, docs/users-guide.md
Add ExecPlan and design updates describing the layered CliConfig schema, examples and precedence rules; mark configuration item 3.11.1 complete in roadmap.

Possibly related PRs

  • leynos/netsuke#279: Overlaps on build-script symbol anchoring and rerun-directive refactor.
  • leynos/netsuke#288: Overlaps on manpage/help generation and build.rs responsibilities.

Suggested labels

Issue

Poem

✨ Split the CLI, stitch the config right,
Defaults, files, env and flags unite.
Tests hum, docs sing, build scripts write,
CliConfig stands firm in morning light.
🍃

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-cli-config-struct-vcf3xy

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

codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos leynos changed the title Add CliConfig struct derived from OrthoConfig Add CliConfig planning docs and ortho_config upgrade notes Mar 8, 2026
@leynos leynos changed the title Add CliConfig planning docs and ortho_config upgrade notes Introduce CliConfig with modular CLI parsing/merge Mar 9, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 10, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

tests/cli_tests/merge.rs

Comment on file

fn cli_config_build_defaults_apply_when_cli_targets_are_absent() -> Result<()> {
    let _env_lock = EnvLock::acquire();
    let temp_dir = tempdir().context("create temporary config directory")?;
    let config_path = temp_dir.path().join("netsuke.toml");
    fs::write(
        &config_path,
        r#"
[cmds.build]
targets = ["all", "docs"]
"#,
    )
    .context("write netsuke.toml")?;

    let _config_guard = EnvVarGuard::set("NETSUKE_CONFIG_PATH", config_path.as_os_str());
    let localizer = Arc::from(cli_localization::build_localizer(None));
    let (cli, matches) = netsuke::cli::parse_with_localizer_from(["netsuke"], &localizer)
        .context("parse CLI args for merge")?;
    let merged = netsuke::cli::merge_with_config(&cli, &matches)
        .context("merge CLI and configuration layers")?;

    let Some(netsuke::cli::Commands::Build(args)) = merged.command else {
        anyhow::bail!("expected merged command to be build");
    };
    ensure!(
        args.targets == vec![String::from("all"), String::from("docs")],
        "configured build targets should be used when CLI targets are absent",
    );
    Ok(())
}

❌ New issue: Code Duplication
The module contains 5 functions with similar structure: cli_config_build_defaults_apply_when_cli_targets_are_absent,cli_config_explicit_targets_override_configured_build_defaults,cli_config_rejects_unsupported_json_output_format,cli_config_validates_spinner_and_progress_conflicts and 1 more functions

@coderabbitai

This comment was marked as resolved.

@leynos leynos changed the title Introduce CliConfig with modular CLI parsing/merge Complete layered CliConfig wiring with OrthoConfig 0.8.0 Mar 10, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 10, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

tests/cli_tests/merge.rs

Comment on file

fn cli_config_build_defaults_apply_when_cli_targets_are_absent() -> Result<()> {
    with_config_file(
        r#"
[cmds.build]
targets = ["all", "docs"]
"#,
        &["netsuke"],
        |merged| {
            let Some(netsuke::cli::Commands::Build(args)) = merged.command else {
                anyhow::bail!("expected merged command to be build");
            };
            ensure!(
                args.targets == vec![String::from("all"), String::from("docs")],
                "configured build targets should be used when CLI targets are absent",
            );
            Ok(())
        },
    )
}

❌ New issue: Code Duplication
The module contains 4 functions with similar structure: cli_config_build_defaults_apply_when_cli_targets_are_absent,cli_config_explicit_targets_override_configured_build_defaults,cli_config_validates_spinner_and_progress_conflicts,cli_config_validates_theme_alias_conflicts

@coderabbitai

This comment was marked as resolved.

@leynos leynos changed the title Complete layered CliConfig wiring with OrthoConfig 0.8.0 Wired CliConfig through OrthoConfig 0.8.0; refactor CLI layers Mar 11, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 11, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

tests/cli_tests/merge.rs

Comment on file

fn cli_config_validates_theme_alias_conflicts(
    default_cli_json: Result<serde_json::Value>,
) -> Result<()> {
    assert_merge_rejects(
        default_cli_json?,
        json!({
            "theme": "unicode",
            "no_emoji": true
        }),
        "conflicting theme and alias should fail",
        "theme = \"unicode\" conflicts with no_emoji = true",
    )
}

❌ New issue: Code Duplication
The module contains 2 functions with similar structure: cli_config_validates_spinner_and_progress_conflicts,cli_config_validates_theme_alias_conflicts

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 11, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

tests/cli_tests/merge.rs

Comment on file

use anyhow::{Context, Result, ensure};
use netsuke::cli::Cli;
use netsuke::cli::{CliConfig, Theme};

❌ New issue: String Heavy Function Arguments
In this module, 44.4% of all arguments to its 14 functions are strings. The threshold for string arguments is 39.0%

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 12, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

tests/cli_tests/merge.rs

Comment on file

use anyhow::{Context, Result, ensure};
use netsuke::cli::Cli;
use netsuke::cli::{CliConfig, Theme};

❌ New issue: String Heavy Function Arguments
In this module, 50.0% of all arguments to its 11 functions are strings. The threshold for string arguments is 39.0%

@coderabbitai

This comment was marked as resolved.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos leynos marked this pull request as ready for review March 12, 2026 18:50
sourcery-ai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown

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

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: cf2ccff65d

ℹ️ 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 src/cli/parser.rs Outdated
coderabbitai[bot]

This comment was marked as resolved.

@leynos leynos changed the title Wired CliConfig through OrthoConfig 0.8.0; refactor CLI layers Complete CLI config struct task: CliConfig as OrthoConfig surface (0.8.0) Mar 12, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented May 27, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response.

src/cli/parsing.rs

Comment on file

//! CLI parsing helpers for clap value parsers.

use clap::ValueEnum;

❌ New issue: String Heavy Function Arguments
In this module, 45.0% of all arguments to its 9 functions are strings. The threshold for string arguments is 39.0%

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

Replace the enum-backed rejection helper and four-case matrix with a
three-case rstest table and string expectations. Route JSON output-format
rejection through the runtime merge path because validation now lives in
merge_with_config rather than merge_from_layers.

Co-authored-by: Cursor <cursoragent@cursor.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

@coderabbitai

This comment was marked as resolved.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented May 27, 2026

@coderabbitai Please investigate the cause of the following issue using codegraph exploration and research, identify a fix and provide an AI coding agent prompt for the fix:

Run leynos/shared-actions/.github/actions/rust-build-release@e4c6b0e200a057edf927c45c298e7ddf229b3934
  with:
    target: x86_64-unknown-linux-gnu
    bin-name: netsuke
    project-dir: .
    manifest-path: Cargo.toml
    skip-man-page-discovery: true
  env:
    BIN_NAME: netsuke
    VERSION: 0.1.0
    MAN_ARCH: amd64
Run astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6
Trying to find version for uv in: /home/runner/work/netsuke/netsuke/uv.toml
Could not find file: /home/runner/work/netsuke/netsuke/uv.toml
Trying to find version for uv in: /home/runner/work/netsuke/netsuke/pyproject.toml
Could not find file: /home/runner/work/netsuke/netsuke/pyproject.toml
Could not determine uv version from uv.toml or pyproject.toml. Falling back to latest.
Getting latest version from GitHub API...
manifest-file not provided, reading from local file.
manifest-file does not contain version 0.11.16, arch x86_64, platform unknown-linux-gnu. Falling back to GitHub releases.
Downloading uv from "https://github.com/astral-sh/uv/releases/download/0.11.16/uv-x86_64-unknown-linux-gnu.tar.gz" ...
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/8e44100d-626d-4ed7-a6d7-78951d6f0385 -f /home/runner/work/_temp/c0fa2252-8334-45c4-852a-7eee32876844
Added /home/runner/.local/bin to the path
Added /opt/hostedtoolcache/uv/0.11.16/x86_64 to the path
Set UV_CACHE_DIR to /home/runner/work/_temp/setup-uv-cache
Successfully installed uv version 0.11.16
Searching files using cache dependency glob: /home/runner/work/netsuke/netsuke/**/*requirements*.txt,/home/runner/work/netsuke/netsuke/**/*requirements*.in,/home/runner/work/netsuke/netsuke/**/*constraints*.txt,/home/runner/work/netsuke/netsuke/**/*constraints*.in,/home/runner/work/netsuke/netsuke/**/pyproject.toml,/home/runner/work/netsuke/netsuke/**/uv.lock
No matches found for glob
Warning: No file matched to [/home/runner/work/netsuke/netsuke/**/*requirements*.txt,/home/runner/work/netsuke/netsuke/**/*requirements*.in,/home/runner/work/netsuke/netsuke/**/*constraints*.txt,/home/runner/work/netsuke/netsuke/**/*constraints*.in,/home/runner/work/netsuke/netsuke/**/pyproject.toml,/home/runner/work/netsuke/netsuke/**/uv.lock]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.
Trying to restore uv cache from GitHub Actions cache with key: setup-uv-1-x86_64-unknown-linux-gnu-3.12.3-pruned-no-dependency-glob
Cache hit for: setup-uv-1-x86_64-unknown-linux-gnu-3.12.3-pruned-no-dependency-glob
Received 1074 of 1074 (100.0%), 0.1 MBs/sec
Cache Size: ~0 MB (1074 B)
/usr/bin/tar -xf /home/runner/work/_temp/55318a47-414a-4eba-811b-072f301931bd/cache.tzst -P -C /home/runner/work/netsuke/netsuke --use-compress-program unzstd
Cache restored successfully
uv cache restored from GitHub Actions cache with key: setup-uv-1-x86_64-unknown-linux-gnu-3.12.3-pruned-no-dependency-glob
Run set -euo pipefail
Downloading pygments (1.2MiB)
 Downloaded pygments
Installed 9 packages in 11ms
Run set -euo pipefail
Run leynos/shared-actions/.github/actions/setup-rust@aebb3f5b831102e2a10ef909c83d7d50ea86c332
Run actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9
Run : construct rustup command line
Run if [[ ! -v CARGO_INCREMENTAL ]]; then
Run echo "::add-matcher::/home/runner/work/_actions/actions-rust-lang/setup-rust-toolchain/9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9/rust.json"
Run if ! command -v rustup &> /dev/null ; then
Run if [[ -z "$toolchain" && ( -f "rust-toolchain" || -f "rust-toolchain.toml" ) ]]
info: syncing channel updates for 1.89.0-x86_64-unknown-linux-gnu
info: latest update on 2025-08-07 for version 1.89.0 (29483883e 2025-08-04)
info: component clippy is up to date
info: component rustfmt is up to date
info: downloading component llvm-tools

  1.89.0-x86_64-unknown-linux-gnu updated - rustc 1.89.0 (29483883e 2025-08-04) (from rustc 1.89.0 (29483883e 2025-08-04))

info: override toolchain for /home/runner/work/netsuke/netsuke set to 1.89.0-x86_64-unknown-linux-gnu
Run echo "rustc-version=$(rustc --version)" >> $GITHUB_OUTPUT
rustc 1.89.0 (29483883e 2025-08-04)
binary: rustc
commit-hash: 29483883eed69d5fb4db01964cdf2af4d86e9cb2
commit-date: 2025-08-04
host: x86_64-unknown-linux-gnu
release: 1.89.0
LLVM version: 20.1.7
cargo 1.89.0 (c24e10642 2025-06-23)
release: 1.89.0
commit-hash: c24e1064277fe51ab72011e2612e556ac56addf7
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
libgit2: 1.9.0 (sys:0.20.2 vendored)
libcurl: 8.12.1-DEV (sys:0.4.80+curl-8.12.1 vendored ssl:OpenSSL/3.5.0)
ssl: OpenSSL 3.5.0 8 Apr 2025
os: Ubuntu 24.4.0 (noble) [64-bit]
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: the currently active `rustc` version is `rustc 1.89.0 (29483883e 2025-08-04)`
info: This is the version for the rustup toolchain manager, not the rustc compiler.
rustup 1.29.0 (28d1352db 2026-03-05)
info: the currently active `rustc` version is `rustc 1.89.0 (29483883e 2025-08-04)`
Run # Not all versions support setting CARGO_REGISTRIES_CRATES_IO_PROTOCOL
Run set -euo pipefail
+ set -o pipefail
+ set -o pipefail
+ case "${BINSTALL_VERSION:-}" in
++ mktemp -d
+ cd /tmp/tmp.P63U0puRMK
+ '[' -z '' ']'
+ base_url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-
++ uname -s
+ os=Linux
+ '[' Linux = Darwin ']'
+ '[' Linux = Linux ']'
++ uname -m
+ machine=x86_64
+ '[' x86_64 = armv7l ']'
+ target=x86_64-unknown-linux-musl
+ '[' x86_64 = armv7 ']'
+ url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ do_curl https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ curl --retry 10 -A 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0' -L --proto =https --tlsv1.2 -sSf https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ tar -xvzf -
cargo-binstall
+ ./cargo-binstall --self-install
+ CARGO_HOME=/home/runner/.cargo
+ case ":$PATH:" in
+ '[' -n '' ']'
Run astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc
Trying to find version for uv in: /home/runner/work/netsuke/netsuke/uv.toml
Could not find file: /home/runner/work/netsuke/netsuke/uv.toml
Trying to find version for uv in: /home/runner/work/netsuke/netsuke/pyproject.toml
Could not find file: /home/runner/work/netsuke/netsuke/pyproject.toml
Could not determine uv version from uv.toml or pyproject.toml. Falling back to latest.
Found uv in tool-cache for 0.11.16
Added /home/runner/.local/bin to the path
Added /opt/hostedtoolcache/uv/0.11.16/x86_64 to the path
Set UV_CACHE_DIR to /home/runner/work/_temp/setup-uv-cache
Successfully installed uv version 0.11.16
Searching files using cache dependency glob: /home/runner/work/netsuke/netsuke/**/pyproject.toml,/home/runner/work/netsuke/netsuke/**/uv.lock,/home/runner/work/netsuke/netsuke/**/scripts/*.py
No matches found for glob
Warning: No file matched to [/home/runner/work/netsuke/netsuke/**/pyproject.toml,/home/runner/work/netsuke/netsuke/**/uv.lock,/home/runner/work/netsuke/netsuke/**/scripts/*.py]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.
Trying to restore uv cache from GitHub Actions cache with key: setup-uv-1-x86_64-unknown-linux-gnu-3.12.3-pruned-no-dependency-glob
Cache hit for: setup-uv-1-x86_64-unknown-linux-gnu-3.12.3-pruned-no-dependency-glob
Received 1074 of 1074 (100.0%), 0.1 MBs/sec
Cache Size: ~0 MB (1074 B)
/usr/bin/tar -xf /home/runner/work/_temp/2189b62a-6b92-4139-af7c-86d657ad8766/cache.tzst -P -C /home/runner/work/netsuke/netsuke --use-compress-program unzstd
Cache restored successfully
uv cache restored from GitHub Actions cache with key: setup-uv-1-x86_64-unknown-linux-gnu-3.12.3-pruned-no-dependency-glob
Run actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
Cache hit for: Linux-cargo--53e4307dff090a8995a71b08706b72cb0b1336505ee6434590e560650ecc4c4e
Received 180174722 of 180174722 (100.0%), 215.6 MBs/sec
Cache Size: ~172 MB (180174722 B)
/usr/bin/tar -xf /home/runner/work/_temp/e21c5e3b-a56c-4fba-a2fc-f5a82573c089/cache.tzst -P -C /home/runner/work/netsuke/netsuke --use-compress-program unzstd
Cache restored successfully
Cache restored from key: Linux-cargo--53e4307dff090a8995a71b08706b72cb0b1336505ee6434590e560650ecc4c4e
Run mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad
try to setup sccache version: v0.15.0
sccache download from url: https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz
Correct checksum: 782d2b5dd7ae0a55ebe368ab258114d0928d019ac2d949ab85d5d02f3926709e
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/9a9d7beb-095b-43e1-98eb-bbaeda2ecb38 -f /home/runner/work/_temp/25e86e1e-431a-4dc7-b685-70f19925e600
sccache extracted to: /home/runner/work/_temp/9a9d7beb-095b-43e1-98eb-bbaeda2ecb38
sccache cached to: /opt/hostedtoolcache/sccache/0.15.0/x64
Run set -euo pipefail
Installed 10 packages in 9ms
$ /home/runner/.cargo/bin/rustup toolchain list
$ /home/runner/.cargo/bin/rustup target add --toolchain 1.89.0-x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu
Installing cross (not found)...
$ /home/runner/.cargo/bin/cargo install cross --locked --version 0.2.5
$ /home/runner/.cargo/bin/cross --version
$ /usr/bin/docker info
$ /usr/bin/podman info
$ /usr/bin/podman info --format {{json .Host.Security}}
Warning:  podman missing CAP_SYS_ADMIN; treating runtime as unavailable
Building with cross (0.2.5)
$ cross build --manifest-path Cargo.toml --release --target x86_64-unknown-linux-gnu
Run set -euo pipefail
Notice: skip-man-page-discovery is set; man-page discovery and the man-path output are suppressed for this run.
0s
Run set -euo pipefail
  set -euo pipefail
  bash scripts/generate-release-help.sh \
    "x86_64-unknown-linux-gnu" \
    "netsuke" \
    "target/orthohelp/x86_64-unknown-linux-gnu/release" \
    "netsuke"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    BIN_NAME: netsuke
    VERSION: 0.1.0
    MAN_ARCH: amd64
    UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
    RBR_TOOLCHAIN: 1.89.0
    CARGO_INCREMENTAL: 0
    CARGO_PROFILE_DEV_DEBUG: 0
    CARGO_TERM_COLOR: always
    RUST_BACKTRACE: short
    RUSTFLAGS: -D warnings
    CARGO_UNSTABLE_SPARSE_REGISTRY: true
    CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
    SCCACHE_PATH: /opt/hostedtoolcache/sccache/0.15.0/x64/sccache
    ACTIONS_CACHE_SERVICE_V2: on
    ACTIONS_RESULTS_URL: https://results-receiver.actions.githubusercontent.com/
    ACTIONS_RUNTIME_TOKEN: ***
Notice: build_id=26477208662-1 correlation_id=26477208662-1-x86_64-unknown-linux-gnu-netsuke target=x86_64-unknown-linux-gnu format=man locale=en-US out_dir=target/orthohelp/x86_64-unknown-linux-gnu/release
Error: MissingRootType
Error: build_id=26477208662-1 correlation_id=26477208662-1-x86_64-unknown-linux-gnu-netsuke target=x86_64-unknown-linux-gnu format=man locale=en-US out_dir=target/orthohelp/x86_64-unknown-linux-gnu/release stderr=Error: MissingRootType
Error: Process completed with exit code 1.

Replace the two string parameters on parse_value_enum with a single
spec struct so call sites pass one grouped argument and CodeScene's
string-heavy argument metric drops below threshold.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

This comment was marked as resolved.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Move file-layer and environment branching out of resolve_merged_diag_json
into diag_json_from_file_layers and diag_json_from_env so the public entry
point delegates through three focused steps and cyclomatic complexity drops.

Co-authored-by: Cursor <cursoragent@cursor.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

Resolve explicit and discovered config paths through map_or_else so a
single Ok/Err match pushes layers or records one error, removing the
duplicated nested match arms.

Co-authored-by: Cursor <cursoragent@cursor.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

Add package metadata pointing cargo-orthohelp at CliConfig and the
supported locale list so release help generation can resolve the schema.

Co-authored-by: Cursor <cursoragent@cursor.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented May 27, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. Ensure that this is validated against the current version of the codegraph.

If further refinement to address this finding would be deleterious, please supply a clear explanatory one to two paragraph markdown message I can paste into the CodeScene web ui's diagnostic suppression function so this diagnostic can be silenced.

Code Duplication

src/cli/parsing.rs:

What lead to degradation?

The module contains 3 functions with similar structure: parse_colour_policy,parse_output_format,parse_spinner_mode

Why does this problem occur?

Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.

How to fix it?

A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. Read More
Once you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented May 27, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response.

String Heavy Function Arguments

src/cli/parsing.rs:

What lead to degradation?

In this module, 47.4% of all arguments to its 9 functions are strings. The threshold for string arguments is 39.0%

Why does this problem occur?

String is a generic type that fail to capture the constraints of the domain object it represents. In this module, 47 % of all function arguments are string types.

How to fix it?

Heavy string usage indicates a missing domain language. Introduce data types that encapsulate the semantics. For example, a user_name is better represented as a constrained User type rather than a pure string, which could be anything.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented May 27, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response.

String Heavy Function Arguments

tests/cli_tests/merge.rs:

What lead to degradation?

In this module, 46.2% of all arguments to its 11 functions are strings. The threshold for string arguments is 39.0%

Why does this problem occur?

String is a generic type that fail to capture the constraints of the domain object it represents. In this module, 46 % of all function arguments are string types.

How to fix it?

Heavy string usage indicates a missing domain language. Introduce data types that encapsulate the semantics. For example, a user_name is better represented as a constrained User type rather than a pure string, which could be anything.

@coderabbitai

This comment was marked as resolved.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@coderabbitai

This comment was marked as resolved.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== src/cli/parsing.rs: full file ==="
fd -e rs parsing src/cli/ --exec cat {}

Length of output: 6003



File: src/cli/parsing.rs — all parser functions


Assessment: suppress this diagnostic

Further refactoring here would be deleterious. Apply the suppression text below.


Suppression justification

The ParseEnumSpec struct was already introduced to remove the localisation-key and argument-name string parameters from parse_value_enum, which addressed the one case where &str arguments were carrying semantic information that deserved a richer type. The nine remaining s: &str parameters — one in each parsing function — are the raw CLI argument value that clap hands to every value parser. This is a fixed interface requirement: clap's ValueParser and LocalizedValueParser machinery always supplies the raw user input as a &str, and the entire purpose of each function is to validate and convert that string into a typed domain value. Wrapping &str in a newtype purely to reduce CodeScene's counter would add meaningless indirection, require every call site to construct the wrapper, and force every function body to unwrap it again before use — all with zero gain in domain clarity or safety.

All nine functions are pub(super) implementation details of the parser module and are never exposed in the crate's public API. The string-heavy ratio is a structural artefact of clap's value-parser contract, not a design smell in the module itself. The ParseEnumSpec refactoring has already extracted every string argument that could meaningfully be typed; what remains is unavoidable plumbing that should not be further abstracted.

@coderabbitai coderabbitai Bot added the Roadmap label May 27, 2026
Replace string expected_msg parameters with ExpectedValidationError so
assert_merge_rejects and its rstest cases carry typed expectations and
CodeScene's string-argument ratio drops below threshold.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Choose a reason for hiding this comment

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

Gates Failed
Enforce advisory code health rules (1 file with String Heavy Function Arguments)

Gates Passed
5 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
parsing.rs 1 advisory rule 10.00 → 9.10 Suppress

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

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