Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A job receipt should be treated as a machine-readable contract, not as proof that a requested change is safe. Before applying it, parse the input, validate it against a versioned schema, check the request against policy and current state, and use a dry run or equivalent preflight when available. Apply only after every relevant gate passes.

What a valid job receipt does—and does not—prove

A schema can require fields, constrain their types, and limit values to an allowed set. Those checks make a receipt predictable to process; they do not establish that its requested action is authorized, matches the user’s intent, targets the right resource, or is still valid against current state.

Keep the schema version with each receipt. That lets the system interpret an older receipt against the contract it was created for rather than silently applying today’s rules to yesterday’s data. Also define what happens to unknown and duplicate fields. For example, Kubernetes documents that unknown fields may be dropped by default, while strict field validation rejects unknown or duplicate fields with a bad-request response. Choose and document a policy rather than letting parser behavior decide implicitly. Kubernetes API Concepts

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not assume that a schema’s default annotation supplies a missing value. In JSON Schema, default is an annotation; validation does not fill the value in. If the application relies on defaults, implement and test that behavior explicitly. Understanding JSON Schema: Annotations

#1 Best Overall
Sale
Working with Contracts: What Law School Doesn't Teach You
  • Understand how contract provisions work
  • Adapt reliable drafting precedents
  • Avoid drafting errors, omissions, and ambiguities
  • Make contracts more user-friendly
  • Build flexibility into contracts without compromising precision

Validate a receipt before execution

  1. Define a versioned contract

    Specify the schema version, required fields, types, allowed values, and handling of unknown or duplicate fields. Preserve the version in the receipt so it can be checked against the intended contract.

  2. Parse, then validate

    Reject malformed input before execution. Validate required fields, types, enum values, and other structural constraints. Treat parse or validation errors as a stop condition; do not partially apply a receipt.

  3. Run domain and policy checks

    After structural validation, verify authorization, target identity, permitted action, policy limits, freshness, and consistency with the user’s intent. These checks require application or domain context that a schema alone cannot establish.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Verify provenance when receipts are signed

    Verify the signature and establish trust in a verification key or certificate associated with at least one receipt issuer. Keep that cryptographic result separate from the decision that the requested action is permitted: a trusted issuer can still request an action that policy disallows. RFC 9943 also permits additional validation policies after cryptographic verification. RFC 9943

  5. Preflight the change

    Use a dry run or equivalent validation path to check the proposed operation before persistence, where the system supports one. Review what the preflight actually exercises and whether generated values can differ from those in the eventual real request.

  6. Apply with a freshness check

    Use a version or precondition check to detect changes made since the receipt was prepared. If the check reports a conflict, re-evaluate the target and receipt against current state; do not blindly retry an outdated request.

What a dry run can tell you

A dry run can exercise request processing and relevant validation before an object is persisted, but it is not a universal guarantee that every effect of a real operation has been simulated. In Kubernetes, dry-run requests run relevant admission and schema validation stages without persisting the object. Kubernetes API Concepts states: “Kubernetes guarantees that dry-run requests will not be persisted in storage or have any other side effects.” That guarantee is specifically about Kubernetes dry-run requests. Generated values may differ between a dry run and the real request. Kubernetes API Concepts

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the preview to inspect the proposed change and its validation result. Do not treat it as a transaction, authorization decision, proof of intent, or assurance that the target will remain unchanged until application. Pair preflight with authorization and policy checks, then use a concurrency precondition at apply time.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why schema-valid output can still be wrong

Structural validity and semantic correctness are separate checks. A May 2026 preprint by Yin Li examined schema-constrained restaurant-ordering agents. It describes 2,400 calls to Nebius Token Factory across four open models and two prompting modes. In that benchmark, the strongest model achieved 100% schema validity in both tested modes, while semantic success was near 80%; weaker models also produced double-digit schema-valid unsafe acceptances. These are results from that specific benchmark, not production failure rates for other systems. Yin Li, “When JSON Is Not Enough: Semantic Reliability of Schema-Constrained LLM Ordering Agents”

The practical lesson is to evaluate what a receipt means in its domain after validating its shape. A well-formed request can still name the wrong item, exceed a policy limit, or conflict with what the user intended.

Handle stale state and conflicts safely

A receipt may have been correct when created but no longer match the target. Kubernetes uses resource-version checks to detect lost updates: submitting an outdated version can return a conflict. Use the equivalent version or precondition mechanism in your system, and treat conflict as a reason to reload state and reassess the operation rather than retrying unchanged. Kubernetes API Concepts

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Schema validation is one gate in a safe application path, not a transaction mechanism. A robust decision combines structural validation, application-level checks, trusted provenance where relevant, preflight, and protection against concurrent changes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.