Skip to content

refactor(diagnostics): normalize Rust and Cargo remediation guidance - #250

Merged
dDevAhmed merged 1 commit into
DigiNodes:mainfrom
Viccodes11:refactor/sw-025-rust-cargo-remediation
Oct 18, 2026
Merged

dDevAhmed merged 1 commit into
DigiNodes:mainfrom
Viccodes11:refactor/sw-025-rust-cargo-remediation

Conversation

@Viccodes11

Copy link
Copy Markdown
Contributor

Summary

Normalizes Rust and Cargo diagnostic remediation guidance to be independently actionable and consistent with the shared diagnostic classification:

  • Cargo remediation when unavailable now independently directs to Cargo installation (Install Cargo and ensure cargo is available on PATH.) without coupling to the Rust toolchain.
  • Cargo remediation on malformed output now independently directs to Cargo verification and reinstallation (Verify cargo --version works and reinstall Cargo if necessary.) rather than Rust.
  • Preserves 'fail' severity for missing, malformed, and unsupported states across both diagnostics.
  • Prevents raw subprocess stderr or process error details from being reflected in diagnostic output.

Closes #128

Scope

  • Update Cargo unavailable and malformed remediation guidance in src/diagnostics/rust.ts.
  • Expand unit test coverage in tests/rust-diagnostics.test.ts to assert independent actionability, severity preservation, and raw stderr / process detail non-reflection for both rustc and Cargo.

Testing

  • Unit tests in tests/rust-diagnostics.test.ts verifying:

    • Supported Rust version passing (>=1.84.0)
    • Unsupported Rust version failure with remediation guidance
    • Unavailable rustc failure with exact remediation and process error non-reflection
    • Malformed rustc version output failure with exact remediation and raw stderr non-reflection
    • Supported Cargo version parsing and passing
    • Unavailable Cargo failure with independent remediation and process error non-reflection
    • Malformed Cargo version output failure with independent remediation and raw stderr non-reflection
    • Independent remediation when Rust fails while Cargo passes
    • Independent remediation when Cargo fails while Rust passes
  • Typecheck verified with TypeScript (tsc -p tsconfig.json --noEmit).

  • Lint checks verified with ESLint (eslint src/diagnostics/rust.ts tests/rust-diagnostics.test.ts).

  • Code formatting verified with Prettier (prettier --check src/diagnostics/rust.ts tests/rust-diagnostics.test.ts).

  • Tests added/updated where applicable

  • Existing relevant tests pass

  • Lint/type/build checks pass where available

Security Impact

  • No security-sensitive behavior is changed
  • Security-sensitive behavior is changed and explained below

Security notes: Diagnostic checks continue to execute with shell: false and strict argument arrays. Raw subprocess stderr and execution error details are asserted not to be reflected in user-facing diagnostic output, preventing potential leakage of tokens or sensitive environment details.

Release Impact

  • No published/user-visible behavior change

  • Patch

  • Minor

  • Breaking/pre-1.0 contract change

  • Changeset included where required

  • Changeset not required; reason explained below

Release notes: Internal refinement of diagnostic remediation copy for consistency across diagnostics.

Documentation

  • Documentation updated where applicable
  • No documentation change required

Checklist

  • I read docs/contributing/wave-architecture.md for Stellar Wave work
  • I stayed within the agreed issue scope
  • I checked for overlapping open contributor PRs
  • I did not include secrets or sensitive data
  • I reviewed new/updated dependencies if any
  • I considered failure/error paths, not only the happy path
  • I am not disclosing an unresolved vulnerability publicly

Make rustc and Cargo remediation guidance independently actionable, preserve failure severity for missing and malformed states, and prevent raw stderr or process error details from being reflected.

Closes DigiNodes#128
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c913dd7-35d4-404a-ba9a-c1ebd4c7cc42
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@dDevAhmed
dDevAhmed merged commit 6a15d16 into DigiNodes:main Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SW-025 — Normalize Rust and Cargo remediation guidance

2 participants