feat: parser integration, CI modernization with mise, and Dev Container support#26
Conversation
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* feat(docs): add contribution guidelines and update architecture diagrams Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * style(toml): format spacing and alignment in dist-workspace.toml Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * chore(vscode): update ruff configuration paths in settings Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * feat(parser): implement libmagic strength calculation and parsing - Add apprentice_magic_strength algorithm port from libmagic - Implement strength modifier parsing with !:strength syntax - Calculate default strength based on rule specificity - Store strength in MagicRule structure for evaluation - Update rule sorting by strength during evaluation - Add unit tests for strength parsing and calculation - Integrate strength into confidence scoring and rule ordering Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * feat(docs): update documentation for phase 1 MVP enhancements Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * style(docs): format spacing and alignment in book.toml Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * feat(tools): add tools configuration for project dependencies Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * ci: upgrade checkout action to v6 and add mise-action Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * chore(ci): replace rustfmt action with just fmt-check command chore(mise): update Rust and add new tools for formatting and auditing Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * refactor(justfile): streamline cross-platform helper commands Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * chore: simplify justfile and mise.toml tooling - Move Rust components (llvm-tools-preview) to mise.toml - Add mdformat with plugins via mise pipx backend - DRY up GoReleaser and coverage recipes with private helpers - Remove unused recipes (cd-root, help, test-justfile, test-fs) - Simplify format-docs using mdformat's built-in --exclude - Update dependencies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: update job dependencies for test and coverage workflows - Ensure 'quality' job is a dependency for 'test' - Ensure 'test' job is a dependency for 'test-cross-platform' Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * chore(deps): update Rust version to 1.91.0 in configuration Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * fix: remove unused mdbook-yml-header preprocessor No docs use YAML front matter, so this preprocessor is unnecessary and was causing CI issues. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: add .gitignore and project.yml for configuration Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> * chore(docs): update repository URL in documentation files Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> --------- Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
|
Caution Review failedThe pull request is closed. Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughAdds format detection and unified magic-file loading (Text/Directory/Binary) with alphabetical directory merging and non-fatal per-file parse errors; MagicDatabase records Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant CLI as CLI
participant Main as Main
participant Parser as Parser
participant DB as MagicDatabase
participant Eval as Evaluator
User->>CLI: invoke rmagic [--magic-file /path]
CLI->>Main: main(args)
Main->>Parser: detect_format(path)
Parser-->>Main: MagicFileFormat (Text/Directory/Binary)
alt Text
Main->>Parser: load_magic_file(path)
Parser->>Parser: parse_text_magic_file()
Parser-->>Main: Vec\<MagicRule\>
else Directory
Main->>Parser: load_magic_directory(path)
Parser->>Parser: iterate files (alphabetical), parse each (skip non-fatal parse errors)
Parser-->>Main: Vec\<MagicRule\>
else Binary
Main-->>User: Error (UnsupportedFormat, suggest --use-builtin)
end
Main->>DB: MagicDatabase::load_from_file(path)
DB->>DB: store rules and source_path (Option\<PathBuf\>)
Main->>Eval: evaluate(file, DB.rules)
Eval-->>Main: Match results or LibmagicError
Main-->>User: output results
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
…ectory-support Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Convert `decrement_recursion_depth()` from a panicking function to one that returns `Result<(), LibmagicError>`. This addresses the critical issue where a programming error in recursion tracking would crash the entire application instead of returning a recoverable error. Changes: - Add `InternalError` variant to `EvaluationError` for internal logic errors - Add `internal_error()` constructor method - Update `decrement_recursion_depth()` to return `Result` - Update all call sites to use `?` operator or `.unwrap()` in tests - Convert `#[should_panic]` test to check for error result instead Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address high-priority issues from PR review: Documentation fixes: - Remove non-existent `start_time` field from EvaluationContext docs - Fix MatchResult value type: `Value` not `Vec<u8>` - Update security claims in load_magic_file() to be accurate - Remove outdated "placeholder" warnings from getting-started.md - Fix test count claims: 650+ tests (was inconsistent 745+/200+) Error handling improvements: - Return error when ALL files in directory fail to parse - Track parse failures and provide detailed error messages - Add tests for all-files-fail and partial-failure scenarios Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The actions-rust-lang/rustfmt@v1 action uses its own rustfmt binary which doesn't properly respect the mise-installed toolchain or the project's rustfmt.toml configuration (edition = "2024"). Replace with a direct `cargo fmt --check` command which uses the mise-installed rust toolchain consistently. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
There was a problem hiding this comment.
Pull request overview
This PR modernizes the project’s developer/CI workflow (mise + Dev Container), and integrates the parser into the library/CLI so MagicDatabase::load_from_file now loads real rules (with format detection + directory support), alongside updated docs and expanded integration testing.
Changes:
- Add unified magic file loading (text vs directory vs binary detection) and wire it into
MagicDatabase+ CLI. - Modernize tooling and CI around
mise, plus add a Rust Dev Container configuration. - Update/expand integration tests, snapshots, and documentation to reflect the new end-to-end flow.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/snapshots/cli_integration_tests__canonical_cli_test_failures.snap.new | New insta snapshot artifact capturing canonical CLI failures (currently appears to be a .snap.new). |
| tests/parser_integration_tests.rs | New end-to-end integration tests for parser loading + MagicDatabase integration. |
| tests/json_integration_test.rs | Update JSON CLI tests to use byte-based rules that the parser supports. |
| tests/directory_loading_tests.rs | New integration tests for directory (Magdir-style) loading behavior. |
| tests/compatibility_tests.rs | Skip DB loading test when magic DB is binary-only via detect_format. |
| tests/cli_integration_tests.rs | Canonical CLI tests now pass an explicit magic file and attempt to resolve a parseable text magic file. |
| src/parser/mod.rs | Add format detection, directory loader, and unified load_magic_file() API. |
| src/main.rs | Update magic file discovery logic to use detect_format; allow directories in validation. |
| src/lib.rs | Implement MagicDatabase::load_from_file using the parser; add source_path() metadata. |
| src/evaluator/mod.rs | Make recursion-depth underflow an error (not a panic) and update call sites/tests accordingly. |
| src/error.rs | Add ParseError::UnsupportedFormat, ParseError::IoError, and EvaluationError::InternalError. |
| mise.toml | Expand mise-managed toolchain/tool list (Rust components + actionlint/lychee/markdownlint-cli2). |
| justfile | Route dev commands through mise exec and update lint/docs tooling commands. |
| docs/src/parser.md | Update parser docs to reflect complete parsing + format detection. |
| docs/src/introduction.md | Update “project status” section to reflect completed components. |
| docs/src/getting-started.md | Remove “placeholder” notes and align examples with real behavior. |
| docs/src/evaluator.md | Update evaluator documentation to reflect implemented engine + APIs. |
| docs/src/architecture.md | Update architecture docs to reflect completed parser/evaluator components. |
| dist-workspace.toml | Enable shell + Homebrew installers and bump GitHub Actions versions for cargo-dist workflows. |
| README.md | Refresh project status/feature list and usage examples. |
| AGENTS.md | Add explicit guidance to avoid emojis/non-ASCII in docs/code. |
| .github/workflows/release.yml | Bump Actions versions and add Homebrew formula publish job. |
| .github/workflows/compatibility.yml | Disable compatibility job via if: false. |
| .github/workflows/ci.yml | Migrate more steps to mise; update job dependencies and gating. |
| .github/dependabot.yml | Add Dependabot support for Dev Container updates. |
| .github/commit-instructions.md | Simplify/clarify Conventional Commit guidance. |
| .devcontainer/devcontainer.json | Add Dev Container setup for Rust + tooling + VS Code extensions. |
| .coderabbitai.yaml | Toggle walkthrough collapse behavior. |
| "Binary compiled magic files (.mgc) are not supported for parsing.\n\ | ||
| Use the --use-builtin option to use the built-in magic rules instead,\n\ | ||
| or provide a text-based magic file or directory.", |
There was a problem hiding this comment.
This error message tells users to use --use-builtin, but the CLI args currently don’t include that flag. Either implement --use-builtin in src/main.rs or adjust the guidance here (and related docs/tests) to avoid pointing to a non-existent option.
| "Binary compiled magic files (.mgc) are not supported for parsing.\n\ | |
| Use the --use-builtin option to use the built-in magic rules instead,\n\ | |
| or provide a text-based magic file or directory.", | |
| "Binary compiled magic files (.mgc) are not supported for parsing. \ | |
| Provide a text-based magic file or directory instead.", |
| MagicFileFormat::Binary | MagicFileFormat::Directory => continue, | ||
| MagicFileFormat::Text => return path, |
There was a problem hiding this comment.
default_magic_file_path() currently skips MagicFileFormat::Directory, but directories are now supported (and validate_magic_file explicitly allows them). Allowing Directory here would make the CLI work on systems that ship a Magdir directory rather than a single text file.
| MagicFileFormat::Binary | MagicFileFormat::Directory => continue, | |
| MagicFileFormat::Text => return path, | |
| MagicFileFormat::Binary => continue, | |
| MagicFileFormat::Text | MagicFileFormat::Directory => return path, |
| use std::io::Read; | ||
| use std::path::{Path, PathBuf}; | ||
|
|
||
| /// Represents the format of a magic file or directory | ||
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
There was a problem hiding this comment.
src/parser/mod.rs is already very large, and this PR adds substantial new functionality here (format detection + directory loading). Given the project’s documented file-size guideline (AGENTS.md:84-88), consider extracting this into dedicated modules/files to keep mod.rs focused on orchestration.
| let entries = fs::read_dir(dir_path).map_err(|e| { | ||
| ParseError::invalid_syntax( | ||
| 0, | ||
| format!("Failed to read directory '{}': {}", dir_path.display(), e), | ||
| ) | ||
| })?; | ||
|
|
||
| // Collect and sort entries by filename for deterministic ordering | ||
| let mut file_paths: Vec<std::path::PathBuf> = Vec::new(); | ||
| for entry in entries { | ||
| let entry = entry.map_err(|e| { | ||
| ParseError::invalid_syntax( | ||
| 0, | ||
| format!( | ||
| "Failed to read directory entry in '{}': {}", | ||
| dir_path.display(), | ||
| e | ||
| ), | ||
| ) | ||
| })?; | ||
|
|
||
| let path = entry.path(); | ||
| let file_type = entry.file_type().map_err(|e| { | ||
| ParseError::invalid_syntax( | ||
| 0, | ||
| format!("Failed to read file type for '{}': {}", path.display(), e), | ||
| ) | ||
| })?; |
There was a problem hiding this comment.
load_magic_directory() converts directory access failures into InvalidSyntax (line=0). With the new ParseError::IoError variant and CLI exit-code handling, these should surface as I/O errors (preserving ErrorKind) so they map to LibmagicError::IoError rather than a “magic syntax” error.
| let entries = fs::read_dir(dir_path).map_err(|e| { | |
| ParseError::invalid_syntax( | |
| 0, | |
| format!("Failed to read directory '{}': {}", dir_path.display(), e), | |
| ) | |
| })?; | |
| // Collect and sort entries by filename for deterministic ordering | |
| let mut file_paths: Vec<std::path::PathBuf> = Vec::new(); | |
| for entry in entries { | |
| let entry = entry.map_err(|e| { | |
| ParseError::invalid_syntax( | |
| 0, | |
| format!( | |
| "Failed to read directory entry in '{}': {}", | |
| dir_path.display(), | |
| e | |
| ), | |
| ) | |
| })?; | |
| let path = entry.path(); | |
| let file_type = entry.file_type().map_err(|e| { | |
| ParseError::invalid_syntax( | |
| 0, | |
| format!("Failed to read file type for '{}': {}", path.display(), e), | |
| ) | |
| })?; | |
| let entries = fs::read_dir(dir_path).map_err(ParseError::IoError)?; | |
| // Collect and sort entries by filename for deterministic ordering | |
| let mut file_paths: Vec<std::path::PathBuf> = Vec::new(); | |
| for entry in entries { | |
| let entry = entry.map_err(ParseError::IoError)?; | |
| let path = entry.path(); | |
| let file_type = entry.file_type().map_err(ParseError::IoError)?; |
| compatibility-tests: | ||
| name: Compatibility Tests | ||
| if: false | ||
| runs-on: ${{ matrix.os }} |
There was a problem hiding this comment.
Setting if: false disables the entire compatibility job (including on the scheduled run). If this is meant to be temporarily paused, consider removing the schedule trigger or gating behind an input/label so it can still be run when needed.
| --- | ||
| source: tests/cli_integration_tests.rs | ||
| assertion_line: 149 | ||
| expression: normalized_summary | ||
| --- | ||
| Found 81 test failures out of 81 canonical tests: | ||
|
|
||
| CVE-2014-1943.testfile | ||
| CLI error: CLI failed: Compiling libmagic-rs v0.1.0 (/Volumes/Projects/Projects/libmagic-rs) | ||
| Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.38s | ||
| Running `target/debug/rmagic CVE-2014-1943.testfile` | ||
| Error: Magic file parse error | ||
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | ||
| The magic file contains invalid syntax or formatting. | ||
| Please check the magic file format or try a different magic file. | ||
|
|
||
|
|
||
| HWP2016.hwp.testfile | ||
| CLI error: CLI failed: Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s | ||
| Running `target/debug/rmagic HWP2016.hwp.testfile` | ||
| Error: Magic file parse error | ||
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | ||
| The magic file contains invalid syntax or formatting. | ||
| Please check the magic file format or try a different magic file. | ||
|
|
||
|
|
||
| HWP2016.hwpx.zip.testfile | ||
| CLI error: CLI failed: Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s | ||
| Running `target/debug/rmagic HWP2016.hwpx.zip.testfile` | ||
| Error: Magic file parse error | ||
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | ||
| The magic file contains invalid syntax or formatting. | ||
| Please check the magic file format or try a different magic file. | ||
|
|
||
|
|
||
| HWP97.hwp.testfile | ||
| CLI error: CLI failed: Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s | ||
| Running `target/debug/rmagic HWP97.hwp.testfile` | ||
| Error: Magic file parse error | ||
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | ||
| The magic file contains invalid syntax or formatting. | ||
| Please check the magic file format or try a different magic file. | ||
|
|
||
|
|
There was a problem hiding this comment.
This file looks like an insta generated “new snapshot” artifact (*.snap.new). These are created when snapshot assertions fail and typically shouldn’t be committed; either delete it or accept the snapshot update so only the canonical *.snap is tracked (e.g., via cargo insta accept).
| --- | |
| source: tests/cli_integration_tests.rs | |
| assertion_line: 149 | |
| expression: normalized_summary | |
| --- | |
| Found 81 test failures out of 81 canonical tests: | |
| CVE-2014-1943.testfile | |
| CLI error: CLI failed: Compiling libmagic-rs v0.1.0 (/Volumes/Projects/Projects/libmagic-rs) | |
| Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.38s | |
| Running `target/debug/rmagic CVE-2014-1943.testfile` | |
| Error: Magic file parse error | |
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | |
| The magic file contains invalid syntax or formatting. | |
| Please check the magic file format or try a different magic file. | |
| HWP2016.hwp.testfile | |
| CLI error: CLI failed: Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s | |
| Running `target/debug/rmagic HWP2016.hwp.testfile` | |
| Error: Magic file parse error | |
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | |
| The magic file contains invalid syntax or formatting. | |
| Please check the magic file format or try a different magic file. | |
| HWP2016.hwpx.zip.testfile | |
| CLI error: CLI failed: Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s | |
| Running `target/debug/rmagic HWP2016.hwpx.zip.testfile` | |
| Error: Magic file parse error | |
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | |
| The magic file contains invalid syntax or formatting. | |
| Please check the magic file format or try a different magic file. | |
| HWP97.hwp.testfile | |
| CLI error: CLI failed: Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s | |
| Running `target/debug/rmagic HWP97.hwp.testfile` | |
| Error: Magic file parse error | |
| Invalid syntax at line 12: Failed to parse rule: Parsing Error: Error { input: "MZ\tMS-DOS executable", code: Digit } | |
| The magic file contains invalid syntax or formatting. | |
| Please check the magic file format or try a different magic file. | |
| Please check the magic file format or try a different magic file. |
| fn test_detect_format_text_file() { | ||
| let temp_dir = std::env::temp_dir(); | ||
| let text_file = temp_dir.join("test_text_magic.txt"); | ||
| fs::write(&text_file, "# Magic file\n0 string test Test").unwrap(); | ||
|
|
There was a problem hiding this comment.
These tests write to fixed filenames under std::env::temp_dir(). Since Rust tests run in parallel by default, this can cause flaky failures due to cross-test collisions. Prefer tempfile::TempDir / NamedTempFile (unique per test) instead of hard-coded paths.
| Err(e) => Err(ParseError::invalid_syntax( | ||
| 0, | ||
| format!("Failed to read magic file: {e}"), | ||
| )), |
There was a problem hiding this comment.
detect_format() docs say it returns ParseError::IoError when the path can’t be read, but this branch converts non-EOF read failures into InvalidSyntax. Returning an I/O-flavored error (preserving ErrorKind) is important so callers/CLI can distinguish parse errors from file access errors.
| Err(e) => Err(ParseError::invalid_syntax( | |
| 0, | |
| format!("Failed to read magic file: {e}"), | |
| )), | |
| Err(e) => Err(e.into()), |
| - uses: dtolnay/rust-toolchain@1.91.0 | ||
| with: | ||
| components: llvm-tools, cargo, rustfmt, clippy | ||
| - uses: jdx/mise-action@v3 | ||
| with: |
There was a problem hiding this comment.
The PR description says workflows were migrated off dtolnay/rust-toolchain in favor of mise, but this workflow still uses dtolnay/rust-toolchain and then runs mise-action as well. Consider using a single toolchain setup path (preferably mise) to avoid drift and redundant installs.
| // I/O errors are critical | ||
| return Err(ParseError::invalid_syntax( | ||
| 0, | ||
| format!("Failed to read file '{}': {}", path.display(), e), | ||
| )); |
There was a problem hiding this comment.
read_to_string failures are treated as InvalidSyntax, which will make the CLI report this as a magic syntax issue (exit code 4) instead of a file access issue (exit code 3). Consider returning ParseError::IoError (or wrapping an io::Error with path context while preserving its kind).
| // I/O errors are critical | |
| return Err(ParseError::invalid_syntax( | |
| 0, | |
| format!("Failed to read file '{}': {}", path.display(), e), | |
| )); | |
| // I/O errors are critical: preserve the original error kind so the | |
| // CLI can distinguish file access issues from syntax issues. | |
| let io_error = std::io::Error::new( | |
| e.kind(), | |
| format!("Failed to read file '{}': {}", path.display(), e), | |
| ); | |
| return Err(ParseError::IoError(io_error)); |
This pull request introduces several improvements to the development workflow, focusing on modernizing CI/CD pipelines, enhancing developer experience with Dev Containers, and refining documentation and configuration. The most significant changes are the migration to the
misetool for environment setup in CI, the addition of a comprehensive Dev Container configuration for Rust development, and updates to documentation and configuration files for clarity and maintainability.CI/CD Modernization:
Replaced the use of
dtolnay/rust-toolchainand various tool-specific setup steps in all GitHub Actions workflows with the unifiedjdx/mise-action@v3for environment setup and caching, simplifying and standardizing the CI pipeline. Also updatedactions/checkoutto v6 in all workflows. [1]], [2]], [3]], [4]], [5]], [6]], [7]], [8]], [9]], [10]])Updated job dependencies in
.github/workflows/ci.ymlto ensure quality and test jobs run in the correct order, improving workflow reliability. [1]], [2]])Dev Container Support:
Added
.devcontainer/devcontainer.jsonto provide a feature-rich Rust development environment with pre-installed tools, VS Code extensions, and performance optimizations (e.g., cargo cache volume), streamlining onboarding and local development. ([.devcontainer/devcontainer.jsonR1-R97])Added support for Dependabot updates for Dev Containers in
.github/dependabot.yml, ensuring container features stay up-to-date. ([.github/dependabot.ymlL1-R11])Documentation and Configuration Updates:
Improved the commit message guidelines in
.github/commit-instructions.mdfor clarity and brevity, with clearer examples and scope/type explanations. ([.github/commit-instructions.mdL3-L34])Cleaned up
.pre-commit-config.yamlby removing the localcargo-audithook (now handled in CI) and correcting plugin names. [1]], [2]])Minor configuration tweaks, such as enabling collapsed walkthroughs in
.coderabbitai.yamland adding/cacheto.serena/.gitignore. [1]], [2]])