Skip to content

Release 0.2.1 - #117

Merged
akosidencio merged 81 commits into
mainfrom
dev
Nov 30, 2026
Merged

akosidencio merged 81 commits into
mainfrom
dev

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Release 0.2.1: merges dev (eaa1947) into main. After this merges, v0.2.1 is tagged on the merge commit and release.yml publishes to PyPI, npm, pub.dev and GHCR.

A stabilization release: server security hardening, isolation of the playground and readiness probe, SDK reliability fixes (Python, Flutter, OpenFeature, Edge, Node.js framework integrations), operator change-request ownership, and a core inlining fix. No database migration, so rolling upgrades and rollback both work. See CHANGELOG.md → [0.2.1] - 2026-11-30 and docs/operations/upgrading-to-0-2-1.md.

Validation on eaa1947

  • CI run 46438337231: 34/34 jobs passed.
  • Dependencies: cargo-deny and cargo-audit (CI), npm audit --omit=dev (0 vulnerabilities in every package), and govulncheck (operator, Go client, Terraform provider: none found).
  • Release dry run (verify phase plus credentials preflight): run 46438220802, in progress. Every verify job that finished in the earlier dry run passed. The tag run repeats the verify phase before anything publishes.
  • Reliability (extended): Node.js, web and React Native fault injection over 300 seeds, core benchmarks and control-plane load all passed; Flutter and the repeated suites are re-running.

Maintainer decisions recorded for this release

Issues fixed in this release have been closed. Follow-ups: #111, #112 (v0.3.0) and #113 (v0.2.2).

…#82)

The status listener announced READY when the client turned ready while
initialize() was pending; OpenFeature then emitted READY again when
initialize() resolved. Later STALE -> READY and ERROR -> READY transitions
are unchanged.

Tests use the real @openfeature/server-sdk with handlers registered before
setProviderAndWait: one READY at startup, one after a stream loss and
recovery, one per re-initialization, and one after a timed-out initialize.
#84)

res.json() ran outside any error handling, so after the first load a
non-JSON body made refresh() reject. A body that is not JSON, or not an
array of flag objects with a string key, now resolves with refreshed:
false and an error, like a network error or a non-2xx answer. A flag the
core rejects mid-load restores the previous snapshot instead of leaving a
half-loaded core. Before the first load these still reject.
…ed request on 202

ListChangeRequests, CancelChangeRequest, and CreateFlagOrPropose /
ReplaceFlagOrPropose, which return the *ChangeRequest the server queued
(ID, requested_by, stored patch) instead of ErrApprovalRequired. CreateFlag,
UpdateFlag and ReplaceFlag keep returning the sentinel. Groundwork for #78.
…83)

fastify.js is CommonJS and module.exports is the plugin, but fastify.d.ts
declared it with export default. Under module: nodenext an ES module's
default import of a CommonJS module is module.exports, which TypeScript then
typed as the namespace object, so app.register(defaultImport, opts) failed.
The declaration now uses export = with a merged namespace (the pattern of
the @fastify/* plugins): the default import, the named checkgatePlugin and
require() all type-check from .mts and .cts. Runtime exports are unchanged.

test/types gains .mts and .cts consumers that register through every import
form; a runtime test registers the ESM default and named imports.
check-npm-packages.mjs type-checks the same from the installed tarball and
registers the plugin with Fastify through every import form (it fails on the
0.2.0 declaration). README, docs and the example use the default import again.
Member removal publishes a user- and project-scoped REVOKE_MEMBER event
through Redis; each instance closes only that user's session/token streams
covering the project. Older instances ignore the event. Streams subscribe
before reading access, so a removal committed after the read is still seen.

Backstop for at-most-once Pub/Sub: session/token streams re-check role,
memberships and credential expiry every SSE_SESSION_RECHECK_SECS (default
30, jittered). A user with access to no environment gets 403 on reconnect.

Metrics: resync_requests_total{trigger=member_removed},
sse_disconnects_total{reason=access_revoked},
sse_rejections_total{reason=forbidden}.
cli, edge and ssr declare >=18 and the MCP server >=20 but ran only on 22;
the OpenFeature provider declares >=20 and node-integrations >=22.12.0 but
their matrices started at the latest 22. No range is changed (patch
release): a node-minimums job runs cli/edge/ssr on 18 and the MCP server on
20, sdk-node-native adds 20 and node-integrations adds 22.12.0. Existing
job and check names are unchanged.

check-versions.mjs (hygiene job) now reads ci.yml in step order and fails
when a publishable npm package's engines.node minimum is not the
node-version of any step running in its directory; '>=22.12.0' needs
22.12[.x], not 22.
…us (#80)

Every npm package README and its docs page now give the same Node.js
statement: the engines range, the versions CI runs, and that 18 and 20 are
past end of life (tested for compatibility, not supported). The OpenFeature
docs page said 22 or later while the package declares >=20; the Node SDK
notes that it declares no range and that eventsource 4 needs 20.
Failures are counted per (email, client address) and per email in one
insert-then-count step. Reaching LOGIN_MAX_FAILURES_PER_CLIENT (default 5)
locks only that client out of the account; LOGIN_MAX_FAILURES_PER_ACCOUNT
(default 50) still bounds password checks across all clients. A success
clears only the caller's failures; attempts_remaining reports only the
caller's allowance. Client addresses come from TRUSTED_PROXIES as before.
Documents the remaining distributed-lockout trade-off.
Events read from the stream were handed to the sync thread through an
unbounded queue. Each event now counts against a per-stream budget
(max_stream_backlog_bytes, default 64 MiB) from when it is read until its
task has run. An event that does not fit pauses the reader for up to
250 ms; if it still does not fit, the stream and its queued events are
dropped and the client reconnects. The replay merges with the flags
held, and events of a replaced stream are never applied.

The overflow is reported in get_health() through existing schema-1
fields (reconnect_count, last_error kind network).
With storage, every task that changed flags re-encoded the whole flag set
under the client lock and wrote it. Snapshots are now taken at most once
per persist_interval_ms (new option, default 500 ms; the first change
after a quiet period at once), as a shallow copy under the lock, and
encoded (256 flags per step, so other threads get the GIL back) and
written after the lock is released. Writes are serialized and numbered:
an older snapshot never overwrites a newer one. close() flushes a
pending snapshot; a failed write leaves the flags in memory untouched
and is retried on the next change or close().
…icorn configs (#86)

With gunicorn --preload, AppConfig.ready() runs in the master, so the
Django example created its client there and every worker raised
CheckgateForkError. flags.get_client() now creates the client on first
use in the process that uses it; gunicorn_django.conf.py connects it in
post_worker_init and closes it in worker_exit.

The Django settings lived in examples/gunicorn.conf.py, which gunicorn
loads from the working directory without -c, so the documented Flask
command failed to boot from examples/. They are now
gunicorn_django.conf.py, next to gunicorn_flask.conf.py (worker_exit
closes the Flask client).
…oad (#86)

test_examples.py starts each example under gunicorn -w 2 --preload
against the fake server, checks that each worker evaluates a flag (by
the access log's worker pid), that only the two workers open a stream
(none from the master), and that a graceful shutdown closes the client
in each worker. CI installs gunicorn, Django and Flask and sets
CHECKGATE_REQUIRE_EXAMPLES=1, so these tests cannot skip there.
…triction (#91)

Default unchanged (private targets allowed). When false, loopback,
RFC 1918, CGNAT and IPv6 ULA destinations (with IPv4-mapped and NAT64
forms, and the name localhost) are refused: 422 on webhook/integration
create and patch, dropped by the delivery resolver at connect time, and
refused for rows stored before the change. The integrations' plaintext
localhost allowance only applies while private targets are allowed.
Link-local and unspecified addresses stay refused under both settings.
status.pendingChangeRequestId (also a printer column), status.requestedBy
(the requester Checkgate records for the operator's token) and
status.rejectedChangeRequestId / rejectedGeneration. CRD regenerated with
controller-gen v0.16.5. Groundwork for #78.
In an environment that requires approval every retry and resync proposed
the same update again (also when the flag already matched), piling up
pending change requests. The reconciler now:

- writes nothing to a flag that already matches the spec;
- lists pending change requests and reuses its own (requester = the
  identity the server recorded for its token) when approving it would
  produce the spec, compared by effect on canonical JSON (key order,
  number spelling and omitted-vs-default values do not matter);
- withdraws its own stale or duplicate requests, never anyone else's,
  then proposes; lists again after proposing and keeps the lowest ID, so
  concurrent proposals (or a reply lost to a timeout) converge on one;
- records the request in status and clears it once approved, rejected or
  withdrawn; a rejected spec is not proposed again until it changes;
- withdraws its pending requests when the FeatureFlag is deleted.

Never approves, rejects or applies. Tested against an in-memory server
with the 0.2.0 approval workflow.
…ciles

TestEnvtestApprovalLifecycle runs the controller in a manager against an
envtest API server (CRD status schema, 20ms requeues, restart with status
lost). TestRealServerApproval runs against a real Checkgate server in an
environment that requires approval; test/e2e/run-real-server.sh prepares
it. Both skip unless their environment is set; CI runs them in the Go
integrations and SDK e2e jobs (#78).
- A dedicated, unqueued concurrency limit (PLAYGROUND_MAX_CONCURRENT,
  default a quarter of DB_MAX_CONNECTIONS, 1-4): beyond it the endpoint
  answers 503 with Retry-After at once. Independent of the SDK bootstrap
  and snapshot limiter.
- Loads only the flag, its prerequisites (12 levels, past the core's depth
  guard) and the segments their rules reference, in one REPEATABLE READ
  read-only transaction, instead of the whole environment.
- Metrics: playground_evaluations_total{outcome=rejected},
  playground_in_flight.

Tests: narrow load vs core explain() over the full SDK snapshot (deep
chain, cycle, segments, multivariate; 33 evaluations identical); a held
permit refuses the next request at once with Retry-After.
The SELECT 1 runs in its own task, its result (success or failure) answers
readiness for 1 s, and concurrent callers await the same in-flight probe.
No lock is held across the query; a cancelled caller cannot strand the
probe. Loss is reported within cache + timeout (<= 3 s), recovery within
about 1 s. New counter readiness_db_probes_total.

Test: 1,000 concurrent probes -> 1 database query; blackholed database
-> 503 after 2.84 s; recovery after 1.15 s.
A refused request now does no database work in the handler. Adds the
playground_isolation load harness (10,000-flag environment; snapshot and
SSE propagation p99 with and without playground saturation).
Every docker run example of the image passes --stop-timeout 30 (and the
ECS task definition stopTimeout: 30), with the reason; a docker run
alternative to the all-in-one Compose file shows docker stop/restart -t 30.
scripts/docker-smoke.sh runs and restarts containers with a 30 s stop
allowance and logs how long the restart took. The image carries a
sh.checkgate.stop-timeout=30 label and the all-in-one entrypoint logs the
requirement at start.
…26-0592)

cookie: private cookie nonces could repeat in processes that fork (the
server encrypts session cookies with PrivateCookieJar; it does not fork,
but the patched release removes the condition). url: stack overflow in
Url::origin() on nested blob: URLs. Lockfile-only, patch releases.
fix(server): 0.2.1 security — member stream revocation, client+email lockout, private webhook targets (#89, #90, #91)
connect() set _connecting and created the ready completer before calling
CheckgateBindings.open(). When the load threw (engine not linked), the error
escaped synchronously and _connecting stayed true, so every later connect()
returned the completer's future, which never completed.

Everything that can fail synchronously (the stream URI and the engine load)
now runs before any state changes; a failure completes the returned future
with the error and leaves the client as it was, so a later connect() tries
the load again.

Adds an optional bindingsLoader constructor parameter (defaults to
CheckgateBindings.open) so tests can supply a loader that throws.

Refs #87
…ient

close() started the final impression and event POSTs and closed the HTTP
client right after, which could abort them. close() now returns a
Future<void> that completes once those requests settle or closeTimeout
(new constructor parameter, default 5 s) passes, and only then closes the
client. It never fails and is idempotent: a repeated close() waits for the
shutdown already under way.

Tests run against a local HttpServer: the reports arrive before the client
closes, a server that never answers is bounded by closeTimeout, and close()
is safe twice, during connect() and after a failed connect().

Refs #87
…se()

README: closeTimeout, Future<void> close(), connect() failing on an engine
load error and retrying. CHANGELOG: 0.2.1 (unreleased) entries for #87 in
the root and package changelogs.

Refs #87
test, docker: port-0 harness for integration/e2e_sse; --stop-timeout 30 (#79, #92)
fix(server): 0.2.1 efficiency — isolated playground, cached readiness probe (#75, #76)
Root cause of the 0.2.0 targeting slowdown, from disassembly of the release
A/B harness: the evaluator became generic over its trace recorder and is
instantiated twice (evaluate_variant and explain). rule_matches then had
two callers and LLVM stopped inlining it (a plain #[inline] hint does not
change that), so every rule of every evaluation paid a call. 0.1.31: one
1,800-instruction evaluator, rule_matches inlined. 0.2.0: evaluator 694
instructions plus an out-of-line rule_matches of 893, one call per rule.

#[inline(always)] restores the 0.1.31 shape for the rule loop. No semantic
change; core tests, bucketing tests and the shared evaluation vectors
(explain included) pass unchanged.

Local A/B (macOS, release_core_ab, B-C-C-B): targeting_10_rules vs 0.2.0
0.933 [0.903, 0.950]; other cases inconclusive at 1 %. The release gate
needs the dedicated Linux host.
perf(core): always inline rule_matches into the generic evaluator (#72; #73 analysed)
- Login lockout: the per-client allowance uses the rate limiter's client
  key, so IPv6 addresses are grouped by /64 (one host no longer acts as
  2^64 clients and reaches the account ceiling alone). Test with two
  addresses of one /64 and a second /64.
- Streams: the access recheck also closes a stream whose personal access
  token was revoked (PatIdentity carries the token id). Test: revoked
  token's stream closes at the 2 s recheck; another token's stays open.
- Webhooks: with WEBHOOK_ALLOW_PRIVATE_TARGETS=false the delivery client
  ignores HTTP(S)_PROXY/ALL_PROXY (a proxy would resolve names outside the
  resolver check). Default unchanged. The setting also refuses
  IPv4-compatible and 6to4 embeddings, 64:ff9b:1::/48 and fec0::/10.
- Readiness: a probe task that panics clears itself and reports unready
  once, instead of leaving readiness stuck.
- Docs and changelog; changelog lists the two dependency advisories.
…ions

- scripts/bump-version.sh 0.2.1 (Cargo workspace + lock, npm packages and
  lockfiles, pubspec, pyproject, Python __version__); check-versions passes.
- Package READMEs that state the current version (cli, mcp-server,
  python, flutter), and the CLI's sample JSON.
- CHANGELOG 0.2.1: summary, 'Upgrading from 0.2.0' (no migration; rolling
  upgrade and rollback tested with a mixed 0.2.0/0.2.1 fleet; new optional
  settings; behaviour changes) and known limitations (#73 not recovered;
  performance not yet confirmed on the dedicated host).
- docs: 'Upgrading to 0.2.1' page and sidebar entry.

docs/.vitepress/data/release.ts stays at 0.2.0: it records what the
registries serve and changes after publishing.
fix(server): 0.2.1 independent-review follow-ups (IPv6 lockout key, revoked PAT streams, proxy vs private-target policy)
release: 0.2.1 preparation (versions, upgrade notes, docs)
…g FeatureFlags

Independent-review follow-ups to #78 (findings 4 and 5).

Ownership: a change request is the operator's own only when its ID is
recorded in status (from the server's reply, or claimed through a
proposal record written to status before proposing when the reply is
lost). Sharing the operator's Checkgate account no longer makes a
request the operator's: manual requests made with the same user (another
token, or a person signed in as that user) are never withdrawn. A pending
request that already makes the spec's change is waited on instead of
duplicated, so a lost status no longer causes an extra proposal. The
proposal-record status write is an optimistic-concurrency check, so two
replicas without leader election cannot both propose.

Conflicts: two FeatureFlags for the same server, environment and key no
longer withdraw and re-propose each other's requests. The one created
first manages the flag; the other reports Conflict=True and changes
nothing in Checkgate (also not on deletion), and takes over when the
first goes away (field index + peer watch).

No server change, no migration. CRD gains status fields
(pendingChangeRequestOwned, proposal); re-apply the CRD on upgrade
(verified from the 0.2.0 CRD in envtest).
…rship

fix(operator): own change requests by recorded ID; resolve conflicting FeatureFlags (0.2.1 review follow-up)
…roxy, readiness panic)

The #103 fixes for review findings 2 and 8 had no executed test; their
"fails before" was reasoned from source. Both now have tests that were
run against the pre-#103 code and fail there:

- An env proxy must not carry webhook deliveries when
  WEBHOOK_ALLOW_PRIVATE_TARGETS=false: a stored hook to an internal-only
  name (.test, which only a proxy could resolve) is not handed to
  HTTP_PROXY. Control: with the default setting the proxy is still used.
  Before #103 the hook went through the proxy (delivered, 200).
- A readiness probe task that panics reports unready once and the next
  check probes again. Before #103 readiness stayed stuck. The probe body
  is now a parameter (DbProbe::check_with) so the panic path is testable;
  production behaviour is unchanged.
…dence

test(server): before/after regression tests for 0.2.1 review findings 2 and 8
docs: 0.2.1 release reconciliation (changelog formatting, Flutter close())
… claims; keep the flag on manager handover

Final 0.2.1 independent review (R2):

- F1 (high, present since the operator's first release): a FeatureFlag
  names both the token Secret (any namespace) and the URL the token is
  sent to, and the operator can read every Secret, so anyone allowed to
  create a FeatureFlag could exfiltrate any Secret in the cluster. A
  tokenSecretRef in another namespace is now refused (Ready=False,
  SecretNotAllowed, nothing sent) unless the operator runs with
  --allow-cross-namespace-secrets.
- F2 (low): an unconfirmed proposal is resolved by claiming only a request
  created within the client timeout of the proposal (2 min clock skew), a
  stale record is forgotten, and with the requester unknown only a single
  unambiguous match is claimed.
- F3 (low): deleting the managing FeatureFlag no longer deletes the flag
  from Checkgate while another FeatureFlag will take it over.
- F4 (low): documented the multi-tenancy limit of age-based arbitration.
- Upgrade page: how to keep 0.2.0's per-account login ceiling (F5).
fix(operator): refuse cross-namespace token Secrets; bound lost-reply claims; keep flag on handover (0.2.1 final review)
…indow, docs)

- A FeatureFlag whose token Secret is refused no longer counts as a peer
  that will take a flag over, so deleting the manager deletes the flag
  instead of leaving it in Checkgate for good.
- Lost-reply recovery relies on the request's creation time alone; the
  extra "recent record" condition made the operator forget its own request
  after ~3 minutes of downtime (CrashLoopBackOff), and createdNear already
  bounds what can be claimed.
- Tests: refused peer at handover, deleting/conflict-losing refused
  FeatureFlags call nothing, claim after downtime, no claim of an older or
  unreadable-created_at request, ambiguous match with unknown requester.
- Docs: same-namespace residual (FeatureFlag create ~ Secret read in that
  namespace), move cross-namespace Secrets before deleting such objects,
  README section order and indentation, CRD field doc (CRD regenerated).
…ew-2

fix(operator): follow-ups of the #109 review (handover peers, claim window, docs)
…e docs, reliability install)

- CHANGELOG: date 0.2.1 (2026-11-30), operator known limitations (#111, #112),
  drop duplicate blank lines left by merges.
- README: 0.2.1 upgrade note and link.
- Docs: quickstart, playground and what-is pages no longer describe 0.2.0
  as unpublished; nav link to the next upgrade page is derived from
  release.next instead of hard-coded.
- Reliability (extended): install the Node SDK's dependencies before its
  fault-injection suite (it failed nightly since 0.2.0 on a missing
  eventsource module).
release: 0.2.1 final preparation (changelog date, upgrade notes, docs, reliability job)
The READMEs ship in the npm tarballs, the PyPI wheels and the pub.dev
package, and several still said 'Current release: 0.2.0' or pinned
@0.2.0 install commands. They now name 0.2.1, pin 0.2.1 where a version is
pinned, and the edge README mentions the refresh() change (#84).
… user's package list

'npm access list packages' without a scope lists the logged-in user's own
packages (GET /-/org/<user>/package), which a granular token may not read:
the preflight failed with E403 on its first run although the token is
valid (npm whoami succeeded). It now reads each @CheckGate package's
collaborators and requires read-write for the token's identity, for all
nine packages (all exist since 0.2.0).
release: fix the credentials preflight (E403 on npm access list packages)
@akosidencio
akosidencio merged commit 60793fe into main Nov 30, 2026
78 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant