{
  "components": {
    "examples": {
      "CorrectionAlreadyFinalizedProblemExample": {
        "summary": "Correction was already finalized before this lifecycle request arrived.",
        "value": {
          "code": "correction.already_finalized",
          "conflict": {
            "allowed_correction_statuses": [
              "pending"
            ],
            "conflict_kind": "already_finalized",
            "current_correction_status": "applied",
            "retry_after_reload": false
          },
          "detail": "Correction status applied is already finalized and cannot be changed by this lifecycle request. Append a retry correction review if another decision is needed.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections/corr_01J0Y9B7M4X1C7RV2R4FKY8G6M/reject",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction already finalized",
          "type": "https://retvest.example/problems/correction-already-finalized"
        }
      },
      "CorrectionCancellationProblemExample": {
        "summary": "Caller cancelled the correction operation before completion.",
        "value": {
          "code": "request.cancelled",
          "detail": "The Work Run correction request was cancelled by the caller before the service completed this operation; retry only when the caller still wants the same correction action.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 499,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction request cancelled",
          "type": "https://retvest.example/problems/correction-request-cancelled"
        }
      },
      "CorrectionCursorConflictProblemExample": {
        "summary": "Correction list cursor is stale after newer ledger rows changed the page boundary.",
        "value": {
          "code": "correction.cursor_stale",
          "conflict": {
            "conflict_kind": "stale_correction_cursor",
            "current_correction_sequence": 4,
            "expected_correction_sequence": 2,
            "retry_after_reload": true
          },
          "detail": "The supplied correction cursor was issued for an older correction ledger position that can no longer be replayed. Reload the first correction page and continue with its next_cursor.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections?cursor=corrpage_0000000002",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction cursor stale",
          "type": "https://retvest.example/problems/correction-cursor-stale"
        }
      },
      "CorrectionDuplicateActiveProblemExample": {
        "summary": "Duplicate active correction attempt already exists for the same Work Run.",
        "value": {
          "code": "correction.active_duplicate",
          "conflict": {
            "active_correction_id": "corr_01J0Y9DUPLICATEACTIVE",
            "conflict_kind": "duplicate_active_correction",
            "current_correction_sequence": 1,
            "expected_correction_sequence": 2,
            "retry_after_reload": false
          },
          "detail": "An active correction attempt already exists for this same Work Run. Resolve or reload the active correction before appending another correction.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Duplicate active correction",
          "type": "https://retvest.example/problems/correction-active-duplicate"
        }
      },
      "CorrectionForbiddenProblemExample": {
        "summary": "Caller role is not authorized to review Work Run corrections.",
        "value": {
          "code": "auth.permission_denied",
          "detail": "The authenticated user is not allowed to create, apply, reject, retry, or read Work Run corrections.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 403,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction review forbidden",
          "type": "https://retvest.example/problems/permission-denied"
        }
      },
      "CorrectionIdempotencyConflictProblemExample": {
        "summary": "Same Idempotency-Key reused for the same Work Run with a different payload.",
        "value": {
          "code": "idempotency.conflict",
          "conflict": {
            "conflict_kind": "idempotency_payload_mismatch"
          },
          "detail": "The supplied Idempotency-Key was already used for this same Work Run with a different payload.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Idempotency-Key conflict",
          "type": "https://retvest.example/problems/idempotency-conflict"
        }
      },
      "CorrectionIdempotencyKeyMissingProblemExample": {
        "summary": "Correction write request omitted the Idempotency-Key header.",
        "value": {
          "code": "idempotency.missing_key",
          "detail": "Idempotency-Key header is required when creating a Work Run correction so retries cannot append duplicate corrections.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 400,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Idempotency-Key required",
          "type": "https://retvest.example/problems/idempotency-key-missing"
        }
      },
      "CorrectionInvalidTransitionProblemExample": {
        "summary": "Correction status does not allow the requested lifecycle transition.",
        "value": {
          "code": "correction.invalid_transition",
          "conflict": {
            "allowed_correction_statuses": [
              "pending"
            ],
            "conflict_kind": "invalid_transition",
            "current_correction_status": "applied",
            "retry_after_reload": false
          },
          "detail": "Correction status applied cannot transition to rejected. Reload correction status and retry only pending corrections.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections/corr_01J0Y9B7M4X1C7RV2R4FKY8G6M/apply",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Invalid correction transition",
          "type": "https://retvest.example/problems/correction-invalid-transition"
        }
      },
      "CorrectionInvalidWorkRunStateProblemExample": {
        "summary": "Work Run state does not allow correction writes.",
        "value": {
          "code": "correction.invalid_work_run_state",
          "conflict": {
            "allowed_work_run_states": [
              "awaiting_approval",
              "blocked_by_evidence_gates"
            ],
            "conflict_kind": "invalid_work_run_state",
            "current_work_run_state": "exported",
            "retry_after_reload": false
          },
          "detail": "Work Run state exported cannot accept corrections. Corrections may only be appended while the Work Run is awaiting_approval or blocked_by_evidence_gates.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Work Run cannot accept corrections",
          "type": "https://retvest.example/problems/correction-invalid-work-run-state"
        }
      },
      "CorrectionMalformedCursorProblemExample": {
        "summary": "Correction read cursor is malformed or not one previously returned by pagination.next_cursor.",
        "value": {
          "code": "request.validation_failed",
          "detail": "The supplied correction cursor is malformed. Use pagination.next_cursor exactly as returned by the previous correction read page.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections?cursor=corrpage_tampered",
          "invalid_params": [
            {
              "name": "query.cursor",
              "reason": "Malformed opaque cursor; use pagination.next_cursor exactly as returned."
            }
          ],
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 422,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Validation error",
          "type": "https://retvest.example/problems/validation-error"
        }
      },
      "CorrectionRateLimitProblemExample": {
        "summary": "Correction request rate limit exceeded; Retry-After is present.",
        "value": {
          "code": "rate_limit.exceeded",
          "detail": "Too many Work Run correction requests were received for this tenant. Retry after 60 seconds.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 429,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction rate limit exceeded",
          "type": "https://retvest.example/problems/rate-limit-exceeded"
        }
      },
      "CorrectionReadBadRequestProblemExample": {
        "summary": "Correction list query parameters are invalid before pagination starts.",
        "value": {
          "code": "request.invalid_query",
          "detail": "Provide either cursor or offset when listing Work Run corrections, not both.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections?cursor=corrpage_0000000002&offset=25",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 400,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Invalid correction list query",
          "type": "https://retvest.example/problems/correction-read-bad-request"
        }
      },
      "CorrectionReadNotFoundProblemExample": {
        "summary": "Unknown Work Run requested for a correction operation.",
        "value": {
          "code": "work_run.not_found",
          "detail": "No Work Run exists for the supplied id in the caller scope.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 404,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Work Run not found",
          "type": "https://retvest.example/problems/work-run-not-found"
        }
      },
      "CorrectionReadValidationProblemExample": {
        "summary": "Correction read pagination parameters failed validation.",
        "value": {
          "code": "request.validation_failed",
          "detail": "One or more correction read query parameters failed validation.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections/audit",
          "invalid_params": [
            {
              "name": "query.limit",
              "reason": "Input should be less than or equal to 100."
            }
          ],
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 422,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Validation error",
          "type": "https://retvest.example/problems/validation-error"
        }
      },
      "CorrectionSequenceStaleProblemExample": {
        "summary": "Client expected_correction_sequence is stale after another correction was appended.",
        "value": {
          "code": "correction.sequence_stale",
          "conflict": {
            "conflict_kind": "stale_correction_sequence",
            "current_correction_sequence": 2,
            "expected_correction_sequence": 2,
            "retry_after_reload": true
          },
          "detail": "expected_correction_sequence 2 is stale because the latest committed correction_sequence is already 2. Reload correction history and retry with expected_correction_sequence 3.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction sequence stale",
          "type": "https://retvest.example/problems/correction-sequence-stale"
        }
      },
      "CorrectionTenantMismatchProblemExample": {
        "summary": "Caller tenant scope does not include this Work Run correction resource.",
        "value": {
          "code": "tenant.mismatch",
          "detail": "The requested Work Run is outside the caller's tenant scope, so corrections cannot be read or written.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 403,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Tenant mismatch",
          "type": "https://retvest.example/problems/tenant-mismatch"
        }
      },
      "CorrectionTimeoutProblemExample": {
        "summary": "Correction review service timed out before completing the operation.",
        "value": {
          "code": "service.timeout",
          "detail": "The correction review service timed out before completing this operation. Retry after waiting, reusing the same Idempotency-Key when replaying the same payload.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 504,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction service timeout",
          "type": "https://retvest.example/problems/correction-service-timeout"
        }
      },
      "CorrectionUnauthorizedProblemExample": {
        "summary": "Missing or expired session for a Work Run correction operation.",
        "value": {
          "code": "auth.required",
          "detail": "A valid retvest_session cookie is required before reading or writing Work Run corrections.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 401,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Authentication required",
          "type": "https://retvest.example/problems/authentication-required"
        }
      },
      "CorrectionUnavailableProblemExample": {
        "summary": "Correction review service is temporarily unavailable.",
        "value": {
          "code": "service.unavailable",
          "detail": "The correction review service is temporarily unavailable. Retry with exponential backoff and a fresh Idempotency-Key when the payload changes.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 503,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Correction service unavailable",
          "type": "https://retvest.example/problems/correction-service-unavailable"
        }
      },
      "CorrectionValidationProblemExample": {
        "summary": "Correction payload failed validation.",
        "value": {
          "code": "request.validation_failed",
          "detail": "One or more correction fields failed validation.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "invalid_params": [
            {
              "name": "body.consequence_status",
              "reason": "Input should be 'averted', 'contained', 'shipped_then_corrected' or 'unresolved'."
            }
          ],
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 422,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Validation error",
          "type": "https://retvest.example/problems/validation-error"
        }
      },
      "CorrectionVersionConflictProblemExample": {
        "summary": "Client expected_work_run_version is stale after another Work Run write.",
        "value": {
          "code": "correction.version_conflict",
          "conflict": {
            "conflict_kind": "stale_work_run_version",
            "current_work_run_version": 8,
            "expected_work_run_version": 7,
            "retry_after_reload": true
          },
          "detail": "expected_work_run_version 7 is stale because the current Work Run version is 8. Reload the Work Run and retry with expected_work_run_version 8.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections/corr_01J0Y9B7M4X1C7RV2R4FKY8G6M/apply",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 409,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Work Run version conflict",
          "type": "https://retvest.example/problems/correction-version-conflict"
        }
      },
      "FastApiValidationErrorExample": {
        "summary": "Legacy FastAPI validation body.",
        "value": {
          "detail": [
            {
              "loc": [
                "path",
                "work_run_id"
              ],
              "msg": "Input should be a valid UUID string",
              "type": "uuid_parsing"
            }
          ]
        }
      },
      "MalformedCorrectionPayloadProblemExample": {
        "summary": "Malformed correction payload.",
        "value": {
          "code": "request.malformed_json",
          "detail": "Correction payload must be a JSON object matching WorkRunCorrectionRequest.",
          "instance": "/admin/work-runs/a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad/corrections",
          "request_id": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "status": 400,
          "tenant_correlation_id": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "title": "Malformed correction payload",
          "type": "https://retvest.example/problems/malformed-json"
        }
      },
      "WorkRunCorrectionApplyRequestExample": {
        "summary": "Apply a pending correction with an optimistic Work Run version guard.",
        "value": {
          "expected_work_run_version": 7,
          "resolution_note": "Evidence gate passed after the correction was reviewed.",
          "resolution_reason_code": "evidence_gate_reconciled"
        }
      },
      "WorkRunCorrectionApplyResponseExample": {
        "summary": "Correction lifecycle row appended after applying the pending correction.",
        "value": {
          "consequence_status": "contained",
          "corrected_assertion": "The evidence key now references the reconciled access review artifact.",
          "corrected_by": "usr_compliance_lead",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1.reconciled",
          "correction_category": "evidence_reconciled",
          "correction_sequence": 2,
          "correction_status": "applied",
          "corrector_role": "Compliance Lead",
          "created_at": "2026-06-16T10:31:03Z",
          "evidence_ref": "doc:vndr-access-review-q1-reconciled#page=7",
          "id": "corr_01J0Y9K9M7B6R1Q3N4V9B2C5D",
          "observed_consequence": "The evidence gate re-ran successfully before export approval.",
          "original_assertion": "The access review evidence key referenced the unreconciled extract.",
          "prev_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
          "receipt_created_at": "2026-06-16T10:31:11Z",
          "receipt_digest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
          "rollback_ref": "work-run-event:evt_01J0Y9JQJHQ0N8YQ3TVFJ2Q6R4",
          "row_hash": "2f9d8f1bb2df5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bc",
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
          "work_run_state": "approved_for_export"
        }
      },
      "WorkRunCorrectionAuditResponseExample": {
        "summary": "Correction audit page with cursor and hash-chain metadata.",
        "value": {
          "audit_events": [
            {
              "actor": "usr_compliance_lead",
              "actor_role": "Compliance Lead",
              "correction_id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
              "correction_sequence": 1,
              "correction_status": "pending",
              "created_at": "2026-06-16T10:24:12Z",
              "event_type": "correction_recorded",
              "id": "aud_01J0Y9FHP6AJN9X7E0FW4QSB7G",
              "payload": {
                "consequence_status": "contained",
                "correction_category": "unsupported_claim",
                "correction_id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "correction_status": "pending",
                "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
              },
              "prev_hash": null,
              "receipt_created_at": "2026-06-16T10:24:18Z",
              "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad"
            },
            {
              "actor": "usr_compliance_lead",
              "actor_role": "Compliance Lead",
              "correction_id": "corr_01J0Y9K9M7B6R1Q3N4V9B2C5D",
              "correction_sequence": 2,
              "correction_status": "applied",
              "created_at": "2026-06-16T10:31:03Z",
              "event_type": "correction_applied",
              "id": "aud_01J0Y9KX1DK5MS94N3A8T6V2QH",
              "payload": {
                "consequence_status": "contained",
                "correction_category": "evidence_reconciled",
                "correction_id": "corr_01J0Y9K9M7B6R1Q3N4V9B2C5D",
                "correction_status": "applied",
                "receipt_digest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
              },
              "prev_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
              "receipt_created_at": "2026-06-16T10:31:11Z",
              "receipt_digest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
              "row_hash": "2f9d8f1bb2df5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bc",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad"
            },
            {
              "actor": "usr_quality_supervisor",
              "actor_role": "Quality Supervisor",
              "correction_id": "corr_01J0Y9R7REJECTED8G6MB4S2D1",
              "correction_sequence": 3,
              "correction_status": "rejected",
              "created_at": "2026-06-16T10:39:22Z",
              "event_type": "correction_rejected",
              "id": "aud_01J0Y9R9V1VHJ8DDY4T4VW8J5M",
              "payload": {
                "consequence_status": "unresolved",
                "correction_category": "unsupported_claim",
                "correction_id": "corr_01J0Y9R7REJECTED8G6MB4S2D1",
                "correction_status": "rejected",
                "receipt_digest": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
              },
              "prev_hash": "2f9d8f1bb2df5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bc",
              "receipt_created_at": "2026-06-16T10:39:30Z",
              "receipt_digest": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
              "row_hash": "b5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1abcd",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad"
            },
            {
              "actor": "usr_quality_supervisor",
              "actor_role": "Quality Supervisor",
              "correction_id": "corr_01J0Y9SUPERSEDED8G6MB4S2D2",
              "correction_sequence": 4,
              "correction_status": "superseded",
              "created_at": "2026-06-16T10:46:18Z",
              "event_type": "correction_superseded",
              "id": "aud_01J0Y9SUPERSEDED4T4VW8J6N",
              "payload": {
                "consequence_status": "contained",
                "correction_category": "replacement_correction",
                "correction_id": "corr_01J0Y9SUPERSEDED8G6MB4S2D2",
                "correction_status": "superseded",
                "failure_metadata": {
                  "failure_reason_code": "replaced_by_later_correction",
                  "redacted_fields": [
                    "correction_body_text"
                  ]
                },
                "receipt_digest": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
              },
              "prev_hash": "b5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1abcd",
              "receipt_created_at": "2026-06-16T10:46:25Z",
              "receipt_digest": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
              "row_hash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad"
            }
          ],
          "filters": {
            "actor": null,
            "event_type": null
          },
          "pagination": {
            "cursor": null,
            "has_more": false,
            "limit": 25,
            "next_cursor": null,
            "next_offset": null,
            "offset": 0,
            "total": 4
          },
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad"
        }
      },
      "WorkRunCorrectionCreateResponseExample": {
        "summary": "Create response envelope for a newly appended correction row.",
        "value": {
          "append_receipt": {
            "append_only": true,
            "correction_sequence": 1,
            "effect": "appended",
            "idempotency_replayed": false,
            "prev_hash": null,
            "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321"
          },
          "consequence_status": "contained",
          "corrected_assertion": "The vendor access review evidence covers Q1 only.",
          "corrected_by": "usr_compliance_lead",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
          "correction": {
            "consequence_status": "contained",
            "corrected_assertion": "The vendor access review evidence covers Q1 only.",
            "corrected_by": "usr_compliance_lead",
            "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
            "correction_category": "unsupported_claim",
            "correction_sequence": 1,
            "correction_status": "pending",
            "corrector_role": "Compliance Lead",
            "created_at": "2026-06-16T10:24:12Z",
            "evidence_ref": "doc:vndr-access-review-q1#page=4",
            "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
            "original_assertion": "The vendor access review was completed in Q2.",
            "prev_hash": null,
            "receipt_created_at": "2026-06-16T10:24:18Z",
            "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
            "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
            "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "work_run_state": "awaiting_approval"
          },
          "correction_category": "unsupported_claim",
          "correction_sequence": 1,
          "correction_status": "pending",
          "corrector_role": "Compliance Lead",
          "created_at": "2026-06-16T10:24:12Z",
          "evidence_ref": "doc:vndr-access-review-q1#page=4",
          "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
          "original_assertion": "The vendor access review was completed in Q2.",
          "prev_hash": null,
          "receipt_created_at": "2026-06-16T10:24:18Z",
          "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
          "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
          "work_run_state": "awaiting_approval"
        }
      },
      "WorkRunCorrectionIdempotentRetryResponseExample": {
        "summary": "Create response envelope for the same Idempotency-Key and same payload retry of the original correction.",
        "value": {
          "append_receipt": {
            "append_only": true,
            "correction_sequence": 1,
            "effect": "idempotent_replay",
            "idempotency_replayed": true,
            "prev_hash": null,
            "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321"
          },
          "consequence_status": "contained",
          "corrected_assertion": "The vendor access review evidence covers Q1 only.",
          "corrected_by": "usr_compliance_lead",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
          "correction": {
            "consequence_status": "contained",
            "corrected_assertion": "The vendor access review evidence covers Q1 only.",
            "corrected_by": "usr_compliance_lead",
            "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
            "correction_category": "unsupported_claim",
            "correction_sequence": 1,
            "correction_status": "pending",
            "corrector_role": "Compliance Lead",
            "created_at": "2026-06-16T10:24:12Z",
            "evidence_ref": "doc:vndr-access-review-q1#page=4",
            "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
            "original_assertion": "The vendor access review was completed in Q2.",
            "prev_hash": null,
            "receipt_created_at": "2026-06-16T10:24:18Z",
            "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
            "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
            "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "work_run_state": "awaiting_approval"
          },
          "correction_category": "unsupported_claim",
          "correction_sequence": 1,
          "correction_status": "pending",
          "corrector_role": "Compliance Lead",
          "created_at": "2026-06-16T10:24:12Z",
          "evidence_ref": "doc:vndr-access-review-q1#page=4",
          "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
          "original_assertion": "The vendor access review was completed in Q2.",
          "prev_hash": null,
          "receipt_created_at": "2026-06-16T10:24:18Z",
          "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
          "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
          "work_run_state": "awaiting_approval"
        }
      },
      "WorkRunCorrectionLedgerResponseExample": {
        "summary": "Paginated correction ledger page with cursor metadata.",
        "value": {
          "corrections": [
            {
              "consequence_status": "contained",
              "corrected_assertion": "The vendor access review evidence covers Q1 only.",
              "corrected_by": "usr_compliance_lead",
              "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
              "correction_category": "unsupported_claim",
              "correction_sequence": 1,
              "correction_status": "pending",
              "corrector_role": "Compliance Lead",
              "created_at": "2026-06-16T10:24:12Z",
              "evidence_ref": "doc:vndr-access-review-q1#page=4",
              "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
              "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
              "original_assertion": "The vendor access review was completed in Q2.",
              "prev_hash": null,
              "receipt_created_at": "2026-06-16T10:24:18Z",
              "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
              "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
              "work_run_state": "awaiting_approval"
            },
            {
              "consequence_status": "contained",
              "corrected_assertion": "The evidence key now references the reconciled access review artifact.",
              "corrected_by": "usr_compliance_lead",
              "corrected_evidence_key": "evidence.controls.soc2.cc6_1.reconciled",
              "correction_category": "evidence_reconciled",
              "correction_sequence": 2,
              "correction_status": "applied",
              "corrector_role": "Compliance Lead",
              "created_at": "2026-06-16T10:31:03Z",
              "evidence_ref": "doc:vndr-access-review-q1-reconciled#page=7",
              "id": "corr_01J0Y9K9M7B6R1Q3N4V9B2C5D",
              "observed_consequence": "The evidence gate re-ran successfully before export approval.",
              "original_assertion": "The access review evidence key referenced the unreconciled extract.",
              "prev_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
              "receipt_created_at": "2026-06-16T10:31:11Z",
              "receipt_digest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
              "rollback_ref": "work-run-event:evt_01J0Y9JQJHQ0N8YQ3TVFJ2Q6R4",
              "row_hash": "2f9d8f1bb2df5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bc",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
              "work_run_state": "approved_for_export"
            },
            {
              "consequence_status": "unresolved",
              "corrected_assertion": "The vendor access review evidence covers Q2.",
              "corrected_by": "usr_quality_supervisor",
              "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
              "correction_category": "unsupported_claim",
              "correction_sequence": 3,
              "correction_status": "rejected",
              "corrector_role": "Quality Supervisor",
              "created_at": "2026-06-16T10:39:22Z",
              "evidence_ref": "doc:vndr-access-review-q2#page=2",
              "id": "corr_01J0Y9R7REJECTED8G6MB4S2D1",
              "observed_consequence": "The evidence gate stayed blocked because the supplied artifact did not support the corrected assertion.",
              "original_assertion": "The vendor access review was completed in Q2.",
              "prev_hash": "2f9d8f1bb2df5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bc",
              "receipt_created_at": "2026-06-16T10:39:30Z",
              "receipt_digest": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
              "rollback_ref": "work-run-event:evt_01J0Y9QH6ZJGYB2EVF7SW49W0C",
              "row_hash": "b5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1abcd",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
              "work_run_state": "blocked_by_evidence_gates"
            },
            {
              "consequence_status": "contained",
              "corrected_assertion": "A later correction narrowed the replacement to Q1 evidence only.",
              "corrected_by": "usr_quality_supervisor",
              "corrected_evidence_key": "evidence.controls.soc2.cc6_1.reconciled",
              "correction_category": "replacement_correction",
              "correction_sequence": 4,
              "correction_status": "superseded",
              "corrector_role": "Quality Supervisor",
              "created_at": "2026-06-16T10:46:18Z",
              "evidence_ref": "doc:vndr-access-review-q1-reconciled#page=8",
              "id": "corr_01J0Y9SUPERSEDED8G6MB4S2D2",
              "observed_consequence": "The earlier rejected replacement attempt stayed in the append-only ledger and this later correction replaced its effect.",
              "original_assertion": "The replacement correction covered a broader evidence period than the artifact supported.",
              "prev_hash": "b5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1abcd",
              "receipt_created_at": "2026-06-16T10:46:25Z",
              "receipt_digest": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
              "rollback_ref": "work-run-event:evt_01J0Y9SUPERSEDED8G6MB4S2",
              "row_hash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
              "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
              "work_run_state": "awaiting_approval"
            }
          ],
          "filters": {
            "consequence_status": null,
            "corrected_by": null,
            "correction_category": null
          },
          "pagination": {
            "cursor": null,
            "has_more": false,
            "limit": 25,
            "next_cursor": null,
            "next_offset": null,
            "offset": 0,
            "total": 4
          },
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad"
        }
      },
      "WorkRunCorrectionRejectRequestExample": {
        "summary": "Reject a pending correction with an optimistic Work Run version guard.",
        "value": {
          "expected_work_run_version": 7,
          "resolution_note": "The submitted evidence did not support the corrected assertion.",
          "resolution_reason_code": "unsupported_evidence"
        }
      },
      "WorkRunCorrectionRejectResponseExample": {
        "summary": "Correction lifecycle row appended after rejecting the pending correction.",
        "value": {
          "consequence_status": "unresolved",
          "corrected_assertion": "The vendor access review evidence covers Q2.",
          "corrected_by": "usr_quality_supervisor",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
          "correction_category": "unsupported_claim",
          "correction_sequence": 3,
          "correction_status": "rejected",
          "corrector_role": "Quality Supervisor",
          "created_at": "2026-06-16T10:39:22Z",
          "evidence_ref": "doc:vndr-access-review-q2#page=2",
          "id": "corr_01J0Y9R7REJECTED8G6MB4S2D1",
          "observed_consequence": "The evidence gate stayed blocked because the supplied artifact did not support the corrected assertion.",
          "original_assertion": "The vendor access review was completed in Q2.",
          "prev_hash": "2f9d8f1bb2df5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bc",
          "receipt_created_at": "2026-06-16T10:39:30Z",
          "receipt_digest": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
          "rollback_ref": "work-run-event:evt_01J0Y9QH6ZJGYB2EVF7SW49W0C",
          "row_hash": "b5c943217ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1abcd",
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
          "work_run_state": "blocked_by_evidence_gates"
        }
      },
      "WorkRunCorrectionRequestExample": {
        "summary": "Record an append-only correction for an unsupported claim.",
        "value": {
          "consequence_status": "contained",
          "corrected_assertion": "The vendor access review evidence covers Q1 only.",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
          "correction_category": "unsupported_claim",
          "evidence_ref": "doc:vndr-access-review-q1#page=4",
          "expected_correction_sequence": 1,
          "expected_work_run_version": 7,
          "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
          "original_assertion": "The vendor access review was completed in Q2.",
          "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47"
        }
      },
      "WorkRunCorrectionResponseExample": {
        "summary": "Compatibility alias for the correction create response envelope.",
        "value": {
          "append_receipt": {
            "append_only": true,
            "correction_sequence": 1,
            "effect": "appended",
            "idempotency_replayed": false,
            "prev_hash": null,
            "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321"
          },
          "consequence_status": "contained",
          "corrected_assertion": "The vendor access review evidence covers Q1 only.",
          "corrected_by": "usr_compliance_lead",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
          "correction": {
            "consequence_status": "contained",
            "corrected_assertion": "The vendor access review evidence covers Q1 only.",
            "corrected_by": "usr_compliance_lead",
            "corrected_evidence_key": "evidence.controls.soc2.cc6_1",
            "correction_category": "unsupported_claim",
            "correction_sequence": 1,
            "correction_status": "pending",
            "corrector_role": "Compliance Lead",
            "created_at": "2026-06-16T10:24:12Z",
            "evidence_ref": "doc:vndr-access-review-q1#page=4",
            "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
            "original_assertion": "The vendor access review was completed in Q2.",
            "prev_hash": null,
            "receipt_created_at": "2026-06-16T10:24:18Z",
            "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
            "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
            "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "work_run_state": "awaiting_approval"
          },
          "correction_category": "unsupported_claim",
          "correction_sequence": 1,
          "correction_status": "pending",
          "corrector_role": "Compliance Lead",
          "created_at": "2026-06-16T10:24:12Z",
          "evidence_ref": "doc:vndr-access-review-q1#page=4",
          "id": "corr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
          "observed_consequence": "The export stayed blocked until the claim was corrected and re-evaluated.",
          "original_assertion": "The vendor access review was completed in Q2.",
          "prev_hash": null,
          "receipt_created_at": "2026-06-16T10:24:18Z",
          "receipt_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "rollback_ref": "work-run-event:evt_01J0Y9BR4M4S8JC51SV8XJ7T47",
          "row_hash": "7ad0fb19640a7e75b8cf56dbcb4a17f39e7d2f29c22bb2f9d8f1bb2df5c94321",
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
          "work_run_state": "awaiting_approval"
        }
      },
      "WorkRunCorrectionRetryRequestExample": {
        "summary": "Retry correction review with an optimistic Work Run version guard.",
        "value": {
          "expected_work_run_version": 8,
          "resolution_note": "Retry review after the external evidence attachment was corrected.",
          "resolution_reason_code": "operator_requested_retry"
        }
      },
      "WorkRunCorrectionRetryResponseExample": {
        "summary": "Append-only retry row recorded for another correction review attempt.",
        "value": {
          "consequence_status": "contained",
          "corrected_assertion": "The vendor access review evidence covers Q1 only after corrected attachment review.",
          "corrected_by": "usr_compliance_lead",
          "corrected_evidence_key": "evidence.controls.soc2.cc6_1.retried",
          "correction_category": "review_retry",
          "correction_sequence": 5,
          "correction_status": "pending",
          "corrector_role": "Compliance Lead",
          "created_at": "2026-06-16T10:52:44Z",
          "evidence_ref": "doc:vndr-access-review-q1-retry#page=5",
          "id": "corr_01J0Y9RETRY8G6MB4S2D3",
          "observed_consequence": "The correction review was re-queued without mutating the earlier applied or rejected rows.",
          "original_assertion": "The prior correction review needs a replay after attachment metadata changed.",
          "prev_hash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
          "receipt_created_at": "2026-06-16T10:52:51Z",
          "receipt_digest": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
          "rollback_ref": "work-run-event:evt_01J0Y9RETRY8G6MB4S2D3",
          "row_hash": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
          "work_run_id": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
          "work_run_state": "awaiting_approval"
        }
      }
    },
    "schemas": {
      "CorrectionAccessProblem": {
        "description": "Reusable 403 Problem branches for correction role authorization and tenant isolation failures.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CorrectionForbiddenProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionTenantMismatchProblem"
          }
        ],
        "title": "CorrectionAccessProblem"
      },
      "CorrectionAlreadyFinalizedProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.already_finalized",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "already_finalized",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for lifecycle races where the correction was already finalized."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Correction lifecycle write arrived after the correction was already applied, rejected, superseded, or otherwise finalized.",
        "title": "CorrectionAlreadyFinalizedProblem"
      },
      "CorrectionAuthProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "auth.required",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 401,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Authentication required before reading or writing Work Run corrections.",
        "title": "CorrectionAuthProblem"
      },
      "CorrectionBadRequestProblem": {
        "description": "Reusable 400 Problem branches for correction create validation before a correction row is appended.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CorrectionIdempotencyMissingKeyProblem"
          },
          {
            "$ref": "#/components/schemas/MalformedCorrectionPayloadProblem"
          }
        ],
        "title": "CorrectionBadRequestProblem"
      },
      "CorrectionCancellationProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "request.cancelled",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 499,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "The caller cancelled the Work Run correction operation before the service completed it; clients should retry only when the same caller intent is still active.",
        "title": "CorrectionCancellationProblem"
      },
      "CorrectionCursorConflictProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.cursor_stale",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "stale_correction_cursor",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for stale correction list cursors."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Correction list cursor was issued for an older ledger position and clients must reload the first page before continuing.",
        "title": "CorrectionCursorConflictProblem"
      },
      "CorrectionDuplicateActiveProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.active_duplicate",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "duplicate_active_correction",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for this Problem branch."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Another active correction already blocks this Work Run correction append.",
        "title": "CorrectionDuplicateActiveProblem"
      },
      "CorrectionForbiddenProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "auth.permission_denied",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 403,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Authenticated caller lacks the role required to review Work Run corrections.",
        "title": "CorrectionForbiddenProblem"
      },
      "CorrectionIdempotencyConflictProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "idempotency.conflict",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "idempotency_payload_mismatch",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for this Problem branch."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Idempotency-Key was reused for the same Work Run with a different correction payload.",
        "title": "CorrectionIdempotencyConflictProblem"
      },
      "CorrectionIdempotencyMissingKeyProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "idempotency.missing_key",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 400,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction create request omitted the Idempotency-Key header.",
        "title": "CorrectionIdempotencyMissingKeyProblem"
      },
      "CorrectionInvalidTransitionProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.invalid_transition",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "invalid_transition",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for invalid lifecycle transitions."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Requested correction lifecycle transition is not valid for the current correction status.",
        "title": "CorrectionInvalidTransitionProblem"
      },
      "CorrectionInvalidWorkRunStateProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.invalid_work_run_state",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "invalid_work_run_state",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for this Problem branch."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Current Work Run state does not allow correction writes.",
        "title": "CorrectionInvalidWorkRunStateProblem"
      },
      "CorrectionMissingWorkRunProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "work_run.not_found",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 404,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "The requested Work Run is missing from the caller scope for correction operations.",
        "title": "CorrectionMissingWorkRunProblem"
      },
      "CorrectionRateLimitProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "rate_limit.exceeded",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 429,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction request rate limit was exceeded; clients should honor Retry-After before retrying.",
        "title": "CorrectionRateLimitProblem"
      },
      "CorrectionReadBadRequestProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "request.invalid_query",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 400,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction list query parameters were invalid before a ledger page could be read.",
        "title": "CorrectionReadBadRequestProblem"
      },
      "CorrectionSequenceStaleProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.sequence_stale",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "stale_correction_sequence",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for this Problem branch."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Client expected_correction_sequence is stale for this Work Run.",
        "title": "CorrectionSequenceStaleProblem"
      },
      "CorrectionTenantMismatchProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "tenant.mismatch",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 403,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Caller tenant scope does not include the requested Work Run correction resource.",
        "title": "CorrectionTenantMismatchProblem"
      },
      "CorrectionTimeoutProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "service.timeout",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 504,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction review service timed out before completing the operation; clients should retry with backoff and honor Retry-After.",
        "title": "CorrectionTimeoutProblem"
      },
      "CorrectionUnavailableProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "service.unavailable",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 503,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction review service is temporarily unavailable; clients should retry with backoff.",
        "title": "CorrectionUnavailableProblem"
      },
      "CorrectionValidationProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "request.validation_failed",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 422,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction create, history, or audit parameters failed validation.",
        "title": "CorrectionValidationProblem"
      },
      "CorrectionVersionConflictProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "correction.version_conflict",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "conflict": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
                  },
                  {
                    "properties": {
                      "conflict_kind": {
                        "const": "stale_work_run_version",
                        "description": "Pinned correction conflict branch for SDK handling.",
                        "title": "Conflict Kind",
                        "type": "string"
                      }
                    },
                    "required": [
                      "conflict_kind"
                    ],
                    "type": "object"
                  }
                ],
                "description": "Typed correction conflict metadata for stale Work Run version writes."
              },
              "status": {
                "const": 409,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status",
              "conflict"
            ],
            "type": "object"
          }
        ],
        "description": "Correction write expected_work_run_version was stale; clients must reload Work Run state before retrying.",
        "title": "CorrectionVersionConflictProblem"
      },
      "CorrectionWriteConflictProblem": {
        "description": "Reusable 409 Problem branches for correction write conflicts that clients can branch on, including stale preconditions, duplicate writes, invalid lifecycle transitions, and already-finalized races.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CorrectionIdempotencyConflictProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionVersionConflictProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionSequenceStaleProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionDuplicateActiveProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionInvalidWorkRunStateProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionInvalidTransitionProblem"
          },
          {
            "$ref": "#/components/schemas/CorrectionAlreadyFinalizedProblem"
          }
        ],
        "title": "CorrectionWriteConflictProblem"
      },
      "HTTPValidationError": {
        "description": "HTTPValidationError contract schema generated by the Retvest API.",
        "properties": {
          "detail": {
            "description": "HTTPValidationError.detail contract field.",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "MalformedCorrectionPayloadProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "code": {
                "const": "request.malformed_json",
                "description": "Stable Retvest application error code for correction clients.",
                "title": "Code",
                "type": "string"
              },
              "status": {
                "const": 400,
                "description": "HTTP status for this correction Problem branch.",
                "title": "Status",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "status"
            ],
            "type": "object"
          }
        ],
        "description": "Correction create request body was not a valid JSON object for WorkRunCorrectionRequest.",
        "title": "MalformedCorrectionPayloadProblem"
      },
      "ProblemDetail": {
        "description": "RFC 7807 problem detail response for work-run API errors.",
        "properties": {
          "code": {
            "description": "Stable Retvest application error code for client branching.",
            "title": "Code",
            "type": "string"
          },
          "conflict": {
            "$ref": "#/components/schemas/WorkRunCorrectionConflictMetadata"
          },
          "detail": {
            "description": "Human-readable explanation specific to this occurrence.",
            "title": "Detail",
            "type": "string"
          },
          "instance": {
            "description": "Request path or occurrence identifier for this problem.",
            "title": "Instance",
            "type": "string"
          },
          "request_id": {
            "description": "Opaque request id for support correlation. Safe to log; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "maxLength": 128,
            "minLength": 1,
            "title": "Request Id",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code for this occurrence.",
            "maximum": 599,
            "minimum": 400,
            "title": "Status",
            "type": "integer"
          },
          "tenant_correlation_id": {
            "description": "Opaque tenant correlation id for cross-service correction routing. Safe to log; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "maxLength": 128,
            "minLength": 1,
            "title": "Tenant Correlation Id",
            "type": "string"
          },
          "title": {
            "description": "Short, human-readable problem summary.",
            "title": "Title",
            "type": "string"
          },
          "type": {
            "default": "about:blank",
            "description": "Stable URI reference identifying the problem type.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "title": "ProblemDetail",
        "type": "object"
      },
      "ValidationError": {
        "description": "ValidationError contract schema generated by the Retvest API.",
        "properties": {
          "loc": {
            "description": "ValidationError.loc contract field.",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "description": "ValidationError.msg contract field.",
            "title": "Message",
            "type": "string"
          },
          "type": {
            "description": "ValidationError.type contract field.",
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "ValidationProblemDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetail"
          },
          {
            "properties": {
              "invalid_params": {
                "description": "Request members that failed validation.",
                "items": {
                  "$ref": "#/components/schemas/ValidationProblemInvalidParam"
                },
                "title": "Invalid Params",
                "type": "array"
              }
            },
            "required": [
              "invalid_params"
            ],
            "type": "object"
          }
        ],
        "description": "RFC 7807 validation problem response with invalid request member details.",
        "title": "ValidationProblemDetail"
      },
      "ValidationProblemInvalidParam": {
        "description": "Single invalid request member reported in a validation problem.",
        "properties": {
          "name": {
            "description": "Dotted request location such as body.consequence_status or path.work_run_id.",
            "title": "Name",
            "type": "string"
          },
          "reason": {
            "description": "Validation failure for the request member.",
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "name",
          "reason"
        ],
        "title": "ValidationProblemInvalidParam",
        "type": "object"
      },
      "WorkRunCorrectionAppendReceipt": {
        "additionalProperties": false,
        "description": "Append-only receipt envelope for a correction create response. The receipt repeats the immutable sequence and hash-chain fields from correction so consumers can persist proof metadata without mutating the correction row.",
        "properties": {
          "append_only": {
            "const": true,
            "default": true,
            "description": "Always true: correction create responses append rows and never mutate earlier correction records.",
            "readOnly": true,
            "title": "Append Only",
            "type": "boolean"
          },
          "correction_sequence": {
            "description": "One-based append-only sequence assigned to the correction row.",
            "minimum": 1.0,
            "readOnly": true,
            "title": "Correction Sequence",
            "type": "integer"
          },
          "effect": {
            "description": "Whether this response appended a new row or replayed the original row for an idempotent retry with the same key and payload.",
            "enum": [
              "appended",
              "idempotent_replay"
            ],
            "readOnly": true,
            "title": "Effect",
            "type": "string"
          },
          "idempotency_replayed": {
            "description": "True when the service returned the previously appended row for the same Work Run, Idempotency-Key, and payload.",
            "readOnly": true,
            "title": "Idempotency Replayed",
            "type": "boolean"
          },
          "prev_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Previous correction audit row hash copied from the immutable correction row, or null for the first correction.",
            "readOnly": true,
            "title": "Prev Hash"
          },
          "receipt_digest": {
            "description": "SHA-256 correction receipt digest copied from the immutable correction row.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Receipt Digest",
            "type": "string"
          },
          "row_hash": {
            "description": "SHA-256 row hash copied from the immutable correction row.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Row Hash",
            "type": "string"
          }
        },
        "required": [
          "effect",
          "append_only",
          "correction_sequence",
          "prev_hash",
          "row_hash",
          "receipt_digest",
          "idempotency_replayed"
        ],
        "title": "WorkRunCorrectionAppendReceipt",
        "type": "object"
      },
      "WorkRunCorrectionAuditEvent": {
        "description": "Hash-chained correction audit event for a governed Work Run. Events are ordered oldest-first by created_at, then id.",
        "properties": {
          "actor": {
            "description": "Display-safe actor identifier that performed this correction audit event.",
            "readOnly": true,
            "title": "Actor",
            "type": "string"
          },
          "actor_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional role or service role associated with the actor at event time.",
            "readOnly": true,
            "title": "Actor Role"
          },
          "correction_id": {
            "description": "Correction id linked to this audit event.",
            "readOnly": true,
            "title": "Correction Id",
            "type": "string"
          },
          "correction_sequence": {
            "description": "One-based append-only correction sequence within this Work Run.",
            "minimum": 1,
            "readOnly": true,
            "title": "Correction Sequence",
            "type": "integer"
          },
          "correction_status": {
            "$ref": "#/components/schemas/WorkRunCorrectionStatus",
            "readOnly": true
          },
          "created_at": {
            "description": "Timestamp when this correction audit event was appended.",
            "readOnly": true,
            "title": "Created At",
            "type": "string"
          },
          "event_type": {
            "description": "Stable audit event type for correction lifecycle branching.",
            "readOnly": true,
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "description": "Stable correction audit event id.",
            "readOnly": true,
            "title": "Id",
            "type": "string"
          },
          "payload": {
            "description": "Bounded audit payload with correction metadata only; raw assertion, correction text, observed consequence text, and idempotency key values are intentionally omitted.",
            "readOnly": true,
            "title": "Payload",
            "type": "object"
          },
          "prev_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Previous audit row hash in the tamper-evident chain, or null for the first row.",
            "readOnly": true,
            "title": "Prev Hash"
          },
          "receipt_created_at": {
            "description": "Timestamp when the correction audit receipt was recorded.",
            "format": "date-time",
            "readOnly": true,
            "title": "Receipt Created At",
            "type": "string"
          },
          "receipt_digest": {
            "description": "SHA-256 digest for the correction audit receipt.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Receipt Digest",
            "type": "string"
          },
          "row_hash": {
            "description": "SHA-256 row hash for this audit event.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Row Hash",
            "type": "string"
          },
          "work_run_id": {
            "description": "Work Run id whose correction audit trail contains this event.",
            "readOnly": true,
            "title": "Work Run Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "work_run_id",
          "event_type",
          "actor",
          "actor_role",
          "correction_id",
          "correction_sequence",
          "correction_status",
          "payload",
          "prev_hash",
          "receipt_created_at",
          "receipt_digest",
          "row_hash",
          "created_at"
        ],
        "title": "WorkRunCorrectionAuditEvent",
        "type": "object"
      },
      "WorkRunCorrectionAuditFilters": {
        "additionalProperties": false,
        "description": "Filters applied to the current Work Run correction audit page. Null means the filter was not supplied.",
        "properties": {
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actor filter applied to the audit page.",
            "title": "Actor"
          },
          "event_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Event type filter applied to the audit page.",
            "title": "Event Type"
          }
        },
        "required": [
          "event_type",
          "actor"
        ],
        "title": "WorkRunCorrectionAuditFilters",
        "type": "object"
      },
      "WorkRunCorrectionAuditResponse": {
        "additionalProperties": false,
        "description": "Paginated correction audit trail for a governed Work Run with applied filters echoed for client state.",
        "properties": {
          "audit_events": {
            "description": "Correction audit events for the requested page.",
            "items": {
              "$ref": "#/components/schemas/WorkRunCorrectionAuditEvent"
            },
            "title": "Audit Events",
            "type": "array"
          },
          "filters": {
            "$ref": "#/components/schemas/WorkRunCorrectionAuditFilters",
            "description": "WorkRunCorrectionAuditResponse.filters contract field."
          },
          "pagination": {
            "$ref": "#/components/schemas/WorkRunCorrectionPagePagination",
            "description": "WorkRunCorrectionAuditResponse.pagination contract field."
          },
          "work_run_id": {
            "description": "Work Run id whose correction audit trail is returned.",
            "title": "Work Run Id",
            "type": "string"
          }
        },
        "required": [
          "work_run_id",
          "filters",
          "pagination",
          "audit_events"
        ],
        "title": "WorkRunCorrectionAuditResponse",
        "type": "object"
      },
      "WorkRunCorrectionConflictMetadata": {
        "description": "Typed RFC 7807 extension metadata for Work Run correction 409 responses.",
        "properties": {
          "active_correction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing active correction that blocks this write, when conflict_kind is duplicate_active_correction.",
            "title": "Active Correction Id"
          },
          "allowed_correction_statuses": {
            "description": "Correction statuses that allow the requested lifecycle transition when conflict_kind is invalid_transition.",
            "items": {
              "type": "string"
            },
            "title": "Allowed Correction Statuses",
            "type": "array"
          },
          "allowed_work_run_states": {
            "description": "Work Run states that accept correction writes when conflict_kind is invalid_work_run_state.",
            "items": {
              "type": "string"
            },
            "title": "Allowed Work Run States",
            "type": "array"
          },
          "conflict_kind": {
            "description": "Machine-readable correction conflict branch, including stale preconditions, duplicate active writes, stale read cursors, invalid transitions, and already-finalized lifecycle races.",
            "enum": [
              "idempotency_payload_mismatch",
              "stale_work_run_version",
              "stale_correction_sequence",
              "duplicate_active_correction",
              "stale_correction_cursor",
              "invalid_work_run_state",
              "invalid_transition",
              "already_finalized"
            ],
            "title": "Conflict Kind",
            "type": "string"
          },
          "current_correction_sequence": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest committed correction_sequence for this Work Run when the conflict was detected.",
            "title": "Current Correction Sequence"
          },
          "current_correction_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current correction lifecycle status that rejected the requested transition.",
            "title": "Current Correction Status"
          },
          "current_work_run_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current Work Run state that rejected the correction write.",
            "title": "Current Work Run State"
          },
          "current_work_run_version": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current Work Run version when the correction write conflict was detected.",
            "title": "Current Work Run Version"
          },
          "expected_correction_sequence": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Client-supplied expected_correction_sequence that guarded the append.",
            "title": "Expected Correction Sequence"
          },
          "expected_work_run_version": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Client-supplied expected_work_run_version that guarded the correction write.",
            "title": "Expected Work Run Version"
          },
          "retry_after_reload": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether a client may retry after reloading current correction state.",
            "title": "Retry After Reload"
          }
        },
        "required": [
          "conflict_kind"
        ],
        "title": "WorkRunCorrectionConflictMetadata",
        "type": "object"
      },
      "WorkRunCorrectionCreateResponse": {
        "additionalProperties": false,
        "description": "Additive append-only create response envelope for Work Run corrections. Existing top-level correction fields remain for compatibility; correction repeats the immutable row and append_receipt mirrors sequence/hash proof for idempotent client persistence.",
        "properties": {
          "append_receipt": {
            "$ref": "#/components/schemas/WorkRunCorrectionAppendReceipt",
            "description": "WorkRunCorrectionCreateResponse.append_receipt contract field."
          },
          "consequence_status": {
            "description": "Append-only consequence status captured when this row was created.",
            "readOnly": true,
            "title": "Consequence Status",
            "type": "string"
          },
          "corrected_assertion": {
            "description": "Immutable corrected assertion text captured for this correction row.",
            "readOnly": true,
            "title": "Corrected Assertion",
            "type": "string"
          },
          "corrected_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Principal that submitted this immutable correction row, or null for system-generated corrections.",
            "readOnly": true,
            "title": "Corrected By"
          },
          "corrected_evidence_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence key corrected by this immutable row, or null when the correction did not target a named evidence key.",
            "readOnly": true,
            "title": "Corrected Evidence Key"
          },
          "correction": {
            "$ref": "#/components/schemas/WorkRunCorrectionResponse",
            "description": "WorkRunCorrectionCreateResponse.correction contract field."
          },
          "correction_category": {
            "description": "Immutable correction category attached during row append.",
            "readOnly": true,
            "title": "Correction Category",
            "type": "string"
          },
          "correction_sequence": {
            "description": "One-based append-only sequence assigned to this correction within the Work Run.",
            "minimum": 1.0,
            "readOnly": true,
            "title": "Correction Sequence",
            "type": "integer"
          },
          "correction_status": {
            "$ref": "#/components/schemas/WorkRunCorrectionStatus",
            "readOnly": true
          },
          "corrector_role": {
            "description": "Role asserted for the principal that appended this correction row.",
            "readOnly": true,
            "title": "Corrector Role",
            "type": "string"
          },
          "created_at": {
            "description": "Timestamp when this correction row was appended to the Work Run ledger.",
            "readOnly": true,
            "title": "Created At",
            "type": "string"
          },
          "evidence_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable evidence reference associated with this correction row.",
            "readOnly": true,
            "title": "Evidence Ref"
          },
          "id": {
            "description": "Stable correction row identifier.",
            "readOnly": true,
            "title": "Id",
            "type": "string"
          },
          "observed_consequence": {
            "description": "Immutable consequence statement observed when this correction row was appended.",
            "readOnly": true,
            "title": "Observed Consequence",
            "type": "string"
          },
          "original_assertion": {
            "description": "Immutable original assertion text captured for this correction row.",
            "readOnly": true,
            "title": "Original Assertion",
            "type": "string"
          },
          "prev_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Previous correction audit row hash in the tamper-evident chain, or null for the first correction.",
            "readOnly": true,
            "title": "Prev Hash"
          },
          "receipt_created_at": {
            "description": "Timestamp when the correction audit receipt was recorded.",
            "format": "date-time",
            "readOnly": true,
            "title": "Receipt Created At",
            "type": "string"
          },
          "receipt_digest": {
            "description": "SHA-256 digest for the correction audit receipt.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Receipt Digest",
            "type": "string"
          },
          "rollback_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable rollback reference associated with this correction row.",
            "readOnly": true,
            "title": "Rollback Ref"
          },
          "row_hash": {
            "description": "SHA-256 row hash for this correction.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Row Hash",
            "type": "string"
          },
          "work_run_id": {
            "description": "Work Run id whose correction ledger received the append.",
            "readOnly": true,
            "title": "Work Run Id",
            "type": "string"
          },
          "work_run_state": {
            "description": "Work Run state observed after the correction append or idempotent replay.",
            "readOnly": true,
            "title": "Work Run State",
            "type": "string"
          }
        },
        "required": [
          "append_receipt",
          "consequence_status",
          "corrected_assertion",
          "corrected_by",
          "corrected_evidence_key",
          "correction",
          "correction_category",
          "correction_sequence",
          "correction_status",
          "corrector_role",
          "created_at",
          "evidence_ref",
          "id",
          "observed_consequence",
          "original_assertion",
          "prev_hash",
          "receipt_created_at",
          "receipt_digest",
          "rollback_ref",
          "row_hash",
          "work_run_id",
          "work_run_state"
        ],
        "title": "WorkRunCorrectionCreateResponse",
        "type": "object"
      },
      "WorkRunCorrectionLedgerEntry": {
        "description": "Append-only correction ledger entry for a governed Work Run. Entries are ordered by correction_sequence and are never updated in place.",
        "properties": {
          "consequence_status": {
            "description": "Consequence status recorded by this immutable correction row, such as averted or unresolved.",
            "readOnly": true,
            "title": "Consequence Status",
            "type": "string"
          },
          "corrected_assertion": {
            "description": "Corrected assertion text captured in this immutable append-only correction ledger row.",
            "readOnly": true,
            "title": "Corrected Assertion",
            "type": "string"
          },
          "corrected_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional user or service identifier that submitted the correction.",
            "readOnly": true,
            "title": "Corrected By"
          },
          "corrected_evidence_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable evidence item key the correction points to.",
            "readOnly": true,
            "title": "Corrected Evidence Key"
          },
          "correction_category": {
            "description": "Immutable machine-readable correction category supplied by the reviewer.",
            "readOnly": true,
            "title": "Correction Category",
            "type": "string"
          },
          "correction_sequence": {
            "description": "One-based append-only sequence within this Work Run.",
            "minimum": 1.0,
            "readOnly": true,
            "title": "Correction Sequence",
            "type": "integer"
          },
          "correction_status": {
            "$ref": "#/components/schemas/WorkRunCorrectionStatus",
            "readOnly": true
          },
          "corrector_role": {
            "description": "Role of the user or service that submitted the correction.",
            "readOnly": true,
            "title": "Corrector Role",
            "type": "string"
          },
          "created_at": {
            "description": "Timestamp when this correction ledger row was appended.",
            "readOnly": true,
            "title": "Created At",
            "type": "string"
          },
          "evidence_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable external evidence reference for the correction.",
            "readOnly": true,
            "title": "Evidence Ref"
          },
          "id": {
            "description": "Stable correction ledger entry id.",
            "readOnly": true,
            "title": "Id",
            "type": "string"
          },
          "observed_consequence": {
            "description": "Reviewer-observed consequence that motivated the correction.",
            "readOnly": true,
            "title": "Observed Consequence",
            "type": "string"
          },
          "original_assertion": {
            "description": "Original assertion being corrected.",
            "readOnly": true,
            "title": "Original Assertion",
            "type": "string"
          },
          "prev_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Previous correction audit row hash in the tamper-evident chain, or null for the first correction.",
            "readOnly": true,
            "title": "Prev Hash"
          },
          "receipt_created_at": {
            "description": "Timestamp when the correction audit receipt was recorded.",
            "format": "date-time",
            "readOnly": true,
            "title": "Receipt Created At",
            "type": "string"
          },
          "receipt_digest": {
            "description": "SHA-256 digest for the correction audit receipt.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Receipt Digest",
            "type": "string"
          },
          "rollback_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable rollback or remediation reference associated with the correction.",
            "readOnly": true,
            "title": "Rollback Ref"
          },
          "row_hash": {
            "description": "SHA-256 row hash for this correction ledger entry.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Row Hash",
            "type": "string"
          },
          "work_run_id": {
            "description": "Work Run id whose correction ledger contains this entry.",
            "readOnly": true,
            "title": "Work Run Id",
            "type": "string"
          },
          "work_run_state": {
            "description": "Work Run state observed after this correction row was appended.",
            "readOnly": true,
            "title": "Work Run State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "work_run_id",
          "work_run_state",
          "correction_sequence",
          "correction_status",
          "corrected_evidence_key",
          "correction_category",
          "original_assertion",
          "corrected_assertion",
          "observed_consequence",
          "consequence_status",
          "evidence_ref",
          "rollback_ref",
          "prev_hash",
          "row_hash",
          "receipt_digest",
          "receipt_created_at",
          "corrected_by",
          "corrector_role",
          "created_at"
        ],
        "title": "WorkRunCorrectionLedgerEntry",
        "type": "object"
      },
      "WorkRunCorrectionLedgerFilters": {
        "additionalProperties": false,
        "description": "Filters applied to the current Work Run correction ledger page. Null means the filter was not supplied.",
        "properties": {
          "consequence_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Consequence status filter applied to the ledger page.",
            "title": "Consequence Status"
          },
          "corrected_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Correcting user filter applied to the ledger page.",
            "readOnly": true,
            "title": "Corrected By"
          },
          "correction_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Correction category filter applied to the ledger page.",
            "title": "Correction Category"
          }
        },
        "required": [
          "correction_category",
          "consequence_status",
          "corrected_by"
        ],
        "title": "WorkRunCorrectionLedgerFilters",
        "type": "object"
      },
      "WorkRunCorrectionLedgerResponse": {
        "additionalProperties": false,
        "description": "Paginated append-only correction ledger response envelope for a governed Work Run with applied filters echoed for client state.",
        "properties": {
          "corrections": {
            "description": "Immutable correction ledger rows for the requested page, ordered by correction_sequence ascending.",
            "items": {
              "$ref": "#/components/schemas/WorkRunCorrectionLedgerEntry"
            },
            "title": "Corrections",
            "type": "array"
          },
          "filters": {
            "$ref": "#/components/schemas/WorkRunCorrectionLedgerFilters",
            "description": "WorkRunCorrectionLedgerResponse.filters contract field."
          },
          "pagination": {
            "$ref": "#/components/schemas/WorkRunCorrectionPagePagination",
            "description": "WorkRunCorrectionLedgerResponse.pagination contract field."
          },
          "work_run_id": {
            "description": "Work Run id whose correction ledger is returned.",
            "title": "Work Run Id",
            "type": "string"
          }
        },
        "required": [
          "work_run_id",
          "filters",
          "pagination",
          "corrections"
        ],
        "title": "WorkRunCorrectionLedgerResponse",
        "type": "object"
      },
      "WorkRunCorrectionPagePagination": {
        "additionalProperties": false,
        "description": "Cursor and offset pagination metadata for Work Run correction ledger and audit pages. Results are ordered oldest-first by correction sequence or event time, then id; cursor values are opaque and should be replayed as returned.",
        "properties": {
          "cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor used for this page, or null when the first page was requested without a cursor.",
            "title": "Cursor"
          },
          "has_more": {
            "description": "Whether another page is available after this result set.",
            "title": "Has More",
            "type": "boolean"
          },
          "limit": {
            "description": "Maximum number of correction records requested for this page.",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor to request the next page, or null when has_more is false.",
            "title": "Next Cursor"
          },
          "next_offset": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Offset to request the next page, or null when has_more is false.",
            "title": "Next Offset"
          },
          "offset": {
            "description": "Zero-based offset used for this page.",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "description": "Total number of correction records matching the supplied filters.",
            "minimum": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "limit",
          "cursor",
          "offset",
          "total",
          "has_more",
          "next_cursor",
          "next_offset"
        ],
        "title": "WorkRunCorrectionPagePagination",
        "type": "object"
      },
      "WorkRunCorrectionRequest": {
        "additionalProperties": false,
        "description": "WorkRunCorrectionRequest contract schema generated by the Retvest API.",
        "properties": {
          "consequence_status": {
            "description": "WorkRunCorrectionRequest.consequence_status contract field.",
            "enum": [
              "averted",
              "contained",
              "shipped_then_corrected",
              "unresolved"
            ],
            "title": "Consequence Status",
            "type": "string"
          },
          "corrected_assertion": {
            "description": "WorkRunCorrectionRequest.corrected_assertion contract field.",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Corrected Assertion",
            "type": "string"
          },
          "corrected_evidence_key": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "WorkRunCorrectionRequest.corrected_evidence_key contract field.",
            "title": "Corrected Evidence Key"
          },
          "correction_category": {
            "description": "WorkRunCorrectionRequest.correction_category contract field.",
            "maxLength": 80,
            "minLength": 1,
            "title": "Correction Category",
            "type": "string"
          },
          "evidence_ref": {
            "anyOf": [
              {
                "maxLength": 240,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "WorkRunCorrectionRequest.evidence_ref contract field.",
            "title": "Evidence Ref"
          },
          "expected_correction_sequence": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional one-based correction_sequence the client expects this append to receive. If another correction already claimed that sequence, the service returns a 409 correction.sequence_stale problem.",
            "title": "Expected Correction Sequence"
          },
          "expected_work_run_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional Work Run version the client expects this correction write to observe. If the Work Run version is stale, the service returns a 409 correction.version_conflict Problem.",
            "title": "Expected Work Run Version"
          },
          "observed_consequence": {
            "description": "WorkRunCorrectionRequest.observed_consequence contract field.",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Observed Consequence",
            "type": "string"
          },
          "original_assertion": {
            "description": "WorkRunCorrectionRequest.original_assertion contract field.",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Original Assertion",
            "type": "string"
          },
          "rollback_ref": {
            "anyOf": [
              {
                "maxLength": 240,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "WorkRunCorrectionRequest.rollback_ref contract field.",
            "title": "Rollback Ref"
          }
        },
        "required": [
          "correction_category",
          "original_assertion",
          "corrected_assertion",
          "observed_consequence",
          "consequence_status"
        ],
        "title": "WorkRunCorrectionRequest",
        "type": "object"
      },
      "WorkRunCorrectionResolutionRequest": {
        "additionalProperties": false,
        "description": "Strict apply, reject, or retry request body for append-only Work Run correction lifecycle writes.",
        "properties": {
          "expected_work_run_version": {
            "description": "Work Run version the client expects this lifecycle write to observe. If the Work Run version is stale, the service returns a 409 correction.version_conflict Problem.",
            "minimum": 1.0,
            "title": "Expected Work Run Version",
            "type": "integer"
          },
          "resolution_note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional operator note; raw correction text is never copied into Problem metadata.",
            "title": "Resolution Note"
          },
          "resolution_reason_code": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional machine-readable reason for applying or rejecting the correction.",
            "title": "Resolution Reason Code"
          }
        },
        "required": [
          "expected_work_run_version"
        ],
        "title": "WorkRunCorrectionResolutionRequest",
        "type": "object"
      },
      "WorkRunCorrectionResponse": {
        "description": "Append-only correction record returned after creation, including the resulting Work Run state.",
        "properties": {
          "consequence_status": {
            "description": "Append-only consequence status captured when this row was created.",
            "readOnly": true,
            "title": "Consequence Status",
            "type": "string"
          },
          "corrected_assertion": {
            "description": "Immutable corrected assertion text captured for this correction row.",
            "readOnly": true,
            "title": "Corrected Assertion",
            "type": "string"
          },
          "corrected_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "WorkRunCorrectionResponse.corrected_by contract field.",
            "readOnly": true,
            "title": "Corrected By"
          },
          "corrected_evidence_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "WorkRunCorrectionResponse.corrected_evidence_key contract field.",
            "readOnly": true,
            "title": "Corrected Evidence Key"
          },
          "correction_category": {
            "description": "Immutable correction category attached during row append.",
            "readOnly": true,
            "title": "Correction Category",
            "type": "string"
          },
          "correction_sequence": {
            "description": "One-based append-only sequence assigned to this correction within the Work Run.",
            "minimum": 1.0,
            "readOnly": true,
            "title": "Correction Sequence",
            "type": "integer"
          },
          "correction_status": {
            "$ref": "#/components/schemas/WorkRunCorrectionStatus",
            "readOnly": true
          },
          "corrector_role": {
            "description": "Role asserted for the principal that appended this correction row.",
            "readOnly": true,
            "title": "Corrector Role",
            "type": "string"
          },
          "created_at": {
            "description": "Timestamp when this correction row was appended to the Work Run ledger.",
            "readOnly": true,
            "title": "Created At",
            "type": "string"
          },
          "evidence_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable evidence reference associated with this correction row.",
            "readOnly": true,
            "title": "Evidence Ref"
          },
          "id": {
            "description": "Stable correction row identifier.",
            "readOnly": true,
            "title": "Id",
            "type": "string"
          },
          "observed_consequence": {
            "description": "Immutable consequence statement observed when this correction row was appended.",
            "readOnly": true,
            "title": "Observed Consequence",
            "type": "string"
          },
          "original_assertion": {
            "description": "Immutable original assertion text captured for this correction row.",
            "readOnly": true,
            "title": "Original Assertion",
            "type": "string"
          },
          "prev_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Previous correction audit row hash in the tamper-evident chain, or null for the first correction.",
            "readOnly": true,
            "title": "Prev Hash"
          },
          "receipt_created_at": {
            "description": "Timestamp when the correction audit receipt was recorded.",
            "format": "date-time",
            "readOnly": true,
            "title": "Receipt Created At",
            "type": "string"
          },
          "receipt_digest": {
            "description": "SHA-256 digest for the correction audit receipt.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Receipt Digest",
            "type": "string"
          },
          "rollback_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable rollback reference associated with this correction row.",
            "readOnly": true,
            "title": "Rollback Ref"
          },
          "row_hash": {
            "description": "SHA-256 row hash for this correction.",
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "readOnly": true,
            "title": "Row Hash",
            "type": "string"
          },
          "work_run_id": {
            "description": "WorkRunCorrectionResponse.work_run_id contract field.",
            "readOnly": true,
            "title": "Work Run Id",
            "type": "string"
          },
          "work_run_state": {
            "description": "WorkRunCorrectionResponse.work_run_state contract field.",
            "readOnly": true,
            "title": "Work Run State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "correction_sequence",
          "correction_status",
          "corrected_evidence_key",
          "correction_category",
          "original_assertion",
          "corrected_assertion",
          "observed_consequence",
          "consequence_status",
          "evidence_ref",
          "rollback_ref",
          "prev_hash",
          "row_hash",
          "receipt_digest",
          "receipt_created_at",
          "corrected_by",
          "corrector_role",
          "created_at",
          "work_run_id",
          "work_run_state"
        ],
        "title": "WorkRunCorrectionResponse",
        "type": "object"
      },
      "WorkRunCorrectionStatus": {
        "description": "Append-only correction lifecycle state. Allowed transitions are append-only: pending correction rows can be followed by applied, rejected, or superseded rows; applied corrections affected the Work Run outcome; rejected corrections remain in the ledger without changing the outcome; superseded corrections remain in history when a later appended correction replaces their effect. Prior correction rows are never updated in place.",
        "enum": [
          "pending",
          "applied",
          "rejected",
          "superseded"
        ],
        "title": "WorkRunCorrectionStatus",
        "type": "string"
      }
    },
    "securitySchemes": {
      "cookieAuth": {
        "description": "Session cookie issued by `/auth/login`. Paired with a separate refresh cookie. Clients should send both with every request.",
        "in": "cookie",
        "name": "retvest_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "contact": {
      "email": "security@retvest.com",
      "name": "Retvest AI",
      "url": "https://retvest.com/"
    },
    "description": "Site-rendered source-publication OpenAPI slice for Work Run correction create, list, audit, apply, reject, and retry operations. This is not hosted API docs DNS proof, package-registry proof, or customer automation proof.",
    "license": {
      "name": "Commercial",
      "url": "https://retvest.com/legal"
    },
    "title": "Retvest Work Run Correction API",
    "version": "4.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/admin/work-runs/{work_run_id}/corrections": {
      "get": {
        "description": "Return a paginated append-only correction ledger for a governed Work Run. Results are ordered by correction_sequence ascending and can be filtered by correction_category, consequence_status, or corrected_by.",
        "operationId": "list_work_run_corrections_admin_work_runs__work_run_id__corrections_get",
        "parameters": [
          {
            "description": "Work Run UUID.",
            "example": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "in": "path",
            "name": "work_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Work Run Id",
              "type": "string"
            }
          },
          {
            "description": "Maximum number of correction ledger entries to return.",
            "example": 25,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based correction ledger result offset for pagination.",
            "example": 0,
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Optional opaque cursor from pagination.next_cursor for the next correction ledger page. When omitted, the service returns the first page using the stable correction ordering.",
            "example": "corrpage_0000000002",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "Filter by correction category, for example unsupported_claim.",
            "example": "unsupported_claim",
            "in": "query",
            "name": "correction_category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Correction Category"
            }
          },
          {
            "description": "Filter by observed consequence status, for example contained.",
            "example": "contained",
            "in": "query",
            "name": "consequence_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "averted",
                    "contained",
                    "shipped_then_corrected",
                    "unresolved"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Consequence Status"
            }
          },
          {
            "description": "Filter by correcting user id.",
            "example": "7dc4ae35-3e51-40f7-9cf6-814da809be36",
            "in": "query",
            "name": "corrected_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Corrected By"
            }
          },
          {
            "description": "Optional Retvest session cookie used for admin correction authentication.",
            "example": "example_retvest_session",
            "in": "cookie",
            "name": "retvest_session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Retvest Session"
            }
          },
          {
            "description": "Optional client request id for correction support correlation. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Request-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Request-ID"
            }
          },
          {
            "description": "Optional opaque tenant correlation id for correction routing. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Tenant-Correlation-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Correlation-ID"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "WorkRunCorrectionLedgerResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionLedgerResponseExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WorkRunCorrectionLedgerResponse"
                }
              }
            },
            "description": "Paginated append-only correction ledger for the Work Run.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadBadRequestProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadBadRequestProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionReadBadRequestProblem"
                }
              }
            },
            "description": "Invalid correction list query.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnauthorizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnauthorizedProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAuthProblem"
                }
              }
            },
            "description": "Authentication Required",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionForbiddenProblemExample": {
                    "$ref": "#/components/examples/CorrectionForbiddenProblemExample"
                  },
                  "CorrectionTenantMismatchProblemExample": {
                    "$ref": "#/components/examples/CorrectionTenantMismatchProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAccessProblem"
                }
              }
            },
            "description": "Permission denied or tenant mismatch",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadNotFoundProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadNotFoundProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMissingWorkRunProblem"
                }
              }
            },
            "description": "Work Run Not Found",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCursorConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionCursorConflictProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCursorConflictProblem"
                }
              }
            },
            "description": "Stale correction cursor or ledger pagination conflict.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionMalformedCursorProblemExample": {
                    "$ref": "#/components/examples/CorrectionMalformedCursorProblemExample"
                  },
                  "CorrectionReadValidationProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadValidationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionValidationProblem"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionRateLimitProblemExample": {
                    "$ref": "#/components/examples/CorrectionRateLimitProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionRateLimitProblem"
                }
              }
            },
            "description": "Correction rate limit exceeded",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCancellationProblemExample": {
                    "$ref": "#/components/examples/CorrectionCancellationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCancellationProblem"
                }
              }
            },
            "description": "Correction request cancelled by caller",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnavailableProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnavailableProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionUnavailableProblem"
                }
              }
            },
            "description": "Correction service unavailable",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionTimeoutProblemExample": {
                    "$ref": "#/components/examples/CorrectionTimeoutProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTimeoutProblem"
                }
              }
            },
            "description": "Correction service timeout",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "summary": "List Work Run Corrections",
        "tags": [
          "admin",
          "work-runs"
        ]
      },
      "post": {
        "description": "Record an append-only human correction with its observed consequence. Supplying Idempotency-Key makes retries safe: the same Work Run, key, and payload returns a create response envelope for the original correction; reusing that key with a different payload returns a 409 ProblemDetail.",
        "operationId": "record_work_run_correction_admin_work_runs__work_run_id__corrections_post",
        "parameters": [
          {
            "description": "Work Run UUID.",
            "example": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "in": "path",
            "name": "work_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Work Run Id",
              "type": "string"
            }
          },
          {
            "description": "Optional client-generated idempotency key for correction retries. Include this header when creating corrections; missing keys can fail with 400 idempotency.missing_key. Reusing the same key for the same Work Run and payload returns the original correction; reusing it with a different payload fails with 409.",
            "example": "correction-a8f14434-20260616T102412Z",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          },
          {
            "description": "POST /admin/work-runs/{work_run_id}/corrections cookie parameter `retvest_session`.",
            "example": "example_retvest_session",
            "in": "cookie",
            "name": "retvest_session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Retvest Session"
            }
          },
          {
            "description": "Optional client request id for correction support correlation. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Request-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Request-ID"
            }
          },
          {
            "description": "Optional opaque tenant correlation id for correction routing. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Tenant-Correlation-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Correlation-ID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "WorkRunCorrectionRequestExample": {
                  "$ref": "#/components/examples/WorkRunCorrectionRequestExample"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WorkRunCorrectionRequest"
              }
            }
          },
          "description": "POST /admin/work-runs/{work_run_id}/corrections JSON request body.",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "WorkRunCorrectionCreateResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionCreateResponseExample"
                  },
                  "WorkRunCorrectionIdempotentRetryResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionIdempotentRetryResponseExample"
                  },
                  "WorkRunCorrectionResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionResponseExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WorkRunCorrectionCreateResponse"
                }
              }
            },
            "description": "Append-only correction create envelope. Same Work Run, Idempotency-Key, and payload retries return the original correction row with append_receipt.effect=idempotent_replay.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionIdempotencyKeyMissingProblemExample": {
                    "$ref": "#/components/examples/CorrectionIdempotencyKeyMissingProblemExample"
                  },
                  "MalformedCorrectionPayloadProblemExample": {
                    "$ref": "#/components/examples/MalformedCorrectionPayloadProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionBadRequestProblem"
                }
              }
            },
            "description": "Missing idempotency key or malformed correction payload.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnauthorizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnauthorizedProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAuthProblem"
                }
              }
            },
            "description": "Authentication Required",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionForbiddenProblemExample": {
                    "$ref": "#/components/examples/CorrectionForbiddenProblemExample"
                  },
                  "CorrectionTenantMismatchProblemExample": {
                    "$ref": "#/components/examples/CorrectionTenantMismatchProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAccessProblem"
                }
              }
            },
            "description": "Permission denied or tenant mismatch",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadNotFoundProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadNotFoundProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMissingWorkRunProblem"
                }
              }
            },
            "description": "Work Run Not Found",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionDuplicateActiveProblemExample": {
                    "$ref": "#/components/examples/CorrectionDuplicateActiveProblemExample"
                  },
                  "CorrectionIdempotencyConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionIdempotencyConflictProblemExample"
                  },
                  "CorrectionInvalidWorkRunStateProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidWorkRunStateProblemExample"
                  },
                  "CorrectionSequenceStaleProblemExample": {
                    "$ref": "#/components/examples/CorrectionSequenceStaleProblemExample"
                  },
                  "CorrectionVersionConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionVersionConflictProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionWriteConflictProblem"
                }
              }
            },
            "description": "Work Run state, Idempotency-Key, version, correction sequence, or duplicate active correction conflict.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "examples": {
                  "FastApiValidationErrorExample": {
                    "$ref": "#/components/examples/FastApiValidationErrorExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              },
              "application/problem+json": {
                "examples": {
                  "CorrectionValidationProblemExample": {
                    "$ref": "#/components/examples/CorrectionValidationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionValidationProblem"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionRateLimitProblemExample": {
                    "$ref": "#/components/examples/CorrectionRateLimitProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionRateLimitProblem"
                }
              }
            },
            "description": "Correction rate limit exceeded",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCancellationProblemExample": {
                    "$ref": "#/components/examples/CorrectionCancellationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCancellationProblem"
                }
              }
            },
            "description": "Correction request cancelled by caller",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnavailableProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnavailableProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionUnavailableProblem"
                }
              }
            },
            "description": "Correction service unavailable",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionTimeoutProblemExample": {
                    "$ref": "#/components/examples/CorrectionTimeoutProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTimeoutProblem"
                }
              }
            },
            "description": "Correction service timeout",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "summary": "Record Work Run Correction",
        "tags": [
          "admin",
          "work-runs"
        ]
      }
    },
    "/admin/work-runs/{work_run_id}/corrections/audit": {
      "get": {
        "description": "Return paginated hash-chained audit events for corrections on a governed Work Run. Results are ordered oldest-first by created_at, then id, and can be filtered by event_type or actor.",
        "operationId": "list_work_run_correction_audit_admin_work_runs__work_run_id__corrections_audit_get",
        "parameters": [
          {
            "description": "Work Run UUID.",
            "example": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "in": "path",
            "name": "work_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Work Run Id",
              "type": "string"
            }
          },
          {
            "description": "Maximum number of correction audit events to return.",
            "example": 25,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based correction audit result offset for pagination.",
            "example": 0,
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Filter by correction audit event type.",
            "example": "correction_recorded",
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "description": "Filter by correction audit actor.",
            "example": "usr_compliance_lead",
            "in": "query",
            "name": "actor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor"
            }
          },
          {
            "description": "Optional Retvest session cookie used for admin correction authentication.",
            "in": "cookie",
            "name": "retvest_session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Retvest Session"
            }
          },
          {
            "description": "Optional client request id for correction support correlation. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Request-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Request-ID"
            }
          },
          {
            "description": "Optional opaque tenant correlation id for correction routing. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Tenant-Correlation-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Correlation-ID"
            }
          },
          {
            "description": "Optional opaque cursor from pagination.next_cursor for the next correction audit page. When omitted, the service returns the first page using the stable correction ordering.",
            "example": "corrpage_0000000002",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "WorkRunCorrectionAuditResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionAuditResponseExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WorkRunCorrectionAuditResponse"
                }
              }
            },
            "description": "Paginated correction audit events for the Work Run.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnauthorizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnauthorizedProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAuthProblem"
                }
              }
            },
            "description": "Authentication Required",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionForbiddenProblemExample": {
                    "$ref": "#/components/examples/CorrectionForbiddenProblemExample"
                  },
                  "CorrectionTenantMismatchProblemExample": {
                    "$ref": "#/components/examples/CorrectionTenantMismatchProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAccessProblem"
                }
              }
            },
            "description": "Permission denied or tenant mismatch",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadNotFoundProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadNotFoundProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMissingWorkRunProblem"
                }
              }
            },
            "description": "Work Run Not Found",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionMalformedCursorProblemExample": {
                    "$ref": "#/components/examples/CorrectionMalformedCursorProblemExample"
                  },
                  "CorrectionReadValidationProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadValidationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionValidationProblem"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionRateLimitProblemExample": {
                    "$ref": "#/components/examples/CorrectionRateLimitProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionRateLimitProblem"
                }
              }
            },
            "description": "Correction rate limit exceeded",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCancellationProblemExample": {
                    "$ref": "#/components/examples/CorrectionCancellationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCancellationProblem"
                }
              }
            },
            "description": "Correction request cancelled by caller",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnavailableProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnavailableProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionUnavailableProblem"
                }
              }
            },
            "description": "Correction service unavailable",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionTimeoutProblemExample": {
                    "$ref": "#/components/examples/CorrectionTimeoutProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTimeoutProblem"
                }
              }
            },
            "description": "Correction service timeout",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "summary": "List Work Run Correction Audit Events",
        "tags": [
          "admin",
          "work-runs"
        ]
      }
    },
    "/admin/work-runs/{work_run_id}/corrections/{correction_id}/apply": {
      "post": {
        "description": "Apply a pending Work Run correction by appending a new lifecycle row. Prior correction records are not mutated; clients should supply expected_work_run_version and an Idempotency-Key for replay-safe retries.",
        "operationId": "apply_work_run_correction_admin_work_runs__work_run_id__corrections__correction_id__apply_post",
        "parameters": [
          {
            "description": "Work Run UUID.",
            "example": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "in": "path",
            "name": "work_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Work Run Id",
              "type": "string"
            }
          },
          {
            "description": "Correction id to apply or reject.",
            "example": "7dc4ae35-3e51-40f7-9cf6-814da809be36",
            "in": "path",
            "name": "correction_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Correction Id",
              "type": "string"
            }
          },
          {
            "description": "Required client-generated idempotency key for correction lifecycle retries. Reusing the same key for the same Work Run and apply payload returns the original outcome; reusing it with a different payload fails with 409.",
            "example": "correction-apply-a8f14434-20260616T103103Z",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "Optional Retvest session cookie used for admin correction authentication.",
            "in": "cookie",
            "name": "retvest_session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Retvest Session"
            }
          },
          {
            "description": "Optional client request id for correction support correlation. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Request-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Request-ID"
            }
          },
          {
            "description": "Optional opaque tenant correlation id for correction routing. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Tenant-Correlation-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Correlation-ID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "WorkRunCorrectionApplyRequestExample": {
                  "$ref": "#/components/examples/WorkRunCorrectionApplyRequestExample"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WorkRunCorrectionResolutionRequest"
              }
            }
          },
          "description": "Expected Work Run version precondition for applying the correction.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "WorkRunCorrectionApplyResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionApplyResponseExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WorkRunCorrectionResponse"
                }
              }
            },
            "description": "Append-only lifecycle row recorded after applying the correction.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "MalformedCorrectionPayloadProblemExample": {
                    "$ref": "#/components/examples/MalformedCorrectionPayloadProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionBadRequestProblem"
                }
              }
            },
            "description": "Malformed correction lifecycle payload.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnauthorizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnauthorizedProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAuthProblem"
                }
              }
            },
            "description": "Authentication Required",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionForbiddenProblemExample": {
                    "$ref": "#/components/examples/CorrectionForbiddenProblemExample"
                  },
                  "CorrectionTenantMismatchProblemExample": {
                    "$ref": "#/components/examples/CorrectionTenantMismatchProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAccessProblem"
                }
              }
            },
            "description": "Permission denied or tenant mismatch",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadNotFoundProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadNotFoundProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMissingWorkRunProblem"
                }
              }
            },
            "description": "Work Run or correction not found",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionAlreadyFinalizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionAlreadyFinalizedProblemExample"
                  },
                  "CorrectionIdempotencyConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionIdempotencyConflictProblemExample"
                  },
                  "CorrectionInvalidTransitionProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidTransitionProblemExample"
                  },
                  "CorrectionInvalidWorkRunStateProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidWorkRunStateProblemExample"
                  },
                  "CorrectionVersionConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionVersionConflictProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionWriteConflictProblem"
                }
              }
            },
            "description": "Idempotency, Work Run version, Work Run state, correction lifecycle transition, or already-finalized conflict.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionValidationProblemExample": {
                    "$ref": "#/components/examples/CorrectionValidationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionValidationProblem"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionRateLimitProblemExample": {
                    "$ref": "#/components/examples/CorrectionRateLimitProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionRateLimitProblem"
                }
              }
            },
            "description": "Correction rate limit exceeded",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCancellationProblemExample": {
                    "$ref": "#/components/examples/CorrectionCancellationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCancellationProblem"
                }
              }
            },
            "description": "Correction request cancelled by caller",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnavailableProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnavailableProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionUnavailableProblem"
                }
              }
            },
            "description": "Correction service unavailable",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionTimeoutProblemExample": {
                    "$ref": "#/components/examples/CorrectionTimeoutProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTimeoutProblem"
                }
              }
            },
            "description": "Correction service timeout",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "summary": "Apply Work Run Correction",
        "tags": [
          "admin",
          "work-runs"
        ]
      }
    },
    "/admin/work-runs/{work_run_id}/corrections/{correction_id}/reject": {
      "post": {
        "description": "Reject a pending Work Run correction by appending a new lifecycle row. Prior correction records are not mutated; clients should supply expected_work_run_version and an Idempotency-Key for replay-safe retries.",
        "operationId": "reject_work_run_correction_admin_work_runs__work_run_id__corrections__correction_id__reject_post",
        "parameters": [
          {
            "description": "Work Run UUID.",
            "example": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "in": "path",
            "name": "work_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Work Run Id",
              "type": "string"
            }
          },
          {
            "description": "Correction id to apply or reject.",
            "example": "7dc4ae35-3e51-40f7-9cf6-814da809be36",
            "in": "path",
            "name": "correction_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Correction Id",
              "type": "string"
            }
          },
          {
            "description": "Required client-generated idempotency key for correction lifecycle retries. Reusing the same key for the same Work Run and reject payload returns the original outcome; reusing it with a different payload fails with 409.",
            "example": "correction-reject-a8f14434-20260616T103103Z",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "Optional Retvest session cookie used for admin correction authentication.",
            "in": "cookie",
            "name": "retvest_session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Retvest Session"
            }
          },
          {
            "description": "Optional client request id for correction support correlation. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Request-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Request-ID"
            }
          },
          {
            "description": "Optional opaque tenant correlation id for correction routing. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Tenant-Correlation-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Correlation-ID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "WorkRunCorrectionRejectRequestExample": {
                  "$ref": "#/components/examples/WorkRunCorrectionRejectRequestExample"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WorkRunCorrectionResolutionRequest"
              }
            }
          },
          "description": "Expected Work Run version precondition for rejecting the correction.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "WorkRunCorrectionRejectResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionRejectResponseExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WorkRunCorrectionResponse"
                }
              }
            },
            "description": "Append-only lifecycle row recorded after rejecting the correction.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "MalformedCorrectionPayloadProblemExample": {
                    "$ref": "#/components/examples/MalformedCorrectionPayloadProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionBadRequestProblem"
                }
              }
            },
            "description": "Malformed correction lifecycle payload.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnauthorizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnauthorizedProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAuthProblem"
                }
              }
            },
            "description": "Authentication Required",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionForbiddenProblemExample": {
                    "$ref": "#/components/examples/CorrectionForbiddenProblemExample"
                  },
                  "CorrectionTenantMismatchProblemExample": {
                    "$ref": "#/components/examples/CorrectionTenantMismatchProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAccessProblem"
                }
              }
            },
            "description": "Permission denied or tenant mismatch",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadNotFoundProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadNotFoundProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMissingWorkRunProblem"
                }
              }
            },
            "description": "Work Run or correction not found",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionAlreadyFinalizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionAlreadyFinalizedProblemExample"
                  },
                  "CorrectionIdempotencyConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionIdempotencyConflictProblemExample"
                  },
                  "CorrectionInvalidTransitionProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidTransitionProblemExample"
                  },
                  "CorrectionInvalidWorkRunStateProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidWorkRunStateProblemExample"
                  },
                  "CorrectionVersionConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionVersionConflictProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionWriteConflictProblem"
                }
              }
            },
            "description": "Idempotency, Work Run version, Work Run state, correction lifecycle transition, or already-finalized conflict.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionValidationProblemExample": {
                    "$ref": "#/components/examples/CorrectionValidationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionValidationProblem"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionRateLimitProblemExample": {
                    "$ref": "#/components/examples/CorrectionRateLimitProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionRateLimitProblem"
                }
              }
            },
            "description": "Correction rate limit exceeded",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCancellationProblemExample": {
                    "$ref": "#/components/examples/CorrectionCancellationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCancellationProblem"
                }
              }
            },
            "description": "Correction request cancelled by caller",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnavailableProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnavailableProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionUnavailableProblem"
                }
              }
            },
            "description": "Correction service unavailable",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionTimeoutProblemExample": {
                    "$ref": "#/components/examples/CorrectionTimeoutProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTimeoutProblem"
                }
              }
            },
            "description": "Correction service timeout",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "summary": "Reject Work Run Correction",
        "tags": [
          "admin",
          "work-runs"
        ]
      }
    },
    "/admin/work-runs/{work_run_id}/corrections/{correction_id}/retry": {
      "post": {
        "description": "Retry a correction review by appending a new pending lifecycle row. Prior correction records are not mutated; clients should supply expected_work_run_version and an Idempotency-Key for replay-safe retries.",
        "operationId": "retry_work_run_correction_admin_work_runs__work_run_id__corrections__correction_id__retry_post",
        "parameters": [
          {
            "description": "Work Run UUID.",
            "example": "a8f14434-1ec8-4eef-8f7f-6ddfd5ac68ad",
            "in": "path",
            "name": "work_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Work Run Id",
              "type": "string"
            }
          },
          {
            "description": "Correction id to retry.",
            "example": "7dc4ae35-3e51-40f7-9cf6-814da809be36",
            "in": "path",
            "name": "correction_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Correction Id",
              "type": "string"
            }
          },
          {
            "description": "Required client-generated idempotency key for correction lifecycle retries. Reusing the same key for the same Work Run and retry payload returns the original outcome; reusing it with a different payload fails with 409.",
            "example": "correction-retry-a8f14434-20260616T103103Z",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "Optional Retvest session cookie used for admin correction authentication.",
            "in": "cookie",
            "name": "retvest_session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Retvest Session"
            }
          },
          {
            "description": "Optional client request id for correction support correlation. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Request-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Request-ID"
            }
          },
          {
            "description": "Optional opaque tenant correlation id for correction routing. Safe to echo; never include tenant identifiers, session tokens, idempotency key values, or raw correction text.",
            "example": "tcorr_01J0Y9B7M4X1C7RV2R4FKY8G6M",
            "in": "header",
            "name": "X-Tenant-Correlation-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Correlation-ID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "WorkRunCorrectionRetryRequestExample": {
                  "$ref": "#/components/examples/WorkRunCorrectionRetryRequestExample"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WorkRunCorrectionResolutionRequest"
              }
            }
          },
          "description": "Expected Work Run version precondition for retrying correction review.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "WorkRunCorrectionRetryResponseExample": {
                    "$ref": "#/components/examples/WorkRunCorrectionRetryResponseExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WorkRunCorrectionResponse"
                }
              }
            },
            "description": "Append-only retry lifecycle row recorded for another correction review attempt.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "MalformedCorrectionPayloadProblemExample": {
                    "$ref": "#/components/examples/MalformedCorrectionPayloadProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionBadRequestProblem"
                }
              }
            },
            "description": "Malformed correction lifecycle payload.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnauthorizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnauthorizedProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAuthProblem"
                }
              }
            },
            "description": "Authentication Required",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionForbiddenProblemExample": {
                    "$ref": "#/components/examples/CorrectionForbiddenProblemExample"
                  },
                  "CorrectionTenantMismatchProblemExample": {
                    "$ref": "#/components/examples/CorrectionTenantMismatchProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionAccessProblem"
                }
              }
            },
            "description": "Permission denied or tenant mismatch",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionReadNotFoundProblemExample": {
                    "$ref": "#/components/examples/CorrectionReadNotFoundProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMissingWorkRunProblem"
                }
              }
            },
            "description": "Work Run or correction not found",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionAlreadyFinalizedProblemExample": {
                    "$ref": "#/components/examples/CorrectionAlreadyFinalizedProblemExample"
                  },
                  "CorrectionIdempotencyConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionIdempotencyConflictProblemExample"
                  },
                  "CorrectionInvalidTransitionProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidTransitionProblemExample"
                  },
                  "CorrectionInvalidWorkRunStateProblemExample": {
                    "$ref": "#/components/examples/CorrectionInvalidWorkRunStateProblemExample"
                  },
                  "CorrectionVersionConflictProblemExample": {
                    "$ref": "#/components/examples/CorrectionVersionConflictProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionWriteConflictProblem"
                }
              }
            },
            "description": "Idempotency, Work Run version, Work Run state, correction lifecycle transition, or already-finalized conflict.",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionValidationProblemExample": {
                    "$ref": "#/components/examples/CorrectionValidationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionValidationProblem"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionRateLimitProblemExample": {
                    "$ref": "#/components/examples/CorrectionRateLimitProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionRateLimitProblem"
                }
              }
            },
            "description": "Correction rate limit exceeded",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionCancellationProblemExample": {
                    "$ref": "#/components/examples/CorrectionCancellationProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionCancellationProblem"
                }
              }
            },
            "description": "Correction request cancelled by caller",
            "headers": {
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionUnavailableProblemExample": {
                    "$ref": "#/components/examples/CorrectionUnavailableProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionUnavailableProblem"
                }
              }
            },
            "description": "Correction service unavailable",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "CorrectionTimeoutProblemExample": {
                    "$ref": "#/components/examples/CorrectionTimeoutProblemExample"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTimeoutProblem"
                }
              }
            },
            "description": "Correction service timeout",
            "headers": {
              "Retry-After": {
                "description": "Seconds the client should wait before retrying this correction operation.",
                "example": 60,
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Request-ID": {
                "description": "Opaque request id echoed for correction support correlation. Safe to log; never carries tenant identifiers, session tokens, idempotency key values, or raw correction text.",
                "example": "req_01J0Y9B7M4X1C7RV2R4FKY8G6M",
                "schema": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "summary": "Retry Work Run Correction Review",
        "tags": [
          "admin",
          "work-runs"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Relative to the configured Retvest deployment origin.",
      "url": "/"
    }
  ],
  "tags": [
    {
      "description": "Product 1 readiness and runtime contract diagnostics for admin-only operator checks.",
      "name": "admin"
    },
    {
      "description": "Compliance Work Run proof surface for governed approval, evidence gate review, receipt state, and audit-packet export.",
      "name": "work-runs"
    }
  ],
  "x-retvest-publication-boundary": {
    "contracts_version": "4.1.0",
    "not_proof_of": [
      "docs.retvest.com production DNS or indexing",
      "package registry availability",
      "generated customer SDK availability",
      "customer automation readiness",
      "production install proof"
    ],
    "openapi_schema_hash": "905a9f3c0b3bf0f90eb4a0a2c6f9369ef72fd4c92cb0dfe627cf950811af9d8a",
    "rendered_artifacts": {
      "docs/api/index.html": "canonical source HTML artifact",
      "docs/api/openapi.json": "canonical source artifact",
      "docs/static/api/index.html": "Docusaurus static mirror",
      "docs/static/api/openapi.json": "Docusaurus static mirror"
    },
    "scope": "work-run-corrections-only",
    "source_artifacts": {
      "docs-api/work-run-correction-openapi-sdk-fixtures.json": "9b74038b3b627b464c02fdc84815fe59b211dd310a001f059604456999eeef79",
      "retvest-contracts/openapi/openapi.json": "9bdd921a719cd5b05246701cc9d4a2a6e8e78e3a86bade345b478c13094f2865",
      "retvest-platform/contracts/openapi-work-run-corrections.v1.json": "64fde377a057d499973e1583078bd136988de7a4b6b597078f50fa43aa2b7bbb"
    },
    "status": "site-rendered-correction-slice"
  }
}
