# Job lifecycle conformance fixtures

These fixtures enforce only the behavior encoded by the schemas and `validate.py`. They are synthetic oracles, not claims that the current product conforms.

## Enforced coverage

- Draft 2020-12 schemas with format checking and strict discriminated lifecycle events.
- Referential owner, conversion, job, cycle, ledger, object, lease, token, request, and generation identities, with each `actor_id` bound to an authoritative role, owner scope, and operation allowlist.
- Contiguous event ordinals, monotonic clocks, full derived snapshots, exact count deltas, lease fencing, source/lease/grace equality edges (−1 ms, equality, +1 ms), and source-object/private-copy alternatives proved by events.
- Customer-debit cancellation closes as compensated; goodwill cancellation closes as consumed without another compensation.
- Cleanup acknowledgement follows cancellation and binds request, conversion, job, lease token, and generation. Before acknowledgement the canonical oracle remains `cancellation_pending` / UI `Cancelling`; only acknowledgement permits `cancelled` / UI `Cancelled`.
- Current/stale terminal metadata and diagnostic variants, stale/replayed/foreign lease-token variants, and both race winners.
- True queued cancellation, K4 exactly 20 concurrent callers, K5 customer/anonymous/admin denial actors, K6-K8 both typed winners, and K9 complete/failed/cancelled/artifact-expired matrix.
- Concurrency is represented by named actors, a shared barrier, real event sequence/attempt links, an ordering-derived winner, and typed allowed winners. Semantic validation rejects metadata-only contenders, sequential-only traces, missing actors, and unenumerated winners.
- Closed event schemas make every replay terminalizer reachable; completion always carries the ZIP expiry derived from its authoritative completion clock.
- Negative schema and semantic self-tests run both the lifecycle and full public validators and cover discriminator, format, minimum generation, winner, actor, clock, identity, and every terminalizer family.
- `public-error-cases.jsonl` follows authoritative MVP `HTTP-007` and the canonical closed errors.

## Explicit blockers

`blocked-conformance-cases.jsonl` is machine-readable and intentionally `BLOCKED`. It records, without reconciling or normalizing away:

1. current `packages/api-contracts` v1/generic-`CONFLICT` shapes versus authoritative `HTTP-007` canonical errors; amendment targets are the v1 error discriminator and generic-CONFLICT projection;
2. current product/index/API-contract cancellation projections versus cleanup-ack pending → `Cancelling` → `Cancelled`; amendment targets are the product projection, index projection, and API-contract cancellation-state schema.

These blockers are conformance failures outside this fixture directory. Nothing here claims those surfaces have been amended.

## Files

- `lifecycle-cases.jsonl` and `lifecycle-case.schema.json`
- `public-error-cases.jsonl` and `public-error-case.schema.json`
- `blocked-conformance-cases.jsonl` and `blocked-conformance-case.schema.json`
- `SHA256SUMS` (generated after a passing remote validation run)
- `validate.py`

## Validation

Run only on a remote validation host with `jsonschema` installed there:

```sh
python3 quality/fixtures/job-lifecycle/validate.py
```

The validator uses `jsonschema.Draft202012Validator` plus `FormatChecker`. A missing dependency exits nonzero as `BLOCKED`; there is no fallback shape check. A passing fixture run proves only fixture/schema/semantic consistency, not implementation conformance.
