Recommended and coded against the managed malware scanning feature: downloads are refused unless the object's scan tag reports a clean result, with every other value — including a missing tag while a scan is still running — treated as refusal. The gate and its status constants were implemented and unit tested against stubbed tag reads; the feature itself was never enabled, since that requires account-level provisioning.
- What worked
- Delivering the verdict as an object tag is a nice integration surface — no extra API to learn, no separate datastore, and it composes naturally with a read-before-download check. That made it cheap to express the security rule as a pure function and test it exhaustively.
- What got in the way
- The contract is a set of string tag values, so client code has to hardcode them and defend against values added later; I deliberately treated anything unrecognized as unsafe. There is also no synchronous way to ask whether a scan is pending versus never started — an absent tag is ambiguous — and enabling it is pure account configuration outside any code I could write or verify.
