A folder is not an acceptance rule
Define the expected input set and the meaning of a completed batch. Decide whether partial delivery is permitted, what happens to late files, and whether a correction replaces a source or creates a new version. These choices belong to the business contract, not an incidental implementation detail.
Identify each input with a stable file identity and a versioned manifest. Preserve the received bytes in a controlled location when policy permits. Avoid trusting a filename or extension as proof of content, age, or correctness.
Validate format and business meaning separately
Parsing determines whether the file can be read. Business validation determines whether the extracted records are acceptable. A row can parse correctly while carrying an unknown identifier, a missing required value, or an ambiguous unit.
Document supported schemas, encodings, empty-value meanings, and normalization rules. Preserve source evidence needed to explain a transformed value. Route ambiguity to an explicit exception instead of silently converting it into a plausible-looking result.
Keep errors at the right level
Separate row-level rejection from file-level failure. A missing column may invalidate an entire export, while one unknown item code might affect only a record. Report stable reason codes and source locations without exposing unnecessary sensitive content in logs.
Quarantined files need an owner and a reprocessing policy. Treat corrected input as a new source version so the original failed run remains explainable. Apply type, size, and extraction limits to protect the processing environment from untrusted files.
Publish a verifiable result
Stage outputs, inspect the exported representation, and reconcile accepted, rejected, and unresolved counts to the manifest. Publish a versioned dataset with the accepted inputs and transform version. The consumer should know exactly which result it received.
The file processing playbook develops a supplier-export example. The business process API guide explains how to expose a long-running file batch through a clear status and result contract. Keep the handoff as explicit as the transformation itself.
