Add the core distribution domain model under src/domain/ (App, Release, Artifact, Channel, AuditEvent + Platform/Visibility/ValidationStatus/ RolloutPolicy enums) and a boundary validator that returns one distinct typed ValidationErr per failure class (BadSlug, EmptyVersion, BadVersion, BadChannelName, UnknownPlatform, MissingField, BadRollout). Pure sx, depends only on modules/std.sx; lookups left as linear scans over List (no HashMap). tests/domain_validate.sx asserts valid App/Release/ Artifact/Channel are accepted and each invalid case is rejected with the exact expected error tag.
12 lines
253 B
Plaintext
12 lines
253 B
Plaintext
#import "modules/std.sx";
|
|
|
|
// Target platforms a release can ship to. `android_apk` names the APK
|
|
// artifact form specifically; the remaining variants are one per OS.
|
|
Platform :: enum u8 {
|
|
ios;
|
|
android_apk;
|
|
macos;
|
|
linux;
|
|
windows;
|
|
}
|