Releases: natiixnt/ContextBudget
v1.6.0 - Docstring stripping, TS condensation, function truncation
v1.6.0
What's new
Python docstring stripping — Docstrings are stripped from rendered symbol bodies. The implementation and signature remain; the prose description does not. Recovers 10–100+ lines per function/class in docstring-heavy codebases.
TypeScript/JavaScript class condensation — Large TS/JS classes (> 40 lines) now get the same treatment as Python classes: first 40 lines verbatim, remaining methods as signature stubs.
Standalone function truncation — Any function/method body exceeding 60 lines is truncated with a # ... (N lines omitted) note. Prevents single large functions from crowding out other symbols.
Benchmark (cold start, 4-task study)
| Task | top-k (uncompressed) | v1.6 cold | reduction |
|---|---|---|---|
| add rate limiting to auth API | 125,701 | 958 | -99.2% |
| refactor database connection pooling | 53,586 | 12,888 | -75.9% |
| fix memory leak in request handler | 113,466 | 5,134 | -95.5% |
| add JWT token validation middleware | 130,934 | 4,913 | -96.2% |
| average | 423,687 | 23,893 | -94.4% |
Cumulative cold-start progression
| Version | Feature | Avg cold reduction |
|---|---|---|
| v1.2 | baseline | ~37% |
| v1.3 | threshold tuning, test file detection, stub scoring | ~41% |
| v1.4 | utility file detection, cross-file import dedup | ~45% |
| v1.5 | Python class body condensation | ~95% (single task) |
| v1.6 | docstring stripping + TS condensation + func truncation | 94.4% (4-task avg) |
v1.5.0 - Faza 3: Class Body Condensation
v1.5.0 - Faza 3: Class Body Condensation
What's new
- Large class bodies (> 40 lines) are now condensed in symbol extraction
- First 40 lines are kept verbatim; remaining methods are rendered as signature-only stubs
- Classes with fewer than 40 lines are unaffected
Benchmark (cold start, "add rate limiting to auth API")
| Strategy | Tokens | vs top-k |
|---|---|---|
| top_k_selection (uncompressed) | 125,703 | baseline |
| compressed_pack cold | 6,416 | -94.9% |
| compressed_pack warm | 387 | -99.7% |
Cumulative cold-start improvements
| Version | Feature | Cold reduction |
|---|---|---|
| v1.2 | baseline | ~37% |
| v1.3 | threshold tuning, test file detection, stub scoring | ~41% |
| v1.4 | utility file detection, cross-file import dedup | ~45% |
| v1.5 | class body condensation | ~95%* |
*measured against uncompressed top-k on the Redcon repo itself
v1.4.0 — Phase 2 Cold-Start
Phase 2 cold-start compression improvements
Changes
1. Utility file detection
Files matching config.*, helpers.*, utils.*, validators.*, constants.*, settings.*, types.*, exceptions.*, errors.* now bypass the full-file path and always use symbol extraction — same mechanism as test file handling in v1.3. Bodies of symbols with no keyword hits are stubbed to signature-only lines.
2. Cross-file import deduplication
import and from ... import lines already emitted by an earlier file are stripped from subsequent files' compressed output. Eliminates repeated boilerplate imports across route handlers, services, and models.
Per-file impact (Redis caching task)
| File | Before | After | Reduction |
|---|---|---|---|
src/utils/helpers.py |
268 | 55 | 79% |
src/utils/validators.py |
249 | 123 | 51% |
src/config.py |
392 | 177 | 55% |
tests/test_users.py |
463 | 66 | 86% |
Cumulative benchmark (cold cache, 15-file Python microservice)
| Version | Avg tokens | Avg reduction |
|---|---|---|
| v1.2 | 7,749 | 37% |
| v1.3 | 7,272 | 41% |
| v1.4 | 6,750 | 45% |
Best case (JWT auth): 7,512 → 5,283 tokens (57% reduction cold start)
v1.3.0 — Cold-Start Compression
Cold-start compression improvements
Redcon v1.3 reduces token usage on first run (no prior cache) with four targeted optimizations to the compression pipeline.
Changes
1. Lower full-file threshold (600 → 300 tokens)
Files between 300-600 tokens now go through symbol/slice extraction instead of being sent verbatim. Previously, small utility files (config, validators, helpers) were always sent in full.
2. Tighter keyword-window snippets
snippet_hit_limit: 8 → 6snippet_context_lines: 2 → 1
3. Test file detection
Files matching test_*, *_test.*, */tests/*, *spec* patterns are always compressed via symbol extraction — even at small sizes — because fixture-heavy structure wastes tokens when sent in full.
4. Signature-only stubs for low-relevance symbols
Symbols with no keyword hits in the body (score < 3.5) are now rendered as a single signature line instead of the full function body. Symbols with keyword hits are unaffected.
Benchmark (cold cache, 15-file Python microservice)
| v1.2 | v1.3 | |
|---|---|---|
| Average tokens | 7,749 | 7,272 |
| Average reduction | 37% | 41% |
| JWT auth task | 7,512 (39%) | 5,992 (51%) |
| Refactor task | 7,831 (36%) | 7,232 (41%) |
v1.2.0
What's new
Dual-license model
- MIT for the core engine (context optimization, compressors, scanners, CLI, SDK, benchmarks)
- Proprietary license for commercial components (gateway, control plane, agent middleware, LLM integrations, runtime, telemetry)
- Added
LICENSE-COMMERCIALand SPDX headers to all proprietary files
Benchmark corrections
- Fixed inflated savings numbers — previous figures were measured with warm cache from sequential runs
- Honest cold-start numbers: 37% reduction (first run, no prior cache)
- Warm-cache numbers: 92% reduction (subsequent runs with summary reuse)
- Updated README, landing page, docs, and wiki
Infrastructure
- Fixed CI no-merge-base error (
--depth=1removed from git fetch) - Fixed Dockerfile: renamed
contextbudgettoredcon, installs[gateway]extra - Added
openai,anthropic,allextras topyproject.toml - Added CI matrix workflow (Python 3.10 / 3.11 / 3.12 x core / gateway / redis)
- Added
docker-compose.ymlfor gateway + Redis stack
Demo and benchmarks
- Added end-to-end demo (
demo/run_demo.py) covering pack, policy, cost analytics, gateway, and LLM adapters - Added 1,000-task benchmark corpus, runner, and pre-generated results (
redcon-benchmarks/)
Redcon v1.1.0
Redcon v1.1.0
Project renamed from ContextBudget → Redcon.
All packages, env vars (RC_*), API key prefix (rck_), and Prometheus metrics (rc_*) have been updated accordingly.
Enterprise features
P0 — Security & Observability
- Prometheus metrics endpoint (
/metrics) with request latency, event ingest, and rate-limit counters - Per-org ingest rate limiting (
RC_CLOUD_EVENTS_RATE_LIMIT/RC_CLOUD_EVENTS_RATE_WINDOW) - Admin bootstrap token (
RC_CLOUD_ADMIN_TOKEN) required forPOST /orgs
P1 — Scalability
- Redis-backed session store for horizontal gateway scaling (
RC_GATEWAY_REDIS_URL) - PgBouncer connection pooling (
deploy/pgbouncer.ini,redcon-cloud/docker-compose.prod.yml) - Per-org usage quotas (
migrations/005_quotas.sql) and Stripe billing hooks (migrations/006_billing.sql) - TypeScript/Node.js SDK (
@redcon/sdk) withCloudClientandGatewayClient
P2 — Enterprise polish
- Multi-region Postgres streaming replication (
deploy/postgres-primary.conf,deploy/postgres-replica.conf,redcon-cloud/docker-compose.multiregion.yml) - Read replica routing for analytics queries (
READ_DATABASE_URL) - OIDC SSO skeleton (
RC_CLOUD_OIDC_*) - Slack and PagerDuty webhook adapters
- 5-step onboarding wizard UI
Migration notes
| Old | New |
|---|---|
pip install contextbudget |
pip install redcon |
CB_GATEWAY_* env vars |
RC_GATEWAY_* |
CB_CLOUD_* env vars |
RC_CLOUD_* |
cbk_... API keys |
rck_... |
@contextbudget/sdk |
@redcon/sdk |
contextbudget-cloud/ |
redcon-cloud/ |
Existing API key values in the database are unaffected — only the prefix format in new keys issued after this release changes.
ContextBudget v1.0
ContextBudget v1.0
First stable release of the ContextBudget platform.
Core Engine
- File scanning, ranking, and compression pipeline
- Token-budget enforcement with configurable policy
- Delta-context propagation for multi-turn agent sessions
- On-disk summary cache with pluggable backends (local file, Redis)
Gateway
- FastAPI runtime gateway (
/prepare-context,/run-agent-step,/report-run) - Remote policy fetch from cloud control plane
- Fire-and-forget audit push after each request
Cloud Control Plane (contextbudget-cloud)
- Multi-tenant org / project / repository hierarchy
- API key issuance with SHA-256 hashing and optional expiry
- Append-only audit log with gateway push endpoint
- Versioned policy management with scope inheritance (repo > project > org)
- PostgreSQL row-level security on the events table
- Dashboard endpoints: overview, repositories, savings, heatmap
- Cost analytics: baseline vs optimised tokens, savings by repo and date
- Agent run tracking
CLI
cb pack,cb scan,cb score,cb plan,cb cost-analysis--jsonoutput flag and run artifact export
Testing
- 600 tests (522 core + 78 cloud), all passing