BuildMidBackendAuto-graded
Make a percentage rollout stable per user
Fix a flag evaluator so disabled flags stay off, rules apply in order, and each user always gets the same rollout answer.evaluate(flag, user) decides whether a feature flag is on for a given user. The version in production doesn't follow its contract, and users see flags behave inconsistently. Fix it so the master switch always wins, the first matching rule decides, and each user gets the same rollout answer every time, in every process.30 min
python
You're done when
- A flag that is switched off is off for everyone, whatever the rules or rollout say.
- Targeting rules are checked in order and the first match decides.
- The same user gets the same rollout answer on every call.
- The answer stays the same when the flag is evaluated in a separate process.
- Raising the rollout percentage only adds users; nobody already included drops out.
- At 0% nobody is included, and at 100% everybody is.
What it measures
Rule precedenceApplying the master switch, the targeting rules and the rollout in the order the contract sets.
Stable bucketingPutting each user in the same rollout bucket on every call and in every process.
Safe ramp-upMaking a higher percentage only add users, with 0% and 100% behaving as they should.
Your environment
Terminal + editorA full shell in the browser
Coding agentAlready signed in, no API key to set up
Isolated workspaceOnly yours, wiped when you finish
Start this lab
30 min
Start labYou'll need to sign in to Anthropos first. The lab opens in a private cloud workspace with your coding agent ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo