Skip to content

Release v0.9.0

Architecture Overhaul - Config & Provider Refactoring + CI Mode + Validation

A major internal refactoring release that restructures the configuration system, LLM provider architecture, and error handling, while adding CI mode support, configuration validation, and security audit CI.

Added

CI Mode Support

  • New environment variables for CI/CD pipelines: GCOP_CI_PROVIDER, GCOP_CI_API_KEY, GCOP_CI_MODEL, GCOP_CI_ENDPOINT
  • When CI=1 is set, automatically creates a "ci" provider with highest priority
  • Enables seamless integration with GitHub Actions, GitLab CI, etc.

Configuration Validation

  • AppConfig::validate() now checks configuration at startup
  • Provider validation: temperature range [0.0, 2.0], non-empty API keys
  • Network validation: non-zero timeout values
  • Invalid configurations now fail fast with clear error messages

CI Security Audit & Code Coverage

  • New audit job using rustsec/audit-check for dependency vulnerability scanning
  • New coverage job using cargo-llvm-cov with Codecov integration

Diff Truncation

  • Automatically truncates diff when exceeding max_diff_size (default 100KB)
  • Displays localized warning when truncation occurs

IssueSeverity Methods

  • New level(), from_config_str(), label(), colored_label() methods on IssueSeverity
  • Simplifies severity filtering and display in review output

Changed

Configuration Module Restructured

  • Split monolithic config/mod.rs into structs.rs, loader.rs, global.rs, tests.rs
  • Global config singleton using OnceLock + ArcSwap (load once, share everywhere)
  • Replaced config/schema.rs with config/structs.rs
  • Serde-based defaults replace manual set_default calls

LLM Provider Architecture Refactored

  • Split provider/base.rs into base/ directory: config.rs, response.rs, retry.rs, validation.rs
  • New ApiBackend trait with blanket LLMProvider implementation
  • Providers only implement unique parts (call_api, call_api_streaming)
  • Significantly reduced code duplication across OpenAI/Claude/Ollama providers

Error Handling Improved

  • GcopError::Other replaced with specific variants (GitCommand, InvalidInput)
  • All error suggestions now use i18n keys instead of hardcoded English
  • unreachable! macros replaced with proper error handling in state machine

Environment Variable Naming

  • Nested config env vars now use double underscores: GCOP__LLM__DEFAULT_PROVIDER (was GCOP_LLM_DEFAULT_PROVIDER)
  • Standalone API key env vars (ANTHROPIC_API_KEY, OPENAI_API_KEY) still supported as fallback

Dependencies Optimized

  • Replaced futures with lighter futures-util
  • Removed bytes, edit, toml dependencies
  • reqwest: switched to rustls-no-provider feature with explicit ring crypto provider
  • tokio: narrowed features from full to specific features
  • Release binary now stripped (strip = true)

Removed

  • Config field commit.confirm_before_commit: Unused reserved field removed
  • Config field review.show_full_diff: Unused reserved field removed
  • Config field ui.verbose: CLI -v flag is the primary mechanism

Road to 1.0

v0.9.0 is the last pre-1.0 release. If no further breaking changes are needed during the 0.9.x cycle, the next minor release will be v1.0.0, marking API stability.

Upgrade

Existing config files remain compatible (unknown fields are silently ignored).

If you use environment variables for configuration, update to double-underscore format:

bash
# Old
GCOP_LLM_DEFAULT_PROVIDER=openai

# New
GCOP__LLM__DEFAULT_PROVIDER=openai
bash
# Homebrew
brew upgrade gcop-rs

# Cargo
cargo install gcop-rs

# pip
pip install --upgrade gcop-rs