Day 069 / Testing / Feature Flags

Feature Flag Matrix

View source ↗Scroll to explore ↓
Feature Flag Matrix project cover
/ Overview

A dependency-free Python CLI that generates exhaustive boolean feature-flag test scenarios with dependency constraints and named environments.

NameFeature Flag Matrix

ClientIndependent daily build

IndustriesSoftware quality tooling

DateDay 069 · November 7, 2026

/ Challenge

Testing one flag at a time can miss interactions between flags. A simple list also becomes misleading when one feature requires another, or when the same scenario needs review in more than one environment.

/ Provided services

Clear thinking.
Practical delivery.

01

Boolean scenario design

Enumerate all states for a small flag set rather than assuming independent feature behavior.

02

Dependency constraints

A requires relationship excludes a state only when its dependent flag is on and its prerequisite is off.

03

Reviewable test plans

JSON scenarios separate planned flag states from application behavior that still needs execution and verification.

Feature Flag Matrix feature visual
/ Solution

Feature Flag Matrix enumerates every boolean state for up to eight flags, excludes states that violate declared requires relationships and repeats valid states across up to eight named environments. Sorted identifiers, stable case IDs and explicit booleans make the JSON output deterministic. The report includes counts of valid and excluded combinations. Strict schema checks reject unknown fields, duplicate keys and names, unsupported identifiers, self-dependencies and oversized inputs. Cyclic requirements are allowed as constraints. The tool generates test plans without connecting to environments, changing production flags or claiming executed test coverage.

/ Impact

Exhaustive bounded boolean states

Dependency-aware exclusions

Named environment expansion

Deterministic case IDs

Explicit planning boundary

/ Tech stack

Python standard library

Itertools, argparse, JSON, pathlib, regex and unittest keep the CLI portable and dependency-free.

Bounded generation

Eight flags and eight environments bound output to at most 2,048 scenarios; input is limited to 128 KB.

Twelve tests

Tests cover exhaustive counts, dependencies, cycles, environment expansion, stable ordering, unique IDs and invalid input.

Next project

Changelog Composer

View case study ↗