Build an "Artifact Generation" client that ingests Orders from a queue, orchestrates the production of Metadata and Assets (with AssetDetails) through a provided SDK against an unreliable testserver, and submits each Order as a ShippableOrder or FailedOrder following the orchestration rules (take before processing, assets before metadata, no metadata if assets failed).
Asked in the Round 1 (LLD, CoderPad) stage. Starter client passes ~1%; improve it to maximize score within the testserver's 1-minute run; 1% per correct order, -1.5% per incorrect/errored order.
Implement generate_artifacts(orders, sdk_plan). Each order has order_id, assets, and optional asset_details; sdk_plan describes whether taking, each asset, and metadata succeed. Return one result per order.
def generate_artifacts(orders, sdk_plan):