Automation · Validation
Input Validation
Cheat sheet · https://pcornel.dk/topic.php?topic=5914
Answer
Input Validation rejects malformed, out-of-range, ambiguous or unauthorized automation inputs before they can influence control flow or target state.
Remember
- Input parsed ≠ input semantically valid.
- Type-valid input ≠ authorized input.
- Default applied ≠ caller intent preserved.
- Sanitized input ≠ safe downstream command or query automatically.
First checks
- Schema/type checks on inputs — structure
- Allowlists and ranges — values
- Reject unknown fields — strictness
Commands
jq empty <input.json>- Read-only/validation observation for whether the selected JSON document is syntactically parseable.
Verify in this order
input → validation → accept/reject
Where it usually breaks
Input Validation proves conformity to the declared input contract only; downstream authorization, command safety, target capability and workload outcome require separate evidence.
Input Validation validation proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Criteria / input | Criteria, source revision, validator and exact target identity are explicit | A generic pass exists without versioned criteria or target correlation |
| Preconditions / operation | Current authoritative facts are bound to the exact operation | Stale preflight or requested state substitutes for execution-time facts |
| Effective outcome | Authoritative state/read-back and service-relevant evidence match the expected result | Tool/test/validator success substitutes for effective target or workload proof |
| Limits / next action | Coverage limits, unknowns and failures drive the next narrower check | Unknown evidence becomes pass, retries hide failures or broad success is inferred from one check |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5914