This release includes breaking changes for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+8 more
ReleasePort's take
Light signalThe release introduces several performance optimizations: inlining applyPlan blob content for GitHub provider writes, adding opt‑in read memoization to GitHubReader, injecting stats into buildContextChange to skip expensive walks, and batching local git subprocess spawns during transaction creation.
Why it matters: These changes reduce API calls per write to a fixed three, deduplicate repeated path reads, skip O(models·locales) reader walks when counts are known, and cut config/checkout calls per transaction, directly improving efficiency for GitHub‑related operations.
Summary
AI summaryUpdates Minor Changes, Patch Changes, and f1a2dce across a mixed release.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Performance | Medium |
GitHub provider now inlines applyPlan blob content reducing API calls per write to a fixed 3. GitHub provider now inlines applyPlan blob content reducing API calls per write to a fixed 3. Source: llm_adapter@2026-07-16 Confidence: high |
— |
| Performance | Medium |
GitHubReader adds opt‑in read memoization deduplicating repeated path reads within one operation. GitHubReader adds opt‑in read memoization deduplicating repeated path reads within one operation. Source: llm_adapter@2026-07-16 Confidence: high |
— |
| Performance | Medium |
buildContextChange gains stats injection to skip O(models·locales) reader walk when model/entry counts are known. buildContextChange gains stats injection to skip O(models·locales) reader walk when model/entry counts are known. Source: llm_adapter@2026-07-16 Confidence: high |
— |
| Performance | Medium |
Local writes batch git subprocess spawns, cutting config and checkout calls per transaction. Local writes batch git subprocess spawns, cutting config and checkout calls per transaction. Source: llm_adapter@2026-07-16 Confidence: high |
— |
Full changelog
Minor Changes
-
f1a2dce: Three additive GitHub-provider optimizations that cut API calls per write (no breaking changes)
- applyPlan blob inlining —
applyPlanToGitHubnow inlines file content directly in the Git tree entries instead of POSTing a blob per file. A write drops fromN+3GitHub mutations to a fixed3(tree + commit + ref) regardless of file count, easing the mutation-rate secondary limit. This brings the GitHub provider to parity with the GitLab provider, which already inlines content in its commit actions. Deletions are unchanged (null-sha entries); content is passed through byte-for-byte. - GitHubReader opt-in read memoization —
new GitHubReader(client, repo, { memoize: true })deduplicates repeated(path, ref)reads within one operation acrossreadFile/listDirectory/fileExists. Opt-in and off by default; failed reads are evicted so transient errors are retried, not cached. The provider's own long-lived reader does not enable it (a reader that outlives a write must not serve stale results). - buildContextChange stats injection —
buildContextChange(reader, operation, source, { stats })lets a caller that already knows the model/entry counts skip the O(models·locales) reader walk; onlyreadConfigremains. The emitted context.json is byte-identical to the scanned variant. Parameterless callers are unaffected.
- applyPlan blob inlining —
Patch Changes
-
cfface5: Speed up local writes by batching git subprocess spawns in the worktree transaction
Every local write (
content_save,model_save,bulk, normalize apply, …) runs throughcreateTransaction, which spawned ~40gitprocesses for a single content save. Two behavior-preserving batches cut that:- Commit identity via environment — the worktree git instance now carries
GIT_AUTHOR_*/GIT_COMMITTER_*in its env instead of running twogit config user.*spawns per transaction (and percontentrain_merge). Git honors these for both the sync merges and the feature-branch commit. - Batched selective sync —
selectiveSyncreplaced its per-filegit cat-file -eexistence loop with a singlegit ls-treeover the changed paths, and its per-filegit checkout HEAD -- <file>loop with a single batched checkout (per-file fallback on error preserves precise skip accounting). Working-tree deletions are parallel fs removals.
Measured: a 2-locale
content_savedrops from ~40 git spawns to ~30 (config 2→0, cat-file 5→0, checkout 7→3), roughly halving the operation's wall-clock. The selective-sync win scales with file count, so bulk writes benefit the most. No behavior change — the full worktree-transaction test suite passes unchanged. - Commit identity via environment — the worktree git instance now carries
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About Contentrain/ai
Local-first MCP server for AI content governance — 13 tools for model/content CRUD, validation, normalization, and i18n across any framework.
Related context
Earlier breaking changes
- v@contentrain/[email protected] `validateModelDefinition` now returns `{ errors, warnings }` instead of a string array.
- v@contentrain/[email protected] `model_save` rejects models with unknown keys, `min > max`, invalid constraints, and `unique` on singletons.
- v@contentrain/[email protected] `content_save` now validates before committing and rejects invalid content.
- v@contentrain/[email protected] `validateModelDefinition` now returns `{ errors, warnings }` instead of a string array.
- v@contentrain/[email protected] `model_save` rejects models with unknown keys, `min > max`, invalid constraints, and `unique` on singletons.
Beta — feedback welcome: [email protected]