{
  "format": "vercy-enterprise-allocation-fixtures/v2",
  "candidateName": "Emission Factor Registry",
  "cases": [
    {
      "id": "factor-version-pin",
      "kind": "positive",
      "input": "A run uses a 2024 regional grid factor and AR6 GWP100.",
      "expect": "It pins the factor version and separate characterization-set version.",
      "target": "Emission Factor Registry",
      "violates": "CO2e conversion pins both factor and characterization versions.",
      "closesDefect": null
    },
    {
      "id": "factor-successor",
      "kind": "positive",
      "input": "The publisher replaces a factor after methodology correction.",
      "expect": "A successor version preserves historical citations.",
      "target": "Emission Factor Registry",
      "violates": "Corrections create successor versions and preserve cited history.",
      "closesDefect": null
    },
    {
      "id": "proxy-downgrade",
      "kind": "positive",
      "input": "A technology-specific factor is unavailable and a regional proxy is used.",
      "expect": "The run records proxy substitution and representativeness downgrade.",
      "target": "Emission Factor Registry",
      "violates": "Proxy substitution records a representativeness downgrade.",
      "closesDefect": null
    },
    {
      "id": "factor-without-units",
      "kind": "negative",
      "input": "A factor lacks denominator quantity kind and unit.",
      "expect": "The factor is rejected as dimensionally unusable.",
      "target": "Emission Factor Registry",
      "violates": "Numerator and denominator quantity kinds and units are explicit.",
      "closesDefect": null,
      "expectedCode": "FACTOR_UNIT_MISSING"
    },
    {
      "id": "gwp-embedded",
      "kind": "negative",
      "input": "A CO2e factor hides the GWP characterization release.",
      "expect": "The result is rejected because characterization must be separately pinned.",
      "target": "Emission Factor Registry",
      "violates": "GWP characterization set remains separately versioned.",
      "closesDefect": null,
      "expectedCode": "CHARACTERIZATION_SET_EMBEDDED"
    },
    {
      "id": "overwrite-factor",
      "kind": "negative",
      "input": "A corrected factor overwrites the cited 2023 version.",
      "expect": "The mutation is rejected; successor lineage is required.",
      "target": "Emission Factor Registry",
      "violates": "Corrections create successor versions and preserve cited history.",
      "closesDefect": null,
      "expectedCode": "FACTOR_VERSION_REWRITTEN"
    },
    {
      "id": "cost-is-emissions",
      "kind": "negative",
      "input": "Cloud spend is labelled measured emissions without an EEIO method.",
      "expect": "The claim is rejected; spend is only an explicit proxy with uncertainty.",
      "target": "Emission Factor Registry",
      "violates": "Financial cost never substitutes for an impact factor without an explicit spend-proxy method.",
      "closesDefect": null,
      "expectedCode": "COST_AS_MEASURED_EMISSIONS"
    },
    {
      "id": "factor-set-release-pin",
      "target": "Emission Factor Registry",
      "kind": "positive",
      "input": "A run cites factor registry R, factor set S, set version 2024.1, factor grid-regional-NL.",
      "expect": "The factor resolves only through the pinned set version, and the set version is immutable after publication.",
      "violates": "A factor version exists only inside one published factor set version.",
      "closesDefect": "D1"
    },
    {
      "id": "factor-version-without-set",
      "target": "Emission Factor Registry",
      "kind": "negative",
      "input": "A factor version is identified by registry, factor and version alone, with no factor set version.",
      "expect": "The factor version is rejected because set containment is part of its identity.",
      "violates": "A factor version exists only inside one published factor set version.",
      "closesDefect": "D1",
      "expectedCode": "FACTOR_SET_CONTAINMENT_MISSING"
    },
    {
      "id": "factor-set-release-mutated",
      "target": "Emission Factor Registry",
      "kind": "negative",
      "input": "A new factor is added to published factor set version 2024.1.",
      "expect": "The mutation is rejected; a successor set version is required.",
      "violates": "A published factor set version never gains, loses or alters a factor version.",
      "closesDefect": "D1",
      "expectedCode": "FACTOR_SET_VERSION_IMMUTABLE_VIOLATION"
    },
    {
      "id": "fixture-shape-v2",
      "target": "Emission Factor Registry",
      "kind": "positive",
      "input": "Prior case gwp-embedded is migrated to fixture format v2.",
      "expect": "The case carries id, target, kind, input, expect, violates, closesDefect null and an expectedCode, and its id is unchanged.",
      "violates": "Every fixture carries id, target, kind, input, expect, violates and closesDefect, and every negative also carries expectedCode.",
      "closesDefect": "D13"
    },
    {
      "id": "negative-without-code",
      "target": "Emission Factor Registry",
      "kind": "negative",
      "input": "A negative fixture asserts only that the artifact is rejected, with no expectedCode.",
      "expect": "The fixture is rejected because a negative without a deterministic code cannot discriminate the cause of rejection.",
      "violates": "Every fixture carries id, target, kind, input, expect, violates and closesDefect, and every negative also carries expectedCode.",
      "closesDefect": "D13",
      "expectedCode": "FIXTURE_EXPECTED_CODE_MISSING"
    },
    {
      "id": "method-class-open-value",
      "target": "Emission Factor Registry",
      "kind": "negative",
      "input": "A factor version declares methodClass as other.",
      "expect": "The factor version is rejected because methodClass is a closed set.",
      "violates": "Every enumerated field is a closed set; an unrecognised value blocks the run rather than passing through.",
      "closesDefect": "D14",
      "expectedCode": "METHOD_CLASS_NOT_IN_CLOSED_SET"
    }
  ]
}
