{
  "format": "vercy-enterprise-allocation-fixtures/v1",
  "candidateName": "Reusable Experiment Design",
  "cases": [
    {
      "id": "two-study-reuse",
      "kind": "positive",
      "input": "Two studies use the same approved design version with different datasets.",
      "expect": "The design is reused while studies, runs, inputs and findings retain separate identity.",
      "covers": [
        1
      ]
    },
    {
      "id": "successor-method",
      "kind": "positive",
      "input": "The analysis intent and stopping rule change for future runs.",
      "expect": "A successor design version is issued and earlier runs keep the old pin.",
      "covers": [
        2
      ]
    },
    {
      "id": "contradictory-runs",
      "kind": "positive",
      "input": "Two runs of one design produce supporting and challenging outcomes.",
      "expect": "Both runs and findings remain without rewriting the design or hypothesis.",
      "covers": [
        3
      ]
    },
    {
      "id": "run-is-design",
      "kind": "negative",
      "input": "Each execution occurrence mints a new reusable design identity.",
      "expect": "The identity duplication is rejected.",
      "expectedCode": "EMPRD04-DESIGN-04",
      "covers": [
        4
      ]
    },
    {
      "id": "rewrite-after-result",
      "kind": "negative",
      "input": "Success criteria are rewritten after result access under the same version.",
      "expect": "The mutation is rejected.",
      "expectedCode": "EMPRD04-DESIGN-05",
      "covers": [
        5
      ]
    },
    {
      "id": "failed-run-deletes-design",
      "kind": "negative",
      "input": "A failed run removes the design from history.",
      "expect": "The deletion is rejected.",
      "expectedCode": "EMPRD04-DESIGN-06",
      "covers": [
        6
      ]
    },
    {
      "target": "reusable-experiment-design",
      "id": "d2-promotion-derivation-link",
      "kind": "negative",
      "input": "A study-scoped release is promoted to a reusable design without a derivedFromStudyReleaseRef.",
      "expect": "Rejected; promotion mints a new identity only with an explicit derivation link, and pre-existing run pins remain valid against the predecessor.",
      "expectedCode": "E_PROMOTION_DERIVATION_MISSING",
      "covers": [
        2,
        14,
        15
      ]
    },
    {
      "target": "reusable-experiment-design",
      "id": "d10-withdraw-pinned-version",
      "kind": "positive",
      "input": "An effective design version pinned by a closed run is withdrawn.",
      "expect": "A DesignVersionStatusEvent is appended; the version content and the closed run's pin are unchanged and remain resolvable.",
      "covers": [
        2,
        14,
        15
      ]
    },
    {
      "target": "reusable-experiment-design",
      "id": "d14-criteria-master-precedence",
      "kind": "negative",
      "input": "A design version states success criteria that conflict with the pinned preregistered hypothesis criteria.",
      "expect": "Rejected; WM-KNW-009 masters preregistered success and stopping criteria and the divergence must be recorded as a preregistration deviation.",
      "expectedCode": "E_CRITERIA_DUAL_MASTERSHIP",
      "covers": [
        2,
        14,
        15
      ]
    },
    {
      "target": "reusable-experiment-design",
      "id": "d15-retired-version-resolvable",
      "kind": "positive",
      "input": "A design version used by a historical run is retired.",
      "expect": "The version enters the retired state with retiredAt, validTo is set, and the historical run and its findings still resolve the pin.",
      "covers": [
        2,
        14,
        15
      ]
    },
    {
      "target": "reusable-experiment-design",
      "id": "d15-silent-criteria-edit",
      "kind": "negative",
      "input": "Stopping rules are edited inside an effective design version without a successor.",
      "expect": "Rejected; the change alters the declared contentDigest field set and requires a successor version.",
      "expectedCode": "E_DESIGN_VERSION_CONTENT_MUTATION",
      "covers": [
        2,
        14,
        15
      ]
    }
  ]
}
