Skip to content

Releases: codecoradev/cora-code

Release v0.13.0

Choose a tag to compare

@ajianaz ajianaz released this 05 Aug 09:47
7a065eb

What's New in v0.13.0

Added

  • Runtime embedding backend selection. Brain Mode now reads brain.embedding from .cora.yaml to select the embedding backend at runtime instead of compile time. Supported values: auto (best available — default), hashing (force 256d zero-dependency), pretrained (force 768d nomic). No recompilation needed to switch.
  • Incremental per-symbol embedding. embed_project() now tracks an embed_fingerprint (hash of symbol name + signature) and skips re-embedding symbols that have not changed since the last index. On large projects, re-indexing after touching one file embeds only the changed symbols instead of all.
  • Schema migration v7. Adds embed_fingerprint TEXT column to the symbols table for incremental embedding tracking. Auto-migrates on first run; existing indexes are upgraded transparently.
  • Backend enum + resolve_backend() in embed module. Clean runtime dispatch with OnceLock caching, graceful fallback when a requested backend is not compiled, and active_dims() / active_provider_name() helpers.
  • BrainConfig + BrainEmbeddingMode in config schema. New brain section in .cora.yaml with embedding field. Includes Display, FromStr, and serde impls for CLI and YAML ergonomics.

Changed

  • embed_code_dispatch() now checks ACTIVE_BACKEND at runtime. Previously selected via #[cfg] at compile time only. Falls back to compile-time default if resolve_backend() was never called (lazy resolution).
  • cora index, cora brain, cora watch all resolve embedding backend on startup. Each command loads .cora.yaml, reads brain.embedding, and calls resolve_backend() before touching the vector index.
  • Embedding doc comments updated. Module-level docs now describe runtime selection and the three-tier architecture (hashing → pretrained → ONNX future).

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.13.0.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.13.0.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.13.0.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.13.0.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.12.0

Choose a tag to compare

@github-actions github-actions released this 03 Aug 07:08
8d6674a

What's New in v0.12.0

Fixed

  • FTS5 returning 0 results for camelCase queries (#451). Added file column to FTS5 virtual table (schema v6), split_camel_case() identifier decomposition, and OR query expansion. Searches like findUser now correctly match via find OR user.
  • Dead-code false positives on framework entry points (#452). Added FRAMEWORK_ENTRY_PREFIXES with SQL LIKE pattern matching for common framework handlers (handle_*, on_*, route_*, etc.) — these are no longer flagged as dead code.
  • Symbol-level suppression markers (#452). Symbols containing // cora: keep in their body are excluded from dead-code detection.
  • Sticky skip files on config change (#453). Added index_config_hash column to projects table — when .cora.yaml changes, previously skipped files are re-evaluated instead of permanently skipped.

Added

  • entry_point_patterns config field — New field in AnalysisConfig and .cora.yaml analysis section. Custom list of glob patterns for framework-specific entry points beyond built-in defaults.
  • Schema migration v6 — Auto-migration: adds index_config_hash to projects, drops and recreates FTS5 with file column, rebuilds search index.
  • index_project_with_skip() — Indexing now respects index_skip_files from config, skipping non-code files during symbol extraction.
  • split_camel_case() — Decomposes camelCaseIdentifiers into individual tokens for FTS5 search (camelCasecamel OR case).
  • Enhanced sanitize_fts_query() — Handles quoted phrases, trims whitespace, and escapes special FTS5 characters.
  • 31 new unit tests — Tests for camelCase splitting, FTS5 query expansion, glob matching, suppression markers, framework prefix detection, schema migration v6, and config hash invalidation.

Changed

  • should_skip_file() rewritten — Simplified glob matching with early exit for non-glob patterns, explicit **/name branch handling.
  • Governance documentation — Added CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, PR template, issue templates (bug report + feature request), and PR checks workflow (branch naming, conventional commits, PR description validation).

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.12.0.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.12.0.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.12.0.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.12.0.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.11.1

Choose a tag to compare

@github-actions github-actions released this 01 Aug 09:26
899ac6f

What's New in v0.11.1

Fixed

  • Index scanner false positives on entry-point files. Added index_skip_files glob patterns to RulesConfig. Common bundler config files (vite.config.ts, webpack.config.*) and app entry points (src/main.ts, src/index.tsx) are now skipped by default — reducing noise from imports used by bundlers, not code.
  • cora scan now includes index findings. Fixed bug where cora scan did not wire index scanners (unused imports, dead code) — the scan command now runs scan_project_index() to produce deterministic findings alongside LLM analysis.
  • Error fallback preserves index findings. When LLM review fails, the fallback path now includes all index-based findings instead of silently dropping them.

Added

  • index_skip_files config field — New field in RulesConfig and .cora.yaml rules_engine section. Supports simple glob patterns (*.config.ts, vite.config.*, **/main.ts). Configurable per-project.
  • should_skip_file() helper — Glob matching utility for index scanner file filtering.
  • 8 new unit tests — Tests for should_skip_file() covering exact match, wildcard suffix/prefix, **/ patterns, and default skip list validation.

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.11.1.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.11.1.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.11.1.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.11.1.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.10.0

Choose a tag to compare

@ajianaz ajianaz released this 29 Jul 04:48
acfc298

What's New in v0.10.0

Highlights

  • Dead code detection. cora dead-code finds functions/methods with no callers using call graph analysis. Available as both CLI command and MCP tool (cora.dead_code).
  • Graph query DSL. cora query "main -> *" lets you traverse the code graph with simple patterns — no SQL needed. Available as both CLI and MCP (cora.query).
  • Auto-config agent installer. cora install detects installed AI coding agents (Cline, Cursor, Windsurf, etc.) and configures Cora as their MCP server. One command setup.
  • Background reindex on serve. cora serve now auto-reindexes the current project before starting the MCP server — always up-to-date symbols.
  • Tree-sitter is now a default feature. The edges table (IMPORTS, IMPLEMENTS, INHERITS, CHILD_OF) now populates correctly in all builds, including release binaries.

Added

  • cora dead-code CLI command (#427). Detect dead functions/methods with --include-tests, --min-lines, and --json flags.
  • cora.dead_code MCP tool (#428). Same dead code detection, accessible via Model Context Protocol.
  • cora query CLI command (#435). Simple graph traversal DSL: "symbol -> *" (callees), "* -> symbol" (callers), "SymbolName" (symbol lookup).
  • cora.query MCP tool (#435). Same query DSL via MCP.
  • cora install CLI command (#431). Auto-detect 40+ AI coding agents and configure Cora MCP with one command. Supports --list, --dry-run, --agents, --force.
  • cora.install MCP tool (#431). Same install detection via MCP.
  • cora serve with auto-reindex (#434). cora serve runs incremental reindex on startup before launching MCP server.
  • Agent config module (#432). Read/write support for JSON, JSONC, and YAML agent configuration files.

Changed

  • Tree-sitter is now a default feature (#429). default = ["tree-sitter"] in Cargo.toml. All builds (including release) now include AST-based extraction.
  • Release workflow explicitly builds with --features tree-sitter.
  • CI workflow explicitly builds/tests with --features tree-sitter.
  • MCP tool count increased from 16 to 18 tools.

Fixed

  • edges table was always empty (#429). Root cause: tree-sitter feature was not enabled by default, so AST extraction (which produces IMPORTS, IMPLEMENTS, INHERITS, CHILD_OF edges) was never compiled into release binaries. Now fixed — 352+ edges populated on rebuild.

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.10.0.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.10.0.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.10.0.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.10.0.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.9.0

Choose a tag to compare

@github-actions github-actions released this 28 Jul 16:05
257b7ad

What's New in v0.9.0

Highlights

  • Single source of truth. Review findings, scan findings, and tech debt snapshots now persist to cora.db — one global database, no more scattered file snapshots.
  • Massive indexing speedup. Rayon-parallel extraction + embedding, batch SQLite writes, PRAGMA tuning, and mtime:size fingerprinting deliver 52× faster incremental indexing (414ms → 6ms) and 1.3× faster cold rebuild (1,260ms → 936ms).
  • cora findings CLI. Track, filter, dismiss, and reopen findings across all your reviews.

Added

  • Persist review & scan findings to cora.db (#397, #398). cora review and cora scan now save findings (severity, file, line, title, fingerprint) to the global database. Best-effort logging — never blocks the review pipeline on DB errors.
  • Auto-resolve stale findings (#399). When a new review/scan completes, findings from prior reviews that no longer appear are automatically marked resolved with an auto_resolved event. Findings that reappear stay open.
  • cora findings CLI command (#400). New subcommand with four actions:
    • cora findings list — show open findings (use --all, --severity, --file, --json for filtering)
    • cora findings stats — summary counts with resolution rate (--json supported)
    • cora findings dismiss <id> — mark as won't-fix with optional --reason
    • cora findings reopen <id> — reopen a dismissed/resolved finding
  • Migration v5 schema (#396). New tables: reviews, findings, finding_events. Auto-migrates on first run.
  • cora index --rebuild flag. Drop and re-index from scratch — useful for schema upgrades or corrupted indices.
  • Rayon parallel processing (#409, #422). File extraction and embedding computation now run in parallel across CPU cores via Rayon.
  • Cache vector index in memory (#407). VECTOR_CACHE (LazyLock) keeps the usearch HNSW index hot in memory — eliminates file I/O on every brain search.
  • Batch symbol lookup in RRF fusion (#410). Brain search now batches DB lookups instead of per-result queries.
  • SQLite PRAGMA tuning (#406). journal_mode=WAL, synchronous=NORMAL, mmap_size=256MB, cache_size=-64MB for faster writes.
  • Batch INSERT via multi-row VALUES (#405). Symbol insertion now uses multi-row INSERT ... VALUES (?,?,?),(?,?,?),... instead of per-row inserts.
  • Batch transaction for index_project (#404). All symbol/edge insertions wrapped in a single BEGIN IMMEDIATE ... COMMIT.
  • Disable FTS5 triggers during bulk indexing (#411). Triggers re-enabled after commit — avoids redundant index updates mid-batch.
  • Mtime:size fingerprinting. Replaces SHA256 content hashing for change detection. Trade-off: --rebuild available for full re-validation.

Changed

  • cora debt reads from cora.db as primary source (#403). File snapshots are now fallback only. DB is the single source of truth for tech debt reports.
  • graph.db renamed to cora.db (#395). Auto-migrates existing graph.db on first run.
  • db_writer module now exposes open_db_for_read(), open_db_for_write(), and compute_fingerprint_pub() for use by the findings CLI.

Performance

Benchmarked on the cora-code repository (1,864 symbols, 115 Rust files, x86_64):

Operation Before (v0.8.3) After (v0.9.0) Speedup
Cold index (full rebuild) ~1,260ms ~936ms 1.3×
Incremental (no changes) ~414ms ~6ms 52×
Brain search (hybrid) ~250ms ~5ms 40×

Fixed

  • cora brain vector search filtered by project_id (#382). Over-fetches from global usearch index, filters at DB layer — prevents cross-project noise.
  • Project root detection (#380). Walks up from CWD to find .cora.yaml / Cargo.toml / .git instead of always using CWD.

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.9.0.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.9.0.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.9.0.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.9.0.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.8.3

Choose a tag to compare

@github-actions github-actions released this 27 Jul 07:43
d245103

What's New in v0.8.3

Added

  • Svelte AST symbol indexing. cora index with --features tree-sitter now extracts functions, arrow functions, and types from <script> blocks in .svelte files. Uses TypeScript/JavaScript grammar delegation — zero new dependencies. Supports lang="ts" and lang="js" attributes with correct line number offsets. Closes #384.
  • TypeScript arrow function extraction. export const handler = () => {} and const cb = function() {} are now captured as symbols with call edges. Previously only ALL_CAPS constants were indexed from lexical_declaration/variable_declaration nodes.

Fixed

  • Project root detection for scoped queries (#380, #382). resolve_project_root() now walks up from CWD to find .cora.yaml, Cargo.toml, or .git instead of always using CWD. Fixes cora brain and cora callers returning results from wrong projects.
  • Vector search filtered by project_id (#382). brain_search() now over-fetches from the global usearch index and filters by project_id at the DB layer, preventing cross-project noise in results.
  • Cross-project fallback for cora callers (#381). When a symbol has no callers in the current project, falls back to searching across all projects in the global index.
  • Partial JSON recovery for scan results (#383). extract_partial_json_objects() added as last-resort fallback when LLM returns truncated JSON arrays in scan output.

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.8.3.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.8.3.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.8.3.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.8.3.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.8.2

Choose a tag to compare

@github-actions github-actions released this 25 Jul 06:58
4a8cc24

What's New in v0.8.2

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.8.2.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.8.2.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.8.2.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.8.2.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.8.1

Choose a tag to compare

@github-actions github-actions released this 25 Jul 06:59
8e38303

What's New in v0.8.1

Fixed

  • crates.io publish (503 transient on v0.8.0)

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.8.1.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.8.1.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.8.1.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.8.1.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-code/blob/main/CHANGELOG.md

Release v0.7.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 06:13
80fc49b

What's New in v0.7.0

Highlights

  • Deeper, token-economical cross-file review. Reviews now resolve who calls the changed code (inbound / blast-radius), not just what the changed code calls — so breaking signature/type changes can be flagged. Bounded scanning + thin slices + a signature-only budget fallback keep token cost low.
  • Config is now validated at load time. Out-of-range values (e.g. temperature: 5) and misspelled keys (quailty_gate) fail loudly instead of being silently ignored.
  • Markdown false positives suppressed. Findings inside fenced code blocks (a git push in a fenced bash block flagged as SQL injection) are now dropped across all finding sources.
  • Performance, security, and correctness fixes across the scan/review pipeline (10 perf bottlenecks, 2 CVE bumps, 8+ silent-corruption and best-practice bugs).

Added

  • Inbound caller (blast-radius) resolution. A new context-chain phase resolves call-sites of functions/types defined or modified in the diff, so breaking changes to their signatures surface their consumers. Gated by new review.context_chain.include_callers (default true); uses gitignore-aware walking and is bounded (≤400 files, ≤3 call-sites/symbol), injecting only the call line + 1 line of context. New ContextPriority::CallerSite.
  • Definition extraction (extract_definitions_from_diff) for Rust/Python/JS-TS/Go/Java-Kotlin — detects functions/types declared in the diff, feeding caller resolution. Rust mod foo; and Java import com.example.* wildcards are now extracted correctly (#73, #72).
  • Signature-only budget fallback. When the token budget can't fit a full function/type body, a thin signature slice (up to {) is injected instead of skipping the entry entirely (~3–5× more symbols under the same budget).
  • Config::validate() (#94) — rejects out-of-range/unsupported values at load: temperature (0.0–2.0), max_tokens/timeout (≥1), max_tokens_param, response_format, output.format, hook.mode/on_violation/min_severity, and provider.base_url scheme. Multiple errors are aggregated into one message.
  • Profile::validate() (#81) — focus weight must be 1–10, and action/tone/detail_level must be recognized values.
  • deny_unknown_fields on all config sections (#80) — misspelled YAML keys are rejected at parse time.

Changed

  • CategoryAction enum (#57) — quality_gate.categories.*.action is now a case-insensitive enum (block/warn/ignore); a typo like blok fails loudly at config load instead of silently becoming blocking.
  • Disabled quality gate never fails (#58) — evaluate() forces Pass when enabled: false.
  • context_chain.max_context_tokens default raised 3000 → 5000.
  • issue_type serializes consistently as issue_type (#48); type retained as a deserialize alias.
  • Severity::from_str_lossy uses eq_ignore_ascii_case (no allocation) (#10).

Fixed

  • Markdown fenced-code-block false positives (#329) — findings inside fenced code blocks (triple-backtick / triple-tilde) in .md/.mdx/.markdown files are dropped across all finding sources (security/secrets/rules scanners + LLM). Fence state is tracked across full hunk context, so it works even when only the block body was edited.
  • Cross-file resolver used the wrong ignore listreview.rs passed ignore.rules (finding-type strings) instead of ignore.files (target/**, node_modules/**); the resolver could inject build-artifact code. Now uses ignore.files.
  • Test-file detection over-match (#87) — is_test_file is path-segment aware; latest, aspect, attestation are no longer mistaken for test files.
  • Directory glob excludes over-permissive (#66) — src/ matches only at segment boundaries (mysrc/ no longer caught).
  • Token estimation (#68) — non-empty content returns ≥1 token (was 0 under integer division).
  • DB size (#23) — index_stats queries PRAGMA page_size instead of assuming 4096 bytes.
  • Project-sync workflow — a merged PR referencing issues via Refs #N (not Closes #N) no longer fails the sync check.
  • 10 scan/review performance bottlenecks (#335) — precompiled regex, batched DB queries, early cutoffs, file-content cache, single reused Tokio runtime, single-transaction prune, etc.
  • Security: bumped anyhow 1.0.102 → 1.0.103 (RUSTSEC-2026-0190) and crossbeam-epoch 0.9.18 → 0.9.20 (RUSTSEC-2026-0204).
  • Various silent-data-corruption bugs resolved (#333): severity sort, security-findings fallback, deterministic debt-snapshot hashing, debt-trend math, config precedence, context_chain merge, and hook-install composition.

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.7.0.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.7.0.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.7.0.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.7.0.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-cli/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-cli/blob/main/CHANGELOG.md

Release v0.6.2

Choose a tag to compare

@github-actions github-actions released this 21 Jun 10:25
4f0d027

What's New in v0.6.2

Fixed — Token Usage Tracking

  • tokens_used is no longer always None in review and scan responses.

    • parse_review_response and parse_scan_response previously discarded the usage object returned by the LLM API, hardcoding Ok((..., None)). Token counts and cost estimates were silently dropped.
    • chat_completion now returns (content, Option<Usage>) and the parse functions thread usage through as TokenUsage. All call sites updated.
    • ReviewResponse.tokens_used and ScanResponse.tokens_used now report real values when the provider supplies them.
  • cora review --stream now collects token usage.

    • The streaming path (chat_completion_stream) previously only accumulated delta.content and ignored the usage field. It now sends stream_options: { include_usage: true } and parses usage from the final SSE chunk (top-level or nested in choices[0].delta.usage).
    • Token counts are now reported correctly for both streaming and non-streaming review.
  • cora scan multi-batch token accumulation.

    • When scanning multiple batches, total_tokens was overwritten by each batch instead of accumulated. Only the last successful batch's tokens were reported.
    • Token usage now accumulates across all batches (input_tokens, output_tokens, and estimated_cost_usd are summed).

Changed — Code Quality

  • Extracted magic numbers into named constants.
    • scan.rs: the hardcoded batch size fallback 20 and token budget 60_000 are now DEFAULT_MAX_FILES_PER_BATCH and DEFAULT_BATCH_TOKEN_BUDGET.
  • Usage struct now accepts camelCase aliases.
    • Some providers (e.g. Azure OpenAI, certain third-party gateways) return promptTokens / completionTokens / totalTokens instead of snake_case. Both forms are now accepted via #[serde(alias = ...)].

Tests

  • Added 4 regression tests for token usage threading: parse_review_preserves_usage_when_provided, parse_review_returns_none_usage_when_not_provided, parse_scan_preserves_usage_when_provided, usage_to_token_usage_maps_fields_correctly.

📦 Platforms

Platform File
Linux (x86_64) cora-x86_64-unknown-linux-gnu-v0.6.2.tar.gz
Linux (ARM64) cora-aarch64-unknown-linux-gnu-v0.6.2.tar.gz
macOS (Apple Silicon) cora-aarch64-apple-darwin-v0.6.2.tar.gz
Windows (x86_64) cora-x86_64-pc-windows-msvc-v0.6.2.zip

🚀 Quick Start

# Quick install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-cli/main/install.sh | sh

# Or via cargo
cargo install cora

# Init project
cora init

# Review staged changes
CORA_API_KEY=your-key cora review --staged

Full changelog: https://github.com/codecoradev/cora-cli/blob/main/CHANGELOG.md