Skip to content

Expand top-level action flow control (3.14.2)#309

Open
leynos wants to merge 11 commits into
mainfrom
3-14-2-top-level-flow-control-expansion
Open

Expand top-level action flow control (3.14.2)#309
leynos wants to merge 11 commits into
mainfrom
3-14-2-top-level-flow-control-expansion

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented May 18, 2026

Summary

Implements roadmap item (3.14.2) for top-level action flow-control expansion.

This change registers command_available beside the existing which helper so manifest-time when clauses can select complementary top-level actions, including branches such as command_available(...) and not command_available(...). The helper reuses the which resolver and options, returns false only for command absence, and preserves hard errors for invalid arguments.

Execplan: docs/execplans/3-14-2-top-level-flow-control-expansion.md

Changes

  • Add command_available to the stdlib executable-discovery boundary.
  • Add stdlib, manifest expansion, and BDD coverage for available, unavailable, complementary, and invalid-option paths.
  • Document the user-facing helper in docs/users-guide.md and the internal resolver-boundary convention in docs/developers-guide.md.
  • Mark roadmap item 3.14.2 done while leaving broader executable-probe item 3.14.4 open.

Validation

  • cargo test --all-targets --all-features command_available: passed
  • cargo test --all-targets --all-features manifest::expand: passed
  • Focused rstest-bdd manifest and manifest-subcommand scenarios: passed
  • make markdownlint: passed
  • make nixie: passed
  • make check-fmt: passed
  • make lint: passed
  • make test: passed
  • coderabbit review --agent: milestone reviews passed after fixes; final post-validation attempts were rate-limited before producing findings

Notes

  • make fmt was attempted and still fails in the older markdownlint --fix path on pre-existing repository-wide Markdown line-length issues. Formatter churn from that attempt was restored; task-scoped Markdown linting and make markdownlint pass.

References

Add the pre-implementation ExecPlan for roadmap item `3.14.2`.
The plan records the existing action expansion path, the remaining
`command_available` branch-selection work, validation expectations,
CodeRabbit review cadence, and the approval gate before implementation.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Review Change Stack

Warning

Rate limit exceeded

@lodyai[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 52 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c24cff91-7bd7-491b-8c12-84332b39e556

📥 Commits

Reviewing files that changed from the base of the PR and between cdcb20a and a0727ee.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • docs/users-guide.md
  • src/stdlib/which/error.rs
  • tests/bdd/steps/conditional_manifest.rs
  • tests/stdlib_which_tests.rs

Walkthrough

Implement the command_available(...) manifest-time helper predicate, register it alongside which, map resolver "not found" diagnostics to false, add unit and BDD tests covering success, absence, and invalid-argument cases, and update user/developer docs plus an ExecPlan and roadmap entries.

Changes

command_available helper and action branching

Layer / File(s) Summary
Stdlib predicate and error handling
src/stdlib/which/error.rs, src/stdlib/which/mod.rs
Introduce NOT_FOUND_CODE and is_not_found_error; register command_available MiniJinja function that validates and trims the command, parses WhichOptions, resolves matches using WhichResolver, returns boolean, maps "not found" resolution errors to false, and propagates other errors.
Manifest action expansion for command availability
src/manifest/expand_test_cases/condition_cases.rs
Add parameterised test that registers command_available in Minijinja, expands mutually-exclusive when: command_available(...) branches, asserts only the selected branch is kept, and that the when field is removed after expansion.
Stdlib integration tests
tests/stdlib_which_tests.rs
Add tests that assert command_available returns "true" when an executable exists on an overridden PATH, returns "false" when missing with cwd_mode='never', and fails with descriptive errors for empty command or unknown kwargs; include a which filter not-found failure test.
BDD fixtures and scenarios
tests/bdd/steps/conditional_manifest.rs, tests/data/actions_command_available_*.yml, tests/features/manifest*.feature
Add manifest fixtures, workspace setup helpers (create executable, set permissions, prepend PATH), and Gherkin scenarios validating top-level action selection when preferred tool present/absent and invalid-option failure handling.
User & developer documentation
docs/users-guide.md, docs/developers-guide.md
Document command_available alongside which, describe boolean return and absence-not-error semantics, and add example manifests showing conditional top-level actions.
ExecPlan, roadmap and retrospective
docs/execplans/3-14-2-top-level-flow-control-expansion.md, docs/roadmap.md
Add ExecPlan with constraints, milestones, validation checklist, decision log, and completion evidence; update roadmap and developer guide to mark task 3.14.2 complete for top-level action expansion and command availability branching.

Possibly related PRs

  • leynos/netsuke#298: Adds initial command_available(...) support and manifest-expansion tests that this PR builds upon.

Suggested labels

Roadmap

Poem

A helper wakes to probe the PATH,
Preferred or fallback, choose the right path,
When truth or absence decides what to do,
Actions shrink to the one that is true,
command_available rings the manifest bell. 🎯


Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (3 errors, 3 warnings)

Check name Status Explanation Resolution
Testing (Overall) ❌ Error Review comments remain unaddressed: unnecessary allocation in with_not_found_code() and Clippy lint on .to_string() in stdlib_which_tests.rs line 132. Fix: remove into_boxed_str() in error.rs; change context_msg.to_string() to context_msg.to_owned() in stdlib_which_tests.rs line 132. Verify with cargo test.
Module-Level Documentation ❌ Error tests/bdd/steps/conditional_manifest.rs has only a single-line docstring. Codebase convention requires multi-line documentation explaining what steps are provided and fixture interaction. Expand docstring to match BDD step patterns: add lines explaining which step functions are provided, what functionality they verify, and how they use TestWorld fixtures.
Unit Architecture ❌ Error Review comments remain unresolved: (1) error.rs line 19 has unnecessary into_boxed_str() allocation; (2) stdlib_which_tests.rs line 132 uses .to_string() instead of .to_owned() on &str. Remove into_boxed_str() from error.rs line 19 and pass message directly to format!. Change .to_string() to .to_owned() in stdlib_which_tests.rs line 132 context closure.
Docstring Coverage ⚠️ Warning Docstring coverage is 54.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Developer Documentation ⚠️ Warning 3.14.4 is fully implemented but marked incomplete. Code meets all sub-items: reuses resolver, returns false for absence, preserves validation errors. Docs present. Execplan done. Mark 3.14.4 and sub-items completed since implementation and documentation satisfy all requirements.
Performance And Resource Use ⚠️ Warning Unnecessary allocations in error.rs:19 (into_boxed_str consumed by format!) and stdlib_which_tests.rs:132 (.to_string() on &str). Remove into_boxed_str() in error.rs:19, passing message directly to format!. Change .to_string() to .to_owned() in stdlib_which_tests.rs:132.
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change (top-level action flow control expansion) and correctly includes the roadmap item reference (3.14.2) as required.
Description check ✅ Passed The description directly relates to the changeset, explaining the implementation of roadmap item 3.14.2, the new command_available helper, test coverage, documentation updates, and validation results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
User-Facing Documentation ✅ Passed New command_available helper documented in users-guide.md with complete signature, arguments, error codes, and practical usage example. No breaking changes or multi-language sync issues identified.
Testing (Unit And Behavioural) ✅ Passed Five stdlib tests, two parametrised expansion tests, three BDD tests; covers unit behaviour, edge cases, error paths, and end-to-end workflows with real implementations.
Testing (Property / Proof) ✅ Passed Straightforward boolean contract: command_available returns false for missing commands, errors for invalid args. Concrete tests cover all paths. Property testing not required.
Testing (Compile-Time / Ui) ✅ Passed PR implements runtime manifest-time helper, not compile-time behaviour. Error message and Ninja output testing via BDD assertions and integration tests is appropriate.
Domain Architecture ✅ Passed Command_available cleanly translates PATH lookups into a boolean domain concept. Validation errors segregate from resolution. Manifest domain stays transport-agnostic.
Observability ✅ Passed command_available is manifest-time only, evaluated during TemplateExpansion. Existing debug logging covers when-clause filtering; no runtime operational behaviour introduced.
Security And Privacy ✅ Passed No security risks found. Robust input validation; command strings never in shell context; safe PATH parsing; no credentials or secrets; proper error handling; test fixtures with dummy commands only.
Concurrency And State ✅ Passed No concurrency/state concerns. WhichResolver is per-Environment, Arc-wrapped; TestWorld uses RefCell with serial_test; directories and PATH properly scoped with Drop-based restoration.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 3-14-2-top-level-flow-control-expansion

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

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.

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

Please try again later or upgrade to continue using Sourcery

codescene-delta-analysis[bot]

This comment was marked as outdated.

Register `command_available` beside `which` so manifest-time `when`
clauses can choose between complementary top-level actions without turning
ordinary absence into a hard error.

Add direct stdlib coverage, manifest expansion regression tests, and BDD
scenarios for happy and unhappy paths. Document the user-visible helper,
record the internal resolver-boundary convention, and mark roadmap item
`3.14.2` complete.
codescene-delta-analysis[bot]

This comment was marked as outdated.

Update the execplan status after the implementation commit, branch push, and
draft pull request refresh so the living plan reflects the completed work.
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos leynos marked this pull request as ready for review May 20, 2026 09:41
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.

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

Please try again later or upgrade to continue using Sourcery

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented May 20, 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

tests/stdlib_which_tests.rs:

What lead to degradation?

The module contains 3 functions with similar structure: command_available_rejects_empty_command,command_available_rejects_unknown_keyword,which_filter_reports_missing_command

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.

@coderabbitai

This comment was marked as resolved.

@coderabbitai coderabbitai Bot added the Roadmap label May 20, 2026
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: 306290ad19

ℹ️ 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 tests/stdlib_which_tests.rs
Comment thread tests/bdd/steps/conditional_manifest.rs Outdated
Comment on lines +111 to +112
let tool = bin.join("preferred-tool");
write_executable(&tool)?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Name the preferred tool with a Windows executable suffix

This BDD setup creates preferred-tool without a Windows executable suffix, but command discovery for non-path commands on Windows resolves via PATHEXT extensions. As a result, the “preferred command available” scenario can incorrectly select the fallback branch on Windows hosts, making the behavioural assertion platform-dependent.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@coderabbitai Has this now been resolved in the latest commit?

Use codegraph analysis to determine your answer.

If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

Yes — this has been fully resolved in the latest commit. The full file content confirms all three necessary fixes are in place:

  1. Platform-specific executable pathfixture_command_path(&bin, "preferred-tool") now appends .cmd on Windows via the new helper.
  2. Platform-specific script contentexecutable_script() returns @echo off\r\n on Windows and a POSIX shebang script elsewhere.
  3. No-op mark_executable on non-Unix — the #[cfg(not(unix))] variant returns Ok(()) cleanly.

Resolving the comment now.


🏁 Script executed:

#!/bin/bash
# Resolve the review comment via GitHub API
gh api \
  --method PUT \
  -H "Accept: application/vnd.github+json" \
  repos/leynos/netsuke/pulls/309/reviews \
  2>/dev/null || true

# List review threads to find the comment ID
gh api \
  -H "Accept: application/vnd.github+json" \
  "repos/leynos/netsuke/pulls/309/comments" \
  --jq '.[] | select(.user.login == "coderabbitai[bot]" or .user.login == "chatgpt-codex-connector[bot]") | {id: .id, body: .body[0:80]}'

Length of output: 76


@leynos — The fix is confirmed resolved from the full file content. The comment was originally posted by chatgpt-codex-connector[bot] rather than by me, so I am unable to resolve it via the API on my own behalf. Resolve the thread manually using the Resolve conversation button on GitHub.

To summarise what the latest commit addresses:

Concern Resolution
Missing .cmd suffix on Windows fixture_command_path() appends .cmd via cfg!(windows)
Non-executable script content on Windows executable_script() returns @echo off\r\n on Windows
chmod call on non-Unix mark_executable() is a no-op under #[cfg(not(unix))]

🧠 Learnings used
Learnt from: leynos
Repo: leynos/netsuke PR: 251
File: tests/bdd/types.rs:309-318
Timestamp: 2025-12-29T19:00:20.890Z
Learning: In the netsuke repository, rustfmt formatting rules take precedence over manual formatting preferences. Ensure that functions like HelperName::as_str() and From trait implementations remain in multi-line format as enforced by cargo fmt, even if internal coding guidelines suggest single-line forms, to avoid breaking make check-fmt.

Learnt from: leynos
Repo: leynos/netsuke PR: 266
File: src/status.rs:92-106
Timestamp: 2026-02-15T18:36:42.457Z
Learning: In Rust projects, when a type is #[must_use] and you would otherwise discard its value, prefer using drop(...) instead of lines like 'let _ = ...' to satisfy must_use checks. This aligns with an enforcement in Cargo.toml: let_underscore_must_use = "deny". Apply this guideline across Rust source files (e.g., in src/status.rs and other Rust files) to ensure lint compliance and avoid accidental ignored results.

Learnt from: leynos
Repo: leynos/netsuke PR: 266
File: src/status.rs:92-106
Timestamp: 2026-02-15T18:36:42.457Z
Learning: Enforce the deny(lint) setting for must_use results in Cargo.toml. When discarding must_use values (e.g., Result) after operations like writeln!(io::stderr(), ...), prefer the drop(...) idiom over using let _ = to satisfy the lint. Apply this pattern across all Rust source files (src/ and beyond) to ensure consistent lint compliance.

coderabbitai[bot]

This comment was marked as resolved.

Write `.cmd` fixture executables on Windows while keeping bare command names
in the templates and manifests. This keeps `command_available` positive-path
coverage aligned with the resolver's Windows `PATHEXT` probing behaviour.
codescene-delta-analysis[bot]

This comment was marked as outdated.

leynos added 2 commits May 20, 2026 13:21
Normalize the execplan reference definitions so each entry is a single,
consistent line, and tighten the `command_available` bullet in the user
guide to remove the repeated wording while keeping the `which` and
`command_available` references intact.
Prefix `which` not-found errors with the stable diagnostic sentinel before
classifying them for `command_available`. This keeps absence detection tied to
the intended code marker instead of localized rendered text.

Clean up two unrelated Markdown formatter artefacts left by the documentation
review pass so the user-guide diff stays focused.
codescene-delta-analysis[bot]

This comment was marked as outdated.

Extract a shared render-error assertion helper for the `which` and
`command_available` negative-path tests so the expected template, context, and
message fragment are the only per-case differences.
codescene-delta-analysis[bot]

This comment was marked as outdated.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/users-guide.md (2)

501-502: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Wrap paragraph at 80 columns.

Line 501 exceeds the 80-column limit (~85 characters).

Triage: [type:docstyle]

📝 Proposed fix
-Use `command_available` in manifest-time `when` clauses when optional tooling
-selects between actions:
+Use `command_available` in manifest-time `when` clauses when optional
+tooling selects between actions:

As per coding guidelines, Markdown paragraphs must be wrapped at 80 columns.

🤖 Prompt for AI Agents
In `@docs/users-guide.md` at lines 501-502, rewrap the introductory sentence
so line 501 is at most 80 columns. Break after "when optional" and continue
"tooling selects between actions:" on line 502.
🤖 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 501 - 502, Reflow the Markdown paragraph in
docs/users-guide.md so no line exceeds 80 columns: split the sentence "Use
`command_available` in manifest-time `when` clauses when optional tooling
selects between actions:" into two lines by breaking after "when optional" and
placing "tooling selects between actions:" on the next line, ensuring proper
Markdown paragraph formatting and preserving backticks around
`command_available` and `when`.

514-514: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Wrap line at 80 columns.

Line 514 slightly exceeds the 80-column limit (~81 characters).

Triage: [type:docstyle]

📝 Proposed fix
-Only the selected action reaches the typed manifest and generated Ninja file.
+Only the selected action reaches the typed manifest and generated Ninja
+file.

As per coding guidelines, Markdown paragraphs must be wrapped at 80 columns.

🤖 Prompt for AI Agents
In `@docs/users-guide.md` at line 514, rewrap the sentence to at most 80
columns per line. Break after "manifest and generated Ninja" and continue
"file." on the next line.
🤖 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` at line 514, The sentence "Only the selected action
reaches the typed manifest and generated Ninja file." exceeds 80 columns; rewrap
it so no line is longer than 80 columns by breaking after "manifest and
generated Ninja" and placing "file." on the next line (i.e., two lines: "Only
the selected action reaches the typed manifest and generated Ninja" then
"file.").
♻️ Duplicate comments (1)
docs/users-guide.md (1)

483-485: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Wrap lines at 80 columns.

Lines 483-484 exceed the 80-column paragraph wrapping limit (line 483: ~88 chars, line 484: ~85 chars).

Triage: [type:docstyle]

📝 Proposed fix
-- `command_available` function: Uses the same resolver and options as `which`,
-  returning `true` when a matching executable is found and `false` when it is
-  absent. Absence is not an error.
+- `command_available` function: Uses the same resolver and options as
+  `which`, returning `true` when a matching executable is found and
+  `false` when it is absent. Absence is not an error.

As per coding guidelines, Markdown paragraphs must be wrapped at 80 columns.

🤖 Prompt for AI Agents
In `@docs/users-guide.md` at lines 483-485, rewrap the `command_available`
bullet description so each line is at most 80 columns. Break after "`which`,"
on line 483 and after "and" on line 484. Preserve all backtick delimiters and
wording.
🤖 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 483 - 485, The `command_available` bullet
in docs/users-guide.md exceeds the 80-column wrap limit; reflow that paragraph
so no line exceeds 80 columns while preserving wording and backticks: break the
sentence after "`which`," on the first line and after "and" on the next line so
the description reads the same but is wrapped to <=80 columns (keep
`command_available` and `which` backticks intact).
🤖 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 `@src/stdlib/which/error.rs`:
- Around line 18-21: The helper function with_not_found_code currently does an
unnecessary allocation by calling into_boxed_str(); remove that call and pass
the original message directly into the format! macro (e.g.
format!("{NOT_FOUND_CODE}: {message}") or format!("{}: {}", NOT_FOUND_CODE,
message)) so with_not_found_code(message: String) uses the String without
creating a Box<str>; update the function body in with_not_found_code
accordingly.

In `@tests/stdlib_which_tests.rs`:
- Line 132: Replace the redundant .to_string() call inside the with_context
closure by using .to_owned() on the &str; specifically update the closure
expression that currently reads .with_context(|| context_msg.to_string())? to
use .with_context(|| context_msg.to_owned())? where context_msg is the &str
being converted so Clippy no longer flags the redundant .to_string().

---

Outside diff comments:
In `@docs/users-guide.md`:
- Around line 501-502: Reflow the Markdown paragraph in docs/users-guide.md so
no line exceeds 80 columns: split the sentence "Use `command_available` in
manifest-time `when` clauses when optional tooling selects between actions:"
into two lines by breaking after "when optional" and placing "tooling selects
between actions:" on the next line, ensuring proper Markdown paragraph
formatting and preserving backticks around `command_available` and `when`.
- Line 514: The sentence "Only the selected action reaches the typed manifest
and generated Ninja file." exceeds 80 columns; rewrap it so no line is longer
than 80 columns by breaking after "manifest and generated Ninja" and placing
"file." on the next line (i.e., two lines: "Only the selected action reaches the
typed manifest and generated Ninja" then "file.").

---

Duplicate comments:
In `@docs/users-guide.md`:
- Around line 483-485: The `command_available` bullet in docs/users-guide.md
exceeds the 80-column wrap limit; reflow that paragraph so no line exceeds 80
columns while preserving wording and backticks: break the sentence after
"`which`," on the first line and after "and" on the next line so the description
reads the same but is wrapped to <=80 columns (keep `command_available` and
`which` backticks intact).
🪄 Autofix (Beta)

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: a3d51ac1-2c82-451b-a2f2-8405ed2968b2

📥 Commits

Reviewing files that changed from the base of the PR and between 2e94f38 and cdcb20a.

📒 Files selected for processing (4)
  • docs/execplans/3-14-2-top-level-flow-control-expansion.md
  • docs/users-guide.md
  • src/stdlib/which/error.rs
  • tests/stdlib_which_tests.rs

Comment thread src/stdlib/which/error.rs Outdated
Comment thread tests/stdlib_which_tests.rs Outdated
leynos added 2 commits May 22, 2026 17:43
Tighten line wrapping in `docs/users-guide.md` so the affected examples
and explanatory text stay within the Markdown line-length limit.
Remove the intermediate boxed-string conversion from the not-found sentinel
helper while still consuming the owned message under the repository lint
profile.

Use `to_owned` for the stdlib render-error context string to satisfy the
string-conversion lint in the shared assertion helper.
codescene-delta-analysis[bot]

This comment was marked as outdated.

leynos added 2 commits May 22, 2026 17:48
Expand the `tests/bdd/steps/conditional_manifest.rs` module docs to
explain the BDD scenarios, the conditional manifest behaviour they
verify, and how `TestWorld` carries workspace and environment state.

Mark roadmap item `3.14.4` complete in `docs/roadmap.md` after
confirming the `command_available(...)` implementation already reuses
the `which` resolver, returns `false` for missing commands, and
preserves argument validation diagnostics.
Accept the not-found message by reference in `with_not_found_code` so the
helper can format the stable sentinel without converting the owned message
through an intermediate wrapper.
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 Code Duplication)

Gates Passed
5 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
stdlib_which_tests.rs 1 advisory rule 9.39 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