Skip to content
LangerSwordPublic

About

Release gates for Flagsmith experiments: audit the wiring, refuse to ship on noise, roll out the winner with a decision record.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docket mark

docket.

Release decisions for Flagsmith experiments.

Audit the wiring. Gate the statistics. Refuse the release. Sign the record.

Product site · Console · Docs · Releases


Docket reads every experiment in a release, audits the wiring, gates the results and refuses the whole release when one case fails. The result is one signed docket: what shipped, what was blocked and why.

Flagsmith reports a win probability. Docket answers a different question: may this release proceed?

$ docket --config demo/docket.release.toml release check

RELEASE: BLOCKED  (exit 2)  demo-release
  case 28 (checkout CTA): winner, leading red
  case 29 (express checkout): guardrail, leading red
    refund_requested moved the wrong way: [+205.4%, +1189.0%]

One winning case cannot rescue one failed guardrail. The release stays blocked, no flag is written, and the refusal is recorded.

Quickstart

# 1. Install the CLI as one file
curl -fLO https://github.com/LangerSword/docket/releases/latest/download/docket_0.1.1.pyz
chmod +x docket_0.1.1.pyz
./docket_0.1.1.pyz --version

# 2. Run the self-hosted demo
git clone https://github.com/LangerSword/docket
cd docket
make demo

# 3. Open the console
https://docket.langersword.in/app/

make demo starts self-hosted Flagsmith, seeds three experiments, drives 1,600 shoppers per experiment, and prints the audit and gate result. The demo produces a blocked release and a guardrail refusal. The shoppers are scripted. The experiments, events, statistics and flag writes are real Flagsmith.

The release page has the CLI, TUI, desktop app, Debian packages, Windows archives and SHA256SUMS.

Gallery: console, TUI (2 images)

Docket web console showing a blocked recorded release

Web console. One blocked case, one winner, eleven audit checks, and a release that cannot ship.

Docket terminal UI showing a blocked release

Terminal. The same release in the TUI.

What it does

Docket reads a docket.release.toml file. The file lists each experiment in the release.

  • Audit. Check the warehouse, rollout, variant keys, control variant, metric events, events URL, traffic and sample ratio. Each failure returns a fix.
  • Gate. Read the stored experiment results and return one of seven states. Exit code 0 is the only result that allows a release.
  • Refuse. One broken case, losing case or guardrail blocks the whole release. Docket never ships the good cases alone.
  • Ship. Require a cleared release and a typed SHIP confirmation. Write the winner to 100 percent and stop.
  • Record. Write one signed release record. Any edit to a number, experiment ID or flag mutation invalidates the record.
  • Ledger. Keep every decision in a local JSONL ledger. Verification works offline.
docket.release.toml
        |
        v
   audit every case
        |
        v
   gate every case  -->  BLOCKED  (one case failed)
        |                    |
        |                    +--> no flag writes
        v
     CLEARED
        |
        v
  ship with typed SHIP
        |
        v
  signed record + ledger

Use Docket from an AI agent

Paste this into an agent that can run shell commands. It does not need to read the rest of the README.

You are inside the Docket repository. Read README.md and the release file.
Run the demo with `make demo`. Then run `docket audit`, `docket gate`,
`docket release check` and `docket verify`. Do not write a flag unless the
release is CLEARED and I type SHIP. Report the docket, the exit code, the
failing case and anything you did not verify. Do not print a token.

Docket is a CLI and an HTTP API. The same decision path runs in CI, the TUI and the browser console.

Surfaces

Surface Entry point Notes
Browser console docket.langersword.in/app/ Release docket, audit, ship, signed record
Terminal UI docket Go and Charm Bubble Tea
Desktop app docket app Rust and egui, local profiles and ledger
HTTP API server/ Stateless, public HTTPS targets only
GitHub Action action/ Audit and gate on a pull request

The TUI and desktop app use the same release engine and API. The TUI accepts mouse input and an optional command prompt. The desktop app keeps local profiles and records.

Agent Skill: Toggle Witness

skills/toggle-witness/ is an Agent Skill for the Flagsmith CLI. It completes one job. It snapshots a flag, samples identities through flagsmith evaluate, compares the split, requests a human approval, applies one step, and keeps the rollback state.

It refuses a flag with segment overrides, refuses a missing approval token, and never deletes a flag. The demo transcript is six lines. The identity loop stays in the shell, so the model sees only the summary.

GitHub Action

- uses: LangerSword/docket/action@v0.1.1
  with:
    base: https://flagsmith.example.com
    token: ${{ secrets.FLAGSMITH_TOKEN }}
    env: ${{ vars.FLAGSMITH_ENV }}
    experiment: "42"

The action installs Docket, runs the audit, gates the release and fails on a non-winning result. It comments the docket on the pull request.

Demo

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

The demo stack is in docker-compose.yml. It runs Flagsmith, Postgres, the task processor and an instrumented shop. The first run creates the flag, metric, experiment and demo events.

The three minute product film is here.

Verification

Python engine       132 tests pass
Go TUI              go test ./... passes
Rust desktop        cargo test passes
CI                  Python, TUI and desktop workflows on Linux, macOS and Windows
make test
make tui-test
make desktop-check

The tests cover the seven states, guardrails, sample ratio mismatch, release aggregation, record signatures and ledger verification.

Limits

  • Docket reads Flagsmith result snapshots. Flagsmith refreshes results at most once every five minutes.
  • Docket does not replace Flagsmith. It adds the release decision, the refusal and the signed record.
  • Docket does not auto-ship. A human must type SHIP on a cleared live release.
  • The API stores no session and no token.
  • The demo shop is a fixture. It is not part of the installed product.

Documentation

Built for Toggle Wars, Track 03, November 2026. MIT licence. See LICENSE.

If Docket is useful, star the repository.

About

Release gates for Flagsmith experiments: audit the wiring, refuse to ship on noise, roll out the winner with a decision record.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages