Skip to content

Conversation

@dotandev
Copy link

This PR adds a step to the GitHub Actions CI pipeline to run MIRI (Undefined Behavior detector) on the codebase.

Changes

Modified .github/workflows/reusable-build.yml:
Added rustup component add miri.
Added Miri Check step to the Linux build job.
Configured to run cargo miri test --workspace with exclusions for crates that use LLVM bindings (FFI) which are currently unsupported by MIRI:

inference-wasm-codegen (depends on inkwell)
inference (depends on wasm-codegen)
inference-cli (depends on inference)
infs (app)
inference-lsp (uses inkwell)
inference-ide & inference-ide-db (excluded to reduce noise/compile time, focusing on core logic first)

Verification

Verified MIRI installation command locally.
CI pipeline will now report any UB found in the core crates (AST, Type Checker, etc).

@SurfingBowser
Copy link
Contributor

Please confirm you have read this contributor guide and followed the instructions. @dotandev

@0xGeorgii 0xGeorgii requested a review from Copilot January 23, 2026 07:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the CI pipeline by adding MIRI (MIddleware Rust Interpreter) checks to detect undefined behavior in Rust code. MIRI is a powerful tool for finding memory safety issues and undefined behavior at runtime.

Changes:

  • Added MIRI component installation to the GitHub Actions workflow
  • Introduced a new "Miri Check" step that runs on Linux non-release builds
  • Configured MIRI to test the workspace while excluding crates with LLVM FFI bindings (unsupported by MIRI) and IDE-related crates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if: runner.os == 'Linux' && !inputs.release-build
run: |
rustup component add miri
cargo miri test --verbose --workspace --exclude inference-wasm-codegen --exclude inference --exclude inference-cli --exclude infs --exclude inference-lsp --exclude inference-ide --exclude inference-ide-db
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The long list of --exclude flags makes this command hard to read and maintain. Consider using a multi-line format with line continuation (backslash) to improve readability, with one exclusion per line.

Suggested change
cargo miri test --verbose --workspace --exclude inference-wasm-codegen --exclude inference --exclude inference-cli --exclude infs --exclude inference-lsp --exclude inference-ide --exclude inference-ide-db
cargo miri test --verbose --workspace \
--exclude inference-wasm-codegen \
--exclude inference \
--exclude inference-cli \
--exclude infs \
--exclude inference-lsp \
--exclude inference-ide \
--exclude inference-ide-db

Copilot uses AI. Check for mistakes.
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.

2 participants