Repository navigation
Releases
Checkgate v0.2.0
Checkgate 0.2.0 brings feature flags to more of your stack: OpenFeature, Python and the main Node.js frameworks. It adds a local quickstart, an evaluation playground, SDK health diagnostics, and an MCP server for AI agents that works within your approval workflow. Every SDK evaluates flags locally with the same Rust engine, and none of the new features adds a network request per evaluation.
Developer ecosystem
- OpenFeature provider:
@checkgate/openfeature-provideris an OpenFeature server-SDK provider built on@checkgate/node. It maps reasons and variants and reports READY, STALE, ERROR and FATAL. - Python SDK:
checkgateuses the Rust engine through PyO3, with SSE plus a polling fallback, revision ordering, an offline cache,get_details()andget_health(). Abi3 wheels for CPython 3.11+ on Linux x86_64/aarch64, macOS x86_64/arm64 and Windows x86_64. Examples for FastAPI, Flask and Django. - Express, NestJS and Fastify:
@checkgate/node-integrationsshares one client per process and gives each request its own evaluation context.
Developer experience
- Five-minute quickstart:
quickstart/start.sh --seedruns a local, development-only setup with Node.js and Python examples. - Evaluation playground: shows what an SDK would answer for a given user, and why. Read-only.
- SDK health diagnostics: the server reports the delivered revision per stream and convergence per environment; the SDKs offer
getHealth()/get_health()and status listeners.
Automation
@checkgate/mcp-server: a stdio MCP server for AI agents. It is read-only by default. With writes enabled and aproposetoken, it can propose changes, which go through the normal approval workflow. No tool creates, approves or applies anything.
Reliability and security
- Protected-environment governance: in environments that require approval, creating an enabled flag now goes through a change request (
202 Accepted). Inert flags are still created directly. - SSE and revision ordering: shared fault-injection and evaluation-vector suites run against the Node.js, Python and OpenFeature SDKs.
- Validation: cross-platform wheel and native-addon builds, npm and wheel package checks, and a tested 0.1.31 → 0.2.0 upgrade and rollback.
Performance
0.2.0 was compared with v0.1.31 in a controlled A/B on a dedicated 6-CPU Linux workstation. No measured regression exceeds the 10 % threshold. Rule matching and weighted-variant selection in the Rust core are 2.7–4.6 % slower (2–10 ns per evaluation), tracked in #72 and #73. Node.js SDK evaluation, server throughput, SSE propagation and memory are unchanged within noise. Details: CHANGELOG, benchmarks.
Upgrading from 0.1.31
- The release has two additive database migrations, applied on start. A 0.1.31 binary will not start against an upgraded database, so replace all instances rather than rolling them. Take a database backup first.
- In approval-required environments, scripts that create enabled flags must handle
202(a pending change request). - Do not create
proposetokens while any 0.1.31 instance is still serving. - The SDK protocol is unchanged: 0.1.31 SDKs work with a 0.2.0 server and the reverse.
- Rollback steps: Upgrading to 0.2.0.
Known limitations
- Python SDK: the stream event queue is unbounded by count (#74) and snapshot persistence is not debounced (#77). There is no source distribution, so platforms without a wheel (for example Alpine/musl) cannot install it.
- The evaluation playground has no dedicated concurrency limit (#75), and
/health/readyprobes the database on every call (#76). - Kubernetes operator: retrying an approval-gated update can leave duplicate pending change requests (#78).
- React Native: iOS is not certified. Flutter: you build and link the Rust engine yourself.
- Security hardening carried over from 0.1.31 (#89–#91) and the
docker runstop timeout (#92) are tracked for 0.2.1.
Packages
| Package | Install |
|---|---|
| Node.js SDK | npm install @checkgate/node@0.2.0 |
| OpenFeature provider (new) | npm install @checkgate/openfeature-provider@0.2.0 @openfeature/server-sdk |
| Express · Fastify · NestJS (new) | npm install @checkgate/node-integrations@0.2.0 |
| Python SDK (new) | pip install checkgate==0.2.0 |
| MCP server (new) | npx -y @checkgate/mcp-server@0.2.0 |
| Browser SDK | npm install @checkgate/web@0.2.0 |
| React Native SDK | npm install @checkgate/react-native@0.2.0 |
| Flutter SDK | flutter pub add checkgate_flutter:^0.2.0 |
| SSR · Edge | npm install @checkgate/ssr@0.2.0 @checkgate/edge@0.2.0 |
| CLI | npm install -D @checkgate/cli@0.2.0 |
npm packages carry npm provenance; the Python wheels carry PyPI attestations.
Container image: ghcr.io/checkgate-sh/checkgate:0.2.0 (also 0.2 and latest), digest sha256:fc57525438619606face777560eb1c6d2b9d0e53e04e41f731bb513df10c8d61, linux/amd64 and linux/arm64, signed with Cosign (keyless, release.yml at v0.2.0).
Full changelog: CHANGELOG.md
Checkgate v0.1.31
Upgrading from 0.1.30
No database migration or configuration change is required, and rolling back to
0.1.30 needs no database step (tested: upgrade, mixed versions and rollback on
one database). SDKs and servers of either version work together. Check these
first; the first one deletes data unless you configure it:
-
Impressions and goal events older than 90 days are now deleted. 0.1.30
kept them forever. A retention job removes rows received more than
ANALYTICS_RETENTION_DAYS(default 90) ago, except those of running or
paused experiments, starting about a minute after the server starts and in
small batches. SetANALYTICS_RETENTION_DAYS=0before upgrading to keep
everything. Results of completed experiments older than the retention
shrink as their rows expire. Deleted rows are not restored by a rollback. -
Analytics ingestion has a quota per SDK key (and per user), shared by
all instances through Redis: 20,000 requests and 60,000 rows a minute by
default (RATE_LIMIT_INGEST_KEY_PER_MINUTE,
RATE_LIMIT_INGEST_ROWS_PER_MINUTE). Over it, the batch gets429with
Retry-Afterand nothing is stored; the SDKs drop it (no retry). Raise the
row budget first if one key reports more than about 1,000 rows a second. -
SDK
connect()can now reject (it used to stay pending forever): with
CheckgateAuthError(Flutter:CheckgateAuthException) when the server
answers 401/403, and whendisconnect()/close()is called first. A caller
that never awaitsconnect()gets no unhandled rejection. After a 401/403
the SDK stops retrying instead of reconnecting every 30 s forever; flags
already loaded keep being served, and callingconnect()again retries. -
SSE keep-alive is now
event: heartbeat(withdata: {}) instead of an
SSE comment, sent afterSSE_HEARTBEAT_INTERVAL_SECS(default 15) of
silence, andconnectedcarriesheartbeat_ms. Older SDKs ignore both.
Proxies see the same traffic pattern as before. -
GET /flags/snapshot?v=2answers{ v, flags, revisions, tombstones };
0.1.31 SDKs ask for it when they poll. Withoutvthe endpoint answers the
same array as before, so older SDKs and other consumers (@checkgate/edge,
@checkgate/ssr, scripts) are unaffected. A 0.1.31 SDK polling a 0.1.30
server gets the array and behaves as 0.1.30 did (no ordering between a poll
and a stream replay; see R20 below). -
SDKs drop a silent stream after 3 heartbeat intervals (45 s by default)
and reconnect. Against a 0.1.30 server the JavaScript SDKs keep only the new
30 s connect deadline (that server's keep-alive is invisible to
EventSource); Flutter still sees it. -
Configuration limits. Flag and segment writes past these limits now get
422: more than 500 rules on a flag; the same segment referenced twice;
more than 50 distinct segments on a flag; a prerequisite on the flag itself,
listed twice, or more than 50; more than 100 variants; more than 500 rules
in a segment. Stored flags keep working. The upgrade guide
(docs/operations/upgrading.md) has a query that finds flags a later edit
would reject. -
GET /flags/snapshotanswers500when a stored flag does not decode,
instead of silently leaving it out (which polling SDKs treated as a delete). -
Tokens. A personal access token can no longer create a token that
outlives itself, and a read-only token can no longer revoke tokens. -
Webhooks and integrations no longer follow redirects, and store at most
1 KiB of each response. -
Webhook and integration URLs may not point at link-local addresses
(169.254.0.0/16, where cloud metadata services answer, andfe80::/10),
atfd00:ec2::254or at the unspecified address (0.0.0.0/8,::):
creating or changing one answers422, and a hostname that resolves only
to such addresses fails to connect. Rows stored earlier are refused at
delivery and logged as such. Loopback and private addresses still work. -
Integration test messages (
POST .../integrations/{id}/test) answer
200with{ delivered, status_code, error }after one attempt (at most
10 s), instead of202before anything was sent. They now reach only the
tested integration, also when it is disabled or filtered. -
Flag reads with an SDK key (
GET /api/environments/{env}/flags[/key])
no longer includeowner_email. The field was already omitted for flags
without an owner. Tags are unchanged. Sessions and personal access tokens
still get it. -
Revoking an SDK key closes the open streams of its environment, on
every instance, withinSSE_RESYNC_SPREAD_MS(default 5 s). Clients using
other keys reconnect and re-bootstrap once; the revoked key's reconnect is
refused. New metric label:checkgate_resync_requests_total{trigger="key_revoked"}. -
Logs. The request span records
path(no query string) instead of
uri, so?sdk_key=is no longer logged. Webhook logs no longer include
the URL. -
All-in-one container. The entrypoint shell stays as PID 1 and stops the
bundled PostgreSQL and Redis after the server exits. Keep the stop timeout
at 30 s or more (docker-compose.ymlnow setsstop_grace_period: 30s).
Known limitations
- Flutter: the package bundles no compiled engine; link the Rust engine
as the Flutter README describes (verified on an iOS simulator). - iOS: verified only for Flutter, on the iOS 17 simulator. The React
Native iOS app build and physical devices were not tested for this release. - Ordering across poll and stream (the R20 fix) needs a 0.1.31 server;
against an older server the SDKs behave as 0.1.30 did. It is per flag, not
across flags (docs/operations/configuration-consistency.md). - Propagation tail: the 1 000-client p99 measured higher than 0.1.30's on
a contended macOS host (198 against 75 ms pooled; median run 84 against
76 ms). Re-measured on a Linux desktop (native Docker, alternated runs, 8
per version), it does not reproduce: p50 and p99 are statistically equal at
1 to 1 000 clients (1 000-client p99 0.82× of 0.1.30's, 95 % CI 0.72–1.09),
none of 5.1 million deliveries missed. With PostgreSQL's commit latency
removed, the 1 000-client p99 is 1.8 ms (6 %) higher, all of it in the first
20 updates after the clients connect (a one-time warm-up cost; later updates
are equal). Not a dedicated server, and its disk dominates the absolute
numbers. - Security findings not fully closed (all low or informational):
webhook and integration URLs may still target loopback and private
addresses by design (restrict egress at the network layer if they must
not); removing a project member does not yet close that user's open
dashboard stream until it reconnects (revoking an SDK key does); anyone who
knows an account's email can still lock it for 15 minutes with 5 wrong
passwords; SDK keys, which are public by design, are stored unhashed.
Added
- Analytics retention (
ANALYTICS_RETENTION_DAYS, default 90;0keeps
rows forever;ANALYTICS_RETENTION_INTERVAL_SECS, default 3600;
ANALYTICS_RETENTION_BATCH_SIZE, default 5000). One instance at a time runs
a pass (PostgreSQL advisory lock), at most once per interval across the
deployment, deleting in short batched transactions on the existing
received_atindexes. Rows of running or paused experiments are kept. No
migration. - Per-key ingest quota, atomic in Redis across instances; when Redis does
not answer, each instance enforces the same budget alone. Large bodies are
charged by size (one row per KiB), so a few huge rows cost what they store. - Metrics:
checkgate_analytics_rows_total{table,outcome},
checkgate_ingest_quota_rejections_total{limit},
checkgate_ingest_quota_local_decisions_total,
checkgate_analytics_cleanup_runs_total{outcome},
checkgate_analytics_cleanup_deleted_rows_total{table},
checkgate_analytics_cleanup_duration_seconds,
checkgate_analytics_cleanup_last_success_timestamp_seconds. - Dead-stream detection in every SDK (
connectTimeoutMs, 30 s, and
streamIdleTimeoutMs, default 3 × the announced heartbeat; Flutter
connectTimeout,streamIdleTimeout). A dropped NAT mapping or half-open
connection used to leave an SDK on stale flags until the OS gave up (hours). getStatus()(Flutter:status):state(connecting,streaming,
reconnecting,polling,auth_failed,closed),lastSyncAt(heartbeats
on a live stream count as confirmation) anderror, so an app can tell how
fresh its flags are.SSE_HEARTBEAT_INTERVAL_SECS(1–300, default 15).- SDK fault-injection suite (
sdks/conformance): one randomized, seeded
suite every SDK runs against its real transport; nightly over 300 seeds.
Live end-to-end runs of all four SDKs against a real server
(scripts/sdk-live-e2e.sh, in CI). Server-side randomized fault and segment
read failure tests (server/tests/sse_faults.rs). - A workflow that submits the resolved Go module graph, so Dependabot stops
reporting the already-patchedgoogle.golang.org/grpc(#51, #54, #55). - Prometheus process metrics on
/metrics(Linux):process_cpu_seconds_total,
process_resident_memory_bytes,process_virtual_memory_bytes,
process_open_fds,process_threads,process_start_time_seconds. bench/ab/: scripts to compare two builds (Node evaluation, snapshot
throughput and CPU, a Node differential check, upgrade and rollback).
Security
- One editor could exhaust memory for the whole server by referencing a
segment thousands of times in a flag: each reference copied the segment's
rules, for every publish, SSE bootstrap and snapshot. Duplicate references
are rejected and expansion is bounded (see the limits above). - Prerequisite fan-out could freeze every SDK. Prerequisites that are all
satisfied never short-circuit, so a chain of flags that each...