docket. Docs

Documentation / Toggle Wars, Track 03

Release decisions, not another experiment dashboard.

Flagsmith tells you which variant is ahead. Docket takes every experiment in a release, audits the evidence, refuses the whole release when one case fails, and signs the decision.

01 / What it does

One release. Every case. One signed decision.

A release is rarely one experiment. It is a checkout change, a pricing change and a copy change that interact. An experiment page can say the checkout variant is ahead. It cannot say whether the release is safe to ship.

Docket treats the release as a docket. Each experiment is a case with its own evidence. Every case is audited before its statistics are trusted. If one case is broken, losing, not ready or guardrailed, the release is refused and no flag is written.

The test

Delete Flagsmith from the product and there is nothing to decide. The experiment results are the evidence, the wiring is the audit, and the feature state is the release.

02 / The platform underneath

What is Flagsmith?

Flagsmith is an open-source feature flag and remote configuration service. It stores flags and their variations, evaluates them for users, records exposures, receives your product events and runs experiments with a Bayesian statistics engine. You can use the hosted service or run the whole thing yourself.

Flagsmith is where the experiment lives. Docket is the layer that reads the experiment, checks whether the data can be trusted, and decides what happens to the release. It does not replace Flagsmith and it does not need a second source of truth.

03 / The path

How it works.

The CLI and the console run the same path. A check is read only. A ship is explicit, pre-validated and signed.

01

Read

Sufficient statistics, interval, chance to win, exposures and sample ratio from the experiment results.

GET /experiments/{id}/results/
02

Audit

Variant keys, event names, warehouse connection, rollout, control variant and allocation. A broken case never gets a number.

GET /warehouse-connections/{id}/events/
03

Decide

Seven states: winner, losing, inconclusive, collecting, guardrail, broken, unreachable. Exit 0, 1, 2 or 3.

docket release check
04

Release

Every mutation is validated before any write. A cleared docket completes the experiments, writes each winner to 100%, signs one record and appends the ledger.

POST /experiments/{id}/complete/

A refusal is not a warning. If the docket is blocked, nothing is written. That is why a signed record only exists for a cleared release.

04 / What you can do

Use it before the deploy, not after the incident.

JobWhat Docket gives youSurface
Check a releaseAudit every case and aggregate a release decisionCLI / Action / console
Stop a bad shipRefuse on a guardrail regression even when the primary metric winsexit 2
Explain a refusalIntervals, win probability, exposures and the exact audit blockreport / console
Ship safelyPre-validate every mutation, then complete experiments and roll winners to 100%release ship
Prove it laterOne HMAC-SHA256 record, an append-only JSONL ledger, offline verificationdocket verify
Put it in CIFail the check when a release is not clearGitHub Action

05 / Why use it

Because the number is not the decision.

Prevent shipping on noise.

An interval that crosses zero, a sample that is still collecting, or a split that is wrong is not a green light. Docket refuses before the release, not after the retro.

Decide at the release level.

One dashboard per experiment leaves the release decision to whoever is awake. Docket makes the release the unit and gives it one state, one exit code and one record.

Leave evidence.

A signed record is useful to the next engineer, the auditor and the postmortem. It says what was known, what was refused and what was written, and it can be checked offline.

Use Flagsmith alone when you only need a flag toggle or one experiment. Use Docket when the release has several cases and someone has to be accountable for the decision.

06 / Start here

Three ways in.

Open the console

The console opens on a recorded release file with no signup. Connect your own Flagsmith to run a live check, then ship only when the docket is cleared.

Browser
https://langersword.github.io/docket/app/

Run the demo locally

Self-hosted Flagsmith, two live experiments, a sample shop, a release docket and a deliberately broken fixture.

Terminal
git clone https://github.com/LangerSword/docket
cd docket
make demo

docket --config demo/docket.release.toml release check
docket --config demo/docket.release.toml release ship --confirm --sign

Put it in CI

GitHub Actions
- uses: LangerSword/docket/action@v1
  with:
    token: ${{ secrets.DOCKET_TOKEN }}
    env: ${{ vars.FLAGSMITH_ENV }}
    experiment: 16

07 / Your data

No account. Your data stays in this browser.

The console is local-first. There is no login because there is nothing server-side to log in to: the API is stateless and has no database.

WhatWhere and howLeaves the device
Connections and the release filelocalStorage: name, base URL, environment key, events URL, the file you are editingNo
Checks and signed recordsIndexedDB: every live check with its full result, every signed recordNo
Admin token and signing keyMemory for the tab. Only if you choose to keep them: encrypted with your passphrase (PBKDF2, AES-GCM) before they touch storageOnly inside a request to the API
Share linkThe non-secret config, compressed into the URL hash. Never a token or a keyWhen you send it
Workspace fileOne JSON file with the above, minus every secret. Import it on another machineWhen you move it

Docket cannot recover a forgotten passphrase. Workspace, then Erase, removes everything the console stored. Signed records verify in the browser with WebCrypto, so the signing key is never sent anywhere to check a record.

08 / Honest limits

What it does not do yet.

  • No post-ship guard. Once a winner is live, Docket does not watch the guardrail or roll it back.
  • Admin token required. The web console needs a Flagsmith Admin API token. Use a dedicated token and revoke it when the release is done.
  • Public API accepts public HTTPS targets. A self-hosted Flagsmith on a private address needs the local API, not the hosted one.

09 / Questions

Short answers.

Does Docket replace Flagsmith?

No. Flagsmith stores and evaluates the experiment. Docket reads the result and decides the release. Delete Flagsmith and Docket has no evidence.

Does the console store my token?

Not unless you ask it to. By default the token and signing key live in browser memory for the tab and are sent to the API only inside a request. If you choose to keep them, they are encrypted with a passphrase before they are written. The API has no database.

What does exit 2 mean?

The release is blocked. A case is broken, losing or guardrailed. Nothing was written.

Can I use Flagsmith Cloud?

Yes. Give the console the API base URL, environment key, admin token, and the events URL your app sends to. The release check reads the experiment results and audits the wiring.

Where is the source?

github.com/LangerSword/docket. MIT.