Releases: dshills/prism
Releases · dshills/prism
v0.6.0 — Performance & Concurrency
What's New
Performance
- Parallel file reads in codebase mode —
Codebase()now uses a producer-consumer pipeline with per-file buffered channels and a 16-worker semaphore, reading files concurrently and delivering results in stable index order. Large codebases complete significantly faster. - Prompt builder buffer pooling —
BuildUserPromptandBuildCodebaseUserPromptnow poolbytes.Bufferbacking arrays viasync.Pool. Chunked reviews build 10–100 KB prompt strings per chunk; pooling eliminates those repeated large allocations. Buffers over 1 MB are discarded to bound pool memory. - Context propagation throughout — All git operations (
Unstaged,Staged,Commit,Range,Codebase) now accept and respectcontext.Context, enabling clean cancellation across the entire review pipeline.
Configurable Concurrency & Rate Limiting
- Dynamic
maxConcurrency— Chunked reviews now use a per-provider default concurrency (8 for cloud providers, 16 for Ollama) rather than a hardcoded constant. Override via config orPRISM_MAX_CONCURRENCY. - Token-bucket rate limiter — A new
ratelimitpackage provides a lazy-refill token-bucket limiter (no background goroutines). Per-provider defaults: Anthropic 50 RPM, OpenAI/Gemini 60 RPM, Ollama unlimited. Override via config orPRISM_RATE_LIMIT_RPM.
New config fields:
```json
{
"maxConcurrency": 0,
"rateLimitRpm": 0
}
```
New environment variables: PRISM_MAX_CONCURRENCY, PRISM_RATE_LIMIT_RPM
Code Quality
strings.SplitSeq/strings.CutPrefixindiffutil— iterator-based line splitting avoids allocating the full[]stringslice for large diffs;CutPrefixreplacesHasPrefix + TrimPrefixpairs.cloneReportdeep copy —FilterReportBySeveritynow returns a fully independent clone;Finding.Locations,Tags, andReferencesslices are no longer shared between the original and filtered report.
Public API (pkg/prism)
- Exposed
pkg/prismfacade package withReview,RenderReport,FilterReportBySeverity,FailOnMet,IsSupportedProvider,ProviderForModel,KnownModels, andDefaultReviewOptions.
Test Coverage
- Comprehensive unit tests for
pkg/prismpublic API (55+ cases): all pure functions, format-specific output assertions, deep-clone isolation. - New
internal/reviewtests:SortFindings(7 cases),BuildReport(10 cases).
Documentation
- README updated with new config fields, environment variables, and missing model names (
gpt-5.3-codex-spark,deepseek-coder-v2).
Upgrade
```bash
go install github.com/dshills/prism/cmd/prism@v0.6.0
```
No breaking changes. Existing config files, environment variables, and exit codes are unchanged.
v0.5.0
What's New
v0.5 — Per-Commit Review
--per-commitflag forreview range: review each commit in a range individually, with findings stamped with the short commit SHA
v0.4 — Local Models & Git Integration
- Ollama / LMStudio support: run reviews with local models (
--provider ollama) - Pre-commit hook:
prism hook install/prism hook uninstall - GitHub PR integration: post findings as pull-request review comments
v0.3 — Compare Mode & Markdown Output
- Multi-model compare mode: run the same diff across multiple provider/model pairs and identify consensus vs. unique findings
- Markdown output format: PR-comment-friendly with collapsible sections per finding
- Rules packs: customize severity overrides, focus areas, and required checks
v0.2 — SARIF, Caching & Large Diffs
- SARIF v2.1.0 output: upload findings to GitHub Advanced Security and other CI tools
- File-based cache: SHA-256 keyed entries with configurable TTL
- Automatic diff chunking: diffs >100 KB are split per file and reviewed in parallel (bounded concurrency of 4)
v0.1 — Initial Release
- 5 review modes: unstaged, staged, commit, range, snippet
- 3 providers: Anthropic, OpenAI, Google Gemini
- Text and JSON output formats
- Secret redaction (on by default)
- Deterministic exit codes for CI gating
- Config file with CLI flag / env var / file precedence
Installation
go install github.com/dshills/prism/cmd/prism@latest