fix(forgejo-opencode-review): Test failures due to tempdir #39

Merged
martin merged 2 commits from nextest-fixes into main 2026-08-23 11:38:55 +00:00
Owner
No description provided.
martin self-assigned this 2026-08-22 21:58:10 +00:00
fix(forgejo-opencode-review): Test failures due to tempdir
Some checks failed
ci/woodpecker/pr/pr-review Pipeline was successful
ci/woodpecker/pr/global-rust-verify Pipeline failed
ci/woodpecker/push/verify-nix Pipeline was successful
2270972133
Member

Review Summary

This PR refactors the forgejo-opencode-review plugin to improve testability by introducing an OpenCodeRunner trait for dependency injection, replacing the fragile PATH manipulation approach with a clean abstraction. The OpenCodeBuilder in core now supports a configurable executable path. Tests are updated to use Result with ? operator instead of unwrap(). The changes are well-structured and follow Rust best practices.

Key improvements:

  • Dependency injection via OpenCodeRunner trait enables clean unit testing
  • Removal of unsafe std::env::set_var calls in tests (which are deprecated in Rust 2024)
  • More idiomatic error handling in tests
  • Addition of cargo-nextest to dev shell for faster test runs

No correctness, security, or performance issues found.


*🤖 Review by opencode (opencode/nemotron-3-ultra-free) — verdict: approve

# Review Summary This PR refactors the `forgejo-opencode-review` plugin to improve testability by introducing an `OpenCodeRunner` trait for dependency injection, replacing the fragile PATH manipulation approach with a clean abstraction. The `OpenCodeBuilder` in core now supports a configurable executable path. Tests are updated to use `Result` with `?` operator instead of `unwrap()`. The changes are well-structured and follow Rust best practices. **Key improvements:** - Dependency injection via `OpenCodeRunner` trait enables clean unit testing - Removal of unsafe `std::env::set_var` calls in tests (which are deprecated in Rust 2024) - More idiomatic error handling in tests - Addition of `cargo-nextest` to dev shell for faster test runs No correctness, security, or performance issues found. --- *🤖 Review by opencode (opencode/nemotron-3-ultra-free) — verdict: **approve** <!-- forgejo-opencode-review -->
fix: Fsiling test in core
Some checks failed
ci/woodpecker/pr/pr-review Pipeline failed
ci/woodpecker/pr/global-rust-verify Pipeline was successful
ci/woodpecker/push/verify-nix Pipeline was successful
50084a1aed
martin merged commit b546f20d22 into main 2026-08-23 11:38:55 +00:00
martin deleted branch nextest-fixes 2026-08-23 11:38:55 +00:00
Sign in to join this conversation.
No description provided.