A public-health lab automation job expects a CSV of specimen rows. Occasionally the file arrives with a valid header but zero data rows. What is the safest automation behavior?
Select an answer to reveal the explanation.
Short Explanation
An empty CSV isn't 'success with mystery data'—it's a yellow flag. Spot zero rows, log it loud, and stop cleanly so you don't trash yesterday's lab results.
Full Explanation
A public-health lab automation job that expects a CSV of specimen rows must treat a valid header with zero data rows as an explicit edge case, not as silent success. The safest behavior is to detect the empty data set, log a clear warning or error, and exit the job without corrupting downstream state. Operators then investigate why no specimens arrived instead of inventing completions or wiping prior results. The crash-with-unhandled-exception behavior can leave locks, partial writes, or unclear exit codes that confuse schedulers and downstream systems. The treat-zero-rows-as-success behavior, which marks random specimens complete, fabricates clinical or lab state and is operationally dangerous. The overwrite-yesterday's-results-with-an-empty-dataset behavior, especially without alerting anyone, destroys prior good output and hides the empty-file incident from responders. Exam caveat: distinguish empty files from malformed files; both should fail closed with distinct log messages. Some pipelines may allow empty inputs by policy, but the stem asks for the safest behavior that avoids corruption—detect, log, and exit cleanly. Operational check: feed a header-only CSV in staging, confirm the job logs the empty condition and exits non-success (or controlled warning per policy) without writing specimen completions, verify yesterday's results remain intact, and alert on repeated empty intakes for the public-health lab feed.