Add actor types to organization flags
Adds an actor type to each organization flag (the model class it gates on), restoring the actor: declaration the foundational MRs shipped without. We removed it earlier on YAGNI grounds, then verified the design is sound and worth having.
Why this is sound
- Polymorphic hashing. Flipper's percentage gate buckets on
crc32(feature_name + actor.flipper_id), andflipper_idis class-prefixed (User:5vsOrganizations::Organization:5). So actor types hash independently and deterministically. - Different actor types per flag is valid. Flags sharing a stage flag (for example
org_stage_la_25) bucket independently per actor — the only thing shared is the percentage threshold, not the bucketing. No cross-flag interference. - Only LA is probabilistic. Experimental/Beta use specific-actor and group gates, GA is
default_enabled: true, Stable has no flag. Only LA is operated with--actors. - The one real footgun is a single flag checked with inconsistent actor types across its own call sites — at LA it would bucket per path.
validate_actor!enforces the declared type, which is what makes the declaration meaningful (an unenforced declaration would be worse than none).
What it adds
actor:field per flag, validated againstFeature::SUPPORTED_MODELS(orinstance).Organizations::Release.enabled?validates the actor against the declared type (raises in dev/test, tracked in production).- Actor column in the generated release status table; actor docs in the dev guide.
Stacked follow-up to !239926 (merged) and !239927.