:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(flags): vendor one copy of the rules v2 contract (#117647)
Anders38d7581d6ff4
diff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/SHA256SUMS b/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/SHA256SUMSdeleted file mode 100644index 23c69841850b..000000000000--- a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/SHA256SUMS+++ /dev/null@@ -1,57 +0,0 @@-c26afdb30b22ebc5bc87cad31685ed2fc2b9ffa7cc185e635be702f28d0e6582 README.md-e9bea9cff58bac0c6c1021e9c8842c53594055b6874a2c58bc4350d0c28a93ca corpus/hash_sha1_60_v1.json-536c8386eefa75721d113bd8718ddeb7fb1aad3b4f2cce1fbcf516a346a16e26 corpus/legacy_projection.json-752ff88dcb943ab1e21f9552b0c4ec606029393fca2b565b01a497da89cd8675 corpus/v1_evaluation.json-f5aa796ba2abf17ab6b2f4706c872f2b15bfa77310cdf0400a3a460db22eda41 fixtures/config/invalid/empty_seed.json-6fac810e014d81b938f66909808e2a2fc1b7cf4db5462fe6522fde1e045cbdda fixtures/config/invalid/empty_string_value.json-cbe5d7e00f3abadd490a72055e6197d511fa59f6b3f7062dbacffea426cc5360 fixtures/config/invalid/group_experiment_with_assign_by.json-82189b24744270ac2e4ad93b97efddbede530e6990d597fe80890cbd2820f70e fixtures/config/invalid/group_percentage_rollout_with_assign_by.json-f3902f40a82f5f80c88a463768b24922bb787b774cb7cd3c4e77fe0e8748e487 fixtures/config/invalid/missing_experiment_paused.json-88541b7eb14532becb477a9d62797960d8cfdc38bc101b79c5294c1e611e26ec fixtures/config/invalid/missing_on_rollout_miss.json-3e35c5e211d8ba159824009be3ed26c4ac6f12c1426109fa1b53b49ff63fc770 fixtures/config/invalid/non_uuid_rule_id.json-de6c7a55d67adce2042d16db287dfcbe49f502d1e5e2f8e71532d0817e28e169 fixtures/config/invalid/null_experiment_id.json-8809275942a5fb5ed548d70d819baffa84ee4ccfec7414cc93903cc79f39c550 fixtures/config/invalid/object_value_too_deep.json-b48ead6599cbb40a2a9eea606544b0ee083bb13ce768d57fc225f2da4924633a fixtures/config/invalid/return_value_type_mismatch.json-9aeefb4ab1eb4140afb213554a91a2c1c085e54cdbe47734442e65ba9a17f99c fixtures/config/invalid/rollout_percentage_above_maximum.json-2ca76285c4f9724603eecb980080bf7ddf0ff8dea4458eb60a2699dfad020941 fixtures/config/invalid/seed_too_long.json-22b5201619d80be17bfb21c9a0bf93472e2231ad4a5f1c6bb8136275e64bb8a4 fixtures/config/invalid/too_few_variants.json-aacabb57255580136b8e6a984c57cea7367e59ddeffed3d4a40137b804cf4c31 fixtures/config/invalid/too_many_variants.json-68c83e9c074a0a70e7753a6e52daa414aeb18977abdd9b702ec4c5c61d82c3a4 fixtures/config/invalid/unknown_config_field.json-f5bba7fa0ea88e43834ac3b5e03ed4f7297ad0bf4ab2f09d962241521dd06787 fixtures/config/invalid/unknown_config_version.json-8bcc957c38bb2b6a33e244ad1cfe76612cf6f4918c8f0b0cc22f86bd01cd1932 fixtures/config/invalid/unknown_rule_field.json-f5d71ea6a2ad839fb5f540c8a7f894438fe7c99f152d7469b86af83e938288db fixtures/config/invalid/variant_key_invalid_characters.json-aecfc8a8f49f1fa5586082fc4b70284a5212e14998984fc3a7bde1520b933095 fixtures/config/invalid/variant_value_type_mismatch.json-49587173259e8b379c8f473e60af7bce7a52ad8f17088068dec021c2a3f9242d fixtures/config/invalid/version_boolean.json-4835228c5a390aa2497d4df5bd62a41d775c5ff75363d2f7dca0a5eee9e77649 fixtures/config/invalid/version_string.json-bd56e3422fee0adf18ee9a4ad13ea96fe9bb4e4d11b3e9e0499e6be985b628e8 fixtures/config/valid/boolean_all_rule_types.json-bd163291f26d8a851d91ed8c76e4979e9af40608fe0c8a80eefa27c3cdd0f2ad fixtures/config/valid/group_all_rule_types.json-fb09e42911934248ff767dbcfe61be60fd39483972f3bb8b1f4b1a4e9e46d944 fixtures/config/valid/object_value_max_depth.json-6a3ce5d6c5522c71969f9141c5da06e0222f797a321de2c5a90c391bcb937947 fixtures/config/valid/reserved_number_value.json-316ca827654b1a5585d25c534a889e963e5c603d293e605b3902357117802d27 fixtures/config/valid/reserved_object_value.json-414987b3d374fc5fc2d912616cadce8241be9b346d66d6cf4945ca69c169354d fixtures/config/valid/string_group_assignment.json-a848ae2e3e0dd2119600bb90ebbcba59040b3bb788586ba127a57eab1848a403 fixtures/config/valid/version_float_literal.json-f18d0bdb0ae65fc6dfa5150731633fd44ca43b752257b18bf81ab876a38ea0e8 fixtures/wire/call_transport.json-e3f09c4d8b076ceae55e742de90a42ce05bc4655140e971c63d407f519efe56b fixtures/wire/calls.json-b6398336370d8807b0874229e8dc94ed1f6e686736764d56666fc48021dabf31 fixtures/wire/definitions.json-0d267173a7d9d9260d94040ff07d14e0e1c90ccad0928c1de174d37ef135bb04 fixtures/wire/definitions_feed.json-6c402eae3da68c26e1fb72c0ed5a6c12ec0fd8aa84935f319a75deeee83bdd3c fixtures/wire/errors.json-06f8b3bb27231abac4cfa65c29078f5a68afe4d4c9443dafc0b338f447838dd3 fixtures/wire/exposure_transport.json-072119b41ccfa922fc9dc96921f022ff06f2c24c2b7540de673142f11da0b084 fixtures/wire/exposures.json-07499c5a7ca7467968156ee16fa95bdeb9018c0b841c4ec8f5bffc61d72de4fa fixtures/wire/readers.json-e34659b62facbc594bdc1ce6c0f127ff25d94672da332670b383d729f45e5960 fixtures/wire/responses.json-caac24e4c78b7086e13eb15768b5fa0eca65992d0cb0b926da5aa5d167d9878b fixtures/wire/warnings.json-3ec2f4172f9ca7897522301303b8bdd7f8c3f8d29e718ee4d1a7a0f2ff32e46f manifest.json-afd25df141b5e05dfa5c8848e1685a4e8b81f3c80fbafc4769c944b815356069 registries/literals.json-c62900e74546b28a29b0883f4863536846d34b19159f3a8ca8bc0914218dfaa3 rules/response_presence.json-74e43ed13dbfd578bcb8eedc5a247917788b320829b888eab84ce1126841d63b schemas/config.schema.json-6d920c77fb7f20c2031dc188d495ed28c3789b3f362334517a2e86021a226e85 schemas/definitions_entry.schema.json-f361158f8a5572feee09fd03ce8d41f31e077f6003b90f776ea2d9ed9e38dcd8 schemas/definitions_v2.schema.json-524a2a0cc43e7907598ca49c98209c116ac65ba8ba5c16a54e1c8a4629fd3a2c schemas/experiment_exposure_properties.schema.json-b26db1aaf9e03764124286e3d9bc0cb263f4521de47e42793560558750c99f3b schemas/feature_flag_called_context.schema.json-1dd97730c746bc4534c4f47eebd82dac0cc67ceb1e4c53e7540960e7f74b00d9 schemas/flags_response_v3.schema.json-3b3fb0be1ac89524f1a65bfcde92ba34b3cdc789ebce716c3ef2ad5938d0ce62 schemas/flags_response_v3_presence.schema.json-9dbf9d76982408badc2409f390311f7150ebee4109ad11528907c55a114a1f9c schemas/hash_sha1_60_v1.schema.json-37f8f88e7ecc2337bee24972a28dbd5ff11893936732bbb34728fce143f128fc schemas/legacy_projection.schema.json-a0ec9be52e5ff9b83751283efd10ff071dc62ac90062d34b71594b37261dba8b schemas/management_error.schema.json-9aafe3c28785298bbc143e170881df43866d1b6f1070f685cbdf3d6e4418f361 schemas/management_warning.schema.json-3e51e0fad046fd9cd829d76d83b26bb6cd0b26be7a26ba223946ec92dcd7c6ce schemas/v1_evaluation.schema.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/SOURCE.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/SOURCE.jsondeleted file mode 100644index 452c81023546..000000000000--- a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/SOURCE.json+++ /dev/null@@ -1,17 +0,0 @@-{- "source_repository": "https://github.com/PostHog/posthog-sdk-test-harness",- "source_path": "contracts/feature_flag_rules_v2",- "source_release": "1.5.0",- "source_revision": "e487249c34176c053f524d96bf0f99818dc91247",- "contract_version": "2.0.0",- "config_schema_version": "1.0.0",- "registry_version": "2.0.0",- "source_sha256sums_digest": "22998a9449a57ee489585ed7b80295d8311af74bfda8a891545330d63df19bc5",- "vendored": "SHA256SUMS is the complete upstream index; this directory holds the config schema, literal registry, management warning schema, manifest and config fixtures it lists. The corpus and wire fixtures stay with the Rust runner.",- "update_procedure": [- "Never edit a vendored file in place. A changed expectation needs a new contract version upstream and a review explanation there.",- "To move to a new version: check out the harness at the released revision to vendor, copy the same files from source_path into a sibling directory named after the new contract version, and delete this one.",- "Record the release, revision, component versions and the SHA-256 of the upstream SHA256SUMS file (shasum -a 256 SHA256SUMS) in the new SOURCE.json.",- "Point CONTRACT_DIR in test_facade_config_validation.py at the new directory."- ]-}diff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/manifest.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/manifest.jsondeleted file mode 100644index 40100063dd46..000000000000--- a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/manifest.json+++ /dev/null@@ -1,921 +0,0 @@-{- "manifest_version": 1,- "contract": {- "name": "feature_flag_rules_v2",- "version": "2.0.0",- "config_version": 2- },- "corpus": {- "version": "1.1.0",- "config_version_locked": 1,- "case_id_pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$",- "published_versions_are_immutable": true,- "expectation_change": "Any changed expected value requires a new corpus version and a review explanation."- },- "schema_dialect": "https://json-schema.org/draft/2020-12/schema",- "compatibility": {- "published_versions_are_immutable": true,- "patch": "Documentation or integrity-tool changes that do not change accepted configs, wire payloads, frozen literals, or fixture expectations.",- "minor": "Additive fixtures or artifacts that do not change accepted configs, accepted or rejected wire payloads, frozen literals, or published fixture expectations.",- "major": "Any change to accepted or rejected configs, accepted or rejected wire payloads (responses, definitions, events, diagnostics), frozen literals, or published fixture expectations."- },- "integrity": {- "algorithm": "sha256",- "index": "SHA256SUMS",- "content": "raw_file_bytes",- "entry_format": "<lowercase_hex_digest><two_spaces><relative_posix_path><line_feed>",- "entry_order": "bytewise_path",- "excluded_from_index": [- "SHA256SUMS"- ]- },- "artifacts": [- {- "path": "README.md",- "kind": "documentation"- },- {- "path": "registries/literals.json",- "kind": "registry",- "version": "2.0.0"- },- {- "path": "schemas/config.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "fixtures/config/valid/boolean_all_rule_types.json",- "kind": "fixture",- "fixture_id": "config.valid.boolean_all_rule_types",- "expected": "valid"- },- {- "path": "fixtures/config/valid/string_group_assignment.json",- "kind": "fixture",- "fixture_id": "config.valid.string_group_assignment",- "expected": "valid"- },- {- "path": "fixtures/config/valid/reserved_number_value.json",- "kind": "fixture",- "fixture_id": "config.valid.reserved_number_value",- "expected": "valid"- },- {- "path": "fixtures/config/valid/reserved_object_value.json",- "kind": "fixture",- "fixture_id": "config.valid.reserved_object_value",- "expected": "valid"- },- {- "path": "fixtures/config/valid/version_float_literal.json",- "kind": "fixture",- "fixture_id": "config.valid.version_float_literal",- "expected": "valid"- },- {- "path": "fixtures/config/invalid/unknown_config_version.json",- "kind": "fixture",- "fixture_id": "config.invalid.unknown_config_version",- "expected": "invalid",- "expected_failure": {- "keyword": "const",- "instance_path": "/version",- "message_contains": "2 was expected"- }- },- {- "path": "fixtures/config/invalid/version_string.json",- "kind": "fixture",- "fixture_id": "config.invalid.version_string",- "expected": "invalid",- "expected_failure": {- "keyword": "const",- "instance_path": "/version"- }- },- {- "path": "fixtures/config/invalid/version_boolean.json",- "kind": "fixture",- "fixture_id": "config.invalid.version_boolean",- "expected": "invalid",- "expected_failure": {- "keyword": "const",- "instance_path": "/version"- }- },- {- "path": "fixtures/config/invalid/unknown_config_field.json",- "kind": "fixture",- "fixture_id": "config.invalid.unknown_config_field",- "expected": "invalid",- "expected_failure": {- "keyword": "additionalProperties",- "instance_path": "",- "message_contains": "groups"- }- },- {- "path": "fixtures/config/invalid/unknown_rule_field.json",- "kind": "fixture",- "fixture_id": "config.invalid.unknown_rule_field",- "expected": "invalid",- "expected_failure": {- "keyword": "additionalProperties",- "instance_path": "/rules/0",- "message_contains": "implicit_default"- }- },- {- "path": "fixtures/config/invalid/missing_on_rollout_miss.json",- "kind": "fixture",- "fixture_id": "config.invalid.missing_on_rollout_miss",- "expected": "invalid",- "expected_failure": {- "keyword": "required",- "instance_path": "/rules/0",- "message_contains": "on_rollout_miss"- }- },- {- "path": "fixtures/config/invalid/missing_experiment_paused.json",- "kind": "fixture",- "fixture_id": "config.invalid.missing_experiment_paused",- "expected": "invalid",- "expected_failure": {- "keyword": "required",- "instance_path": "/rules/0",- "message_contains": "paused"- }- },- {- "path": "fixtures/config/invalid/non_uuid_rule_id.json",- "kind": "fixture",- "fixture_id": "config.invalid.non_uuid_rule_id",- "expected": "invalid",- "expected_failure": {- "keyword": "pattern",- "instance_path": "/rules/0/id"- }- },- {- "path": "fixtures/config/invalid/empty_seed.json",- "kind": "fixture",- "fixture_id": "config.invalid.empty_seed",- "expected": "invalid",- "expected_failure": {- "keyword": "minLength",- "instance_path": "/rules/0/seed"- }- },- {- "path": "fixtures/config/invalid/empty_string_value.json",- "kind": "fixture",- "fixture_id": "config.invalid.empty_string_value",- "expected": "invalid",- "expected_failure": {- "keyword": "minLength",- "instance_path": "/rules/0/value"- }- },- {- "path": "fixtures/config/invalid/return_value_type_mismatch.json",- "kind": "fixture",- "fixture_id": "config.invalid.return_value_type_mismatch",- "expected": "invalid",- "expected_failure": {- "keyword": "type",- "instance_path": "/rules/0/value"- }- },- {- "path": "fixtures/config/invalid/variant_value_type_mismatch.json",- "kind": "fixture",- "fixture_id": "config.invalid.variant_value_type_mismatch",- "expected": "invalid",- "expected_failure": {- "keyword": "type",- "instance_path": "/rules/0/variants/0/value"- }- },- {- "path": "fixtures/config/invalid/null_experiment_id.json",- "kind": "fixture",- "fixture_id": "config.invalid.null_experiment_id",- "expected": "invalid",- "expected_failure": {- "keyword": "type",- "instance_path": "/rules/0/experiment_id",- "message_contains": "integer"- }- },- {- "path": "fixtures/config/valid/object_value_max_depth.json",- "kind": "fixture",- "fixture_id": "config.valid.object_value_max_depth",- "expected": "valid"- },- {- "path": "fixtures/config/invalid/object_value_too_deep.json",- "kind": "fixture",- "fixture_id": "config.invalid.object_value_too_deep",- "expected": "invalid",- "expected_failure": {- "keyword": "oneOf",- "instance_path": "/rules/0/value/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child"- }- },- {- "path": "fixtures/config/invalid/rollout_percentage_above_maximum.json",- "kind": "fixture",- "fixture_id": "config.invalid.rollout_percentage_above_maximum",- "expected": "invalid",- "expected_failure": {- "keyword": "maximum",- "instance_path": "/rules/0/rollout_percentage"- }- },- {- "path": "fixtures/config/invalid/variant_key_invalid_characters.json",- "kind": "fixture",- "fixture_id": "config.invalid.variant_key_invalid_characters",- "expected": "invalid",- "expected_failure": {- "keyword": "pattern",- "instance_path": "/rules/0/variants/0/key"- }- },- {- "path": "fixtures/config/invalid/too_few_variants.json",- "kind": "fixture",- "fixture_id": "config.invalid.too_few_variants",- "expected": "invalid",- "expected_failure": {- "keyword": "minItems",- "instance_path": "/rules/0/variants"- }- },- {- "path": "fixtures/config/invalid/too_many_variants.json",- "kind": "fixture",- "fixture_id": "config.invalid.too_many_variants",- "expected": "invalid",- "expected_failure": {- "keyword": "maxItems",- "instance_path": "/rules/0/variants"- }- },- {- "path": "fixtures/config/invalid/seed_too_long.json",- "kind": "fixture",- "fixture_id": "config.invalid.seed_too_long",- "expected": "invalid",- "expected_failure": {- "keyword": "maxLength",- "instance_path": "/rules/0/seed"- }- },- {- "path": "fixtures/config/invalid/group_percentage_rollout_with_assign_by.json",- "kind": "fixture",- "fixture_id": "config.invalid.group_percentage_rollout_with_assign_by",- "expected": "invalid",- "expected_failure": {- "keyword": "not",- "instance_path": "/rules/0"- }- },- {- "path": "fixtures/config/invalid/group_experiment_with_assign_by.json",- "kind": "fixture",- "fixture_id": "config.invalid.group_experiment_with_assign_by",- "expected": "invalid",- "expected_failure": {- "keyword": "not",- "instance_path": "/rules/0"- }- },- {- "path": "fixtures/config/valid/group_all_rule_types.json",- "kind": "fixture",- "fixture_id": "config.valid.group_all_rule_types",- "expected": "valid"- },- {- "path": "schemas/hash_sha1_60_v1.schema.json",- "kind": "schema",- "version": "1.1.0"- },- {- "path": "schemas/v1_evaluation.schema.json",- "kind": "schema",- "version": "1.1.0"- },- {- "path": "schemas/legacy_projection.schema.json",- "kind": "schema",- "version": "1.1.0"- },- {- "path": "corpus/hash_sha1_60_v1.json",- "kind": "corpus",- "version": "1.1.0",- "schema": "schemas/hash_sha1_60_v1.schema.json",- "case_ids": [- "hash.rollout.ascii_division_edge",- "hash.rollout.ascii_excluded",- "hash.variant.ascii",- "hash.holdout.literal_prefix",- "hash.concatenation.no_separator_escaping",- "hash.identifier.empty",- "hash.identifier.unicode_utf8",- "hash.identifier.truncated_ascii",- "hash.identifier.truncated_scalar_values",- "hash.identifier.exactly_200_multibyte",- "hash.identifier.integer_group_key",- "threshold.equal_is_included",- "threshold.next_binary64_above_is_excluded",- "threshold.zero_percent_zero_hash",- "threshold.zero_percent_smallest_hash",- "threshold.hundred_percent_short_circuit",- "threshold.two_decimal_division_equal",- "threshold.two_decimal_division_excluded",- "threshold.two_decimal_division_included_below_quotient",- "variant.zero_hash_first_variant",- "variant.boundary_is_exclusive",- "variant.just_below_boundary",- "variant.accumulated_boundary_left_to_right",- "variant.accumulated_boundary_third",- "variant.two_decimal_weights_boundary",- "variant.hash_one_off_the_end",- "variant.sum_below_one_off_the_end",- "parity.rollout_identical_bytes",- "parity.variant_identical_bytes",- "parity.holdout_identical_bytes",- "parity.empty_identifier_divergent",- "parity.final_variant_fallback_divergent"- ]- },- {- "path": "corpus/v1_evaluation.json",- "kind": "corpus",- "version": "1.1.0",- "schema": "schemas/v1_evaluation.schema.json",- "case_ids": [- "v1.boolean.targeted_match_with_payload",- "v1.boolean.targeting_miss",- "v1.boolean.rollout_included",- "v1.boolean.rollout_excluded",- "v1.boolean.rollout_miss_continues_to_lower_condition",- "v1.boolean.rollout_miss_early_exit",- "v1.boolean.reason_priority_keeps_earlier_rollout_miss",- "v1.boolean.reason_priority_prefers_later_rollout_miss",- "v1.boolean.null_rollout_is_100",- "v1.boolean.empty_distinct_id_included_at_zero_percent",- "v1.boolean.empty_distinct_id_included_below_prefix_hash",- "v1.multivariate.variant_from_hash_with_payload",- "v1.multivariate.variant_from_hash_control",- "v1.multivariate.variant_override",- "v1.multivariate.invalid_variant_override_uses_hash",- "v1.multivariate.partial_rollout_included",- "v1.multivariate.partial_rollout_excluded",- "v1.multivariate.empty_distinct_id_first_variant",- "v1.group.included_by_group_key",- "v1.group.excluded_by_group_key",- "v1.group.integer_group_key_normalized",- "v1.group.missing_group_key",- "v1.dependency.satisfied",- "v1.dependency.unsatisfied",- "v1.dependency.variant_match",- "v1.dependency.variant_mismatch",- "v1.dependency.missing_target",- "v1.holdout.member",- "v1.holdout.not_member",- "v1.holdout.empty_distinct_id_hashes_prefix",- "v1.omission.inactive_flag"- ]- },- {- "path": "corpus/legacy_projection.json",- "kind": "corpus",- "version": "1.1.0",- "schema": "schemas/legacy_projection.schema.json",- "case_ids": [- "projection.boolean_true",- "projection.boolean_true_with_payload",- "projection.boolean_false_targeting_miss",- "projection.boolean_false_out_of_rollout",- "projection.variant",- "projection.variant_with_payload",- "projection.holdout_variant",- "projection.no_group_type",- "projection.missing_dependency",- "projection.failed_evaluation",- "projection.inactive_omitted"- ]- },- {- "path": "schemas/definitions_entry.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/definitions_v2.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/flags_response_v3.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/flags_response_v3_presence.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/management_warning.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/management_error.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/feature_flag_called_context.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "schemas/experiment_exposure_properties.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "rules/response_presence.json",- "kind": "presence_matrix",- "version": "1.0.0"- },- {- "path": "fixtures/wire/definitions.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/definitions_entry.schema.json",- "case_ids": [- "definitions.v2_canonical",- "definitions.v1_implicit",- "definitions.v1_explicit",- "definitions.v2_numeric_version",- "definitions.inactive",- "definitions.unsupported_version_future",- "definitions.unsupported_version_string",- "definitions.unsupported_version_boolean",- "definitions.unsupported_version_null",- "definitions.unknown_semantic_field",- "definitions.unknown_rule_field",- "definitions.unsupported_rule_type",- "definitions.missing_assignment_seed",- "definitions.v1_null_version",- "definitions.v1_wrong_type_version",- "definitions.v1_null_ensure_experience_continuity",- "definitions.v1_wrong_type_ensure_experience_continuity",- "definitions.v1_explicit_null_row_fields",- "definitions.missing_id",- "definitions.missing_key",- "definitions.missing_active",- "definitions.missing_filters",- "definitions.unknown_field"- ]- },- {- "path": "fixtures/wire/definitions_feed.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/definitions_v2.schema.json",- "case_ids": [- "definitions_feed.mixed_versions",- "definitions_feed.missing_cohorts",- "definitions_feed.minimal_events_false",- "definitions_feed.minimal_events_true",- "definitions_feed.minimal_events_wrong_type",- "definitions_feed.null_legacy_row_fields",- "definitions_feed.missing_flags",- "definitions_feed.missing_group_type_mapping",- "definitions_feed.unknown_field"- ]- },- {- "path": "fixtures/wire/responses.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/flags_response_v3.schema.json",- "case_ids": [- "responses.targeting_match_targeted_release",- "responses.missing_id",- "responses.missing_version",- "responses.missing_config_version",- "responses.targeting_match_targeted_release_missing_has_experiment",- "responses.targeting_match_targeted_release_missing_rule_type",- "responses.targeting_match_targeted_release_missing_rule_id",- "responses.targeting_match_targeted_release_forbidden_experiment_id",- "responses.targeting_match_targeted_release_forbidden_variant_key",- "responses.targeting_match_targeted_release_forbidden_holdout_id",- "responses.targeting_match_targeted_release_wrong_condition_index",- "responses.targeting_match_targeted_release_forbidden_failed",- "responses.targeting_match_targeted_release_flag_with_experiment",- "responses.targeting_match_percentage_rollout",- "responses.targeting_match_percentage_rollout_missing_has_experiment",- "responses.targeting_match_percentage_rollout_missing_rule_type",- "responses.targeting_match_percentage_rollout_missing_rule_id",- "responses.targeting_match_percentage_rollout_forbidden_experiment_id",- "responses.targeting_match_percentage_rollout_forbidden_variant_key",- "responses.targeting_match_percentage_rollout_forbidden_holdout_id",- "responses.targeting_match_percentage_rollout_wrong_condition_index",- "responses.targeting_match_percentage_rollout_forbidden_failed",- "responses.experiment_split",- "responses.experiment_split_missing_has_experiment",- "responses.experiment_split_missing_rule_type",- "responses.experiment_split_missing_rule_id",- "responses.experiment_split_missing_experiment_id",- "responses.experiment_split_missing_variant_key",- "responses.experiment_split_forbidden_holdout_id",- "responses.experiment_split_wrong_condition_index",- "responses.experiment_split_forbidden_failed",- "responses.experiment_split_contradicted_has_experiment",- "responses.rollout_miss_percentage_rollout",- "responses.rollout_miss_percentage_rollout_missing_has_experiment",- "responses.rollout_miss_percentage_rollout_missing_rule_type",- "responses.rollout_miss_percentage_rollout_missing_rule_id",- "responses.rollout_miss_percentage_rollout_forbidden_experiment_id",- "responses.rollout_miss_percentage_rollout_forbidden_variant_key",- "responses.rollout_miss_percentage_rollout_forbidden_holdout_id",- "responses.rollout_miss_percentage_rollout_wrong_condition_index",- "responses.rollout_miss_percentage_rollout_forbidden_failed",- "responses.rollout_miss_experiment",- "responses.rollout_miss_experiment_missing_has_experiment",- "responses.rollout_miss_experiment_missing_rule_type",- "responses.rollout_miss_experiment_missing_rule_id",- "responses.rollout_miss_experiment_missing_experiment_id",- "responses.rollout_miss_experiment_forbidden_variant_key",- "responses.rollout_miss_experiment_forbidden_holdout_id",- "responses.rollout_miss_experiment_wrong_condition_index",- "responses.rollout_miss_experiment_forbidden_failed",- "responses.experiment_paused",- "responses.experiment_paused_missing_has_experiment",- "responses.experiment_paused_missing_rule_type",- "responses.experiment_paused_missing_rule_id",- "responses.experiment_paused_missing_experiment_id",- "responses.experiment_paused_forbidden_variant_key",- "responses.experiment_paused_forbidden_holdout_id",- "responses.experiment_paused_wrong_condition_index",- "responses.experiment_paused_forbidden_failed",- "responses.holdout",- "responses.holdout_missing_has_experiment",- "responses.holdout_missing_rule_type",- "responses.holdout_missing_rule_id",- "responses.holdout_missing_experiment_id",- "responses.holdout_missing_holdout_id",- "responses.holdout_forbidden_variant_key",- "responses.holdout_wrong_condition_index",- "responses.holdout_forbidden_failed",- "responses.no_rule_match",- "responses.no_rule_match_missing_has_experiment",- "responses.no_rule_match_forbidden_rule_type",- "responses.no_rule_match_forbidden_rule_id",- "responses.no_rule_match_forbidden_experiment_id",- "responses.no_rule_match_forbidden_variant_key",- "responses.no_rule_match_forbidden_holdout_id",- "responses.no_rule_match_wrong_condition_index",- "responses.no_rule_match_forbidden_failed",- "responses.missing_group_key",- "responses.missing_group_key_missing_has_experiment",- "responses.missing_group_key_forbidden_rule_type",- "responses.missing_group_key_forbidden_rule_id",- "responses.missing_group_key_forbidden_experiment_id",- "responses.missing_group_key_forbidden_variant_key",- "responses.missing_group_key_forbidden_holdout_id",- "responses.missing_group_key_wrong_condition_index",- "responses.missing_group_key_forbidden_failed",- "responses.dependency_error",- "responses.dependency_error_missing_has_experiment",- "responses.dependency_error_forbidden_rule_type",- "responses.dependency_error_forbidden_rule_id",- "responses.dependency_error_forbidden_experiment_id",- "responses.dependency_error_forbidden_variant_key",- "responses.dependency_error_forbidden_holdout_id",- "responses.dependency_error_wrong_condition_index",- "responses.dependency_error_missing_failed",- "responses.dependency_error_nonnull_value",- "responses.error",- "responses.error_missing_has_experiment",- "responses.error_forbidden_rule_type",- "responses.error_forbidden_rule_id",- "responses.error_forbidden_experiment_id",- "responses.error_forbidden_variant_key",- "responses.error_forbidden_holdout_id",- "responses.error_wrong_condition_index",- "responses.error_missing_failed",- "responses.error_nonnull_value",- "responses.v1",- "responses.omitted",- "responses.split_wrong_type_config_version",- "responses.split_wrong_type_rule_type",- "responses.split_wrong_type_rule_id",- "responses.split_wrong_type_experiment_id",- "responses.split_wrong_type_variant_key",- "responses.forbidden_legacy_enabled",- "responses.forbidden_legacy_variant",- "responses.split_arm_b_equal_value",- "responses.split_string_value",- "responses.null_default",- "responses.request_failure_omission",- "responses.missing_group_nonnull_value",- "responses.v1_failed",- "responses.v1_quick_win",- "responses.v2_forced_variant",- "responses.key_mismatch",- "responses.failure_envelope",- "responses.local_only_reason",- "responses.nested_seed",- "responses.passthrough_seed",- "responses.reserved_number_wire_value",- "responses.reserved_object_wire_value",- "responses.targeting_match_targeted_release_wrong_rule_type",- "responses.experiment_split_wrong_rule_type",- "responses.rollout_miss_percentage_rollout_wrong_rule_type",- "responses.rollout_miss_experiment_wrong_rule_type",- "responses.experiment_paused_wrong_rule_type",- "responses.holdout_wrong_rule_type",- "responses.targeting_match_targeted_release_null_value",- "responses.targeting_match_percentage_rollout_null_value",- "responses.experiment_split_null_value",- "responses.empty_v2_string",- "responses.v1_experiment_without_linkage",- "responses.v1_ambiguous_experiment",- "responses.flag_key_seed",- "responses.seed_named_flag_nested_seed",- "responses.flag_key_assignment_seed",- "responses.v1_forbidden_rule_id",- "responses.v1_forbidden_rule_type",- "responses.v1_forbidden_holdout_id",- "responses.v1_object_payload",- "responses.v1_null_value_not_failed"- ]- },- {- "path": "fixtures/wire/warnings.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/management_warning.schema.json",- "case_ids": [- "warnings.rule_order_changes_traffic",- "warnings.unreachable_lower_rule",- "warnings.rollout_miss_can_enter_lower_rule",- "warnings.assignment_reset_changes_traffic",- "warnings.conclusion_expands_population",- "warnings.detail_and_attr",- "warnings.unknown_code",- "warnings.missing_code",- "warnings.wrong_detail_type",- "warnings.unknown_field"- ]- },- {- "path": "fixtures/wire/errors.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/management_error.schema.json",- "case_ids": [- "errors.validation",- "errors.nonfield",- "errors.missing_type",- "errors.missing_code",- "errors.missing_detail",- "errors.missing_attr",- "errors.wrong_detail_type",- "errors.unknown_field"- ]- },- {- "path": "fixtures/wire/calls.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/feature_flag_called_context.schema.json",- "case_ids": [- "calls.targeting_match_targeted_release",- "calls.targeting_match_targeted_release_missing_rule_type",- "calls.targeting_match_targeted_release_missing_rule_id",- "calls.targeting_match_targeted_release_forbidden_experiment_id",- "calls.targeting_match_targeted_release_forbidden_variant_key",- "calls.targeting_match_targeted_release_forbidden_holdout_id",- "calls.targeting_match_percentage_rollout",- "calls.targeting_match_percentage_rollout_missing_rule_type",- "calls.targeting_match_percentage_rollout_missing_rule_id",- "calls.targeting_match_percentage_rollout_forbidden_experiment_id",- "calls.targeting_match_percentage_rollout_forbidden_variant_key",- "calls.targeting_match_percentage_rollout_forbidden_holdout_id",- "calls.experiment_split",- "calls.experiment_split_missing_rule_type",- "calls.experiment_split_missing_rule_id",- "calls.experiment_split_missing_experiment_id",- "calls.experiment_split_missing_variant_key",- "calls.experiment_split_forbidden_holdout_id",- "calls.rollout_miss_percentage_rollout",- "calls.rollout_miss_percentage_rollout_missing_rule_type",- "calls.rollout_miss_percentage_rollout_missing_rule_id",- "calls.rollout_miss_percentage_rollout_forbidden_experiment_id",- "calls.rollout_miss_percentage_rollout_forbidden_variant_key",- "calls.rollout_miss_percentage_rollout_forbidden_holdout_id",- "calls.rollout_miss_experiment",- "calls.rollout_miss_experiment_missing_rule_type",- "calls.rollout_miss_experiment_missing_rule_id",- "calls.rollout_miss_experiment_missing_experiment_id",- "calls.rollout_miss_experiment_forbidden_variant_key",- "calls.rollout_miss_experiment_forbidden_holdout_id",- "calls.experiment_paused",- "calls.experiment_paused_missing_rule_type",- "calls.experiment_paused_missing_rule_id",- "calls.experiment_paused_missing_experiment_id",- "calls.experiment_paused_forbidden_variant_key",- "calls.experiment_paused_forbidden_holdout_id",- "calls.holdout",- "calls.holdout_missing_rule_type",- "calls.holdout_missing_rule_id",- "calls.holdout_missing_experiment_id",- "calls.holdout_missing_holdout_id",- "calls.holdout_forbidden_variant_key",- "calls.no_rule_match",- "calls.no_rule_match_forbidden_rule_type",- "calls.no_rule_match_forbidden_rule_id",- "calls.no_rule_match_forbidden_experiment_id",- "calls.no_rule_match_forbidden_variant_key",- "calls.no_rule_match_forbidden_holdout_id",- "calls.missing_group_key",- "calls.missing_group_key_forbidden_rule_type",- "calls.missing_group_key_forbidden_rule_id",- "calls.missing_group_key_forbidden_experiment_id",- "calls.missing_group_key_forbidden_variant_key",- "calls.missing_group_key_forbidden_holdout_id",- "calls.dependency_error",- "calls.dependency_error_forbidden_rule_type",- "calls.dependency_error_forbidden_rule_id",- "calls.dependency_error_forbidden_experiment_id",- "calls.dependency_error_forbidden_variant_key",- "calls.dependency_error_forbidden_holdout_id",- "calls.error",- "calls.error_forbidden_rule_type",- "calls.error_forbidden_rule_id",- "calls.error_forbidden_experiment_id",- "calls.error_forbidden_variant_key",- "calls.error_forbidden_holdout_id",- "calls.v1",- "calls.missing",- "calls.inactive",- "calls.v1_quick_win",- "calls.arm_b_equal_value",- "calls.string",- "calls.v2_forced_variant",- "calls.forbidden_value_number",- "calls.forbidden_value_object",- "calls.forbidden_value_array",- "calls.forbidden_value_null",- "calls.forbidden_value_empty_string",- "calls.partial_split_diagnostic",- "calls.inactive_forbidden_experiment_id",- "calls.missing_feature_flag",- "calls.missing_feature_flag_response",- "calls.unknown_field"- ]- },- {- "path": "fixtures/wire/exposures.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/experiment_exposure_properties.schema.json",- "case_ids": [- "exposures.remote_split",- "exposures.local_split",- "exposures.arm_b_equal_value",- "exposures.successor_experiment",- "exposures.string",- "exposures.missing_feature_flag",- "exposures.wrong_type_feature_flag",- "exposures.missing_feature_flag_response",- "exposures.wrong_type_feature_flag_response",- "exposures.missing_feature_flag_config_version",- "exposures.wrong_type_feature_flag_config_version",- "exposures.missing_feature_flag_reason_code",- "exposures.wrong_type_feature_flag_reason_code",- "exposures.missing_feature_flag_variant",- "exposures.wrong_type_feature_flag_variant",- "exposures.missing_feature_flag_rule_id",- "exposures.wrong_type_feature_flag_rule_id",- "exposures.missing_feature_flag_rule_type",- "exposures.wrong_type_feature_flag_rule_type",- "exposures.missing_feature_flag_experiment_id",- "exposures.wrong_type_feature_flag_experiment_id",- "exposures.missing_experiment_exposure_source",- "exposures.wrong_type_experiment_exposure_source",- "exposures.missing_locally_evaluated",- "exposures.wrong_type_locally_evaluated",- "exposures.forbidden_outcome_holdout",- "exposures.forbidden_outcome_pause",- "exposures.forbidden_outcome_rollout_miss",- "exposures.forbidden_outcome_no_rule",- "exposures.forbidden_outcome_failed",- "exposures.forbidden_value_object",- "exposures.forbidden_value_array",- "exposures.forbidden_value_null",- "exposures.forbidden_value_empty_string",- "exposures.holdout_context",- "exposures.ingestion_source",- "exposures.v1_config",- "exposures.forced_variant_context",- "exposures.unknown_field"- ]- },- {- "path": "fixtures/wire/readers.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/flags_response_v3.schema.json",- "case_ids": [- "readers.complete_split",- "readers.partial_split_missing_config_version",- "readers.partial_split_missing_rule_type",- "readers.partial_split_missing_rule_id",- "readers.partial_split_missing_experiment_id",- "readers.partial_split_missing_variant_key",- "readers.split_wrong_type_config_version",- "readers.split_wrong_type_rule_type",- "readers.split_wrong_type_rule_id",- "readers.split_wrong_type_experiment_id",- "readers.split_wrong_type_variant_key",- "readers.wrong_rule_type_literal",- "readers.unknown_fields",- "readers.old_server_variant",- "readers.old_server_boolean",- "readers.old_server_null_variant",- "readers.old_server_false",- "readers.v3_value_takes_precedence",- "readers.missing_flag",- "readers.targeting_match_targeted_release",- "readers.targeting_match_percentage_rollout",- "readers.rollout_miss_percentage_rollout",- "readers.rollout_miss_experiment",- "readers.experiment_paused",- "readers.holdout",- "readers.holdout_variant_key",- "readers.no_rule_match",- "readers.missing_group_key",- "readers.dependency_error",- "readers.error",- "readers.error_with_value",- "readers.malformed_sibling_isolation",- "readers.partial_split_string_value",- "readers.v1_at_v3",- "readers.v1_failed",- "readers.integral_json_number_context",- "readers.flag_key_seed"- ]- },- {- "path": "fixtures/wire/exposure_transport.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/experiment_exposure_properties.schema.json",- "case_ids": [- "exposure_transport.exposure_with_transport",- "exposure_transport.nested_seed",- "exposure_transport.nested_holdout_seed",- "exposure_transport.holdout_context",- "exposure_transport.forced_variant_context",- "exposure_transport.group_type_named_seed"- ]- },- {- "path": "fixtures/wire/call_transport.json",- "kind": "fixture_set",- "version": "1.0.0",- "schema": "schemas/feature_flag_called_context.schema.json",- "case_ids": [- "call_transport.call_with_transport",- "call_transport.nested_assignment_seed",- "call_transport.prefixed_seed",- "call_transport.person_property_named_seed"- ]- }- ],- "wire_contract": {- "version": "1.0.0",- "fixture_version": "1.0.0",- "published_versions_are_immutable": true,- "producer_schema_sha256": "1dd97730c746bc4534c4f47eebd82dac0cc67ceb1e4c53e7540960e7f74b00d9",- "fixture_encoding": "Each case deep-copies its named template, removes the listed existing JSON Pointer members, then sets members by JSON Pointer. Set requires an existing parent. Templates and expectations are JSON, not executable SDK suites.",- "compatibility": "New artifacts are additive to contract 1.2.0. Published schema bytes and fixture expectations are immutable. Accepted/rejected wire-contract changes require a new major wire component version; additive cases require a new minor fixture version. Reader expectations never relax producer validation."- }-}diff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/SOURCE.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/SOURCE.jsonnew file mode 100644index 000000000000..cf3c8f831ab4--- /dev/null+++ b/products/feature_flags/backend/test/fixtures/rules_v2_contract/SOURCE.json@@ -0,0 +1,53 @@+{+ "repository": "https://github.com/PostHog/posthog-sdk-test-harness",+ "release": "1.15.0",+ "commit": "64ffa6ab19166541880c077d349abe18a7e42395",+ "path": "contracts/feature_flag_rules_v2",+ "contract_version": "2.3.1",+ "files": {+ "fixtures/config/invalid/assign_by_not_person.json": "52d356d2bcdcbf705b0fe2673eb147ac352bda13c9b1bc3d53c4bbb1cb01a5aa",+ "fixtures/config/invalid/default_value_type_mismatch.json": "516e72b6bd9f761de62166457528242723694f86e417b1aee6eb37b924acc4b5",+ "fixtures/config/invalid/empty_seed.json": "f5aa796ba2abf17ab6b2f4706c872f2b15bfa77310cdf0400a3a460db22eda41",+ "fixtures/config/invalid/empty_string_value.json": "6fac810e014d81b938f66909808e2a2fc1b7cf4db5462fe6522fde1e045cbdda",+ "fixtures/config/invalid/group_experiment_with_assign_by.json": "cbe5d7e00f3abadd490a72055e6197d511fa59f6b3f7062dbacffea426cc5360",+ "fixtures/config/invalid/group_percentage_rollout_with_assign_by.json": "82189b24744270ac2e4ad93b97efddbede530e6990d597fe80890cbd2820f70e",+ "fixtures/config/invalid/missing_experiment_paused.json": "f3902f40a82f5f80c88a463768b24922bb787b774cb7cd3c4e77fe0e8748e487",+ "fixtures/config/invalid/missing_on_rollout_miss.json": "88541b7eb14532becb477a9d62797960d8cfdc38bc101b79c5294c1e611e26ec",+ "fixtures/config/invalid/missing_rollout_seed.json": "bfc87e05621e30ec19647c8b4dc129b02433c7f2f2e17a9c52f8bf71ad3711ea",+ "fixtures/config/invalid/non_uuid_rule_id.json": "3e35c5e211d8ba159824009be3ed26c4ac6f12c1426109fa1b53b49ff63fc770",+ "fixtures/config/invalid/null_experiment_id.json": "de6c7a55d67adce2042d16db287dfcbe49f502d1e5e2f8e71532d0817e28e169",+ "fixtures/config/invalid/null_rule_value.json": "ac6f0c04ffbe348a75be7249a7cce80a2ec0411954c46c142eaa3609d2842bd7",+ "fixtures/config/invalid/object_value_too_deep.json": "8809275942a5fb5ed548d70d819baffa84ee4ccfec7414cc93903cc79f39c550",+ "fixtures/config/invalid/return_value_type_mismatch.json": "b48ead6599cbb40a2a9eea606544b0ee083bb13ce768d57fc225f2da4924633a",+ "fixtures/config/invalid/rollout_percentage_above_maximum.json": "9aeefb4ab1eb4140afb213554a91a2c1c085e54cdbe47734442e65ba9a17f99c",+ "fixtures/config/invalid/rollout_percentage_below_minimum.json": "dc4102374a3e075c9501f915ead07e8061d46f07293d7b71c0eaa53d4e06fbcf",+ "fixtures/config/invalid/seed_too_long.json": "2ca76285c4f9724603eecb980080bf7ddf0ff8dea4458eb60a2699dfad020941",+ "fixtures/config/invalid/targeted_release_with_rollout_fields.json": "7080ad218d8a04b26884aeca4828ada72a21ea8b85453a4f2ae6fafc567223be",+ "fixtures/config/invalid/too_few_variants.json": "22b5201619d80be17bfb21c9a0bf93472e2231ad4a5f1c6bb8136275e64bb8a4",+ "fixtures/config/invalid/too_many_variants.json": "aacabb57255580136b8e6a984c57cea7367e59ddeffed3d4a40137b804cf4c31",+ "fixtures/config/invalid/unknown_assignment_algorithm.json": "a2cc3d33443fb50ca284ec0a053c1e29b5b752729808aca7f1a5d5009c3cc5cb",+ "fixtures/config/invalid/unknown_config_field.json": "68c83e9c074a0a70e7753a6e52daa414aeb18977abdd9b702ec4c5c61d82c3a4",+ "fixtures/config/invalid/unknown_config_version.json": "f5bba7fa0ea88e43834ac3b5e03ed4f7297ad0bf4ab2f09d962241521dd06787",+ "fixtures/config/invalid/unknown_property_field.json": "f13c58cc326561ee558ffd5d2e60ec26c8ba8bc5410c7310f1f820c3ff08eb25",+ "fixtures/config/invalid/unknown_property_operator.json": "621727ab45d910f6c47d88da7e68ab619c38aaee6aff2abeccf1b5f413b60b75",+ "fixtures/config/invalid/unknown_property_type.json": "06f5c1dafff26761dfe321765072161a1230e591e1e80a353e5093a8eca041bd",+ "fixtures/config/invalid/unknown_rollout_miss_policy.json": "e1ed66e2d00c56c217af240b2cb5af3cc10d2f7f2d26299ecf998bcb73246c22",+ "fixtures/config/invalid/unknown_rule_field.json": "8bcc957c38bb2b6a33e244ad1cfe76612cf6f4918c8f0b0cc22f86bd01cd1932",+ "fixtures/config/invalid/variant_key_invalid_characters.json": "f5d71ea6a2ad839fb5f540c8a7f894438fe7c99f152d7469b86af83e938288db",+ "fixtures/config/invalid/variant_value_type_mismatch.json": "aecfc8a8f49f1fa5586082fc4b70284a5212e14998984fc3a7bde1520b933095",+ "fixtures/config/invalid/version_boolean.json": "49587173259e8b379c8f473e60af7bce7a52ad8f17088068dec021c2a3f9242d",+ "fixtures/config/invalid/version_string.json": "4835228c5a390aa2497d4df5bd62a41d775c5ff75363d2f7dca0a5eee9e77649",+ "fixtures/config/valid/boolean_all_rule_types.json": "bd56e3422fee0adf18ee9a4ad13ea96fe9bb4e4d11b3e9e0499e6be985b628e8",+ "fixtures/config/valid/boolean_targeted_and_percentage_rollout.json": "ff39ff54ecdc16a52fe963b3d0e7f08b8e417567a147c7730fc932fc366944e8",+ "fixtures/config/valid/group_all_rule_types.json": "bd163291f26d8a851d91ed8c76e4979e9af40608fe0c8a80eefa27c3cdd0f2ad",+ "fixtures/config/valid/object_value_max_depth.json": "fb09e42911934248ff767dbcfe61be60fd39483972f3bb8b1f4b1a4e9e46d944",+ "fixtures/config/valid/reserved_number_value.json": "6a3ce5d6c5522c71969f9141c5da06e0222f797a321de2c5a90c391bcb937947",+ "fixtures/config/valid/reserved_object_value.json": "316ca827654b1a5585d25c534a889e963e5c603d293e605b3902357117802d27",+ "fixtures/config/valid/string_group_assignment.json": "414987b3d374fc5fc2d912616cadce8241be9b346d66d6cf4945ca69c169354d",+ "fixtures/config/valid/version_float_literal.json": "a848ae2e3e0dd2119600bb90ebbcba59040b3bb788586ba127a57eab1848a403",+ "manifest.json": "e1dc17a0ef7a8388c05262c1a6c388a8237f028b7942bbce9ac1a8b45fa3fb5d",+ "registries/literals.json": "afd25df141b5e05dfa5c8848e1685a4e8b81f3c80fbafc4769c944b815356069",+ "schemas/config.schema.json": "74e43ed13dbfd578bcb8eedc5a247917788b320829b888eab84ce1126841d63b",+ "schemas/management_warning.schema.json": "9aafe3c28785298bbc143e170881df43866d1b6f1070f685cbdf3d6e4418f361"+ }+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/assign_by_not_person.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/assign_by_not_person.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/assign_by_not_person.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/assign_by_not_person.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/default_value_type_mismatch.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/default_value_type_mismatch.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/default_value_type_mismatch.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/default_value_type_mismatch.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/empty_seed.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/empty_seed.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/empty_seed.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/empty_seed.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/empty_string_value.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/empty_string_value.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/empty_string_value.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/empty_string_value.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/group_experiment_with_assign_by.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/group_experiment_with_assign_by.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/group_experiment_with_assign_by.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/group_experiment_with_assign_by.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/group_percentage_rollout_with_assign_by.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/group_percentage_rollout_with_assign_by.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/group_percentage_rollout_with_assign_by.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/group_percentage_rollout_with_assign_by.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/missing_experiment_paused.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/missing_experiment_paused.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/missing_experiment_paused.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/missing_experiment_paused.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/missing_on_rollout_miss.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/missing_on_rollout_miss.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/missing_on_rollout_miss.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/missing_on_rollout_miss.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/missing_rollout_seed.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/missing_rollout_seed.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/missing_rollout_seed.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/missing_rollout_seed.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/non_uuid_rule_id.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/non_uuid_rule_id.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/non_uuid_rule_id.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/non_uuid_rule_id.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/null_experiment_id.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/null_experiment_id.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/null_experiment_id.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/null_experiment_id.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/null_rule_value.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/null_rule_value.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/null_rule_value.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/null_rule_value.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/object_value_too_deep.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/object_value_too_deep.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/object_value_too_deep.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/object_value_too_deep.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/return_value_type_mismatch.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/return_value_type_mismatch.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/return_value_type_mismatch.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/return_value_type_mismatch.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/rollout_percentage_above_maximum.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_above_maximum.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/rollout_percentage_above_maximum.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_above_maximum.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/rollout_percentage_below_minimum.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_below_minimum.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/rollout_percentage_below_minimum.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_below_minimum.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/seed_too_long.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/seed_too_long.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/seed_too_long.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/seed_too_long.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/targeted_release_with_rollout_fields.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/targeted_release_with_rollout_fields.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/targeted_release_with_rollout_fields.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/targeted_release_with_rollout_fields.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/too_few_variants.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/too_few_variants.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/too_few_variants.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/too_few_variants.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/too_many_variants.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/too_many_variants.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/too_many_variants.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/too_many_variants.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_assignment_algorithm.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_assignment_algorithm.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_assignment_algorithm.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_assignment_algorithm.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/unknown_config_field.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_field.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/unknown_config_field.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_field.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/unknown_config_version.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_version.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/unknown_config_version.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_version.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_property_field.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_field.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_property_field.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_field.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_property_operator.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_operator.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_property_operator.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_operator.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_property_type.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_type.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_property_type.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_type.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_rollout_miss_policy.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rollout_miss_policy.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_rollout_miss_policy.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rollout_miss_policy.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/unknown_rule_field.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rule_field.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/unknown_rule_field.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rule_field.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/variant_key_invalid_characters.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/variant_key_invalid_characters.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/variant_key_invalid_characters.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/variant_key_invalid_characters.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/variant_value_type_mismatch.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/variant_value_type_mismatch.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/variant_value_type_mismatch.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/variant_value_type_mismatch.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/version_boolean.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/version_boolean.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/version_boolean.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/version_boolean.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/version_string.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/version_string.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/invalid/version_string.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/invalid/version_string.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/boolean_all_rule_types.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/boolean_all_rule_types.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/boolean_all_rule_types.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/boolean_all_rule_types.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/boolean_targeted_and_percentage_rollout.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/boolean_targeted_and_percentage_rollout.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/boolean_targeted_and_percentage_rollout.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/boolean_targeted_and_percentage_rollout.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/group_all_rule_types.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/group_all_rule_types.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/group_all_rule_types.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/group_all_rule_types.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/object_value_max_depth.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/object_value_max_depth.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/object_value_max_depth.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/object_value_max_depth.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/reserved_number_value.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/reserved_number_value.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/reserved_number_value.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/reserved_number_value.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/reserved_object_value.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/reserved_object_value.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/reserved_object_value.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/reserved_object_value.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/string_group_assignment.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/string_group_assignment.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/string_group_assignment.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/string_group_assignment.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/version_float_literal.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/version_float_literal.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/fixtures/config/valid/version_float_literal.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/fixtures/config/valid/version_float_literal.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/manifest.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/manifest.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/manifest.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/manifest.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/registries/literals.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/registries/literals.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/registries/literals.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/registries/literals.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/schemas/config.schema.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/schemas/config.schema.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/schemas/config.schema.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/schemas/config.schema.jsondiff --git a/products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/schemas/management_warning.schema.json b/products/feature_flags/backend/test/fixtures/rules_v2_contract/schemas/management_warning.schema.jsonsimilarity index 100%rename from products/feature_flags/backend/test/fixtures/rules_v2_contract/2.0.0/schemas/management_warning.schema.jsonrename to products/feature_flags/backend/test/fixtures/rules_v2_contract/schemas/management_warning.schema.jsondiff --git a/products/feature_flags/backend/test/test_facade_config_validation.py b/products/feature_flags/backend/test/test_facade_config_validation.pyindex 0963c2122b76..aa46ca7da592 100644--- a/products/feature_flags/backend/test/test_facade_config_validation.py+++ b/products/feature_flags/backend/test/test_facade_config_validation.py@@ -44,7 +44,7 @@ from products.feature_flags.backend.facade.config_validation import ()# Vendored from the released harness contract; SOURCE.json records the revision and digests.-CONTRACT_DIR = Path(__file__).parent / "fixtures" / "rules_v2_contract" / "2.0.0"+CONTRACT_DIR = Path(__file__).parent / "fixtures" / "rules_v2_contract"LIMITS = ValidationLimits(max_config_bytes=64 * 1024, max_metadata_bytes=1024)TARGETED_ID = "11111111-1111-4111-8111-111111111111"@@ -913,27 +913,16 @@ def _admitted_family(document: dict[str, Any]) -> bool:class TestReleasedContract:def test_vendored_contract_is_intact(self) -> None:source = load_contract("SOURCE.json")- index_bytes = (CONTRACT_DIR / "SHA256SUMS").read_bytes()- assert hashlib.sha256(index_bytes).hexdigest() == source["source_sha256sums_digest"]- index = {- path: digest for digest, path in re.findall(r"^([0-9a-f]{64}) (.+)$", index_bytes.decode("utf-8"), re.M)- }- vendored = [- path+ vendored = {+ path.relative_to(CONTRACT_DIR).as_posix(): pathfor path in CONTRACT_DIR.rglob("*")- if path.is_file() and path.name not in ("SHA256SUMS", "SOURCE.json")- ]- relatives = {path.relative_to(CONTRACT_DIR).as_posix() for path in vendored}- # A deliberate subset of the upstream index: the corpus and wire files stay with the Rust runner.- assert relatives <= set(index)- for path in vendored:- relative = path.relative_to(CONTRACT_DIR).as_posix()- assert hashlib.sha256(path.read_bytes()).hexdigest() == index[relative], relative- assert {entry["path"] for entry in CONTRACT_FIXTURES} <= relatives+ if path.is_file() and path.name != "SOURCE.json"+ }+ assert set(vendored) == set(source["files"])+ for relative, path in vendored.items():+ assert hashlib.sha256(path.read_bytes()).hexdigest() == source["files"][relative], relative+ assert {entry["path"] for entry in CONTRACT_FIXTURES} <= set(vendored)assert MANIFEST["contract"]["version"] == source["contract_version"]- versions = {artifact["path"]: artifact.get("version") for artifact in MANIFEST["artifacts"]}- assert versions["schemas/config.schema.json"] == source["config_schema_version"]- assert versions["registries/literals.json"] == source["registry_version"]def test_literals_agree_with_the_released_registry(self) -> None:registry = load_contract("registries/literals.json")diff --git a/products/feature_flags/turbo.json b/products/feature_flags/turbo.jsonindex 5ff158cf38c7..52d9bcb1a2f5 100644--- a/products/feature_flags/turbo.json+++ b/products/feature_flags/turbo.json@@ -1,6 +1,10 @@{"extends": ["//"],"tasks": {+ "backend:test": {+ // Tests read the vendored JSON under backend/test/fixtures/, which the root .py globs miss.+ "inputs": ["$TURBO_EXTENDS$", "backend/test/fixtures/**"]+ },// No script backs this task. It exists so a product whose tests read tools.yaml can// depend on it, and Turbo then marks that product's backend:test affected on a change."backend:mcp-surface": {diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/SOURCE.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/SOURCE.jsondeleted file mode 100644index 0d627ae24753..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/SOURCE.json+++ /dev/null@@ -1,21 +0,0 @@-{- "source_repository": "https://github.com/PostHog/posthog-sdk-test-harness",- "source_path": "contracts/feature_flag_rules_v2",- "source_revision": "3de40b77efbe978057ea1d16a519b72cf6ec8e16",- "contract_version": "1.2.0",- "corpus_version": "1.1.0",- "source_sha256sums_digest": "b3457d860277f89407762abcf48774e3ef37bbf7c45693fee35cb4096a343e71",- "files": {- "manifest.json": "822b6d654bea1d928068c30477a9d437094d5a36edd8ad14cba94b5871bcbbfa",- "corpus/hash_sha1_60_v1.json": "e9bea9cff58bac0c6c1021e9c8842c53594055b6874a2c58bc4350d0c28a93ca",- "corpus/legacy_projection.json": "536c8386eefa75721d113bd8718ddeb7fb1aad3b4f2cce1fbcf516a346a16e26",- "corpus/v1_evaluation.json": "752ff88dcb943ab1e21f9552b0c4ec606029393fca2b565b01a497da89cd8675"- },- "update_procedure": [- "Never edit a vendored file in place. A changed expectation needs a new corpus version upstream and a review explanation there.",- "To move to a new version: check out the harness at the revision to vendor, copy manifest.json and corpus/*.json from source_path into a sibling directory named after the new contract version, and delete this one.",- "Record the revision, versions, and the SHA-256 of the upstream SHA256SUMS file (shasum -a 256 SHA256SUMS) in the new SOURCE.json.",- "Regenerate files with: (cd <new directory> && shasum -a 256 manifest.json corpus/*.json).",- "Point CORPUS_DIR in tests/test_rules_v2_v1_contract.rs at the new directory and reconcile UNSUPPORTED_CASE_IDS with the new manifest."- ]-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/manifest.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/manifest.jsondeleted file mode 100644index e5fe51232421..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/manifest.json+++ /dev/null@@ -1,419 +0,0 @@-{- "manifest_version": 1,- "contract": {- "name": "feature_flag_rules_v2",- "version": "1.2.0",- "config_version": 2- },- "corpus": {- "version": "1.1.0",- "config_version_locked": 1,- "case_id_pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$",- "published_versions_are_immutable": true,- "expectation_change": "Any changed expected value requires a new corpus version and a review explanation."- },- "schema_dialect": "https://json-schema.org/draft/2020-12/schema",- "compatibility": {- "published_versions_are_immutable": true,- "patch": "Documentation or integrity-tool changes that do not change accepted configs or frozen literals.",- "minor": "Additive fixtures or artifacts that do not change accepted configs or frozen literals.",- "major": "Any change to accepted configs, rejected configs, or frozen literals."- },- "integrity": {- "algorithm": "sha256",- "index": "SHA256SUMS",- "content": "raw_file_bytes",- "entry_format": "<lowercase_hex_digest><two_spaces><relative_posix_path><line_feed>",- "entry_order": "bytewise_path",- "excluded_from_index": [- "SHA256SUMS"- ]- },- "artifacts": [- {- "path": "README.md",- "kind": "documentation"- },- {- "path": "registries/literals.json",- "kind": "registry",- "version": "1.0.0"- },- {- "path": "schemas/config.schema.json",- "kind": "schema",- "version": "1.0.0"- },- {- "path": "fixtures/config/valid/boolean_all_rule_types.json",- "kind": "fixture",- "fixture_id": "config.valid.boolean_all_rule_types",- "expected": "valid"- },- {- "path": "fixtures/config/valid/string_group_assignment.json",- "kind": "fixture",- "fixture_id": "config.valid.string_group_assignment",- "expected": "valid"- },- {- "path": "fixtures/config/valid/reserved_number_value.json",- "kind": "fixture",- "fixture_id": "config.valid.reserved_number_value",- "expected": "valid"- },- {- "path": "fixtures/config/valid/reserved_object_value.json",- "kind": "fixture",- "fixture_id": "config.valid.reserved_object_value",- "expected": "valid"- },- {- "path": "fixtures/config/valid/version_float_literal.json",- "kind": "fixture",- "fixture_id": "config.valid.version_float_literal",- "expected": "valid"- },- {- "path": "fixtures/config/invalid/unknown_config_version.json",- "kind": "fixture",- "fixture_id": "config.invalid.unknown_config_version",- "expected": "invalid",- "expected_failure": {- "keyword": "const",- "instance_path": "/version",- "message_contains": "2 was expected"- }- },- {- "path": "fixtures/config/invalid/version_string.json",- "kind": "fixture",- "fixture_id": "config.invalid.version_string",- "expected": "invalid",- "expected_failure": {- "keyword": "const",- "instance_path": "/version"- }- },- {- "path": "fixtures/config/invalid/version_boolean.json",- "kind": "fixture",- "fixture_id": "config.invalid.version_boolean",- "expected": "invalid",- "expected_failure": {- "keyword": "const",- "instance_path": "/version"- }- },- {- "path": "fixtures/config/invalid/unknown_config_field.json",- "kind": "fixture",- "fixture_id": "config.invalid.unknown_config_field",- "expected": "invalid",- "expected_failure": {- "keyword": "additionalProperties",- "instance_path": "",- "message_contains": "groups"- }- },- {- "path": "fixtures/config/invalid/unknown_rule_field.json",- "kind": "fixture",- "fixture_id": "config.invalid.unknown_rule_field",- "expected": "invalid",- "expected_failure": {- "keyword": "additionalProperties",- "instance_path": "/rules/0",- "message_contains": "implicit_default"- }- },- {- "path": "fixtures/config/invalid/missing_on_rollout_miss.json",- "kind": "fixture",- "fixture_id": "config.invalid.missing_on_rollout_miss",- "expected": "invalid",- "expected_failure": {- "keyword": "required",- "instance_path": "/rules/0",- "message_contains": "on_rollout_miss"- }- },- {- "path": "fixtures/config/invalid/missing_experiment_paused.json",- "kind": "fixture",- "fixture_id": "config.invalid.missing_experiment_paused",- "expected": "invalid",- "expected_failure": {- "keyword": "required",- "instance_path": "/rules/0",- "message_contains": "paused"- }- },- {- "path": "fixtures/config/invalid/non_uuid_rule_id.json",- "kind": "fixture",- "fixture_id": "config.invalid.non_uuid_rule_id",- "expected": "invalid",- "expected_failure": {- "keyword": "pattern",- "instance_path": "/rules/0/id"- }- },- {- "path": "fixtures/config/invalid/empty_seed.json",- "kind": "fixture",- "fixture_id": "config.invalid.empty_seed",- "expected": "invalid",- "expected_failure": {- "keyword": "minLength",- "instance_path": "/rules/0/seed"- }- },- {- "path": "fixtures/config/invalid/empty_string_value.json",- "kind": "fixture",- "fixture_id": "config.invalid.empty_string_value",- "expected": "invalid",- "expected_failure": {- "keyword": "minLength",- "instance_path": "/rules/0/value"- }- },- {- "path": "fixtures/config/invalid/return_value_type_mismatch.json",- "kind": "fixture",- "fixture_id": "config.invalid.return_value_type_mismatch",- "expected": "invalid",- "expected_failure": {- "keyword": "type",- "instance_path": "/rules/0/value"- }- },- {- "path": "fixtures/config/invalid/variant_value_type_mismatch.json",- "kind": "fixture",- "fixture_id": "config.invalid.variant_value_type_mismatch",- "expected": "invalid",- "expected_failure": {- "keyword": "type",- "instance_path": "/rules/0/variants/0/value"- }- },- {- "path": "fixtures/config/invalid/null_experiment_id.json",- "kind": "fixture",- "fixture_id": "config.invalid.null_experiment_id",- "expected": "invalid",- "expected_failure": {- "keyword": "type",- "instance_path": "/rules/0/experiment_id",- "message_contains": "integer"- }- },- {- "path": "fixtures/config/valid/object_value_max_depth.json",- "kind": "fixture",- "fixture_id": "config.valid.object_value_max_depth",- "expected": "valid"- },- {- "path": "fixtures/config/invalid/object_value_too_deep.json",- "kind": "fixture",- "fixture_id": "config.invalid.object_value_too_deep",- "expected": "invalid",- "expected_failure": {- "keyword": "oneOf",- "instance_path": "/rules/0/value/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child/child"- }- },- {- "path": "fixtures/config/invalid/rollout_percentage_above_maximum.json",- "kind": "fixture",- "fixture_id": "config.invalid.rollout_percentage_above_maximum",- "expected": "invalid",- "expected_failure": {- "keyword": "maximum",- "instance_path": "/rules/0/rollout_percentage"- }- },- {- "path": "fixtures/config/invalid/variant_key_invalid_characters.json",- "kind": "fixture",- "fixture_id": "config.invalid.variant_key_invalid_characters",- "expected": "invalid",- "expected_failure": {- "keyword": "pattern",- "instance_path": "/rules/0/variants/0/key"- }- },- {- "path": "fixtures/config/invalid/too_few_variants.json",- "kind": "fixture",- "fixture_id": "config.invalid.too_few_variants",- "expected": "invalid",- "expected_failure": {- "keyword": "minItems",- "instance_path": "/rules/0/variants"- }- },- {- "path": "fixtures/config/invalid/too_many_variants.json",- "kind": "fixture",- "fixture_id": "config.invalid.too_many_variants",- "expected": "invalid",- "expected_failure": {- "keyword": "maxItems",- "instance_path": "/rules/0/variants"- }- },- {- "path": "fixtures/config/invalid/seed_too_long.json",- "kind": "fixture",- "fixture_id": "config.invalid.seed_too_long",- "expected": "invalid",- "expected_failure": {- "keyword": "maxLength",- "instance_path": "/rules/0/seed"- }- },- {- "path": "fixtures/config/invalid/group_percentage_rollout_with_assign_by.json",- "kind": "fixture",- "fixture_id": "config.invalid.group_percentage_rollout_with_assign_by",- "expected": "invalid",- "expected_failure": {- "keyword": "not",- "instance_path": "/rules/0"- }- },- {- "path": "fixtures/config/invalid/group_experiment_with_assign_by.json",- "kind": "fixture",- "fixture_id": "config.invalid.group_experiment_with_assign_by",- "expected": "invalid",- "expected_failure": {- "keyword": "not",- "instance_path": "/rules/0"- }- },- {- "path": "fixtures/config/valid/group_all_rule_types.json",- "kind": "fixture",- "fixture_id": "config.valid.group_all_rule_types",- "expected": "valid"- },- {- "path": "schemas/hash_sha1_60_v1.schema.json",- "kind": "schema",- "version": "1.1.0"- },- {- "path": "schemas/v1_evaluation.schema.json",- "kind": "schema",- "version": "1.1.0"- },- {- "path": "schemas/legacy_projection.schema.json",- "kind": "schema",- "version": "1.1.0"- },- {- "path": "corpus/hash_sha1_60_v1.json",- "kind": "corpus",- "version": "1.1.0",- "schema": "schemas/hash_sha1_60_v1.schema.json",- "case_ids": [- "hash.rollout.ascii_division_edge",- "hash.rollout.ascii_excluded",- "hash.variant.ascii",- "hash.holdout.literal_prefix",- "hash.concatenation.no_separator_escaping",- "hash.identifier.empty",- "hash.identifier.unicode_utf8",- "hash.identifier.truncated_ascii",- "hash.identifier.truncated_scalar_values",- "hash.identifier.exactly_200_multibyte",- "hash.identifier.integer_group_key",- "threshold.equal_is_included",- "threshold.next_binary64_above_is_excluded",- "threshold.zero_percent_zero_hash",- "threshold.zero_percent_smallest_hash",- "threshold.hundred_percent_short_circuit",- "threshold.two_decimal_division_equal",- "threshold.two_decimal_division_excluded",- "threshold.two_decimal_division_included_below_quotient",- "variant.zero_hash_first_variant",- "variant.boundary_is_exclusive",- "variant.just_below_boundary",- "variant.accumulated_boundary_left_to_right",- "variant.accumulated_boundary_third",- "variant.two_decimal_weights_boundary",- "variant.hash_one_off_the_end",- "variant.sum_below_one_off_the_end",- "parity.rollout_identical_bytes",- "parity.variant_identical_bytes",- "parity.holdout_identical_bytes",- "parity.empty_identifier_divergent",- "parity.final_variant_fallback_divergent"- ]- },- {- "path": "corpus/v1_evaluation.json",- "kind": "corpus",- "version": "1.1.0",- "schema": "schemas/v1_evaluation.schema.json",- "case_ids": [- "v1.boolean.targeted_match_with_payload",- "v1.boolean.targeting_miss",- "v1.boolean.rollout_included",- "v1.boolean.rollout_excluded",- "v1.boolean.rollout_miss_continues_to_lower_condition",- "v1.boolean.rollout_miss_early_exit",- "v1.boolean.reason_priority_keeps_earlier_rollout_miss",- "v1.boolean.reason_priority_prefers_later_rollout_miss",- "v1.boolean.null_rollout_is_100",- "v1.boolean.empty_distinct_id_included_at_zero_percent",- "v1.boolean.empty_distinct_id_included_below_prefix_hash",- "v1.multivariate.variant_from_hash_with_payload",- "v1.multivariate.variant_from_hash_control",- "v1.multivariate.variant_override",- "v1.multivariate.invalid_variant_override_uses_hash",- "v1.multivariate.partial_rollout_included",- "v1.multivariate.partial_rollout_excluded",- "v1.multivariate.empty_distinct_id_first_variant",- "v1.group.included_by_group_key",- "v1.group.excluded_by_group_key",- "v1.group.integer_group_key_normalized",- "v1.group.missing_group_key",- "v1.dependency.satisfied",- "v1.dependency.unsatisfied",- "v1.dependency.variant_match",- "v1.dependency.variant_mismatch",- "v1.dependency.missing_target",- "v1.holdout.member",- "v1.holdout.not_member",- "v1.holdout.empty_distinct_id_hashes_prefix",- "v1.omission.inactive_flag"- ]- },- {- "path": "corpus/legacy_projection.json",- "kind": "corpus",- "version": "1.1.0",- "schema": "schemas/legacy_projection.schema.json",- "case_ids": [- "projection.boolean_true",- "projection.boolean_true_with_payload",- "projection.boolean_false_targeting_miss",- "projection.boolean_false_out_of_rollout",- "projection.variant",- "projection.variant_with_payload",- "projection.holdout_variant",- "projection.no_group_type",- "projection.missing_dependency",- "projection.failed_evaluation",- "projection.inactive_omitted"- ]- }- ]-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/SOURCE.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/SOURCE.jsonnew file mode 100644index 000000000000..4181a5ffe8a6--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/SOURCE.json@@ -0,0 +1,62 @@+{+ "repository": "https://github.com/PostHog/posthog-sdk-test-harness",+ "release": "1.15.0",+ "commit": "64ffa6ab19166541880c077d349abe18a7e42395",+ "path": "contracts/feature_flag_rules_v2",+ "contract_version": "2.3.1",+ "files": {+ "corpus/hash_sha1_60_v1.json": "e9bea9cff58bac0c6c1021e9c8842c53594055b6874a2c58bc4350d0c28a93ca",+ "corpus/legacy_projection.json": "536c8386eefa75721d113bd8718ddeb7fb1aad3b4f2cce1fbcf516a346a16e26",+ "corpus/v1_evaluation.json": "752ff88dcb943ab1e21f9552b0c4ec606029393fca2b565b01a497da89cd8675",+ "corpus/v2_boolean_evaluation.json": "2d2a4be5f7185445f6d6593533fe105e436bade1becc3e3b15ff380a8da477bb",+ "corpus/v2_value_evaluation.json": "aaddd05e47fc5a4ae07ea42ada5a659798f4b5fc8d0c0827f6a68e4daf68c128",+ "fixtures/config/invalid/assign_by_not_person.json": "52d356d2bcdcbf705b0fe2673eb147ac352bda13c9b1bc3d53c4bbb1cb01a5aa",+ "fixtures/config/invalid/default_value_type_mismatch.json": "516e72b6bd9f761de62166457528242723694f86e417b1aee6eb37b924acc4b5",+ "fixtures/config/invalid/empty_seed.json": "f5aa796ba2abf17ab6b2f4706c872f2b15bfa77310cdf0400a3a460db22eda41",+ "fixtures/config/invalid/empty_string_value.json": "6fac810e014d81b938f66909808e2a2fc1b7cf4db5462fe6522fde1e045cbdda",+ "fixtures/config/invalid/group_experiment_with_assign_by.json": "cbe5d7e00f3abadd490a72055e6197d511fa59f6b3f7062dbacffea426cc5360",+ "fixtures/config/invalid/group_percentage_rollout_with_assign_by.json": "82189b24744270ac2e4ad93b97efddbede530e6990d597fe80890cbd2820f70e",+ "fixtures/config/invalid/missing_experiment_paused.json": "f3902f40a82f5f80c88a463768b24922bb787b774cb7cd3c4e77fe0e8748e487",+ "fixtures/config/invalid/missing_on_rollout_miss.json": "88541b7eb14532becb477a9d62797960d8cfdc38bc101b79c5294c1e611e26ec",+ "fixtures/config/invalid/missing_rollout_seed.json": "bfc87e05621e30ec19647c8b4dc129b02433c7f2f2e17a9c52f8bf71ad3711ea",+ "fixtures/config/invalid/non_uuid_rule_id.json": "3e35c5e211d8ba159824009be3ed26c4ac6f12c1426109fa1b53b49ff63fc770",+ "fixtures/config/invalid/null_experiment_id.json": "de6c7a55d67adce2042d16db287dfcbe49f502d1e5e2f8e71532d0817e28e169",+ "fixtures/config/invalid/null_rule_value.json": "ac6f0c04ffbe348a75be7249a7cce80a2ec0411954c46c142eaa3609d2842bd7",+ "fixtures/config/invalid/object_value_too_deep.json": "8809275942a5fb5ed548d70d819baffa84ee4ccfec7414cc93903cc79f39c550",+ "fixtures/config/invalid/return_value_type_mismatch.json": "b48ead6599cbb40a2a9eea606544b0ee083bb13ce768d57fc225f2da4924633a",+ "fixtures/config/invalid/rollout_percentage_above_maximum.json": "9aeefb4ab1eb4140afb213554a91a2c1c085e54cdbe47734442e65ba9a17f99c",+ "fixtures/config/invalid/rollout_percentage_below_minimum.json": "dc4102374a3e075c9501f915ead07e8061d46f07293d7b71c0eaa53d4e06fbcf",+ "fixtures/config/invalid/seed_too_long.json": "2ca76285c4f9724603eecb980080bf7ddf0ff8dea4458eb60a2699dfad020941",+ "fixtures/config/invalid/targeted_release_with_rollout_fields.json": "7080ad218d8a04b26884aeca4828ada72a21ea8b85453a4f2ae6fafc567223be",+ "fixtures/config/invalid/too_few_variants.json": "22b5201619d80be17bfb21c9a0bf93472e2231ad4a5f1c6bb8136275e64bb8a4",+ "fixtures/config/invalid/too_many_variants.json": "aacabb57255580136b8e6a984c57cea7367e59ddeffed3d4a40137b804cf4c31",+ "fixtures/config/invalid/unknown_assignment_algorithm.json": "a2cc3d33443fb50ca284ec0a053c1e29b5b752729808aca7f1a5d5009c3cc5cb",+ "fixtures/config/invalid/unknown_config_field.json": "68c83e9c074a0a70e7753a6e52daa414aeb18977abdd9b702ec4c5c61d82c3a4",+ "fixtures/config/invalid/unknown_config_version.json": "f5bba7fa0ea88e43834ac3b5e03ed4f7297ad0bf4ab2f09d962241521dd06787",+ "fixtures/config/invalid/unknown_property_field.json": "f13c58cc326561ee558ffd5d2e60ec26c8ba8bc5410c7310f1f820c3ff08eb25",+ "fixtures/config/invalid/unknown_property_operator.json": "621727ab45d910f6c47d88da7e68ab619c38aaee6aff2abeccf1b5f413b60b75",+ "fixtures/config/invalid/unknown_property_type.json": "06f5c1dafff26761dfe321765072161a1230e591e1e80a353e5093a8eca041bd",+ "fixtures/config/invalid/unknown_rollout_miss_policy.json": "e1ed66e2d00c56c217af240b2cb5af3cc10d2f7f2d26299ecf998bcb73246c22",+ "fixtures/config/invalid/unknown_rule_field.json": "8bcc957c38bb2b6a33e244ad1cfe76612cf6f4918c8f0b0cc22f86bd01cd1932",+ "fixtures/config/invalid/variant_key_invalid_characters.json": "f5d71ea6a2ad839fb5f540c8a7f894438fe7c99f152d7469b86af83e938288db",+ "fixtures/config/invalid/variant_value_type_mismatch.json": "aecfc8a8f49f1fa5586082fc4b70284a5212e14998984fc3a7bde1520b933095",+ "fixtures/config/invalid/version_boolean.json": "49587173259e8b379c8f473e60af7bce7a52ad8f17088068dec021c2a3f9242d",+ "fixtures/config/invalid/version_string.json": "4835228c5a390aa2497d4df5bd62a41d775c5ff75363d2f7dca0a5eee9e77649",+ "fixtures/config/valid/boolean_all_rule_types.json": "bd56e3422fee0adf18ee9a4ad13ea96fe9bb4e4d11b3e9e0499e6be985b628e8",+ "fixtures/config/valid/boolean_targeted_and_percentage_rollout.json": "ff39ff54ecdc16a52fe963b3d0e7f08b8e417567a147c7730fc932fc366944e8",+ "fixtures/config/valid/group_all_rule_types.json": "bd163291f26d8a851d91ed8c76e4979e9af40608fe0c8a80eefa27c3cdd0f2ad",+ "fixtures/config/valid/object_value_max_depth.json": "fb09e42911934248ff767dbcfe61be60fd39483972f3bb8b1f4b1a4e9e46d944",+ "fixtures/config/valid/reserved_number_value.json": "6a3ce5d6c5522c71969f9141c5da06e0222f797a321de2c5a90c391bcb937947",+ "fixtures/config/valid/reserved_object_value.json": "316ca827654b1a5585d25c534a889e963e5c603d293e605b3902357117802d27",+ "fixtures/config/valid/string_group_assignment.json": "414987b3d374fc5fc2d912616cadce8241be9b346d66d6cf4945ca69c169354d",+ "fixtures/config/valid/version_float_literal.json": "a848ae2e3e0dd2119600bb90ebbcba59040b3bb788586ba127a57eab1848a403",+ "fixtures/wire/definitions.json": "b6398336370d8807b0874229e8dc94ed1f6e686736764d56666fc48021dabf31",+ "fixtures/wire/responses.json": "e34659b62facbc594bdc1ce6c0f127ff25d94672da332670b383d729f45e5960",+ "manifest.json": "e1dc17a0ef7a8388c05262c1a6c388a8237f028b7942bbce9ac1a8b45fa3fb5d",+ "registries/literals.json": "afd25df141b5e05dfa5c8848e1685a4e8b81f3c80fbafc4769c944b815356069",+ "schemas/config.schema.json": "74e43ed13dbfd578bcb8eedc5a247917788b320829b888eab84ce1126841d63b",+ "schemas/definitions_entry.schema.json": "6d920c77fb7f20c2031dc188d495ed28c3789b3f362334517a2e86021a226e85",+ "schemas/flags_response_v3.schema.json": "98c1397bb7b5a1ceb3f317b34c6c57cff0ab30e94bf5945ee7b56f293536b70f",+ "schemas/flags_response_v3_presence.schema.json": "3b3fb0be1ac89524f1a65bfcde92ba34b3cdc789ebce716c3ef2ad5938d0ce62"+ }+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/corpus/hash_sha1_60_v1.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/hash_sha1_60_v1.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/corpus/hash_sha1_60_v1.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/hash_sha1_60_v1.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/corpus/legacy_projection.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/legacy_projection.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/corpus/legacy_projection.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/legacy_projection.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/corpus/v1_evaluation.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/v1_evaluation.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_contract/1.2.0/corpus/v1_evaluation.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/v1_evaluation.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/corpus/v2_boolean_evaluation.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/v2_boolean_evaluation.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/corpus/v2_boolean_evaluation.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/v2_boolean_evaluation.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/corpus/v2_value_evaluation.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/v2_value_evaluation.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/corpus/v2_value_evaluation.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/corpus/v2_value_evaluation.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/assign_by_not_person.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/assign_by_not_person.jsonnew file mode 100644index 000000000000..b58dd6c2147c--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/assign_by_not_person.json@@ -0,0 +1,20 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "b2b2b2b2-b2b2-4b2b-8b2b-b2b2b2b2b2b2",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": 33.33,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-preview",+ "assign_by": "group"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/default_value_type_mismatch.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/default_value_type_mismatch.jsonnew file mode 100644index 000000000000..09e2e774d2ff--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/default_value_type_mismatch.json@@ -0,0 +1,22 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": "false",+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "person",+ "operator": "exact",+ "value": "preview"+ }+ ]+ },+ "value": true+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/empty_seed.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/empty_seed.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/empty_seed.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/empty_seed.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/empty_string_value.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/empty_string_value.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/empty_string_value.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/empty_string_value.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/group_experiment_with_assign_by.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/group_experiment_with_assign_by.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/group_experiment_with_assign_by.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/group_experiment_with_assign_by.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/group_percentage_rollout_with_assign_by.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/group_percentage_rollout_with_assign_by.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/group_percentage_rollout_with_assign_by.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/group_percentage_rollout_with_assign_by.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/missing_experiment_paused.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_experiment_paused.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/missing_experiment_paused.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_experiment_paused.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/missing_on_rollout_miss.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_on_rollout_miss.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/missing_on_rollout_miss.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_on_rollout_miss.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_rollout_seed.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_rollout_seed.jsonnew file mode 100644index 000000000000..b9aebe13c213--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/missing_rollout_seed.json@@ -0,0 +1,18 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "88888888-8888-4888-8888-888888888888",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": 25,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "sha1_60_v1"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/non_uuid_rule_id.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/non_uuid_rule_id.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/non_uuid_rule_id.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/non_uuid_rule_id.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/null_experiment_id.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/null_experiment_id.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/null_experiment_id.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/null_experiment_id.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/null_rule_value.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/null_rule_value.jsonnew file mode 100644index 000000000000..86b0fd4ce629--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/null_rule_value.json@@ -0,0 +1,22 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "person",+ "operator": "exact",+ "value": "preview"+ }+ ]+ },+ "value": null+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/object_value_too_deep.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/object_value_too_deep.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/object_value_too_deep.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/object_value_too_deep.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/return_value_type_mismatch.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/return_value_type_mismatch.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/return_value_type_mismatch.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/return_value_type_mismatch.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/rollout_percentage_above_maximum.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_above_maximum.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/rollout_percentage_above_maximum.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_above_maximum.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_below_minimum.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_below_minimum.jsonnew file mode 100644index 000000000000..ae1178323d9c--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/rollout_percentage_below_minimum.json@@ -0,0 +1,19 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "b2b2b2b2-b2b2-4b2b-8b2b-b2b2b2b2b2b2",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": -1,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-preview"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/seed_too_long.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/seed_too_long.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/seed_too_long.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/seed_too_long.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/targeted_release_with_rollout_fields.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/targeted_release_with_rollout_fields.jsonnew file mode 100644index 000000000000..ada5d13a0c72--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/targeted_release_with_rollout_fields.json@@ -0,0 +1,27 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "person",+ "operator": "exact",+ "value": "preview"+ }+ ]+ },+ "value": true,+ "rollout_percentage": 25,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-preview",+ "assign_by": "person"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/too_few_variants.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/too_few_variants.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/too_few_variants.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/too_few_variants.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/too_many_variants.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/too_many_variants.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/too_many_variants.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/too_many_variants.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_assignment_algorithm.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_assignment_algorithm.jsonnew file mode 100644index 000000000000..316e736db644--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_assignment_algorithm.json@@ -0,0 +1,19 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "b2b2b2b2-b2b2-4b2b-8b2b-b2b2b2b2b2b2",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": 33.33,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "md5_v1",+ "seed": "release-preview"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_config_field.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_field.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_config_field.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_field.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_config_version.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_version.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_config_version.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_config_version.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_field.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_field.jsonnew file mode 100644index 000000000000..6dfddd6c5978--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_field.json@@ -0,0 +1,23 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "person",+ "operator": "exact",+ "value": "preview",+ "implicit_default": false+ }+ ]+ },+ "value": true+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_operator.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_operator.jsonnew file mode 100644index 000000000000..2c64cb68a044--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_operator.json@@ -0,0 +1,22 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "person",+ "operator": "contains",+ "value": "preview"+ }+ ]+ },+ "value": true+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_type.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_type.jsonnew file mode 100644index 000000000000..ad308a4210c4--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_property_type.json@@ -0,0 +1,22 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "event",+ "operator": "exact",+ "value": "preview"+ }+ ]+ },+ "value": true+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rollout_miss_policy.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rollout_miss_policy.jsonnew file mode 100644index 000000000000..0992b220aaee--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rollout_miss_policy.json@@ -0,0 +1,19 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": false,+ "rules": [+ {+ "id": "b2b2b2b2-b2b2-4b2b-8b2b-b2b2b2b2b2b2",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": 33.33,+ "on_rollout_miss": "stop",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-preview"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_rule_field.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rule_field.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/unknown_rule_field.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/unknown_rule_field.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/variant_key_invalid_characters.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/variant_key_invalid_characters.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/variant_key_invalid_characters.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/variant_key_invalid_characters.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/variant_value_type_mismatch.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/variant_value_type_mismatch.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/variant_value_type_mismatch.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/variant_value_type_mismatch.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/version_boolean.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/version_boolean.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/version_boolean.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/version_boolean.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/version_string.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/version_string.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/invalid/version_string.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/invalid/version_string.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/boolean_all_rule_types.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/boolean_all_rule_types.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/boolean_all_rule_types.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/boolean_all_rule_types.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/boolean_targeted_and_percentage_rollout.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/boolean_targeted_and_percentage_rollout.jsonnew file mode 100644index 000000000000..0150a3672ed4--- /dev/null+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/boolean_targeted_and_percentage_rollout.json@@ -0,0 +1,59 @@+{+ "version": 2,+ "return_type": "boolean",+ "default_value": null,+ "rules": [+ {+ "id": "a1a1a1a1-a1a1-4a1a-8a1a-a1a1a1a1a1a1",+ "rule_type": "targeted_release",+ "targeting": {+ "properties": [+ {+ "key": "account_tier",+ "type": "person",+ "operator": "exact",+ "value": "preview"+ }+ ]+ },+ "value": true+ },+ {+ "id": "b2b2b2b2-b2b2-4b2b-8b2b-b2b2b2b2b2b2",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": 33.33,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-preview"+ },+ {+ "id": "c3c3c3c3-c3c3-4c3c-8c3c-c3c3c3c3c3c3",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": false,+ "rollout_percentage": 100,+ "on_rollout_miss": "return_default",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-fallback",+ "assign_by": "person"+ },+ {+ "id": "d4d4d4d4-d4d4-4d4d-8d4d-d4d4d4d4d4d4",+ "rule_type": "percentage_rollout",+ "targeting": {+ "properties": []+ },+ "value": true,+ "rollout_percentage": 0,+ "on_rollout_miss": "continue",+ "assignment_algorithm": "sha1_60_v1",+ "seed": "release-disabled"+ }+ ]+}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/group_all_rule_types.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/group_all_rule_types.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/group_all_rule_types.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/group_all_rule_types.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/object_value_max_depth.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/object_value_max_depth.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/object_value_max_depth.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/object_value_max_depth.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/reserved_number_value.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/reserved_number_value.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/reserved_number_value.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/reserved_number_value.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/reserved_object_value.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/reserved_object_value.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/reserved_object_value.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/reserved_object_value.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/string_group_assignment.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/string_group_assignment.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/string_group_assignment.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/string_group_assignment.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/version_float_literal.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/version_float_literal.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/version_float_literal.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/config/valid/version_float_literal.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/wire/definitions.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/wire/definitions.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/fixtures/wire/definitions.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/wire/definitions.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/fixtures/wire/responses.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/wire/responses.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/fixtures/wire/responses.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/fixtures/wire/responses.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/manifest.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/manifest.jsonsimilarity index 81%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/manifest.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/manifest.jsonindex 440c1d2677bb..1c96529d544a 100644--- a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/manifest.json+++ b/rust/feature-flags/tests/fixtures/rules_v2_contract/manifest.json@@ -2,7 +2,7 @@"manifest_version": 1,"contract": {"name": "feature_flag_rules_v2",- "version": "2.1.0",+ "version": "2.3.1","config_version": 2},"corpus": {@@ -548,7 +548,7 @@{"path": "schemas/flags_response_v3.schema.json","kind": "schema",- "version": "1.0.0"+ "version": "1.0.1"},{"path": "schemas/flags_response_v3_presence.schema.json",@@ -568,12 +568,12 @@{"path": "schemas/feature_flag_called_context.schema.json","kind": "schema",- "version": "1.0.0"+ "version": "1.0.1"},{"path": "schemas/experiment_exposure_properties.schema.json","kind": "schema",- "version": "1.0.0"+ "version": "1.0.1"},{"path": "rules/response_presence.json",@@ -1028,14 +1028,236 @@"call_transport.prefixed_seed","call_transport.person_property_named_seed"]+ },+ {+ "path": "schemas/v2_boolean_evaluation.schema.json",+ "kind": "schema",+ "version": "1.0.0"+ },+ {+ "path": "corpus/v2_boolean_evaluation.json",+ "kind": "boolean_evaluation_corpus",+ "version": "1.0.0",+ "schema": "schemas/v2_boolean_evaluation.schema.json",+ "component": "v2_boolean_evaluation",+ "case_ids": [+ "v2_boolean.empty.null",+ "v2_boolean.empty.false",+ "v2_boolean.empty.true",+ "v2_boolean.target.false",+ "v2_boolean.target.true",+ "v2_boolean.order.false_claims",+ "v2_boolean.order.reversed",+ "v2_boolean.order.original_index",+ "v2_boolean.miss.continue",+ "v2_boolean.miss.continue_false_default",+ "v2_boolean.miss.return_default",+ "v2_boolean.miss.return_default_false_default",+ "v2_boolean.miss.consecutive",+ "v2_boolean.miss.exhausted",+ "v2_boolean.order.percentage_false",+ "v2_boolean.order.targeting_miss",+ "v2_boolean.miss.targeting_miss_continues",+ "v2_boolean.property.exact_case",+ "v2_boolean.property.exact_scalar",+ "v2_boolean.property.exact_false",+ "v2_boolean.property.is_not",+ "v2_boolean.property.contains",+ "v2_boolean.property.not_contains",+ "v2_boolean.property.starts",+ "v2_boolean.property.not_starts",+ "v2_boolean.property.ends",+ "v2_boolean.property.not_ends",+ "v2_boolean.property.contains_multi",+ "v2_boolean.property.not_contains_multi",+ "v2_boolean.property.greater",+ "v2_boolean.property.greater_equal",+ "v2_boolean.property.less",+ "v2_boolean.property.less_equal",+ "v2_boolean.property.regex",+ "v2_boolean.property.not_regex",+ "v2_boolean.property.not_regex_negated",+ "v2_boolean.property.regex_search",+ "v2_boolean.property.semver_eq",+ "v2_boolean.property.semver_neq",+ "v2_boolean.property.semver_gt",+ "v2_boolean.property.semver_gte",+ "v2_boolean.property.semver_lt",+ "v2_boolean.property.semver_lte",+ "v2_boolean.property.semver_tilde",+ "v2_boolean.property.semver_caret",+ "v2_boolean.property.semver_wildcard",+ "v2_boolean.property.semver_bad_subject",+ "v2_boolean.property.date_exact",+ "v2_boolean.property.date_after",+ "v2_boolean.property.date_before",+ "v2_boolean.property.date_before_negated",+ "v2_boolean.property.date_relative",+ "v2_boolean.property.relative_unsigned",+ "v2_boolean.property.relative_hours",+ "v2_boolean.property.relative_weeks",+ "v2_boolean.property.relative_year_leap_clamp",+ "v2_boolean.property.relative_month_clamp",+ "v2_boolean.property.date_epoch",+ "v2_boolean.property.date_epoch_string",+ "v2_boolean.property.date_bad_subject",+ "v2_boolean.property.legacy_exact_setting",+ "v2_boolean.property.timezone",+ "v2_boolean.property.wall_clock_no_offset",+ "v2_boolean.property.relative_dst",+ "v2_boolean.property.date_exact_same_day_miss",+ "v2_boolean.property.date_before_equal",+ "v2_boolean.property.date_after_equal",+ "v2_boolean.property.relative_dst_elapsed_miss",+ "v2_boolean.property.relative_dst_fall",+ "v2_boolean.property.relative_dst_overlap_earliest",+ "v2_boolean.property.relative_dst_overlap_later_miss",+ "v2_boolean.property.relative_dst_gap",+ "v2_boolean.property.null_is_set",+ "v2_boolean.property.missing_is_not_set",+ "v2_boolean.property.null_is_not_set",+ "v2_boolean.property.missing_exact",+ "v2_boolean.property.missing_is_not",+ "v2_boolean.property.negated_missing",+ "v2_boolean.property.negation",+ "v2_boolean.property.double_negative",+ "v2_boolean.property.negated_match",+ "v2_boolean.property.and",+ "v2_boolean.property.and_miss",+ "v2_boolean.context.partial_is_not",+ "v2_boolean.context.partial_is_not_set",+ "v2_boolean.context.partial_exact",+ "v2_boolean.context.unavailable",+ "v2_boolean.context.unneeded",+ "v2_boolean.context.partial_present",+ "v2_boolean.context.false_before_missing",+ "v2_boolean.context.missing_before_false",+ "v2_boolean.error.invalid_regex_false",+ "v2_boolean.error.invalid_regex_true",+ "v2_boolean.error.numeric",+ "v2_boolean.error.false_short_circuits",+ "v2_boolean.error.terminal_short_circuits",+ "v2_boolean.hash.ascii",+ "v2_boolean.hash.seed_parity",+ "v2_boolean.hash.empty",+ "v2_boolean.hash.empty_return_default",+ "v2_boolean.hash.ascii_200",+ "v2_boolean.hash.ascii_201",+ "v2_boolean.hash.multibyte_200",+ "v2_boolean.hash.multibyte_201",+ "v2_boolean.hash.supplementary_200",+ "v2_boolean.hash.supplementary_201",+ "v2_boolean.hash.composed",+ "v2_boolean.hash.decomposed",+ "v2_boolean.hash.zero",+ "v2_boolean.hash.full",+ "v2_boolean.hash.empty_full",+ "v2_boolean.hash.partial",+ "v2_boolean.hash.fraction",+ "v2_boolean.hash.seed_changed",+ "v2_boolean.hash.subject_changed",+ "v2_boolean.hash.renamed",+ "v2_boolean.hash.moved",+ "v2_boolean.property.long_value",+ "v2_boolean.threshold.p0_equal",+ "v2_boolean.threshold.p0_above",+ "v2_boolean.threshold.p33_33_equal",+ "v2_boolean.threshold.p33_33_below",+ "v2_boolean.threshold.p33_33_above",+ "v2_boolean.threshold.p50_equal",+ "v2_boolean.threshold.p50_below",+ "v2_boolean.threshold.p50_above",+ "v2_boolean.threshold.p100_equal",+ "v2_boolean.threshold.p100_below",+ "v2_boolean.eligibility.inactive",+ "v2_boolean.eligibility.deleted",+ "v2_boolean.eligibility.request_filtered",+ "v2_boolean.parser.malformed",+ "v2_boolean.parser.unsupported",+ "v2_boolean.error.invalid_not_regex_negated",+ "v2_boolean.target.empty_identifier"+ ]+ },+ {+ "path": "schemas/v2_value_evaluation.schema.json",+ "kind": "schema",+ "version": "1.0.0"+ },+ {+ "path": "corpus/v2_value_evaluation.json",+ "kind": "value_evaluation_corpus",+ "version": "1.0.0",+ "schema": "schemas/v2_value_evaluation.schema.json",+ "component": "v2_value_evaluation",+ "case_ids": [+ "v2_value.string.target",+ "v2_value.string.rollout_hit",+ "v2_value.string.miss_return_default",+ "v2_value.string.miss_return_default_null",+ "v2_value.string.miss_continue",+ "v2_value.string.no_match_default",+ "v2_value.string.no_match_null",+ "v2_value.string.order_first_match",+ "v2_value.string.order_targeting_miss",+ "v2_value.number.target",+ "v2_value.number.rollout_hit",+ "v2_value.number.miss_return_default",+ "v2_value.number.miss_return_default_null",+ "v2_value.number.miss_continue",+ "v2_value.number.no_match_default",+ "v2_value.number.no_match_null",+ "v2_value.number.order_first_match",+ "v2_value.number.order_targeting_miss",+ "v2_value.object.target",+ "v2_value.object.rollout_hit",+ "v2_value.object.miss_return_default",+ "v2_value.object.miss_return_default_null",+ "v2_value.object.miss_continue",+ "v2_value.object.no_match_default",+ "v2_value.object.no_match_null",+ "v2_value.object.order_first_match",+ "v2_value.object.order_targeting_miss",+ "v2_value.string.unicode",+ "v2_value.string.looks_boolean",+ "v2_value.number.zero",+ "v2_value.number.negative_decimal",+ "v2_value.number.short_decimal",+ "v2_value.number.exponent",+ "v2_value.number.max_safe_integer",+ "v2_value.number.min_safe_integer",+ "v2_value.object.empty",+ "v2_value.object.nested",+ "v2_value.object.max_depth",+ "v2_value.parser.string_empty_value",+ "v2_value.parser.string_empty_default",+ "v2_value.parser.string_value_mismatch",+ "v2_value.parser.number_value_mismatch",+ "v2_value.parser.number_default_mismatch",+ "v2_value.parser.number_above_safe_integer",+ "v2_value.parser.number_below_safe_integer",+ "v2_value.parser.object_array_value",+ "v2_value.parser.object_default_mismatch",+ "v2_value.parser.object_too_deep",+ "v2_value.parser.object_nested_number_above_safe_integer"+ ]}],"wire_contract": {- "version": "1.0.0",+ "version": "1.0.1","fixture_version": "1.0.0","published_versions_are_immutable": true,- "producer_schema_sha256": "1dd97730c746bc4534c4f47eebd82dac0cc67ceb1e4c53e7540960e7f74b00d9",+ "producer_schema_sha256": "98c1397bb7b5a1ceb3f317b34c6c57cff0ab30e94bf5945ee7b56f293536b70f","fixture_encoding": "Each case deep-copies its named template, removes the listed existing JSON Pointer members, then sets members by JSON Pointer. Set requires an existing parent. Templates and expectations are JSON, not executable SDK suites.","compatibility": "New artifacts are additive to contract 1.2.0. Published schema bytes and fixture expectations are immutable. Accepted/rejected wire-contract changes require a new major wire component version; additive cases require a new minor fixture version. Reader expectations never relax producer validation."+ },+ "v2_boolean_evaluation": {+ "version": "1.0.0",+ "config_version_locked": 2,+ "published_versions_are_immutable": true+ },+ "v2_value_evaluation": {+ "version": "1.0.0",+ "config_version_locked": 2,+ "published_versions_are_immutable": true}}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/registries/literals.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/registries/literals.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/registries/literals.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/registries/literals.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/config.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/config.schema.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/config.schema.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/config.schema.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/schemas/definitions_entry.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/definitions_entry.schema.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/schemas/definitions_entry.schema.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/definitions_entry.schema.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/flags_response_v3.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/flags_response_v3.schema.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/flags_response_v3.schema.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/flags_response_v3.schema.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/flags_response_v3_presence.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/flags_response_v3_presence.schema.jsonsimilarity index 100%rename from rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/flags_response_v3_presence.schema.jsonrename to rust/feature-flags/tests/fixtures/rules_v2_contract/schemas/flags_response_v3_presence.schema.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/README.md b/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/README.mddeleted file mode 100644index 92908f966229..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/README.md+++ /dev/null@@ -1,272 +0,0 @@-# Feature Flag Rules v2 contract--This package defines Feature Flag Rules v2 configuration, definitions, response, management diagnostic and event contracts, plus the canonical evaluation corpus.-Contract package 2.3.1 contains config schema 1.0.0, registry 2.0.0, corpus 1.1.0, wire schemas 1.0.1 with wire fixtures 1.0.0, person boolean evaluation corpus 1.0.0, and typed value evaluation corpus 1.0.0.-The contract version is independent of the test harness package version.--The package does not enable config writes or runtime evaluation.--## Terminology and OpenFeature translation--These are PostHog configuration names compatible with OpenFeature's evaluation and provider interfaces.-OpenFeature does not prescribe this configuration schema; person assignment, experiments, rule types, and variant weights are PostHog vocabulary choices.--default_value is the flag default; the caller default is supplied to the SDK accessor.-On a normal no-match result, a configured flag default of false wins over a caller default of true.-A null flag default delegates to the caller default.-On abnormal execution, OpenFeature returns the caller default regardless of the configured flag default.--Each variants[].weight is a percentage of subjects enrolled by the rule, and the weights sum to exactly 100.-The separate rollout_percentage controls enrollment into the rule.--Person flags may explicitly set assign_by to person or omit it.-Group flags declare aggregation_group_type_index (including index 0) and must omit assign_by on every rule; the schema enforces this so assignment uses the flag aggregation key.--Experiment rules require an integer experiment_id linking an Experiment row.-An experiment_id of null is invalid in this contract.-Non-experiment variant splits are reserved for a possible future extension; their evaluation reason and exposure semantics are not defined here.--rollout_miss means a terminal miss under on_rollout_miss: return_default.-A continuing miss moves evaluation to the next rule and contributes neither a reason code nor metadata from the missed rule (including rule_id and condition_index) to the final result. The final result uses the terminating rule's reason and metadata, or no_rule_match if no rule terminates.-no_rule_match means no rule produced a terminal result, including when targeting matched but rollout missed with continue.-dependency_error covers unknown, cyclic, and otherwise unresolvable dependencies.--The OpenFeature mapping also depends on the provider's evaluation-context binding.-missing_group_key maps to INVALID_CONTEXT when required group membership is missing from additional context fields, even if a person targetingKey is present.-Only a provider that binds the group key to OpenFeature targetingKey uses TARGETING_KEY_MISSING when that field is missing.-Percentage rollout inclusion maps to TARGETING_MATCH by contract choice; OpenFeature also describes pseudorandom assignment with SPLIT and permits custom reasons.--## Package contents--- schemas/config.schema.json contains the JSON Schema 2020-12 config contract.-- registries/literals.json owns shared protocol literals, semantic constraints, and the OpenFeature reason mapping.-- fixtures/config/valid contains configs that the schema must accept.-- fixtures/config/invalid contains configs that the schema must reject.-- corpus/hash_sha1_60_v1.json contains exact sha1_60_v1 vectors, white-box threshold and variant boundary vectors, and v1-to-v2 seed parity inputs.-- corpus/v1_evaluation.json contains lock-down fixtures for the frozen version 1 evaluation arm.-- corpus/legacy_projection.json records how a version 1 outcome projects into each response protocol version.-- schemas/hash_sha1_60_v1.schema.json, schemas/v1_evaluation.schema.json, and schemas/legacy_projection.schema.json are the companion schemas for the corpus files.-- corpus/v2_boolean_evaluation.json contains the person boolean evaluation corpus, and schemas/v2_boolean_evaluation.schema.json is its companion schema.-- corpus/v2_value_evaluation.json contains the string, number and object evaluation corpus with each result's legacy rendering, and schemas/v2_value_evaluation.schema.json is its companion schema.-- manifest.json assigns stable fixture and case IDs and declares the compatibility policy.-- SHA256SUMS records the SHA-256 digest for each package file except itself.--In the config and corpus schemas, objects marked with x-posthog-open-object accept arbitrary keys by design; every other object is closed.-The marker documents this choice for the contract tests; additionalProperties defines how those keys are validated.--The config schema enforces all constraints that the standard can express, including the 20-level object-value depth limit.-Depth counts object and array containers, with the returned object at level 1; scalar leaves add no level.-The registry also identifies constraints that need a semantic or parser-level validator, such as unique rule IDs and variant keys, and exact variant weight totals.--Docker releases include contracts/ directly. MANIFEST.in also includes this contract in Python source distributions for source-artifact verification.-It does not install the contract as wheel package data; consumers should pin the repository files or use the source distribution or Docker image.--## Component versions--Each artifact carries its own component version in manifest.json.-The config schema stays at 1.0.0 because contract 2.0.0 does not change its published bytes or accepted configs.-The literal registry is 2.0.0: it removes the four unused management warning codes (`EXPERIMENT_VALUE_COLLISION`, `SDK_REMOTE_FALLBACK_REQUIRED`, `SDK_EXPERIMENT_CONTEXT_MISSING`, `LEGACY_PROJECTION_LIMITED`) from the `warning_codes` published in registry 1.0.0 (contract 1.2.0), which the compatibility policy classifies as a major change; the five remaining codes are unchanged.-The corpus files and their companion schemas are corpus version 1.1.0.-Contract package 2.1.0 adds config fixtures for the targeted-release and percentage-rollout family; it changes no published schema, registry, corpus or fixture bytes.-Contract package 2.3.0 adds the typed value evaluation corpus; it also changes no published bytes.--## Corpus rules--Every corpus case has a stable ID that manifest.json declares under its file.-Adding, removing, or renaming a case requires a manifest change.--Expected values are hand-derived from the algorithm definition and the frozen version 1 evaluator.-Hash expectations were calculated with an independent SHA-1 implementation, never generated from a production evaluator.-The meta-tests recompute every hash vector, so an expectation cannot change silently.--A published corpus version is immutable.-Changing any expected value, including a hash vector, a version 1 outcome, or a projection cell, requires a new corpus version and a review explanation of why the previous expectation was wrong or superseded.-Additive cases may join a new minor corpus version; a changed expectation is a major corpus change.--Hash arithmetic is defined in corpus/hash_sha1_60_v1.json.-The contract value of hash01 converts both the 60-bit integer and the scale to binary64 before one division.-Consumers must parse decimal hash01 literals with correctly rounded binary64 conversion, including 17-digit literals.-Check the accompanying hash01_binary64_hex before consuming the corpus; a best-effort JSON float parser can otherwise move a boundary case.-Thresholds are rollout_percentage / 100 computed in binary64, and variant boundaries accumulate left to right in binary64 in stored order.--## Empty identifiers in the frozen version 1 arm--The Rust `/flags` service is the server-side version 1 reference; there is no remaining Python server-side v1 evaluator.-The frozen arm pins its behavior as verified on 2026-09-10 at [PostHog/posthog f57417de1c412fe55187540f392def4e2aef48b3](https://github.com/PostHog/posthog/blob/f57417de1c412fe55187540f392def4e2aef48b3/rust/feature-flags/src/flags/flag_matching.rs#L2160).-A deliberate change to that behavior requires a new corpus version.--Version 1 accepts an empty `distinct_id`; a missing field is invalid.-Its rollout and variant hash accessor returns 0.0 without calling SHA-1 for the empty identifier.-The inclusive rollout comparison therefore matches even at 0 percent, and a 50/50 variant split selects the first stored variant.-Holdouts do call SHA-1: the empty identifier hashes `holdout-` to 0.9268829483920294, outside a 92 percent holdout and inside a 93 percent holdout.-Version 2 never enters rollout, holdout, or variant assignment with an empty identifier.--`hash_evidence` always records SHA-1 arithmetic.-For the empty-identifier rollout and variant cases it shows the counterfactual arithmetic result; `expected` records the reference's 0.0-path outcome, and each note explains the difference.-For holdouts the recorded arithmetic is the hash the reference actually uses.--`local_evaluation` describes the local evaluator contract: `conclusive` requires the expected value, `inconclusive` requires fallback without a local value, and `remote_only` pins reference behavior that local evaluators do not yet implement; an evaluator implementing it must match.-The empty-identifier cases are `remote_only` because [posthog-python a1002c577e7c69e3f321f8f0832ee037316135a3](https://github.com/PostHog/posthog-python/blob/a1002c577e7c69e3f321f8f0832ee037316135a3/posthog/feature_flags.py#L116) hashes the prefix (plus the variant salt) locally and ignores holdouts.-Its public local-only flag API returns false at 0 and 62 percent, test for the stored control/test 50/50 split, and true for both holdout fixtures.-These are known SDK divergences, not inconclusive results or evidence of automatic fallback; the 92 percent holdout result happens to agree.--## Version and integrity policy--A published contract version is immutable.-Publish a new contract version to correct or extend a published contract.-Do not change a published version in place.--SHA256SUMS uses raw file bytes.-It has one lowercase SHA-256 digest, two spaces, a relative POSIX path, and one line feed per entry.-Entries use bytewise path order.--To pin this contract, record the source revision, the contract version, the corpus version, and the SHA-256 digest of SHA256SUMS.-Verify each file against SHA256SUMS before use.--After editing rules/response_presence.json, regenerate the derived terminal-reason branches of the presence and called-context schemas:--```sh-python3 <repo>/bin/update-feature-flag-rules-v2-presence-schemas.py-```--After editing contract files and updating manifest.json, regenerate the checksum index from any working directory:--```sh-python3 <repo>/bin/update-feature-flag-rules-v2-checksums.py-```--Run `python -m pytest tests/test_feature_flag_rules_v2_contract.py tests/test_feature_flag_rules_v2_corpus.py tests/test_feature_flag_rules_v2_wire.py` from the repository root to verify the manifest, fixtures, corpus, and checksums.---## Wire artifacts and validation boundaries--- `schemas/definitions_entry.schema.json` selects v1 for absent/1 `filters.version`, or references the frozen config schema for v2. The entry's row `version` is independent. Row `version` and `ensure_experience_continuity` retain their existing nullable types. Existing v1 filters are opaque in this schema; this package does not redefine legacy evaluation semantics.-- `schemas/definitions_v2.schema.json` describes the mixed-version definitions feed, including its required cohort map and optional boolean `minimal_flag_called_events`. Unsupported config versions or v2 semantic fields require per-flag remote fallback in auto mode and an unsupported result in strict local mode.-- `schemas/flags_response_v3.schema.json` is the exact producer schema. Its raw-byte digest is pinned in the manifest and tests. `schemas/flags_response_v3_presence.schema.json` adds the terminal-reason presence matrix from `rules/response_presence.json`. The companion also requires the failure envelope flag whenever a record failed and rejects an `experiment_id` alongside `has_experiment: false` in any record; `has_experiment: true` alone does not imply an unambiguous experiment ID. Validate against both, then check map-key equality and recursive seed absence. A schema-only success does not establish a valid producer response.-- `schemas/management_warning.schema.json` describes a diagnostic with a required warning code from the registry's five `warning_codes` and optional presentation `detail` and field `attr`. `schemas/management_error.schema.json` preserves the management validation-error envelope (`type`, `code`, `detail`, `attr`); error codes remain endpoint-owned. These artifacts do not install a warning response envelope or an acknowledgement protocol.-- `schemas/feature_flag_called_context.schema.json` and `schemas/experiment_exposure_properties.schema.json` describe **closed property projections**, not entire capture envelopes. The generic call supports v1 diagnostics and v2 terminal context. A malformed-split diagnostic may retain config version 2 and the split reason while omitting the whole rule/experiment attribution tuple; a partly populated tuple is rejected. Direct exposure requires the complete v2 experiment-split tuple, SDK origin and `locally_evaluated`, and forbids holdout and forced-variant context. Scan the full event for assignment seeds before extracting the projection; normal capture identity, library, group and optional transport properties remain outside it.-- `fixtures/wire/` contains producer fixtures, separate tolerant-reader expectations, and full-event transport examples. A case deep-copies a named template, removes existing members by JSON Pointer, and then sets members by JSON Pointer (the parent must exist). Invalid cases declare the validation layer, keyword and instance path; reader cases separately declare producer validity; optional message fragments disambiguate required fields. `schema`, `presence`, `semantic` and `seed` are fixture validation layers, not new wire error codes.--Definitions retain canonical rule and holdout assignment seeds because local evaluation needs them. Evaluation responses and events prohibit assignment seeds recursively, including inside arrays, diagnostic conditions and opaque transport objects. The response's `flags` map keys are user-defined flag names, so names such as `seed` are allowed; every record and the rest of the envelope are still scanned. Likewise, the immediate keys of an event's `$groups`, `$set` and `$set_once` maps are customer-chosen group type and person property names; their values are still scanned.--Producer and reader contracts serve different purposes. Missing split context is invalid producer output, but a reader preserves a usable value and emits no experiment exposure. Known fields with wrong JSON types produce a per-record parse error and leave siblings usable. Unknown fields are ignored. A record without `value` uses the old-server `variant ?? enabled` interpretation, config version 1, and no carried-over v2 context. Reader expectations never loosen producer validation. Reader and event fixtures are contract data; they do not run SDK execution or activate capabilities.--The first event release permits only booleans and non-empty strings in the response property. Reserved number/object response-schema cases do not enable writers or event emission. Equal-valued arms remain separate analytical identities through their variant keys. A holdout, pause, rollout miss, default, missing or failed result cannot produce a direct exposure.--Future accepted/rejected wire-contract changes require a new major wire component version and a new major package version; additive fixture cases require a new minor fixture version and a new minor package version. Wire schema `$id`s are stable URLs without embedded versions, matching the exact producer schema; the component version is carried by `manifest.json` and the checksum index, so load one package version per schema registry. A future major wire revision publishes new schema files under new paths and `$id`s rather than reusing these.--The source distribution includes every indexed artifact and the checksum utility. Verify a build against the checkout with:--```sh-uv build --sdist-python3 bin/update-feature-flag-rules-v2-checksums.py --verify-sdist dist/posthog_sdk_test_harness-<harness-version>.tar.gz-```--The verifier reads the archive without extraction, requires its checksum index to match the checkout, and checks exact file coverage and every digest against that index.--## Variant key charset correction (2.3.1)--Contract 2.3.1 corrects `metadata.variant_key` in `schemas/flags_response_v3.schema.json` and `$feature_flag_variant` in the two event schemas from `^[a-zA-Z0-9_-]+$` to any string: the PostHog API has never restricted version 1 variant keys (stored flags carry dots, slashes and spaces because variant keys double as configuration values), so the 1.0.0 pattern rejected records the server legitimately produces for config version 1. Version 2 variant keys stay constrained by `schemas/config.schema.json` at admission. The three schemas are republished under their existing `$id`s as wire schemas 1.0.1; the wire fixtures keep their published bytes and version.--## Person boolean evaluation corpus--Contract 2.2.0 adds `corpus/v2_boolean_evaluation.json` and its schema as a separate 1.0.0 component.-The frozen v1 corpus, hash/variant vectors, schemas, registry, and wire fixtures keep their published bytes and versions.--Each case supplies a full config, explicit person identifier and property completeness, team timezone, exact-matching setting, and fixed evaluation time.-The core consumes the resolved person distinct ID without device or experience-continuity overrides.-A complete property map can establish absence; a partial map cannot establish absence for an unknown key.-An unavailable map fails only when evaluation reaches a predicate.-Predicates are ANDed in stored order and short-circuit on a conclusive miss or an error.-Negation applies once to conclusive results; an absent or null `negation` means false.-Malformed regex syntax and backtracking failures are evaluation errors, including under negation; this avoids turning an invalid pattern into a successful negative match.-This is stricter than v1's invalid-pattern non-match behavior and does not change v1 expectations.-A consumer may compile patterns when it loads a config, but an invalid pattern in a predicate that evaluation never reaches is not a parse error; the error surfaces only when evaluation reaches the predicate.-Other operators reuse the existing property language, including null presence, case handling, semver normalization, and team-timezone date comparisons.--### Regex coverage--The shared regex cases use ASCII literals, `^`/`$` anchors, and ordinary capturing groups, with case-sensitive search semantics: an unanchored pattern may match a substring.-`not_regex` complements a successful search result; predicate `negation` then complements that conclusive result once more.-The unmatched `[` is a syntax error for both operators, and neither operator nor predicate negation converts that error to a match.-These cases require no lookaround, backreferences, or engine-specific extensions.-They do not define the complete regex dialect accepted by a consumer.--Actual regex execution failures must remain errors, but this language-neutral corpus does not prescribe an execution budget or require a particular pattern to exhaust it.-Engine-specific lookaround support and backtracking-limit tests belong with the implementation, where the engine and limit are known.-A passing shared corpus alone does not establish support for those extensions.--### Date comparisons--Both the person property and filter value resolve to instants before comparison, using the same `context.now` and IANA `context.timezone`.-`is_date_exact` compares instants for equality, including the time of day; it does not compare calendar dates or truncate to midnight.-`is_date_before` and `is_date_after` use strict `<` and `>` comparisons, so equality matches neither.-The `explicit_exact_matching` setting affects the separate `exact` operator, not these date operators.--- A timestamp with `Z` or an explicit offset denotes that instant regardless of the team timezone.-- A bare `YYYY-MM-DD` denotes midnight in the team timezone. A date and time without an offset denotes that wall-clock time in the team timezone.-- Numeric person properties, including numeric strings, denote Unix epoch seconds.-- Relative strings have the form `-?N[hdwmy]`, with an integer magnitude below 10,000. Both `1d` and `-1d` mean one day ago; the optional minus does not reverse the direction.-- To resolve a relative value, first convert `context.now` to the team timezone and take its local wall clock. Subtract the magnitude there: hours, days, or seven-day weeks use wall-clock arithmetic; months and years subtract one calendar month or year at a time, clamping the day to the last valid day at each step. Preserve the time of day and fractional seconds. For example, two months before March 31, 2024 is January 29, 2024 after the intermediate February clamp.-- Interpret the resulting wall clock in the team timezone, then convert it to an instant. During a fall-back overlap, choose the earlier instant. A spring-forward gap has no instant and produces a non-match. An unparseable property value also produces a non-match. Predicate negation applies afterwards to these conclusive non-matches.--For `relative_dst`, `2024-03-31T12:00:00Z` is 14:00 in Oslo. Subtracting `-1d` gives March 30 at 14:00 local, or `2024-03-30T13:00:00Z`: 23 elapsed hours earlier.-The paired miss case rejects `2024-03-30T12:00:00Z`, even though it is on the same local date and exactly 24 elapsed hours earlier.-The fall-back cases similarly distinguish a 25-hour calendar day and the two occurrences of an overlapping wall-clock time; the gap case rejects a nonexistent time.--These rules follow the reference consumer's [relative-date resolution](https://github.com/PostHog/posthog/blob/157973cc642c31bceb8fe00c566bb8aed0a3a38f/rust/feature-flags/src/properties/relative_date.rs) and [date comparisons](https://github.com/PostHog/posthog/blob/157973cc642c31bceb8fe00c566bb8aed0a3a38f/rust/feature-flags/src/properties/property_matching.rs).-The corpus uses the explicit formats above; it does not require the reference consumer's additional best-effort absolute-date formats.--### Terminal results and consumer scope--`expected` is exhaustive: compare every field and reject unexpected fields.-Success with a null value delegates to the caller default; success with false remains a configured result.-`no_rule_match` carries no rule, while terminal matches and rollout misses carry the original UUID, kind, and zero-based index.-Errors carry no successful value or rule context.-The evaluation error kinds `missing_context`, `invalid_property`, and `invalid_regex` refine the registry's `error` reason code and share its OpenFeature mapping.-Parse errors reject the document before evaluation: `malformed` for a document the config schema rejects, and `unsupported` for an unknown config version, the registry's `unknown_version_result`.-The corpus does not define a new response protocol.--Hash evidence records UTF-8 bytes, the real SHA1 digest, its first 60 bits, and binary64 hash/threshold bits.-The meta-tests independently recompute these values with Python hashlib and binary64 arithmetic.-Identifiers truncate to 200 Unicode scalar values without normalization; predicate values remain intact.-The truncation and normalization cases use thresholds that separate the correct digest from UTF-8 byte, UTF-16 code unit, NFC, and NFD mistakes.-Empty identifiers are rollout misses even at 100%, so `on_rollout_miss` decides whether evaluation continues or returns the default; nonempty 100% bypasses hashing.-At 0%, the inclusive zero-hash edge remains included.-`white_box` rows replay through a consumer's private test-only hook that passes `white_box.hash01_binary64_hex` straight into the rollout threshold comparison, skipping identifier hashing; each row records equal, below, or next-binary64-above threshold evidence.-They supplement real digest cases and must not become a public override API.--Consumers must report the `ordering`, `properties`, `context`, `errors`, `hashing`, `white_box`, `eligibility`, and `parser` families separately.-Eligibility cases run through the existing request boundary and require omission, without calling the core.-Parser cases require whole-document rejection, separately from evaluation support.-The existing published variant/experiment/holdout/group/dependency vectors remain outside this component's evaluator scope.-A passing boolean corpus does not establish those families or production reachability.--## Typed value evaluation corpus--Contract 2.3.0 adds `corpus/v2_value_evaluation.json` and its schema as a separate 1.0.0 component for string, number and object flags.-Cases use the boolean corpus case shape and context rules, and `expected` is exhaustive in the same way.-`expected.value` is the typed JSON value, or null when the result delegates to the caller default.-Compare values by JSON type as well as value: the number `1` and the boolean `true` differ.--Ordering rows repeat nine scenarios for each type: a targeted match, a 100 percent rollout hit, a 0 percent rollout miss under `return_default` with a typed and with a null default, a miss under `continue`, no rule match with a typed and with a null default, and first-match ordering with and without a targeting miss.-Rules in one config return different values, so a consumer that reports the wrong rule's value fails.-Value rows cover the value domain: non-ASCII and boolean-looking strings; zero, negative, decimal, exponent and ±(2^53 − 1) numbers; and empty, nested and 20-level objects.-Every number in a value row round-trips through binary64.-Parser rows require whole-document rejection: an empty string, a value or default of the wrong JSON type, a top-level array for an object flag, a number outside ±(2^53 − 1) at any depth, and an object deeper than 20 levels.--### Legacy rendering--Each success row carries `legacy`, the rendering of its value in the response shapes before v3:--| Value | `enabled` | `variant` | Flag map value | Payload |-| --- | --- | --- | --- | --- |-| null | false | null | false | none |-| string | true | the string | the string | none |-| number or object | true | null | true | the value |--`enabled` also decides whether the flag appears in the enabled-only `/decide` map and key list.-Zero and the empty object are values, so they render as enabled.-The payload travels as a JSON-encoded string in `metadata.payload` and `featureFlagPayloads`, like a version 1 payload, so existing payload accessors decode it.-The corpus records the decoded value because key order and number spelling in the encoded string are not canonical; decode before comparing.-A v3 record carries `expected.value` in `value`, and its `metadata.payload` stays null for config version 2, as the wire schema requires.diff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/SHA256SUMS b/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/SHA256SUMSdeleted file mode 100644index 0a047228fe87..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/SHA256SUMS+++ /dev/null@@ -1,73 +0,0 @@-5d07b6385e04a2f83856a303019e7f530de09a192084939369ac32689887412d README.md-e9bea9cff58bac0c6c1021e9c8842c53594055b6874a2c58bc4350d0c28a93ca corpus/hash_sha1_60_v1.json-536c8386eefa75721d113bd8718ddeb7fb1aad3b4f2cce1fbcf516a346a16e26 corpus/legacy_projection.json-752ff88dcb943ab1e21f9552b0c4ec606029393fca2b565b01a497da89cd8675 corpus/v1_evaluation.json-2d2a4be5f7185445f6d6593533fe105e436bade1becc3e3b15ff380a8da477bb corpus/v2_boolean_evaluation.json-aaddd05e47fc5a4ae07ea42ada5a659798f4b5fc8d0c0827f6a68e4daf68c128 corpus/v2_value_evaluation.json-52d356d2bcdcbf705b0fe2673eb147ac352bda13c9b1bc3d53c4bbb1cb01a5aa fixtures/config/invalid/assign_by_not_person.json-516e72b6bd9f761de62166457528242723694f86e417b1aee6eb37b924acc4b5 fixtures/config/invalid/default_value_type_mismatch.json-f5aa796ba2abf17ab6b2f4706c872f2b15bfa77310cdf0400a3a460db22eda41 fixtures/config/invalid/empty_seed.json-6fac810e014d81b938f66909808e2a2fc1b7cf4db5462fe6522fde1e045cbdda fixtures/config/invalid/empty_string_value.json-cbe5d7e00f3abadd490a72055e6197d511fa59f6b3f7062dbacffea426cc5360 fixtures/config/invalid/group_experiment_with_assign_by.json-82189b24744270ac2e4ad93b97efddbede530e6990d597fe80890cbd2820f70e fixtures/config/invalid/group_percentage_rollout_with_assign_by.json-f3902f40a82f5f80c88a463768b24922bb787b774cb7cd3c4e77fe0e8748e487 fixtures/config/invalid/missing_experiment_paused.json-88541b7eb14532becb477a9d62797960d8cfdc38bc101b79c5294c1e611e26ec fixtures/config/invalid/missing_on_rollout_miss.json-bfc87e05621e30ec19647c8b4dc129b02433c7f2f2e17a9c52f8bf71ad3711ea fixtures/config/invalid/missing_rollout_seed.json-3e35c5e211d8ba159824009be3ed26c4ac6f12c1426109fa1b53b49ff63fc770 fixtures/config/invalid/non_uuid_rule_id.json-de6c7a55d67adce2042d16db287dfcbe49f502d1e5e2f8e71532d0817e28e169 fixtures/config/invalid/null_experiment_id.json-ac6f0c04ffbe348a75be7249a7cce80a2ec0411954c46c142eaa3609d2842bd7 fixtures/config/invalid/null_rule_value.json-8809275942a5fb5ed548d70d819baffa84ee4ccfec7414cc93903cc79f39c550 fixtures/config/invalid/object_value_too_deep.json-b48ead6599cbb40a2a9eea606544b0ee083bb13ce768d57fc225f2da4924633a fixtures/config/invalid/return_value_type_mismatch.json-9aeefb4ab1eb4140afb213554a91a2c1c085e54cdbe47734442e65ba9a17f99c fixtures/config/invalid/rollout_percentage_above_maximum.json-dc4102374a3e075c9501f915ead07e8061d46f07293d7b71c0eaa53d4e06fbcf fixtures/config/invalid/rollout_percentage_below_minimum.json-2ca76285c4f9724603eecb980080bf7ddf0ff8dea4458eb60a2699dfad020941 fixtures/config/invalid/seed_too_long.json-7080ad218d8a04b26884aeca4828ada72a21ea8b85453a4f2ae6fafc567223be fixtures/config/invalid/targeted_release_with_rollout_fields.json-22b5201619d80be17bfb21c9a0bf93472e2231ad4a5f1c6bb8136275e64bb8a4 fixtures/config/invalid/too_few_variants.json-aacabb57255580136b8e6a984c57cea7367e59ddeffed3d4a40137b804cf4c31 fixtures/config/invalid/too_many_variants.json-a2cc3d33443fb50ca284ec0a053c1e29b5b752729808aca7f1a5d5009c3cc5cb fixtures/config/invalid/unknown_assignment_algorithm.json-68c83e9c074a0a70e7753a6e52daa414aeb18977abdd9b702ec4c5c61d82c3a4 fixtures/config/invalid/unknown_config_field.json-f5bba7fa0ea88e43834ac3b5e03ed4f7297ad0bf4ab2f09d962241521dd06787 fixtures/config/invalid/unknown_config_version.json-f13c58cc326561ee558ffd5d2e60ec26c8ba8bc5410c7310f1f820c3ff08eb25 fixtures/config/invalid/unknown_property_field.json-621727ab45d910f6c47d88da7e68ab619c38aaee6aff2abeccf1b5f413b60b75 fixtures/config/invalid/unknown_property_operator.json-06f5c1dafff26761dfe321765072161a1230e591e1e80a353e5093a8eca041bd fixtures/config/invalid/unknown_property_type.json-e1ed66e2d00c56c217af240b2cb5af3cc10d2f7f2d26299ecf998bcb73246c22 fixtures/config/invalid/unknown_rollout_miss_policy.json-8bcc957c38bb2b6a33e244ad1cfe76612cf6f4918c8f0b0cc22f86bd01cd1932 fixtures/config/invalid/unknown_rule_field.json-f5d71ea6a2ad839fb5f540c8a7f894438fe7c99f152d7469b86af83e938288db fixtures/config/invalid/variant_key_invalid_characters.json-aecfc8a8f49f1fa5586082fc4b70284a5212e14998984fc3a7bde1520b933095 fixtures/config/invalid/variant_value_type_mismatch.json-49587173259e8b379c8f473e60af7bce7a52ad8f17088068dec021c2a3f9242d fixtures/config/invalid/version_boolean.json-4835228c5a390aa2497d4df5bd62a41d775c5ff75363d2f7dca0a5eee9e77649 fixtures/config/invalid/version_string.json-bd56e3422fee0adf18ee9a4ad13ea96fe9bb4e4d11b3e9e0499e6be985b628e8 fixtures/config/valid/boolean_all_rule_types.json-ff39ff54ecdc16a52fe963b3d0e7f08b8e417567a147c7730fc932fc366944e8 fixtures/config/valid/boolean_targeted_and_percentage_rollout.json-bd163291f26d8a851d91ed8c76e4979e9af40608fe0c8a80eefa27c3cdd0f2ad fixtures/config/valid/group_all_rule_types.json-fb09e42911934248ff767dbcfe61be60fd39483972f3bb8b1f4b1a4e9e46d944 fixtures/config/valid/object_value_max_depth.json-6a3ce5d6c5522c71969f9141c5da06e0222f797a321de2c5a90c391bcb937947 fixtures/config/valid/reserved_number_value.json-316ca827654b1a5585d25c534a889e963e5c603d293e605b3902357117802d27 fixtures/config/valid/reserved_object_value.json-414987b3d374fc5fc2d912616cadce8241be9b346d66d6cf4945ca69c169354d fixtures/config/valid/string_group_assignment.json-a848ae2e3e0dd2119600bb90ebbcba59040b3bb788586ba127a57eab1848a403 fixtures/config/valid/version_float_literal.json-f18d0bdb0ae65fc6dfa5150731633fd44ca43b752257b18bf81ab876a38ea0e8 fixtures/wire/call_transport.json-e3f09c4d8b076ceae55e742de90a42ce05bc4655140e971c63d407f519efe56b fixtures/wire/calls.json-b6398336370d8807b0874229e8dc94ed1f6e686736764d56666fc48021dabf31 fixtures/wire/definitions.json-0d267173a7d9d9260d94040ff07d14e0e1c90ccad0928c1de174d37ef135bb04 fixtures/wire/definitions_feed.json-6c402eae3da68c26e1fb72c0ed5a6c12ec0fd8aa84935f319a75deeee83bdd3c fixtures/wire/errors.json-06f8b3bb27231abac4cfa65c29078f5a68afe4d4c9443dafc0b338f447838dd3 fixtures/wire/exposure_transport.json-072119b41ccfa922fc9dc96921f022ff06f2c24c2b7540de673142f11da0b084 fixtures/wire/exposures.json-07499c5a7ca7467968156ee16fa95bdeb9018c0b841c4ec8f5bffc61d72de4fa fixtures/wire/readers.json-e34659b62facbc594bdc1ce6c0f127ff25d94672da332670b383d729f45e5960 fixtures/wire/responses.json-caac24e4c78b7086e13eb15768b5fa0eca65992d0cb0b926da5aa5d167d9878b fixtures/wire/warnings.json-e1dc17a0ef7a8388c05262c1a6c388a8237f028b7942bbce9ac1a8b45fa3fb5d manifest.json-afd25df141b5e05dfa5c8848e1685a4e8b81f3c80fbafc4769c944b815356069 registries/literals.json-c62900e74546b28a29b0883f4863536846d34b19159f3a8ca8bc0914218dfaa3 rules/response_presence.json-74e43ed13dbfd578bcb8eedc5a247917788b320829b888eab84ce1126841d63b schemas/config.schema.json-6d920c77fb7f20c2031dc188d495ed28c3789b3f362334517a2e86021a226e85 schemas/definitions_entry.schema.json-f361158f8a5572feee09fd03ce8d41f31e077f6003b90f776ea2d9ed9e38dcd8 schemas/definitions_v2.schema.json-b638947b6916568bfc8549781c9663b5f4b8f9afa93096e1877b5c90892469f2 schemas/experiment_exposure_properties.schema.json-81ae96c4dd14b5cf1ae48a8cd5e8a9d86fcf990644cc2944407c694e6272af59 schemas/feature_flag_called_context.schema.json-98c1397bb7b5a1ceb3f317b34c6c57cff0ab30e94bf5945ee7b56f293536b70f schemas/flags_response_v3.schema.json-3b3fb0be1ac89524f1a65bfcde92ba34b3cdc789ebce716c3ef2ad5938d0ce62 schemas/flags_response_v3_presence.schema.json-9dbf9d76982408badc2409f390311f7150ebee4109ad11528907c55a114a1f9c schemas/hash_sha1_60_v1.schema.json-37f8f88e7ecc2337bee24972a28dbd5ff11893936732bbb34728fce143f128fc schemas/legacy_projection.schema.json-a0ec9be52e5ff9b83751283efd10ff071dc62ac90062d34b71594b37261dba8b schemas/management_error.schema.json-9aafe3c28785298bbc143e170881df43866d1b6f1070f685cbdf3d6e4418f361 schemas/management_warning.schema.json-3e51e0fad046fd9cd829d76d83b26bb6cd0b26be7a26ba223946ec92dcd7c6ce schemas/v1_evaluation.schema.json-26925201a00b4605df0475091dd292fdc8dcc3c8fb05c23fee1c29ec2aec798a schemas/v2_boolean_evaluation.schema.json-f6ec83560301643532a2f36936d0cc3b9abb873cb7edaadcf71a6ec4a559dcc3 schemas/v2_value_evaluation.schema.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/SOURCE.json b/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/SOURCE.jsondeleted file mode 100644index 5c5fb9e28427..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/SOURCE.json+++ /dev/null@@ -1,30 +0,0 @@-{- "source_repository": "https://github.com/PostHog/posthog-sdk-test-harness",- "source_revision": "e32f08bd30fab57ce543da5808a668d0fda697b0",- "release_status": "released",- "contract_version": "2.3.1",- "v2_boolean_evaluation_version": "1.0.0",- "v2_value_evaluation_version": "1.0.0",- "wire_version": "1.0.1",- "v1_corpus_version": "1.1.0",- "registry_version": "2.0.0",- "config_schema_version": "1.0.0",- "source_sha256sums_digest": "8fbf9ae84ae29ee0b09150a9c8cc378942c716a287a202d6a057131467407c6e",- "files": [- "README.md",- "manifest.json",- "registries/literals.json",- "schemas/config.schema.json",- "schemas/v2_boolean_evaluation.schema.json",- "corpus/v2_boolean_evaluation.json",- "schemas/v2_value_evaluation.schema.json",- "corpus/v2_value_evaluation.json",- "schemas/flags_response_v3.schema.json",- "schemas/flags_response_v3_presence.schema.json",- "rules/response_presence.json",- "fixtures/wire/responses.json"- ],- "vendoring_scope": "subset",- "upstream_metadata": "README.md, manifest.json, and SHA256SUMS describe the full upstream package. Only the paths in files and the source checksum index are vendored here, unchanged.",- "source_release": "1.13.1"-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/rules/response_presence.json b/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/rules/response_presence.jsondeleted file mode 100644index a76f62448c0d..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/rules/response_presence.json+++ /dev/null@@ -1,155 +0,0 @@-{- "version": "1.0.0",- "rows": [- {- "reason": "targeting_match",- "rule_type": "targeted_release",- "required": [- "rule_type",- "rule_id"- ],- "forbidden": [- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "targeting_match",- "rule_type": "percentage_rollout",- "required": [- "rule_type",- "rule_id"- ],- "forbidden": [- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "experiment_split",- "rule_type": "experiment",- "required": [- "rule_type",- "rule_id",- "experiment_id",- "variant_key"- ],- "forbidden": [- "holdout_id"- ],- "failed": false- },- {- "reason": "rollout_miss",- "rule_type": "percentage_rollout",- "required": [- "rule_type",- "rule_id"- ],- "forbidden": [- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "rollout_miss",- "rule_type": "experiment",- "required": [- "rule_type",- "rule_id",- "experiment_id"- ],- "forbidden": [- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "experiment_paused",- "rule_type": "experiment",- "required": [- "rule_type",- "rule_id",- "experiment_id"- ],- "forbidden": [- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "holdout",- "rule_type": "experiment",- "required": [- "rule_type",- "rule_id",- "experiment_id",- "holdout_id"- ],- "forbidden": [- "variant_key"- ],- "failed": false- },- {- "reason": "no_rule_match",- "rule_type": null,- "required": [],- "forbidden": [- "rule_type",- "rule_id",- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "missing_group_key",- "rule_type": null,- "required": [],- "forbidden": [- "rule_type",- "rule_id",- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": false- },- {- "reason": "dependency_error",- "rule_type": null,- "required": [],- "forbidden": [- "rule_type",- "rule_id",- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": true- },- {- "reason": "error",- "rule_type": null,- "required": [],- "forbidden": [- "rule_type",- "rule_id",- "experiment_id",- "variant_key",- "holdout_id"- ],- "failed": true- }- ]-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/v2_boolean_evaluation.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/v2_boolean_evaluation.schema.jsondeleted file mode 100644index 11fb221afb92..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/v2_boolean_evaluation.schema.json+++ /dev/null@@ -1,321 +0,0 @@-{- "$schema": "https://json-schema.org/draft/2020-12/schema",- "$id": "urn:posthog:feature-flag-rules-v2:corpus:v2_boolean_evaluation:1.0.0",- "type": "object",- "properties": {- "corpus_version": {- "const": "1.0.0"- },- "config_version": {- "const": 2- },- "description": {- "type": "string"- },- "cases": {- "type": "array",- "minItems": 1,- "items": {- "type": "object",- "properties": {- "id": {- "type": "string",- "pattern": "^v2_boolean(\\.[a-z0-9_]+)+$"- },- "family": {- "enum": [- "ordering",- "properties",- "context",- "errors",- "hashing",- "white_box",- "eligibility",- "parser"- ]- },- "flag": {- "type": "object",- "properties": {- "key": {- "type": "string"- },- "name": {- "type": "string"- },- "active": {- "type": "boolean"- },- "deleted": {- "type": "boolean"- },- "requested": {- "type": "boolean"- }- },- "required": [- "key",- "name",- "active",- "deleted",- "requested"- ],- "additionalProperties": false- },- "config": {- "type": "object",- "additionalProperties": true,- "x-posthog-open-object": "validated separately against the canonical config schema, including rejected examples"- },- "context": {- "type": "object",- "properties": {- "identifier": {- "type": "string"- },- "properties": {- "type": [- "object",- "null"- ],- "additionalProperties": true,- "x-posthog-open-object": "supplied person property values"- },- "properties_complete": {- "type": "boolean"- },- "timezone": {- "type": "string"- },- "explicit_exact_matching": {- "type": "boolean"- },- "now": {- "type": "string",- "format": "date-time"- }- },- "required": [- "identifier",- "properties",- "properties_complete",- "timezone",- "explicit_exact_matching",- "now"- ],- "additionalProperties": false- },- "expected": {- "oneOf": [- {- "type": "object",- "properties": {- "status": {- "const": "success"- },- "value": {- "type": [- "boolean",- "null"- ]- },- "reason": {- "enum": [- "targeting_match",- "rollout_miss",- "no_rule_match"- ]- },- "rule": {- "type": "object",- "properties": {- "id": {- "type": "string",- "format": "uuid"- },- "rule_type": {- "enum": [- "targeted_release",- "percentage_rollout"- ]- },- "index": {- "type": "integer",- "minimum": 0- }- },- "required": [- "id",- "rule_type",- "index"- ],- "additionalProperties": false- }- },- "required": [- "status",- "value",- "reason"- ],- "if": {- "properties": {- "reason": {- "const": "no_rule_match"- }- }- },- "then": {- "not": {- "required": [- "rule"- ]- }- },- "else": {- "required": [- "rule"- ]- },- "additionalProperties": false- },- {- "type": "object",- "properties": {- "status": {- "const": "error"- },- "error": {- "enum": [- "missing_context",- "invalid_property",- "invalid_regex"- ]- }- },- "required": [- "status",- "error"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "status": {- "const": "parse_error"- },- "kind": {- "enum": [- "malformed",- "unsupported"- ]- }- },- "required": [- "status",- "kind"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "status": {- "const": "omitted"- }- },- "required": [- "status"- ],- "additionalProperties": false- }- ]- },- "hash_evidence": {- "type": "object",- "properties": {- "identifier": {- "type": "string"- },- "input_utf8_hex": {- "type": "string"- },- "sha1_hex": {- "type": "string",- "pattern": "^[0-9a-f]{40}$"- },- "first_15_hex": {- "type": "string",- "pattern": "^[0-9a-f]{15}$"- },- "n": {- "type": "string",- "pattern": "^[0-9]+$"- },- "hash01_binary64_hex": {- "type": "string",- "pattern": "^[0-9a-f]{16}$"- },- "threshold_binary64_hex": {- "type": "string",- "pattern": "^[0-9a-f]{16}$"- }- },- "required": [- "identifier",- "input_utf8_hex",- "sha1_hex",- "first_15_hex",- "n",- "hash01_binary64_hex",- "threshold_binary64_hex"- ],- "additionalProperties": false- },- "white_box": {- "type": "object",- "properties": {- "hash01_binary64_hex": {- "type": "string",- "pattern": "^[0-9a-f]{16}$"- },- "threshold_binary64_hex": {- "type": "string",- "pattern": "^[0-9a-f]{16}$"- },- "relation": {- "enum": [- "equal",- "below",- "above"- ]- }- },- "required": [- "hash01_binary64_hex",- "threshold_binary64_hex",- "relation"- ],- "additionalProperties": false- }- },- "required": [- "id",- "family",- "flag",- "config",- "context",- "expected"- ],- "additionalProperties": false- }- }- },- "required": [- "corpus_version",- "config_version",- "description",- "cases"- ],- "additionalProperties": false-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/v2_value_evaluation.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/v2_value_evaluation.schema.jsondeleted file mode 100644index 5225c84c6880..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_evaluation/2.3.1/schemas/v2_value_evaluation.schema.json+++ /dev/null@@ -1,290 +0,0 @@-{- "$schema": "https://json-schema.org/draft/2020-12/schema",- "$id": "urn:posthog:feature-flag-rules-v2:corpus:v2_value_evaluation:1.0.0",- "type": "object",- "properties": {- "corpus_version": {- "const": "1.0.0"- },- "config_version": {- "const": 2- },- "description": {- "type": "string"- },- "cases": {- "type": "array",- "minItems": 1,- "items": {- "type": "object",- "properties": {- "id": {- "type": "string",- "pattern": "^v2_value(\\.[a-z0-9_]+)+$"- },- "family": {- "enum": [- "ordering",- "values",- "parser"- ]- },- "flag": {- "type": "object",- "properties": {- "key": {- "type": "string"- },- "name": {- "type": "string"- },- "active": {- "const": true- },- "deleted": {- "const": false- },- "requested": {- "const": true- }- },- "required": [- "key",- "name",- "active",- "deleted",- "requested"- ],- "additionalProperties": false- },- "config": {- "type": "object",- "properties": {- "return_type": {- "enum": [- "string",- "number",- "object"- ]- }- },- "required": [- "return_type"- ],- "additionalProperties": true,- "x-posthog-open-object": "validated separately against the canonical config schema, including rejected examples"- },- "context": {- "type": "object",- "properties": {- "identifier": {- "type": "string",- "minLength": 1- },- "properties": {- "type": "object",- "additionalProperties": true,- "x-posthog-open-object": "supplied person property values"- },- "properties_complete": {- "const": true- },- "timezone": {- "type": "string"- },- "explicit_exact_matching": {- "type": "boolean"- },- "now": {- "type": "string",- "format": "date-time"- }- },- "required": [- "identifier",- "properties",- "properties_complete",- "timezone",- "explicit_exact_matching",- "now"- ],- "additionalProperties": false- },- "expected": {- "oneOf": [- {- "type": "object",- "properties": {- "status": {- "const": "success"- },- "value": {- "type": [- "string",- "number",- "object",- "null"- ]- },- "reason": {- "enum": [- "targeting_match",- "rollout_miss",- "no_rule_match"- ]- },- "rule": {- "type": "object",- "properties": {- "id": {- "type": "string",- "format": "uuid"- },- "rule_type": {- "enum": [- "targeted_release",- "percentage_rollout"- ]- },- "index": {- "type": "integer",- "minimum": 0- }- },- "required": [- "id",- "rule_type",- "index"- ],- "additionalProperties": false- }- },- "required": [- "status",- "value",- "reason"- ],- "if": {- "properties": {- "reason": {- "const": "no_rule_match"- }- }- },- "then": {- "not": {- "required": [- "rule"- ]- }- },- "else": {- "required": [- "rule"- ]- },- "additionalProperties": false- },- {- "type": "object",- "properties": {- "status": {- "const": "parse_error"- },- "kind": {- "const": "malformed"- }- },- "required": [- "status",- "kind"- ],- "additionalProperties": false- }- ]- },- "legacy": {- "type": "object",- "description": "Legacy rendering of expected.value. enabled is the detailed record's enabled field and decides inclusion in the enabled-only maps and lists; variant is the detailed record's variant; value is the flag map entry; payload is the decoded JSON-encoded payload string, or null for no payload.",- "properties": {- "enabled": {- "type": "boolean"- },- "variant": {- "type": [- "string",- "null"- ],- "minLength": 1- },- "value": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "string",- "minLength": 1- }- ]- },- "payload": {- "type": [- "number",- "object",- "null"- ]- }- },- "required": [- "enabled",- "variant",- "value",- "payload"- ],- "additionalProperties": false- }- },- "required": [- "id",- "family",- "flag",- "config",- "context",- "expected"- ],- "if": {- "properties": {- "expected": {- "properties": {- "status": {- "const": "success"- }- }- }- }- },- "then": {- "required": [- "legacy"- ]- },- "else": {- "not": {- "required": [- "legacy"- ]- }- },- "additionalProperties": false- }- }- },- "required": [- "corpus_version",- "config_version",- "description",- "cases"- ],- "additionalProperties": false-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/README.md b/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/README.mddeleted file mode 100644index dbfe6569a055..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/README.md+++ /dev/null@@ -1,163 +0,0 @@-# Feature Flag Rules v2 contract--This package defines Feature Flag Rules v2 configuration, definitions, response, management diagnostic and event contracts, plus the canonical evaluation corpus.-Contract package 2.1.0 contains config schema 1.0.0, registry 2.0.0, corpus 1.1.0, and wire schemas/fixtures 1.0.0.-The contract version is independent of the test harness package version.--The package does not enable config writes or runtime evaluation.-It reserves number and object values for later writer support.--## Terminology and OpenFeature translation--These are PostHog configuration names compatible with OpenFeature's evaluation and provider interfaces.-OpenFeature does not prescribe this configuration schema; person assignment, experiments, rule types, and variant weights are PostHog vocabulary choices.--default_value is the flag default; the caller default is supplied to the SDK accessor.-On a normal no-match result, a configured flag default of false wins over a caller default of true.-A null flag default delegates to the caller default.-On abnormal execution, OpenFeature returns the caller default regardless of the configured flag default.--Each variants[].weight is a percentage of subjects enrolled by the rule, and the weights sum to exactly 100.-The separate rollout_percentage controls enrollment into the rule.--Person flags may explicitly set assign_by to person or omit it.-Group flags declare aggregation_group_type_index (including index 0) and must omit assign_by on every rule; the schema enforces this so assignment uses the flag aggregation key.--Experiment rules require an integer experiment_id linking an Experiment row.-An experiment_id of null is invalid in this contract.-Non-experiment variant splits are reserved for a possible future extension; their evaluation reason and exposure semantics are not defined here.--rollout_miss means a terminal miss under on_rollout_miss: return_default.-A continuing miss moves evaluation to the next rule and contributes neither a reason code nor metadata from the missed rule (including rule_id and condition_index) to the final result. The final result uses the terminating rule's reason and metadata, or no_rule_match if no rule terminates.-no_rule_match means no rule produced a terminal result, including when targeting matched but rollout missed with continue.-dependency_error covers unknown, cyclic, and otherwise unresolvable dependencies.--The OpenFeature mapping also depends on the provider's evaluation-context binding.-missing_group_key maps to INVALID_CONTEXT when required group membership is missing from additional context fields, even if a person targetingKey is present.-Only a provider that binds the group key to OpenFeature targetingKey uses TARGETING_KEY_MISSING when that field is missing.-Percentage rollout inclusion maps to TARGETING_MATCH by contract choice; OpenFeature also describes pseudorandom assignment with SPLIT and permits custom reasons.--## Package contents--- schemas/config.schema.json contains the JSON Schema 2020-12 config contract.-- registries/literals.json owns shared protocol literals, semantic constraints, and the OpenFeature reason mapping.-- fixtures/config/valid contains configs that the schema must accept.-- fixtures/config/invalid contains configs that the schema must reject.-- corpus/hash_sha1_60_v1.json contains exact sha1_60_v1 vectors, white-box threshold and variant boundary vectors, and v1-to-v2 seed parity inputs.-- corpus/v1_evaluation.json contains lock-down fixtures for the frozen version 1 evaluation arm.-- corpus/legacy_projection.json records how a version 1 outcome projects into each response protocol version.-- schemas/hash_sha1_60_v1.schema.json, schemas/v1_evaluation.schema.json, and schemas/legacy_projection.schema.json are the companion schemas for the corpus files.-- manifest.json assigns stable fixture and case IDs and declares the compatibility policy.-- SHA256SUMS records the SHA-256 digest for each package file except itself.--In the config and corpus schemas, objects marked with x-posthog-open-object accept arbitrary keys by design; every other object is closed.-The marker documents this choice for the contract tests; additionalProperties defines how those keys are validated.--The config schema enforces all constraints that the standard can express, including the 20-level object-value depth limit.-Depth counts object and array containers, with the returned object at level 1; scalar leaves add no level.-The registry also identifies constraints that need a semantic or parser-level validator, such as unique rule IDs and variant keys, and exact variant weight totals.--Docker releases include contracts/ directly. MANIFEST.in also includes this contract in Python source distributions for source-artifact verification.-It does not install the contract as wheel package data; consumers should pin the repository files or use the source distribution or Docker image.--## Component versions--Each artifact carries its own component version in manifest.json.-The config schema stays at 1.0.0 because contract 2.0.0 does not change its published bytes or accepted configs.-The literal registry is 2.0.0: it removes the four unused management warning codes (`EXPERIMENT_VALUE_COLLISION`, `SDK_REMOTE_FALLBACK_REQUIRED`, `SDK_EXPERIMENT_CONTEXT_MISSING`, `LEGACY_PROJECTION_LIMITED`) from the `warning_codes` published in registry 1.0.0 (contract 1.2.0), which the compatibility policy classifies as a major change; the five remaining codes are unchanged.-The corpus files and their companion schemas are corpus version 1.1.0.-Contract package 2.1.0 adds config fixtures for the targeted-release and percentage-rollout family; it changes no published schema, registry, corpus or fixture bytes.--## Corpus rules--Every corpus case has a stable ID that manifest.json declares under its file.-Adding, removing, or renaming a case requires a manifest change.--Expected values are hand-derived from the algorithm definition and the frozen version 1 evaluator.-Hash expectations were calculated with an independent SHA-1 implementation, never generated from a production evaluator.-The meta-tests recompute every hash vector, so an expectation cannot change silently.--A published corpus version is immutable.-Changing any expected value, including a hash vector, a version 1 outcome, or a projection cell, requires a new corpus version and a review explanation of why the previous expectation was wrong or superseded.-Additive cases may join a new minor corpus version; a changed expectation is a major corpus change.--Hash arithmetic is defined in corpus/hash_sha1_60_v1.json.-The contract value of hash01 converts both the 60-bit integer and the scale to binary64 before one division.-Consumers must parse decimal hash01 literals with correctly rounded binary64 conversion, including 17-digit literals.-Check the accompanying hash01_binary64_hex before consuming the corpus; a best-effort JSON float parser can otherwise move a boundary case.-Thresholds are rollout_percentage / 100 computed in binary64, and variant boundaries accumulate left to right in binary64 in stored order.--## Empty identifiers in the frozen version 1 arm--The Rust `/flags` service is the server-side version 1 reference; there is no remaining Python server-side v1 evaluator.-The frozen arm pins its behavior as verified on 2026-09-10 at [PostHog/posthog f57417de1c412fe55187540f392def4e2aef48b3](https://github.com/PostHog/posthog/blob/f57417de1c412fe55187540f392def4e2aef48b3/rust/feature-flags/src/flags/flag_matching.rs#L2160).-A deliberate change to that behavior requires a new corpus version.--Version 1 accepts an empty `distinct_id`; a missing field is invalid.-Its rollout and variant hash accessor returns 0.0 without calling SHA-1 for the empty identifier.-The inclusive rollout comparison therefore matches even at 0 percent, and a 50/50 variant split selects the first stored variant.-Holdouts do call SHA-1: the empty identifier hashes `holdout-` to 0.9268829483920294, outside a 92 percent holdout and inside a 93 percent holdout.-Version 2 never enters rollout, holdout, or variant assignment with an empty identifier.--`hash_evidence` always records SHA-1 arithmetic.-For the empty-identifier rollout and variant cases it shows the counterfactual arithmetic result; `expected` records the reference's 0.0-path outcome, and each note explains the difference.-For holdouts the recorded arithmetic is the hash the reference actually uses.--`local_evaluation` describes the local evaluator contract: `conclusive` requires the expected value, `inconclusive` requires fallback without a local value, and `remote_only` pins reference behavior that local evaluators do not yet implement; an evaluator implementing it must match.-The empty-identifier cases are `remote_only` because [posthog-python a1002c577e7c69e3f321f8f0832ee037316135a3](https://github.com/PostHog/posthog-python/blob/a1002c577e7c69e3f321f8f0832ee037316135a3/posthog/feature_flags.py#L116) hashes the prefix (plus the variant salt) locally and ignores holdouts.-Its public local-only flag API returns false at 0 and 62 percent, test for the stored control/test 50/50 split, and true for both holdout fixtures.-These are known SDK divergences, not inconclusive results or evidence of automatic fallback; the 92 percent holdout result happens to agree.--## Version and integrity policy--A published contract version is immutable.-Publish a new contract version to correct or extend a published contract.-Do not change a published version in place.--SHA256SUMS uses raw file bytes.-It has one lowercase SHA-256 digest, two spaces, a relative POSIX path, and one line feed per entry.-Entries use bytewise path order.--To pin this contract, record the source revision, the contract version, the corpus version, and the SHA-256 digest of SHA256SUMS.-Verify each file against SHA256SUMS before use.--After editing rules/response_presence.json, regenerate the derived terminal-reason branches of the presence and called-context schemas:--```sh-python3 <repo>/bin/update-feature-flag-rules-v2-presence-schemas.py-```--After editing contract files and updating manifest.json, regenerate the checksum index from any working directory:--```sh-python3 <repo>/bin/update-feature-flag-rules-v2-checksums.py-```--Run `python -m pytest tests/test_feature_flag_rules_v2_contract.py tests/test_feature_flag_rules_v2_corpus.py tests/test_feature_flag_rules_v2_wire.py` from the repository root to verify the manifest, fixtures, corpus, and checksums.---## Wire artifacts and validation boundaries--- `schemas/definitions_entry.schema.json` selects v1 for absent/1 `filters.version`, or references the frozen config schema for v2. The entry's row `version` is independent. Row `version` and `ensure_experience_continuity` retain their existing nullable types. Existing v1 filters are opaque in this schema; this package does not redefine legacy evaluation semantics.-- `schemas/definitions_v2.schema.json` describes the mixed-version definitions feed, including its required cohort map and optional boolean `minimal_flag_called_events`. Unsupported config versions or v2 semantic fields require per-flag remote fallback in auto mode and an unsupported result in strict local mode.-- `schemas/flags_response_v3.schema.json` is the exact producer schema. Its raw-byte digest is pinned in the manifest and tests. `schemas/flags_response_v3_presence.schema.json` adds the terminal-reason presence matrix from `rules/response_presence.json`. The companion also requires the failure envelope flag whenever a record failed and rejects an `experiment_id` alongside `has_experiment: false` in any record; `has_experiment: true` alone does not imply an unambiguous experiment ID. Validate against both, then check map-key equality and recursive seed absence. A schema-only success does not establish a valid producer response.-- `schemas/management_warning.schema.json` describes a diagnostic with a required warning code from the registry's five `warning_codes` and optional presentation `detail` and field `attr`. `schemas/management_error.schema.json` preserves the management validation-error envelope (`type`, `code`, `detail`, `attr`); error codes remain endpoint-owned. These artifacts do not install a warning response envelope or an acknowledgement protocol.-- `schemas/feature_flag_called_context.schema.json` and `schemas/experiment_exposure_properties.schema.json` describe **closed property projections**, not entire capture envelopes. The generic call supports v1 diagnostics and v2 terminal context. A malformed-split diagnostic may retain config version 2 and the split reason while omitting the whole rule/experiment attribution tuple; a partly populated tuple is rejected. Direct exposure requires the complete v2 experiment-split tuple, SDK origin and `locally_evaluated`, and forbids holdout and forced-variant context. Scan the full event for assignment seeds before extracting the projection; normal capture identity, library, group and optional transport properties remain outside it.-- `fixtures/wire/` contains producer fixtures, separate tolerant-reader expectations, and full-event transport examples. A case deep-copies a named template, removes existing members by JSON Pointer, and then sets members by JSON Pointer (the parent must exist). Invalid cases declare the validation layer, keyword and instance path; reader cases separately declare producer validity; optional message fragments disambiguate required fields. `schema`, `presence`, `semantic` and `seed` are fixture validation layers, not new wire error codes.--Definitions retain canonical rule and holdout assignment seeds because local evaluation needs them. Evaluation responses and events prohibit assignment seeds recursively, including inside arrays, diagnostic conditions and opaque transport objects. The response's `flags` map keys are user-defined flag names, so names such as `seed` are allowed; every record and the rest of the envelope are still scanned. Likewise, the immediate keys of an event's `$groups`, `$set` and `$set_once` maps are customer-chosen group type and person property names; their values are still scanned.--Producer and reader contracts serve different purposes. Missing split context is invalid producer output, but a reader preserves a usable value and emits no experiment exposure. Known fields with wrong JSON types produce a per-record parse error and leave siblings usable. Unknown fields are ignored. A record without `value` uses the old-server `variant ?? enabled` interpretation, config version 1, and no carried-over v2 context. Reader expectations never loosen producer validation. Reader and event fixtures are contract data; they do not run SDK execution or activate capabilities.--The first event release permits only booleans and non-empty strings in the response property. Reserved number/object response-schema cases do not enable writers or event emission. Equal-valued arms remain separate analytical identities through their variant keys. A holdout, pause, rollout miss, default, missing or failed result cannot produce a direct exposure.--Future accepted/rejected wire-contract changes require a new major wire component version and a new major package version; additive fixture cases require a new minor fixture version and a new minor package version. Wire schema `$id`s are stable URLs without embedded versions, matching the exact producer schema; the component version is carried by `manifest.json` and the checksum index, so load one package version per schema registry. A future major wire revision publishes new schema files under new paths and `$id`s rather than reusing these.--The source distribution includes every indexed artifact and the checksum utility. Verify a build against the checkout with:--```sh-uv build --sdist-python3 bin/update-feature-flag-rules-v2-checksums.py --verify-sdist dist/posthog_sdk_test_harness-<harness-version>.tar.gz-```--The verifier reads the archive without extraction, requires its checksum index to match the checkout, and checks exact file coverage and every digest against that index.diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/SHA256SUMS b/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/SHA256SUMSdeleted file mode 100644index f60e71085715..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/SHA256SUMS+++ /dev/null@@ -1,69 +0,0 @@-e95b63c14f4af2abce2f9906aaaf28c5174759ce657eaa27ea8374f1d966fa54 README.md-e9bea9cff58bac0c6c1021e9c8842c53594055b6874a2c58bc4350d0c28a93ca corpus/hash_sha1_60_v1.json-536c8386eefa75721d113bd8718ddeb7fb1aad3b4f2cce1fbcf516a346a16e26 corpus/legacy_projection.json-752ff88dcb943ab1e21f9552b0c4ec606029393fca2b565b01a497da89cd8675 corpus/v1_evaluation.json-52d356d2bcdcbf705b0fe2673eb147ac352bda13c9b1bc3d53c4bbb1cb01a5aa fixtures/config/invalid/assign_by_not_person.json-516e72b6bd9f761de62166457528242723694f86e417b1aee6eb37b924acc4b5 fixtures/config/invalid/default_value_type_mismatch.json-f5aa796ba2abf17ab6b2f4706c872f2b15bfa77310cdf0400a3a460db22eda41 fixtures/config/invalid/empty_seed.json-6fac810e014d81b938f66909808e2a2fc1b7cf4db5462fe6522fde1e045cbdda fixtures/config/invalid/empty_string_value.json-cbe5d7e00f3abadd490a72055e6197d511fa59f6b3f7062dbacffea426cc5360 fixtures/config/invalid/group_experiment_with_assign_by.json-82189b24744270ac2e4ad93b97efddbede530e6990d597fe80890cbd2820f70e fixtures/config/invalid/group_percentage_rollout_with_assign_by.json-f3902f40a82f5f80c88a463768b24922bb787b774cb7cd3c4e77fe0e8748e487 fixtures/config/invalid/missing_experiment_paused.json-88541b7eb14532becb477a9d62797960d8cfdc38bc101b79c5294c1e611e26ec fixtures/config/invalid/missing_on_rollout_miss.json-bfc87e05621e30ec19647c8b4dc129b02433c7f2f2e17a9c52f8bf71ad3711ea fixtures/config/invalid/missing_rollout_seed.json-3e35c5e211d8ba159824009be3ed26c4ac6f12c1426109fa1b53b49ff63fc770 fixtures/config/invalid/non_uuid_rule_id.json-de6c7a55d67adce2042d16db287dfcbe49f502d1e5e2f8e71532d0817e28e169 fixtures/config/invalid/null_experiment_id.json-ac6f0c04ffbe348a75be7249a7cce80a2ec0411954c46c142eaa3609d2842bd7 fixtures/config/invalid/null_rule_value.json-8809275942a5fb5ed548d70d819baffa84ee4ccfec7414cc93903cc79f39c550 fixtures/config/invalid/object_value_too_deep.json-b48ead6599cbb40a2a9eea606544b0ee083bb13ce768d57fc225f2da4924633a fixtures/config/invalid/return_value_type_mismatch.json-9aeefb4ab1eb4140afb213554a91a2c1c085e54cdbe47734442e65ba9a17f99c fixtures/config/invalid/rollout_percentage_above_maximum.json-dc4102374a3e075c9501f915ead07e8061d46f07293d7b71c0eaa53d4e06fbcf fixtures/config/invalid/rollout_percentage_below_minimum.json-2ca76285c4f9724603eecb980080bf7ddf0ff8dea4458eb60a2699dfad020941 fixtures/config/invalid/seed_too_long.json-7080ad218d8a04b26884aeca4828ada72a21ea8b85453a4f2ae6fafc567223be fixtures/config/invalid/targeted_release_with_rollout_fields.json-22b5201619d80be17bfb21c9a0bf93472e2231ad4a5f1c6bb8136275e64bb8a4 fixtures/config/invalid/too_few_variants.json-aacabb57255580136b8e6a984c57cea7367e59ddeffed3d4a40137b804cf4c31 fixtures/config/invalid/too_many_variants.json-a2cc3d33443fb50ca284ec0a053c1e29b5b752729808aca7f1a5d5009c3cc5cb fixtures/config/invalid/unknown_assignment_algorithm.json-68c83e9c074a0a70e7753a6e52daa414aeb18977abdd9b702ec4c5c61d82c3a4 fixtures/config/invalid/unknown_config_field.json-f5bba7fa0ea88e43834ac3b5e03ed4f7297ad0bf4ab2f09d962241521dd06787 fixtures/config/invalid/unknown_config_version.json-f13c58cc326561ee558ffd5d2e60ec26c8ba8bc5410c7310f1f820c3ff08eb25 fixtures/config/invalid/unknown_property_field.json-621727ab45d910f6c47d88da7e68ab619c38aaee6aff2abeccf1b5f413b60b75 fixtures/config/invalid/unknown_property_operator.json-06f5c1dafff26761dfe321765072161a1230e591e1e80a353e5093a8eca041bd fixtures/config/invalid/unknown_property_type.json-e1ed66e2d00c56c217af240b2cb5af3cc10d2f7f2d26299ecf998bcb73246c22 fixtures/config/invalid/unknown_rollout_miss_policy.json-8bcc957c38bb2b6a33e244ad1cfe76612cf6f4918c8f0b0cc22f86bd01cd1932 fixtures/config/invalid/unknown_rule_field.json-f5d71ea6a2ad839fb5f540c8a7f894438fe7c99f152d7469b86af83e938288db fixtures/config/invalid/variant_key_invalid_characters.json-aecfc8a8f49f1fa5586082fc4b70284a5212e14998984fc3a7bde1520b933095 fixtures/config/invalid/variant_value_type_mismatch.json-49587173259e8b379c8f473e60af7bce7a52ad8f17088068dec021c2a3f9242d fixtures/config/invalid/version_boolean.json-4835228c5a390aa2497d4df5bd62a41d775c5ff75363d2f7dca0a5eee9e77649 fixtures/config/invalid/version_string.json-bd56e3422fee0adf18ee9a4ad13ea96fe9bb4e4d11b3e9e0499e6be985b628e8 fixtures/config/valid/boolean_all_rule_types.json-ff39ff54ecdc16a52fe963b3d0e7f08b8e417567a147c7730fc932fc366944e8 fixtures/config/valid/boolean_targeted_and_percentage_rollout.json-bd163291f26d8a851d91ed8c76e4979e9af40608fe0c8a80eefa27c3cdd0f2ad fixtures/config/valid/group_all_rule_types.json-fb09e42911934248ff767dbcfe61be60fd39483972f3bb8b1f4b1a4e9e46d944 fixtures/config/valid/object_value_max_depth.json-6a3ce5d6c5522c71969f9141c5da06e0222f797a321de2c5a90c391bcb937947 fixtures/config/valid/reserved_number_value.json-316ca827654b1a5585d25c534a889e963e5c603d293e605b3902357117802d27 fixtures/config/valid/reserved_object_value.json-414987b3d374fc5fc2d912616cadce8241be9b346d66d6cf4945ca69c169354d fixtures/config/valid/string_group_assignment.json-a848ae2e3e0dd2119600bb90ebbcba59040b3bb788586ba127a57eab1848a403 fixtures/config/valid/version_float_literal.json-f18d0bdb0ae65fc6dfa5150731633fd44ca43b752257b18bf81ab876a38ea0e8 fixtures/wire/call_transport.json-e3f09c4d8b076ceae55e742de90a42ce05bc4655140e971c63d407f519efe56b fixtures/wire/calls.json-b6398336370d8807b0874229e8dc94ed1f6e686736764d56666fc48021dabf31 fixtures/wire/definitions.json-0d267173a7d9d9260d94040ff07d14e0e1c90ccad0928c1de174d37ef135bb04 fixtures/wire/definitions_feed.json-6c402eae3da68c26e1fb72c0ed5a6c12ec0fd8aa84935f319a75deeee83bdd3c fixtures/wire/errors.json-06f8b3bb27231abac4cfa65c29078f5a68afe4d4c9443dafc0b338f447838dd3 fixtures/wire/exposure_transport.json-072119b41ccfa922fc9dc96921f022ff06f2c24c2b7540de673142f11da0b084 fixtures/wire/exposures.json-07499c5a7ca7467968156ee16fa95bdeb9018c0b841c4ec8f5bffc61d72de4fa fixtures/wire/readers.json-e34659b62facbc594bdc1ce6c0f127ff25d94672da332670b383d729f45e5960 fixtures/wire/responses.json-caac24e4c78b7086e13eb15768b5fa0eca65992d0cb0b926da5aa5d167d9878b fixtures/wire/warnings.json-cfca35316b4333f0eb1bf462eb8afa7110eb3391081c43447351acebc50f3485 manifest.json-afd25df141b5e05dfa5c8848e1685a4e8b81f3c80fbafc4769c944b815356069 registries/literals.json-c62900e74546b28a29b0883f4863536846d34b19159f3a8ca8bc0914218dfaa3 rules/response_presence.json-74e43ed13dbfd578bcb8eedc5a247917788b320829b888eab84ce1126841d63b schemas/config.schema.json-6d920c77fb7f20c2031dc188d495ed28c3789b3f362334517a2e86021a226e85 schemas/definitions_entry.schema.json-f361158f8a5572feee09fd03ce8d41f31e077f6003b90f776ea2d9ed9e38dcd8 schemas/definitions_v2.schema.json-524a2a0cc43e7907598ca49c98209c116ac65ba8ba5c16a54e1c8a4629fd3a2c schemas/experiment_exposure_properties.schema.json-b26db1aaf9e03764124286e3d9bc0cb263f4521de47e42793560558750c99f3b schemas/feature_flag_called_context.schema.json-1dd97730c746bc4534c4f47eebd82dac0cc67ceb1e4c53e7540960e7f74b00d9 schemas/flags_response_v3.schema.json-3b3fb0be1ac89524f1a65bfcde92ba34b3cdc789ebce716c3ef2ad5938d0ce62 schemas/flags_response_v3_presence.schema.json-9dbf9d76982408badc2409f390311f7150ebee4109ad11528907c55a114a1f9c schemas/hash_sha1_60_v1.schema.json-37f8f88e7ecc2337bee24972a28dbd5ff11893936732bbb34728fce143f128fc schemas/legacy_projection.schema.json-a0ec9be52e5ff9b83751283efd10ff071dc62ac90062d34b71594b37261dba8b schemas/management_error.schema.json-9aafe3c28785298bbc143e170881df43866d1b6f1070f685cbdf3d6e4418f361 schemas/management_warning.schema.json-3e51e0fad046fd9cd829d76d83b26bb6cd0b26be7a26ba223946ec92dcd7c6ce schemas/v1_evaluation.schema.jsondiff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/SOURCE.json b/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/SOURCE.jsondeleted file mode 100644index 052f5dcb666b..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/SOURCE.json+++ /dev/null@@ -1,58 +0,0 @@-{- "source_revision": "c32f4959240967f1ee89e58490fc9d3beaa1401f",- "contract_version": "2.1.0",- "registry_version": "2.0.0",- "config_schema_version": "1.0.0",- "definitions_schema_version": "1.0.0",- "files": [- "README.md",- "fixtures/config/invalid/assign_by_not_person.json",- "fixtures/config/invalid/default_value_type_mismatch.json",- "fixtures/config/invalid/empty_seed.json",- "fixtures/config/invalid/empty_string_value.json",- "fixtures/config/invalid/group_experiment_with_assign_by.json",- "fixtures/config/invalid/group_percentage_rollout_with_assign_by.json",- "fixtures/config/invalid/missing_experiment_paused.json",- "fixtures/config/invalid/missing_on_rollout_miss.json",- "fixtures/config/invalid/missing_rollout_seed.json",- "fixtures/config/invalid/non_uuid_rule_id.json",- "fixtures/config/invalid/null_experiment_id.json",- "fixtures/config/invalid/null_rule_value.json",- "fixtures/config/invalid/object_value_too_deep.json",- "fixtures/config/invalid/return_value_type_mismatch.json",- "fixtures/config/invalid/rollout_percentage_above_maximum.json",- "fixtures/config/invalid/rollout_percentage_below_minimum.json",- "fixtures/config/invalid/seed_too_long.json",- "fixtures/config/invalid/targeted_release_with_rollout_fields.json",- "fixtures/config/invalid/too_few_variants.json",- "fixtures/config/invalid/too_many_variants.json",- "fixtures/config/invalid/unknown_assignment_algorithm.json",- "fixtures/config/invalid/unknown_config_field.json",- "fixtures/config/invalid/unknown_config_version.json",- "fixtures/config/invalid/unknown_property_field.json",- "fixtures/config/invalid/unknown_property_operator.json",- "fixtures/config/invalid/unknown_property_type.json",- "fixtures/config/invalid/unknown_rollout_miss_policy.json",- "fixtures/config/invalid/unknown_rule_field.json",- "fixtures/config/invalid/variant_key_invalid_characters.json",- "fixtures/config/invalid/variant_value_type_mismatch.json",- "fixtures/config/invalid/version_boolean.json",- "fixtures/config/invalid/version_string.json",- "fixtures/config/valid/boolean_all_rule_types.json",- "fixtures/config/valid/boolean_targeted_and_percentage_rollout.json",- "fixtures/config/valid/group_all_rule_types.json",- "fixtures/config/valid/object_value_max_depth.json",- "fixtures/config/valid/reserved_number_value.json",- "fixtures/config/valid/reserved_object_value.json",- "fixtures/config/valid/string_group_assignment.json",- "fixtures/config/valid/version_float_literal.json",- "fixtures/wire/definitions.json",- "manifest.json",- "registries/literals.json",- "schemas/config.schema.json",- "schemas/definitions_entry.schema.json"- ],- "source_repository": "https://github.com/PostHog/posthog-sdk-test-harness",- "source_release": "1.6.0",- "source_sha256sums_digest": "b8488174e76feb8a83907ee723c8609cf3fd1a1063fdeb90df2228991a01e1a0"-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/registries/literals.json b/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/registries/literals.jsondeleted file mode 100644index ed8065689791..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/registries/literals.json+++ /dev/null@@ -1,297 +0,0 @@-{- "registry_version": "2.0.0",- "config_versions": {- "v1": 1,- "v2": 2,- "absent_version_selects": "v1",- "unknown_version_result": "unsupported",- "version_comparison": "A JSON number selects the version it equals mathematically, so 2.0 selects v2. A JSON string or boolean never selects a version."- },- "fields": [- "aggregation_group_type_index",- "assign_by",- "assignment_algorithm",- "cohort_name",- "default_value",- "description",- "exclusion_percentage",- "experiment_id",- "group_key_names",- "group_type_index",- "holdout",- "id",- "key",- "label",- "metadata",- "negation",- "on_rollout_miss",- "operator",- "paused",- "properties",- "return_type",- "rollout_percentage",- "rule_type",- "rules",- "seed",- "targeting",- "type",- "value",- "variants",- "version",- "weight"- ],- "rule_types": [- {- "value": "targeted_release",- "writer_status": "enabled"- },- {- "value": "percentage_rollout",- "writer_status": "enabled"- },- {- "value": "experiment",- "writer_status": "enabled"- }- ],- "return_types": [- {- "value": "boolean",- "writer_status": "enabled"- },- {- "value": "string",- "writer_status": "enabled"- },- {- "value": "number",- "writer_status": "reserved"- },- {- "value": "object",- "writer_status": "reserved"- }- ],- "rollout_miss_policies": [- "continue",- "return_default"- ],- "assignment_targets": [- "person"- ],- "assignment_algorithms": [- "sha1_60_v1"- ],- "property_types": [- "person",- "cohort",- "group",- "flag"- ],- "property_operators": [- "exact",- "is_not",- "icontains",- "not_icontains",- "icontains_multi",- "not_icontains_multi",- "starts_with",- "not_starts_with",- "ends_with",- "not_ends_with",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_eq",- "semver_neq",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_after",- "is_date_before",- "in",- "not_in",- "flag_evaluates_to"- ],- "reason_codes": [- "targeting_match",- "experiment_split",- "rollout_miss",- "experiment_paused",- "holdout",- "no_rule_match",- "flag_disabled",- "missing_group_key",- "dependency_error",- "error"- ],- "openfeature_mapping": {- "specification": "https://openfeature.dev/specification/",- "reason_codes": {- "targeting_match": {- "reason": "TARGETING_MATCH",- "error_code": null,- "note": "Targeted release, or percentage rollout inclusion. TARGETING_MATCH is this contract's choice for rollout inclusion; OpenFeature also describes pseudorandom assignment with SPLIT and permits custom reasons."- },- "experiment_split": {- "reason": "SPLIT",- "error_code": null,- "note": "Experiment identity is in flag metadata."- },- "rollout_miss": {- "reason": "DEFAULT",- "error_code": null,- "note": "A terminal rollout miss under return_default. Value is default_value, or the caller default when null. A continuing miss moves evaluation to the next rule and contributes neither a reason code nor metadata from the missed rule (including rule_id and condition_index) to the final result. The final result uses the terminating rule's reason and metadata, or no_rule_match if no rule terminates."- },- "experiment_paused": {- "reason": "DEFAULT",- "error_code": null,- "note": "Value is default_value, or the caller default when null."- },- "holdout": {- "reason": "DEFAULT",- "error_code": null,- "note": "Value is default_value, or the caller default when null."- },- "no_rule_match": {- "reason": "DEFAULT",- "error_code": null,- "note": "No rule produced a terminal result, including when targeting matched but rollout missed with continue. Value is default_value, or the caller default when null."- },- "flag_disabled": {- "reason": "DISABLED",- "error_code": null,- "note": "Local definitions only. Remote responses omit an inactive flag."- },- "missing_group_key": {- "reason": "ERROR",- "error_code": "INVALID_CONTEXT",- "note": "The required group key is missing from additional evaluation-context fields. If a provider binds the group key to OpenFeature targetingKey and that field is missing, use TARGETING_KEY_MISSING instead."- },- "dependency_error": {- "reason": "ERROR",- "error_code": "GENERAL",- "note": "A dependency is unknown, cyclic, or otherwise unresolvable. reason.description becomes the error message."- },- "error": {- "reason": "ERROR",- "error_code": "GENERAL",- "note": "reason.description becomes the error message."- }- },- "outcomes_without_reason_code": [- {- "situation": "Flag absent from the remote response",- "reason": "ERROR",- "error_code": "FLAG_NOT_FOUND",- "note": "Typed accessor returns the caller default."- },- {- "situation": "Unsupported config version or unknown semantic field in definitions, strict local mode",- "reason": "ERROR",- "error_code": "PARSE_ERROR",- "note": "Auto mode falls back remotely before this."- },- {- "situation": "Typed accessor asked for a type the flag does not return",- "reason": "ERROR",- "error_code": "TYPE_MISMATCH",- "note": "No coercion."- },- {- "situation": "Bootstrap value used",- "reason": "CACHED",- "error_code": null,- "note": "STALE when the SDK knows definitions are outdated. No experiment context, no exposure."- },- {- "situation": "Client-side override",- "reason": "override",- "error_code": null,- "note": "Custom reason string. Never TARGETING_MATCH; suppresses $experiment_exposure."- },- {- "situation": "Provider not initialised",- "reason": "ERROR",- "error_code": "PROVIDER_NOT_READY",- "note": "Provider concern."- }- ],- "flag_metadata_keys": [- "config_version",- "rule_type",- "rule_id",- "experiment_id",- "variant_key",- "holdout_id",- "id",- "version",- "reason_code",- "condition_index"- ]- },- "warning_codes": [- "RULE_ORDER_CHANGES_TRAFFIC",- "UNREACHABLE_LOWER_RULE",- "ROLLOUT_MISS_CAN_ENTER_LOWER_RULE",- "ASSIGNMENT_RESET_CHANGES_TRAFFIC",- "CONCLUSION_EXPANDS_POPULATION"- ],- "semantic_constraints": [- {- "id": "rule_ids_unique",- "scope": "rules",- "requirement": "Each rule id is unique in one config. For example, two rules in one config with id aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa are invalid even if their rule_type differs; the same id may appear in separate configs."- },- {- "id": "variant_keys_unique",- "scope": "rules[].variants",- "requirement": "Each variant key is unique in one variant list. For example, [control, test] is valid and [control, control] is invalid within one rule. Separate rules may each use control and test."- },- {- "id": "variant_weights_sum_100",- "scope": "rules[].variants",- "requirement": "Each variant weight is a percentage of subjects enrolled by the rule. Weights sum to exactly 100 in stored order; rollout_percentage separately controls enrollment into the rule. For example, [33.33, 33.33, 33.34] is valid, while [33.33, 33.33, 33.33] totals 99.99 and is invalid. Validate the stored decimal percentages exactly (for example, as integer hundredths totaling 10000); do not round an invalid sum to 100. This validation is separate from binary64 accumulation during assignment."- },- {- "id": "percentage_two_decimals",- "scope": "all rollout_percentage, weight, and exclusion_percentage values",- "requirement": "Percentages have at most two decimal places. JSON Schema multipleOf is not used because binary64 division is inexact for values such as 33.33."- },- {- "id": "number_is_binary64",- "scope": "all number and object values",- "requirement": "Numbers are finite IEEE-754 binary64 values. Negative zero normalizes to zero. Nonzero underflow to zero is invalid."- },- {- "id": "json_keys_unique",- "scope": "all object values",- "requirement": "JSON object keys are unique at every depth before ordinary deserialization."- },- {- "id": "json_depth_limit",- "scope": "all object values",- "requirement": "Object values contain at most 20 object/array levels, counting the root object as level 1. Scalar leaves do not add a level. The config schema enforces this bound with numbered definitions."- },- {- "id": "assignment_target_context",- "scope": "randomized rules",- "requirement": "Explicit person assignment is valid only for person flags. Group flags use the flag aggregation key and omit assign_by. The config schema enforces omission of assign_by whenever aggregation_group_type_index is present, including index 0."- },- {- "id": "contextual_size_limits",- "scope": "config and metadata",- "requirement": "The deployment config byte limit and the metadata size limit apply outside JSON Schema validation."- }- ]-}diff --git a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/schemas/config.schema.json b/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/schemas/config.schema.jsondeleted file mode 100644index f44d12f0c44a..000000000000--- a/rust/feature-flags/tests/fixtures/rules_v2_parser/2.1.0/schemas/config.schema.json+++ /dev/null@@ -1,1005 +0,0 @@-{- "$schema": "https://json-schema.org/draft/2020-12/schema",- "$id": "urn:posthog:feature-flag-rules-v2:config:1.0.0",- "title": "Feature Flag Rules v2 config",- "description": "Canonical stored configuration for Feature Flag Rules config version 2.",- "type": "object",- "required": [- "version",- "return_type",- "default_value",- "rules"- ],- "properties": {- "version": {- "const": 2- },- "return_type": {- "enum": [- "boolean",- "string",- "number",- "object"- ]- },- "default_value": {- "description": "Flag default for a normal result with no assigned value. Null delegates to the caller default. OpenFeature uses the caller default on abnormal execution regardless of this setting."- },- "rules": {- "type": "array",- "maxItems": 100,- "items": {- "$ref": "#/$defs/rule"- }- },- "aggregation_group_type_index": {- "type": "integer"- }- },- "additionalProperties": false,- "allOf": [- {- "if": {- "properties": {- "return_type": {- "const": "boolean"- }- },- "required": [- "return_type"- ]- },- "then": {- "properties": {- "default_value": {- "type": [- "boolean",- "null"- ]- },- "rules": {- "items": {- "$ref": "#/$defs/booleanRuleValues"- }- }- }- }- },- {- "if": {- "properties": {- "return_type": {- "const": "string"- }- },- "required": [- "return_type"- ]- },- "then": {- "properties": {- "default_value": {- "anyOf": [- {- "$ref": "#/$defs/stringValue"- },- {- "type": "null"- }- ]- },- "rules": {- "items": {- "$ref": "#/$defs/stringRuleValues"- }- }- }- }- },- {- "if": {- "properties": {- "return_type": {- "const": "number"- }- },- "required": [- "return_type"- ]- },- "then": {- "properties": {- "default_value": {- "anyOf": [- {- "$ref": "#/$defs/safeNumber"- },- {- "type": "null"- }- ]- },- "rules": {- "items": {- "$ref": "#/$defs/numberRuleValues"- }- }- }- }- },- {- "if": {- "properties": {- "return_type": {- "const": "object"- }- },- "required": [- "return_type"- ]- },- "then": {- "properties": {- "default_value": {- "anyOf": [- {- "$ref": "#/$defs/jsonObjectValue"- },- {- "type": "null"- }- ]- },- "rules": {- "items": {- "$ref": "#/$defs/objectRuleValues"- }- }- }- }- },- {- "if": {- "required": [- "aggregation_group_type_index"- ]- },- "then": {- "properties": {- "rules": {- "items": {- "not": {- "required": [- "assign_by"- ]- }- }- }- }- }- }- ],- "$defs": {- "uuid": {- "type": "string",- "format": "uuid",- "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"- },- "percentage": {- "type": "number",- "minimum": 0,- "maximum": 100- },- "seed": {- "type": "string",- "minLength": 1,- "maxLength": 400- },- "stringValue": {- "type": "string",- "minLength": 1- },- "safeNumber": {- "type": "number",- "minimum": -9007199254740991,- "maximum": 9007199254740991- },- "jsonObjectValue": {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth2"- },- "x-posthog-open-object": "application_json_value",- "description": "At most 20 object/array levels, counting this root object as level 1. Scalar leaves do not add a level. Numbered definitions bound validation recursion."- },- "metadata": {- "type": "object",- "additionalProperties": true,- "x-posthog-open-object": "opaque_metadata"- },- "groupKeyNames": {- "anyOf": [- {- "type": "null"- },- {- "type": "object",- "additionalProperties": {- "type": "string"- },- "x-posthog-open-object": "display_group_key_names"- }- ]- },- "propertyFilter": {- "type": "object",- "required": [- "key",- "type"- ],- "properties": {- "key": {- "type": "string",- "minLength": 1- },- "value": {},- "type": {- "enum": [- "person",- "cohort",- "group",- "flag"- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "icontains_multi",- "not_icontains_multi",- "starts_with",- "not_starts_with",- "ends_with",- "not_ends_with",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_eq",- "semver_neq",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_after",- "is_date_before",- "in",- "not_in",- "flag_evaluates_to"- ]- },- {- "type": "null"- }- ]- },- "group_type_index": {- "type": [- "integer",- "null"- ]- },- "negation": {- "type": [- "boolean",- "null"- ]- },- "cohort_name": {- "type": [- "string",- "null"- ]- },- "group_key_names": {- "$ref": "#/$defs/groupKeyNames"- },- "label": {- "type": [- "string",- "null"- ]- }- },- "additionalProperties": false- },- "targeting": {- "type": "object",- "required": [- "properties"- ],- "properties": {- "properties": {- "type": "array",- "maxItems": 100,- "items": {- "$ref": "#/$defs/propertyFilter"- }- }- },- "additionalProperties": false- },- "variant": {- "type": "object",- "required": [- "key",- "weight",- "value"- ],- "properties": {- "key": {- "type": "string",- "minLength": 1,- "pattern": "^[a-zA-Z0-9_-]+$"- },- "weight": {- "description": "Percentage of subjects enrolled by the rule assigned to this variant. Variant weights sum to exactly 100; the rule's rollout_percentage separately controls enrollment.",- "$ref": "#/$defs/percentage"- },- "value": {}- },- "additionalProperties": false- },- "holdout": {- "type": "object",- "required": [- "id",- "seed",- "exclusion_percentage"- ],- "properties": {- "id": {- "type": "integer"- },- "seed": {- "$ref": "#/$defs/seed"- },- "exclusion_percentage": {- "$ref": "#/$defs/percentage"- }- },- "additionalProperties": false- },- "targetedReleaseRule": {- "type": "object",- "required": [- "id",- "rule_type",- "targeting",- "value"- ],- "properties": {- "id": {- "$ref": "#/$defs/uuid"- },- "rule_type": {- "const": "targeted_release"- },- "targeting": {- "$ref": "#/$defs/targeting"- },- "description": {- "type": "string"- },- "metadata": {- "$ref": "#/$defs/metadata"- },- "value": {}- },- "additionalProperties": false- },- "percentageRolloutRule": {- "type": "object",- "required": [- "id",- "rule_type",- "targeting",- "value",- "rollout_percentage",- "on_rollout_miss",- "assignment_algorithm",- "seed"- ],- "properties": {- "id": {- "$ref": "#/$defs/uuid"- },- "rule_type": {- "const": "percentage_rollout"- },- "targeting": {- "$ref": "#/$defs/targeting"- },- "description": {- "type": "string"- },- "metadata": {- "$ref": "#/$defs/metadata"- },- "value": {},- "rollout_percentage": {- "$ref": "#/$defs/percentage"- },- "on_rollout_miss": {- "enum": [- "continue",- "return_default"- ]- },- "assignment_algorithm": {- "const": "sha1_60_v1"- },- "seed": {- "$ref": "#/$defs/seed"- },- "assign_by": {- "const": "person"- }- },- "additionalProperties": false- },- "experimentRule": {- "type": "object",- "required": [- "id",- "rule_type",- "targeting",- "experiment_id",- "paused",- "rollout_percentage",- "on_rollout_miss",- "assignment_algorithm",- "seed",- "variants"- ],- "properties": {- "id": {- "$ref": "#/$defs/uuid"- },- "rule_type": {- "const": "experiment"- },- "targeting": {- "$ref": "#/$defs/targeting"- },- "description": {- "type": "string"- },- "metadata": {- "$ref": "#/$defs/metadata"- },- "experiment_id": {- "type": "integer"- },- "paused": {- "type": "boolean"- },- "rollout_percentage": {- "$ref": "#/$defs/percentage"- },- "on_rollout_miss": {- "enum": [- "continue",- "return_default"- ]- },- "assignment_algorithm": {- "const": "sha1_60_v1"- },- "seed": {- "$ref": "#/$defs/seed"- },- "assign_by": {- "const": "person"- },- "variants": {- "type": "array",- "minItems": 2,- "maxItems": 20,- "items": {- "$ref": "#/$defs/variant"- }- },- "holdout": {- "$ref": "#/$defs/holdout"- }- },- "additionalProperties": false- },- "rule": {- "oneOf": [- {- "$ref": "#/$defs/targetedReleaseRule"- },- {- "$ref": "#/$defs/percentageRolloutRule"- },- {- "$ref": "#/$defs/experimentRule"- }- ]- },- "booleanRuleValues": {- "properties": {- "value": {- "type": "boolean"- },- "variants": {- "items": {- "properties": {- "value": {- "type": "boolean"- }- }- }- }- }- },- "stringRuleValues": {- "properties": {- "value": {- "$ref": "#/$defs/stringValue"- },- "variants": {- "items": {- "properties": {- "value": {- "$ref": "#/$defs/stringValue"- }- }- }- }- }- },- "numberRuleValues": {- "properties": {- "value": {- "$ref": "#/$defs/safeNumber"- },- "variants": {- "items": {- "properties": {- "value": {- "$ref": "#/$defs/safeNumber"- }- }- }- }- }- },- "objectRuleValues": {- "properties": {- "value": {- "$ref": "#/$defs/jsonObjectValue"- },- "variants": {- "items": {- "properties": {- "value": {- "$ref": "#/$defs/jsonObjectValue"- }- }- }- }- }- },- "jsonScalarValue": {- "oneOf": [- {- "type": "null"- },- {- "type": "boolean"- },- {- "$ref": "#/$defs/safeNumber"- },- {- "type": "string"- }- ]- },- "jsonValueDepth2": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth3"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth3"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth3": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth4"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth4"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth4": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth5"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth5"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth5": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth6"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth6"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth6": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth7"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth7"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth7": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth8"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth8"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth8": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth9"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth9"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth9": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth10"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth10"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth10": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth11"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth11"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth11": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth12"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth12"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth12": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth13"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth13"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth13": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth14"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth14"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth14": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth15"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth15"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth15": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth16"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth16"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth16": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth17"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth17"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth17": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth18"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth18"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth18": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth19"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth19"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth19": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonValueDepth20"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonValueDepth20"- },- "x-posthog-open-object": "application_json_value"- }- ]- },- "jsonValueDepth20": {- "oneOf": [- {- "$ref": "#/$defs/jsonScalarValue"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/jsonScalarValue"- }- },- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/jsonScalarValue"- },- "x-posthog-open-object": "application_json_value"- }- ]- }- }-}diff --git a/rust/feature-flags/tests/test_config_format.rs b/rust/feature-flags/tests/test_config_format.rsindex 289218545302..4b3b63174611 100644--- a/rust/feature-flags/tests/test_config_format.rs+++ b/rust/feature-flags/tests/test_config_format.rs@@ -25,7 +25,7 @@ pub mod common;fn documents() -> Vec<(String, Value, bool, bool)> {let mut cases = Vec::new();let supported: Value = serde_json::from_str(include_str!(- "fixtures/rules_v2_parser/2.1.0/fixtures/config/valid/boolean_targeted_and_percentage_rollout.json"+ "fixtures/rules_v2_contract/fixtures/config/valid/boolean_targeted_and_percentage_rollout.json")).unwrap();cases.push(("evaluated-valid-v2".to_string(),diff --git a/rust/feature-flags/tests/test_config_v2/fixtures.rs b/rust/feature-flags/tests/test_config_v2/fixtures.rsindex 4adfe044a74d..abd6cbace43d 100644--- a/rust/feature-flags/tests/test_config_v2/fixtures.rs+++ b/rust/feature-flags/tests/test_config_v2/fixtures.rs@@ -1,8 +1,7 @@-use std::collections::{BTreeMap, BTreeSet};+use std::collections::BTreeSet;use std::path::PathBuf;use serde_json::{json, Value};-use sha2::{Digest, Sha256};use super::{config, person_property_cases, read, result};use feature_flags::flags::config_v2::{@@ -12,49 +11,13 @@ use feature_flags::flags::config_v2::{use feature_flags::flags::flag_models::FeatureFlag;fn root() -> PathBuf {- PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/rules_v2_parser/2.1.0")+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/rules_v2_contract")}fn load(path: &str) -> Value {serde_json::from_slice(&std::fs::read(root().join(path)).unwrap()).unwrap()}-#[test]-fn released_parser_artifacts_are_intact() {- let source = load("SOURCE.json");- assert_eq!(- source["source_revision"],- "c32f4959240967f1ee89e58490fc9d3beaa1401f"- );- let index = std::fs::read(root().join("SHA256SUMS")).unwrap();- assert_eq!(- hex::encode(Sha256::digest(&index)),- source["source_sha256sums_digest"]- );- let text = std::str::from_utf8(&index).unwrap();- let digests: BTreeMap<_, _> = text- .lines()- .map(|line| {- let (digest, path) = line.split_once(" ").unwrap();- (path, digest)- })- .collect();- let files: BTreeSet<_> = source["files"]- .as_array()- .unwrap()- .iter()- .map(|p| p.as_str().unwrap())- .collect();- assert_eq!(files.len(), source["files"].as_array().unwrap().len());- for path in files {- let bytes = std::fs::read(root().join(path)).unwrap();- assert_eq!(hex::encode(Sha256::digest(bytes)), digests[path], "{path}");- }- let manifest = load("manifest.json");- assert_eq!(manifest["contract"]["version"], source["contract_version"]);- assert_eq!(manifest["corpus"]["version"], "1.1.0");-}-#[test]fn released_config_cases_distinguish_schema_expectations_from_supported_families() {let manifest = load("manifest.json");@@ -323,20 +286,7 @@ fn definitions_filters_use_the_same_parser_without_replacing_the_service_envelop}assert!(exercised.insert(case["id"].as_str().unwrap()));}- let manifest = load("manifest.json");- let artifact = manifest["artifacts"]- .as_array()- .unwrap()- .iter()- .find(|artifact| artifact["path"] == "fixtures/wire/definitions.json")- .unwrap();- let expected: BTreeSet<_> = artifact["case_ids"]- .as_array()- .unwrap()- .iter()- .map(|id| id.as_str().unwrap())- .collect();- assert_eq!(exercised, expected);+ assert_eq!(exercised.len(), 23);let mut entry = fixtures["templates"]["v2"].clone();entry["filters"] = load("fixtures/config/valid/boolean_targeted_and_percentage_rollout.json");entry["team_id"] = json!(1);@@ -352,10 +302,6 @@ fn definitions_filters_use_the_same_parser_without_replacing_the_service_envelopfn released_schema_and_registry_match_the_parser_contract() {let schema = load("schemas/config.schema.json");let registry = load("registries/literals.json");- assert_eq!(- registry["registry_version"],- load("SOURCE.json")["registry_version"]- );for (pointer, fields) in [("/properties", CONFIG_FIELDS),(diff --git a/rust/feature-flags/tests/test_rules_v2_evaluation.rs b/rust/feature-flags/tests/test_rules_v2_evaluation.rsindex a76090e31ea5..4c97b7fc35ee 100644--- a/rust/feature-flags/tests/test_rules_v2_evaluation.rs+++ b/rust/feature-flags/tests/test_rules_v2_evaluation.rs@@ -7,7 +7,6 @@ use feature_flags::flags::feature_flag_list::PreparedFlags;use feature_flags::flags::flag_matching_utils::calculate_hash;use feature_flags::flags::flag_request::MAX_DISTINCT_ID_LEN;use serde_json::{json, Value};-use sha2::{Digest, Sha256};use uuid::Uuid;pub mod common;@@ -38,59 +37,13 @@ fn vendored_response_fixtures_agree_with_the_validator() {}#[test]-fn pinned_evaluation_artifact_subset_is_intact() {- let source = corpus::load("SOURCE.json");- let revision = source["source_revision"].as_str().unwrap();- assert_eq!(revision.len(), 40);- assert!(revision.bytes().all(|c| c.is_ascii_hexdigit()));- assert_eq!(source["release_status"], "released");- assert_eq!(source["source_release"], "1.13.1");- let index = std::fs::read(corpus::root().join("SHA256SUMS")).unwrap();- assert_eq!(- hex::encode(Sha256::digest(&index)),- source["source_sha256sums_digest"]- );- let digests: BTreeMap<_, _> = std::str::from_utf8(&index)- .unwrap()- .lines()- .map(|line| line.split_once(" ").unwrap())- .map(|(digest, path)| (path, digest))- .collect();- let files: BTreeSet<_> = source["files"]- .as_array()- .unwrap()- .iter()- .map(|path| path.as_str().unwrap())- .collect();- assert_eq!(files.len(), source["files"].as_array().unwrap().len());- for path in files {- assert_eq!(- hex::encode(Sha256::digest(- std::fs::read(corpus::root().join(path)).unwrap()- )),- digests[path],- "{path}"- );- }- let manifest = corpus::load("manifest.json");- assert_eq!(manifest["contract"]["version"], source["contract_version"]);+fn evaluation_corpora_have_unique_ids_and_the_pinned_families() {let mut counts = BTreeMap::new();for (component, cases) in [("v2_boolean_evaluation", corpus::cases()),("v2_value_evaluation", corpus::value_cases()),] {- assert_eq!(- manifest[component]["version"],- source[format!("{component}_version")]- );let ids: Vec<_> = cases.iter().map(|case| case["id"].clone()).collect();- let artifact = manifest["artifacts"]- .as_array()- .unwrap()- .iter()- .find(|artifact| artifact["path"] == format!("corpus/{component}.json"))- .unwrap();- assert_eq!(json!(ids), artifact["case_ids"]);assert_eq!(ids.iter().map(Value::to_string)diff --git a/rust/feature-flags/tests/test_rules_v2_evaluation/corpus.rs b/rust/feature-flags/tests/test_rules_v2_evaluation/corpus.rsindex 505a8bdfe610..8974aef7c7cc 100644--- a/rust/feature-flags/tests/test_rules_v2_evaluation/corpus.rs+++ b/rust/feature-flags/tests/test_rules_v2_evaluation/corpus.rs@@ -9,7 +9,7 @@ use feature_flags::flags::flag_models::FeatureFlag;use serde_json::{json, Value};pub fn root() -> PathBuf {- PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/rules_v2_evaluation/2.3.1")+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/rules_v2_contract")}pub fn load(path: &str) -> Value {diff --git a/rust/feature-flags/tests/test_rules_v2_v1_contract.rs b/rust/feature-flags/tests/test_rules_v2_v1_contract.rsindex 57951bf78a7c..df209214ebbc 100644--- a/rust/feature-flags/tests/test_rules_v2_v1_contract.rs+++ b/rust/feature-flags/tests/test_rules_v2_v1_contract.rs@@ -4,9 +4,7 @@//! `FeatureFlagMatcher::evaluate_all_feature_flags`; and the legacy projection matrix//! against the `/flags` and `/decide` response conversions.//!-//! The corpus lives under `tests/fixtures/rules_v2_contract/<contract version>/`.-//! `SOURCE.json` there records the upstream revision, the digests this test verifies, and-//! the update procedure. CI never fetches the harness repository.+//! The corpus lives under `tests/fixtures/rules_v2_contract/`; CI never fetches the harness.use std::collections::{BTreeSet, HashMap, HashSet};use std::fs;@@ -31,7 +29,7 @@ use serde_json::{json, Value};use sha2::{Digest, Sha256};use uuid::Uuid;-const CORPUS_DIR: &str = "tests/fixtures/rules_v2_contract/1.2.0";+const CORPUS_DIR: &str = "tests/fixtures/rules_v2_contract";/// A dependency target absent from the fixture definitions maps to an id no fixture flag/// uses, so the target is missing from the flag list entirely. That is the only way the@@ -40,9 +38,8 @@ const CORPUS_DIR: &str = "tests/fixtures/rules_v2_contract/1.2.0";const MISSING_DEPENDENCY_ID: i64 = 0;#[test]-fn vendored_corpus_is_intact() {+fn vendored_contract_is_intact() {let source = load_json("SOURCE.json");- let manifest = load_json("manifest.json");let recorded = source["files"].as_object().expect("SOURCE.json files");let mut on_disk = BTreeSet::new();@@ -58,39 +55,17 @@ fn vendored_corpus_is_intact() {assert_eq!(hex::encode(Sha256::digest(&bytes)),digest.as_str().unwrap(),- "{rel}: bytes differ from the digest in SOURCE.json; a changed expectation needs a new corpus version, see update_procedure"- );- }-- assert_eq!(source["contract_version"], manifest["contract"]["version"]);- assert_eq!(source["corpus_version"], manifest["corpus"]["version"]);- for artifact in corpus_artifacts(&manifest) {- let path = str_field(artifact, "path");- let file = load_json(path);- assert_eq!(- file["corpus_version"], manifest["corpus"]["version"],- "{path}: corpus_version"- );- let in_file = file_case_ids(&file);- let unique: BTreeSet<&String> = in_file.iter().collect();- assert_eq!(unique.len(), in_file.len(), "{path}: duplicate case ids");- let declared: BTreeSet<String> = artifact["case_ids"]- .as_array()- .unwrap()- .iter()- .map(|id| id.as_str().unwrap().to_string())- .collect();- assert_eq!(- unique.into_iter().cloned().collect::<BTreeSet<_>>(),- declared,- "{path}: case ids differ from the manifest"+ "{rel}: bytes differ from the digest in SOURCE.json; re-vendor from the harness instead of editing");}+ assert_eq!(+ source["contract_version"],+ load_json("manifest.json")["contract"]["version"]+ );}#[tokio::test]async fn corpus_matches_production_evaluator_and_projections() {- let manifest = load_json("manifest.json");let db = TestContext::new(None).await;let team_id = db.insert_new_team(None).await.expect("insert team").id;@@ -99,12 +74,30 @@ async fn corpus_matches_production_evaluator_and_projections() {covered.extend(run_v1_corpus(&db, team_id).await);covered.extend(run_projection_corpus());- let declared: HashSet<String> = corpus_artifacts(&manifest)- .flat_map(|artifact| artifact["case_ids"].as_array().unwrap().iter())- .map(|id| id.as_str().unwrap().to_string())- .collect();- assert!(!declared.is_empty(), "the manifest declares no cases");- assert_eq!(covered, declared, "every manifest case must execute");+ assert_eq!(covered, corpus_case_ids(), "every corpus case must execute");+}++fn corpus_case_ids() -> HashSet<String> {+ let manifest = load_json("manifest.json");+ let mut ids = HashSet::new();+ let mut counts = Vec::new();+ for artifact in corpus_artifacts(&manifest) {+ let path = str_field(artifact, "path");+ let in_file = file_case_ids(&load_json(path));+ counts.push((path.to_string(), in_file.len()));+ for id in in_file {+ assert!(ids.insert(id.clone()), "{path}: duplicate case id {id}");+ }+ }+ assert_eq!(+ counts,+ [+ ("corpus/hash_sha1_60_v1.json".to_string(), 32),+ ("corpus/v1_evaluation.json".to_string(), 31),+ ("corpus/legacy_projection.json".to_string(), 11),+ ]+ );+ ids}async fn run_hash_corpus(db: &TestContext, team_id: i32) -> HashSet<String> {