Page 8 of 8~112 min topic

Feature flags lab

Run acceptance tests and make the ship call

A second person can reproduce 5% cohort sees index_v2 citations; kill switch returns everyone to v1 in < 60s from a clean checkout and name the owner for FLAG-CLIENT-TRUST-4.

~14 min this pageProduction ship gate

1Try it yourself

Decision drill

Feature flag lab

Flags control who sees what — without redeploying code.

Release control72%

1/3New RAG index for 5% of traffic.

2Learn the idea

Read

Clean-room demo

From a fresh clone/directory, run the commands that prove 5% cohort sees index_v2 citations; kill switch returns everyone to v1 in < 60s. A second person plays release captain flipping rag_index_v2 for cohort canary and follows your script without coaching. The demo includes limitations: what FastAPI RAG endpoint whose v2 index is dark-launched then exposed to 5% still will not do.

Read

Evidence pack

Bundle: contract snippet, passing tests, metric snapshot for flag_exposure_pct and citation_delta_v2_vs_v1, security negative probe, rollback note, owner name. Reference FLAG-CLIENT-TRUST-4 as the drill you rehearsed. If any item is missing, the ship gate fails even if the happy path dazzles.

Read

Implementation artifact

python drill_kill_switch.py --flag rag_index_v2 --sla-seconds 60

Read

Ownership and next review

For Feature flags lab, name the human who gets paged, the review date for thresholds, and the condition that triggers reevaluation. Endpoint POST /v1/rag/answer remains the production surface you operate for FastAPI RAG endpoint whose v2 index is dark-launched then exposed to 5% — not a slide. Keep FLAG-CLIENT-TRUST-4 in the handoff template so the next owner inherits the drill.

Read

Stage depth

After the peer demo, schedule the next threshold review date. File a short changelog that mentions FLAG-CLIENT-TRUST-4 and the control that addresses it. Archive the evidence pack where your team already stores launch records. Resist rewriting everything “for real production” in one weekend — operate this slice until the metrics bore you, then widen. Final self-check: if telemetry vanished, would you still know to hold? If yes, you learned the operating posture this lane teaches.

Read

Field notes for `feature-flags-lab` / `mastery-ship`

Trim the demo script until every command is necessary. Record a peer signature line: name, date UTC, pass/fail. File known limitations as bullets, not apologies. Link the evidence pack from the README. Schedule the next game day on a calendar, even if it is solo. Archive the branch tag or release digest you actually shipped. In this chapter the product is FastAPI RAG endpoint whose v2 index is dark-launched then exposed to 5%, the human stakeholder is release captain flipping rag_index_v2 for cohort canary, and the incident id you design against is FLAG-CLIENT-TRUST-4. Re-state the oracle in your notes — 5% cohort sees index_v2 citations; kill switch returns everyone to v1 in < 60s — and keep the invariant visible: flag writes require RBAC; client-supplied flag values never authorize access. Track flag_exposure_pct and citation_delta_v2_vs_v1 as the scoreboard. Surface under change control: POST /v1/rag/answer. If you only have forty minutes, finish the fixture for browser-exposed flag lets attackers force v2 (unreviewed) index before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.

Go deeper

Before you start

Why this matters

Draft a two-minute demo script that proves 5% cohort sees index_v2 citations; kill switch returns everyone to v1 in < 60s from a clean directory. Include the failure rehearsal for browser-exposed flag lets attackers force v2 (unreviewed) index and the rollback/owner line. If the script needs tribal knowledge, the lab is not shipped.

In the wild

See how this idea shows up as a product and a company — then come back to the lesson. Skills transfer across vendors.

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. Can a peer reproduce without coaching?
2. Does the pack include flag_exposure_pct and citation_delta_v2_vs_v1 and rollback?
3. Is ownership for FLAG-CLIENT-TRUST-4-class events explicit?

All responses are required.