P2.1: domain structs + boundary validation
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.
This commit is contained in:
11
src/domain/platform.sx
Normal file
11
src/domain/platform.sx
Normal file
@@ -0,0 +1,11 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user