Environment Configuration and Feature-Flag Drift
Different feature flags or configuration values cause the API to behave differently in development, staging, and production without visibility.
Failure explanation
The same API behaves differently across development, staging, and production because configuration, feature flags, secrets, routing, or tenant settings differ unexpectedly. A feature may be enabled for only some tenants, a default may vary by environment, or a rollout may leave service instances with inconsistent configuration. This can make defects difficult to reproduce and can invalidate staging sign-off.
Example
Staging enables a new tax calculation feature for all test tenants. Production enables it for only 30% of tenants, but the gateway and backend instances disagree about the flag state. Identical requests produce different totals depending on which instance handles them.
How to test
- Compare effective configuration and feature-flag states across environments.
- Test enabled, disabled, gradual rollout, tenant overrides, and configuration refresh.
- Route repeated requests across multiple instances to detect inconsistent state.
- Ensure secrets are compared by presence/metadata, never exposed values.
Expected behavior
Environment differences are intentional, documented, observable, and version-controlled where appropriate. A given request and tenant receive consistent behavior under the same effective configuration.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.
In the field
- STORY-049 primary The Feature Flag That Made Identical Requests Return Different Rules
- STORY-013 related The Accumulated Integration Debt
- STORY-016 related The Rate Limit That Turned One Tenant's Sync Into Everyone's Outage
- STORY-030 related The Credential Rotation That Locked Out Every Integration
- STORY-033 related The Same API Behaved Differently Behind Different Gateways