{
  "format": "vercy-enterprise-allocation-fixtures/v1",
  "candidateName": "Absence",
  "cases": [
    {
      "id": "approved-leave",
      "kind": "positive",
      "input": "A half-time worker has approved leave for one nominal working day.",
      "expect": "Availability applies the operational effect under the pinned calendar without exposing protected reason.",
      "target": "Absence",
      "closesDefect": 15,
      "violates": null,
      "expectedCode": null
    },
    {
      "id": "cancelled-leave",
      "kind": "positive",
      "input": "Approved future absence is cancelled before effectivity.",
      "expect": "Cancellation is appended and the original decision remains.",
      "target": "Absence",
      "closesDefect": 15,
      "violates": null,
      "expectedCode": null
    },
    {
      "id": "spring-forward",
      "kind": "positive",
      "input": "Absence spans a DST spring-forward transition.",
      "expect": "Nominal and elapsed durations remain separately computed.",
      "target": "Absence",
      "closesDefect": 15,
      "violates": null,
      "expectedCode": null
    },
    {
      "id": "medical-reason-in-calendar",
      "kind": "negative",
      "input": "A diagnosis is copied into ordinary availability.",
      "expect": "The disclosure is rejected.",
      "target": "Absence",
      "closesDefect": 15,
      "violates": "inv-medical-reason-excluded",
      "expectedCode": "EM-PEO-07-ABS-101"
    },
    {
      "id": "missing-means-present",
      "kind": "negative",
      "input": "No absence record is treated as proof of presence.",
      "expect": "The inference is rejected.",
      "target": "Absence",
      "closesDefect": 15,
      "violates": "inv-missing-is-unknown",
      "expectedCode": "EM-PEO-07-ABS-102"
    },
    {
      "id": "rewrite-approved",
      "kind": "negative",
      "input": "An approved interval is edited in place.",
      "expect": "The mutation is rejected.",
      "target": "Absence",
      "closesDefect": 15,
      "violates": "inv-approved-immutable",
      "expectedCode": "EM-PEO-07-ABS-103"
    },
    {
      "id": "abs-revision-append",
      "target": "Absence",
      "kind": "positive",
      "input": "An approved absence is shortened by one day; a new AbsenceRevision records the shorter interval with recordedAt, actorRef and supersedesRevision.",
      "expect": "The prior revision, its interval, its operationalCategory and its decision remain retrievable; the case identity is unchanged.",
      "violates": null,
      "closesDefect": 7,
      "expectedCode": null
    },
    {
      "id": "abs-in-place-revision-edit",
      "target": "Absence",
      "kind": "negative",
      "input": "The interval on an existing approved AbsenceRevision is edited in place with no successor revision.",
      "expect": "The mutation is rejected; corrections append a revision and never rewrite one.",
      "violates": "inv-corrections-additive-linked",
      "closesDefect": 7,
      "expectedCode": "EM-PEO-07-ABS-001"
    },
    {
      "id": "abs-new-episode-new-case",
      "target": "Absence",
      "kind": "positive",
      "input": "The same person is absent again two months after a closed case, for an unrelated reason.",
      "expect": "A new absenceId is created and linked by relatedEpisodeRef; it is not recorded as a revision of the closed case.",
      "violates": null,
      "closesDefect": 7,
      "expectedCode": null
    },
    {
      "id": "abs-category-enumeration",
      "target": "Absence",
      "kind": "positive",
      "input": "An absence on medical grounds is recorded with operationalCategory partially-available and its clinical reason held as an AbsenceProtectedReason with a lawfulConditionRef.",
      "expect": "The ordinary availability projection reads only the enumerated operational category and has no forward path from Absence to the protected reason.",
      "violates": null,
      "closesDefect": 6,
      "expectedCode": null
    },
    {
      "id": "abs-diagnosis-in-category",
      "target": "Absence",
      "kind": "negative",
      "input": "operationalCategory is set to a coded diagnostic value rather than one of unavailable, partially-available or available-with-restriction.",
      "expect": "The value is rejected; operationalCategory accepts only its enumerated values.",
      "violates": "inv-medical-reason-excluded",
      "closesDefect": 6,
      "expectedCode": "EM-PEO-07-ABS-002"
    },
    {
      "id": "abs-protected-reason-without-condition",
      "target": "Absence",
      "kind": "negative",
      "input": "An ordinary capacity report resolves AbsenceProtectedReason and renders the clinical reason without an additional lawful condition.",
      "expect": "The resolution is rejected; the protected partition is reachable only under an additional lawful condition and is excluded from every default projection.",
      "violates": "inv-medical-reason-excluded",
      "closesDefect": 6,
      "expectedCode": "EM-PEO-07-ABS-003"
    },
    {
      "id": "abs-interval-missing-release",
      "target": "Absence",
      "kind": "negative",
      "input": "An absence interval is recorded as two local dates with no bound offsets, no tzid and no tzdbRelease.",
      "expect": "The interval is rejected; both bounds require explicit offsets and the interval requires tzid and tzdbRelease.",
      "violates": "inv-interval-pins-offset-tz-release",
      "closesDefect": 4,
      "expectedCode": "EM-PEO-07-ABS-004"
    },
    {
      "id": "abs-quantity-with-basis",
      "target": "Absence",
      "kind": "positive",
      "input": "A partial-day absence records quantity 4 with quantityUnit hour and quantityBasis the declared contractual nominal day.",
      "expect": "The quantity is accepted and is interpretable without inferring a basis; rounding occurs only at projection.",
      "violates": null,
      "closesDefect": 12,
      "expectedCode": null
    },
    {
      "id": "abs-quantity-without-basis",
      "target": "Absence",
      "kind": "negative",
      "input": "A partial-day absence records quantity 4 with no quantityUnit and no quantityBasis.",
      "expect": "The record is rejected; quantity requires a declared unit, code system and basis.",
      "violates": "inv-quantity-declares-unit-and-basis",
      "closesDefect": 12,
      "expectedCode": "EM-PEO-07-ABS-005"
    },
    {
      "id": "abs-publishes-availability-projection",
      "target": "Absence",
      "kind": "negative",
      "input": "The absence record publishes a computed availability window as its own owned output.",
      "expect": "The publication is rejected; Absence owns a declared operational effect and never an availability projection or capacity fact.",
      "violates": "inv-quantities-separate",
      "closesDefect": 11,
      "expectedCode": "EM-PEO-07-ABS-006"
    }
  ]
}
