#import "modules/std.sx";
#import "platform.sx";

// Where an artifact sits in the validation pipeline: artifacts enter
// `pending`, then validation moves them to `valid` or `invalid`.
ValidationStatus :: enum u8 {
    pending;
    valid;
    invalid;
}

// A single uploaded binary belonging to a release, for one platform.
// `sha256` is the lowercase-hex content digest; `storage_key` locates the
// bytes in the blob store. `metadata` is an opaque string (mirroring
// AuditEvent.metadata) carrying per-artifact data the manifest emits later.
Artifact :: struct {
    id: string;
    app_id: string;
    release_id: string;
    platform: Platform;
    filename: string;
    content_type: string;
    size_bytes: i64;
    sha256: string;
    storage_key: string;
    metadata: string;
    validation_status: ValidationStatus = .pending;
}
