Repository navigation
v0.2.0 final release gate: governance hardening, benchmark/test harness fixes, packaging and upgrade validation - #70
Merged
Conversation
…hrough a change request A project editor could POST an enabled flag straight into an environment with require_approval set, and SDKs were served it at once with no review (inherited from 0.1.x; found by the v0.2.0 security review). In such an environment, only an inert flag (disabled, no disabled_value, so it serves the built-in false) is still created at once. Any other creation is stored as a pending change request with action "create" and answered 202 Accepted, like a queued PATCH: nothing reaches flags, the snapshot or the stream until a different editor/admin approves it. Approval inserts the flag (409 and still pending if the key exists by then), audits CREATE with the reviewer as actor plus change_request_id and requested_by. Reject and cancel leave no flag. Environments without approval are unchanged. - Migration 20261122000030 (additive): change_requests.action (default 'update') and a partial unique index, one pending creation per key, so concurrent proposals and retrying automation get 409, not duplicates. - Reuses the change-request infrastructure: same approve/reject/cancel routes, self-approval block, project RBAC and notifications. - Dashboard: create handles 202, "New flag" badge, no Approve button on your own request (the server refuses it for admins too). - Go client: CreateFlag returns ErrApprovalRequired on 202 instead of decoding the change request as a flag (Terraform, operator). - Docs: API reference, governance guide, Terraform/operator notes, CHANGELOG, upgrade guide (second migration, rollback step, backup). - Tests: server/tests/governance.rs, 11 tests covering the 12 review scenarios; 10 fail with the gate removed. integration.rs creates its chat-notification flag inert, since Production requires approval there.
…I, dedicated-host release A/B The public Rust Criterion benchmark failed on GitHub runners for v0.1.31 and the v0.2.0 candidate alike: concurrency() benchmarked reader counts [1, 2, 4, available_parallelism()], which repeats 4 on a 4-vCPU runner, and Criterion 0.8 panics on the duplicate ID. The workflow stayed green because run.sh records a failed run and continues. - bench/benches/evaluation.rs: sort and de-duplicate the reader counts (IDs unchanged wherever they were already unique). No evaluation code changes. - ci.yml: bench-smoke job runs every Criterion benchmark once (--test), pinned to 1, 2 and 4 CPUs, plus snapshot_decode. Harness health is pass/fail; no timings are collected. - public-benchmarks.yml: after uploading results, fail the job if any run in raw/runs.jsonl failed. - scripts/release-benchmarks/v0.2.0-linux.sh (+ lib/, README): baseline vs candidate on a dedicated Linux host. Refs resolved to SHAs (branches refused), isolated worktrees and target dirs, identical harnesses (core_ab.rs compiled against each core; the candidate's load tools and SSE client for both servers), own pinned PostgreSQL/Redis containers, disjoint CPU sets, B-C-C-B rounds, idle check and per-second sampler per run, raw SSE audit for duplicated/out-of-order deliveries, explicit invalid-run rules, bootstrap-CI verdicts (PASS/FAIL/INCONCLUSIVE), --check, --quick, --analyze-only; cleans up only what it created.
…fixing the reliability::g2 port race reliability::g2 failed with "Address already in use": free_port() released its socket before the server bound it, a parallel test's server took the same port, and the losing server's harness polled /health on that port, got the other server's 200 and handed the test the wrong instance (its setup/complete then answered 404). - tests/common: Server::spawn binds PORT=0 (and tests set METRICS_ADDR to 127.0.0.1:0); the harness reads the bound addresses from the process's own log lines (only bytes written after this spawn), so nothing can take the port between choosing and binding it, and an answer from another process is never mistaken for this one. A restart must reuse its port (clients point at it): a lost bind is detected from the process's own "Failed to bind" line and retried at most 5 times with backoff, then fails with the log. No sleeps stand in for synchronization. Unique working directories. - Cluster instances start on port 0 and keep the bound port across restarts. - tests/harness.rs: parallel spawns get distinct ports answered by their own process; a server that cannot bind because something else answers 200 on the port fails with a clear message instead of being used. - CI also runs playground and sdk_diagnostics (added in 0.2.0): they skip without PostgreSQL/Redis, so no CI job ever ran them. Verified: reliability 20/20 full runs, g2 10/10 while sse_faults runs alongside, every server integration suite passes.
…bump-version.sh works on Linux - scripts/check-npm-packages.mjs + ci.yml npm-packages job: packs @checkgate/openfeature-provider, @checkgate/node-integrations and @checkgate/mcp-server as real tarballs; every manifest path (main, types, every exports target, bin) packed, no development files, versions agree, peer ranges accept the release version; then a clean consumer install with @checkgate/node packed at the release version imports every entry point (require and import), type-checks the declarations through exports (NodeNext, strict) and runs the provider, the Express middleware and checkgate-mcp (tools/list over stdio) against a local stub stream. Replaces nothing in release.yml; runs on every pull request. - scripts/check-python-package.py + python-wheels.yml release-artifacts job: the manylinux wheels built exactly as release.yml builds them, on pull requests instead of only on a tag; tags (cp311-abi3), METADATA, contents, RECORD hashes, version consistency (wheel, __version__, pyproject), twine check --strict, auditwheel show, clean-venv install and the test suite. Nothing is uploaded to PyPI. - scripts/bump-version.sh: used `sed -i ''` unconditionally, which fails on GNU sed at the first edit (release prep only worked on macOS); now detects GNU vs BSD sed. Also sets the package's own version in npm lockfiles (top level and packages[""] only), which were left at the old version.
…uickstart binding, MCP cleartext warning - Python SDK (_sse.py): the line buffer is a bytearray. Appending each fragment of a long line to immutable bytes copied the whole buffer every time: a 15-16 MiB line in 4 KiB writes cost ~12-13 s of GIL-holding CPU (measured), repeatable by a hostile server or MITM. Now ~0.02 s; parse identical on 200 random fragmentations; the 16 MiB bound is unchanged. Regression test in test_sse_and_revisions.py. - quickstart/compose.yml: publish on 127.0.0.1 by default (plain HTTP, COOKIE_SECURE=false, development only); CHECKGATE_BIND overrides. - @checkgate/mcp-server: warn at start for http:// to a non-loopback host; fix the 403 explanation that still said propose tokens can create disabled flags (removed by F-01). - CHANGELOG: these, the bench/test/release-tooling fixes.
…restore and interrupted-upgrade procedures - bench/ab/upgrade_rollback_020.py: 35 scripted PASS/FAIL steps on real databases with release builds: upgrade (exactly migrations 29 and 30, byte-identical snapshot, unchanged stream protocol, old token and pending change request keep working, new create requests and propose tokens), 0.1.31 refusing to start next to 0.2.0, the documented SQL rollback and a re-upgrade, restore from pg_dump, and 0.2.0 killed by SIGKILL while migration 30 waits on a lock (29 applied, 30 not, no partial schema; restarting 0.2.0 completes it). 35/35 pass. - docs/operations/upgrading-to-0-2-0.md: points at that script; adds rollback by restoring the backup and what to do after an interrupted upgrade (backup step, second migration and cancel-pending-creations step were added with the governance fix).
This was referenced Nov 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final release gate for v0.2.0: governance hardening, benchmark and test-harness fixes, packaging validation, upgrade/rollback validation. Do not merge until the owner reviews; nothing is tagged or published. Base:
dev4c722c8 (PR #69 merged).Commits
a027407fix(security)require_approval, a non-inert create (enabled, or a customdisabled_value) is now a pending change request withaction: "create"(202, same contract as a queued PATCH). Nothing reachesflags, the snapshot or the stream until a different editor/admin approves; reject/cancel leave no flag. Inert creates (disabled, servingfalse) still apply at once; unprotected environments unchanged. Migration20261122000030(additive):change_requests.action+ one pending creation per key. Dashboard, Go client (Terraform/operator:ErrApprovalRequiredinstead of decoding the CR as a flag), docs, CHANGELOG, upgrade guide.server/tests/governance.rs: 11 tests for the 12 review scenarios; 10 fail with the gate removed.f57f740benchreaders/4on GitHub's 4-vCPU runners): reader counts de-duplicated. Newbench-smokeCI job (--test, pinned to 1/2/4 CPUs);public-benchmarks.ymlfails when a run failed.scripts/release-benchmarks/v0.2.0-linux.sh: baseline-vs-candidate A/B for a dedicated Linux host (--help,--check,--quick,--analyze-only).f1dc7c8testreliability::g2port race: servers bind port 0 and the harness reads the address from the process's own log, so another test's server answering/healthis never mistaken for this one; restarts retry a lost bind at most 5 times.tests/harness.rsregression tests. CI now also runsplaygroundandsdk_diagnostics, which no job ran before.b247630releasescripts/check-npm-packages.mjs(pack, inspect, clean consumer install, type-check, smoke) andscripts/check-python-package.py(tags, metadata, RECORD, versions) with CI jobs that build the publishable artifacts on PRs, never publishing.bump-version.shfailed on GNU sed (Linux) at the first edit; lockfile versions now bumped too.dc89b83fix(security)127.0.0.1by default; MCP warns forhttp://to a remote host and no longer claims propose tokens can create flags.ca3dcc7docs, releasebench/ab/upgrade_rollback_020.py(35 steps) and the upgrade guide: backup, restore, interrupted upgrade.Verification (local, Linux workstation; PostgreSQL 16 on tmpfs, Redis 7)
clippy --workspace --all-targets --all-features -D warnings,cargo test --workspace, rustdoc-D warnings,cargo audit— clean.g210/10 under contention.pg_dump, SIGKILL mid-migration recovers).twine check --strict(CI builds the manylinux artifacts).--quickend-to-end run (v0.1.31 vsa027407) completed and cleaned up after itself; INCONCLUSIVE by design — not performance evidence.Not run locally: Docker image smoke, Miri, web/React Native/Flutter SDKs, Windows/macOS wheels — this PR's CI covers them.
Still open before tagging
scripts/release-benchmarks/v0.2.0-linux.sh, instructions inscripts/release-benchmarks/README.md).checkgateis unclaimed on PyPI (404 on 2026-11-22); no trusted publisher or publish job exists — owner action.NPM_TOKENmay create them can only be confirmed by the owner.