An archive needs an extraction budget
Compressed size is only one measure of the work an upload can request.
Bound the expanded work
Python’s zipfile documentation warns about decompression resource exhaustion and untrusted archive paths. A small ZIP upload can represent much more extracted data. Choosing a library does not by itself establish the application’s memory, disk or processing limits.
Our proposed acceptance contract sets limits for member count, individual expanded size, total bytes actually written and elapsed work. Treat archive metadata as input to screening, then enforce limits during processing rather than trusting the declared totals alone.
Separate staging from publication
An original workflow extracts into a new isolated staging directory. It validates member destinations and supported entry types, rejects ambiguous duplicate names, and publishes only the expected outputs after successful completion. On failure it discards the staging result. Existing application files are never an extraction destination.
Decide whether nested archives are supported. If they are, apply a total budget across the whole operation rather than resetting the allowance at every nesting level. If they are not, document that limit in the upload contract.
Use small failure fixtures
A practical local test suite can use tiny archives containing duplicate names, an unsupported entry, excessive member counts or output that exceeds a deliberately low test budget. Confirm both the reported rejection and the absence of partially published files. Keep the fixture limits small enough that the test is safe to run routinely. This note describes a review method; it does not provide or claim to validate a general-purpose secure extractor.