170 lines
4.1 KiB
JSON
170 lines
4.1 KiB
JSON
{
|
|
"$comment": "Structural schema; also run versioned model validation for cross-field budgets, result consistency, UUID canonical form and UTF-8 byte limits.",
|
|
"$defs": {
|
|
"RunLimits": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"cpu_time_us": {
|
|
"maximum": 60000000,
|
|
"minimum": 1000,
|
|
"title": "Cpu Time Us",
|
|
"type": "integer"
|
|
},
|
|
"file_bytes": {
|
|
"maximum": 67108864,
|
|
"minimum": 1,
|
|
"title": "File Bytes",
|
|
"type": "integer"
|
|
},
|
|
"memory_bytes": {
|
|
"maximum": 2147483648,
|
|
"minimum": 1,
|
|
"title": "Memory Bytes",
|
|
"type": "integer"
|
|
},
|
|
"open_files": {
|
|
"maximum": 1024,
|
|
"minimum": 3,
|
|
"title": "Open Files",
|
|
"type": "integer"
|
|
},
|
|
"processes": {
|
|
"maximum": 128,
|
|
"minimum": 1,
|
|
"title": "Processes",
|
|
"type": "integer"
|
|
},
|
|
"stack_bytes": {
|
|
"maximum": 268435456,
|
|
"minimum": 1,
|
|
"title": "Stack Bytes",
|
|
"type": "integer"
|
|
},
|
|
"stderr_bytes": {
|
|
"maximum": 16777216,
|
|
"minimum": 1,
|
|
"title": "Stderr Bytes",
|
|
"type": "integer"
|
|
},
|
|
"stdout_bytes": {
|
|
"maximum": 16777216,
|
|
"minimum": 1,
|
|
"title": "Stdout Bytes",
|
|
"type": "integer"
|
|
},
|
|
"wall_time_us": {
|
|
"maximum": 120000000,
|
|
"minimum": 1000,
|
|
"title": "Wall Time Us",
|
|
"type": "integer"
|
|
},
|
|
"workdir_bytes": {
|
|
"maximum": 268435456,
|
|
"minimum": 1,
|
|
"title": "Workdir Bytes",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"cpu_time_us",
|
|
"wall_time_us",
|
|
"memory_bytes",
|
|
"stack_bytes",
|
|
"processes",
|
|
"open_files",
|
|
"stdout_bytes",
|
|
"stderr_bytes",
|
|
"file_bytes",
|
|
"workdir_bytes"
|
|
],
|
|
"title": "RunLimits",
|
|
"type": "object"
|
|
},
|
|
"Toolchain": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"image_kind": {
|
|
"const": "linux_gnu_cxx_x86_64_v1",
|
|
"title": "Image Kind",
|
|
"type": "string"
|
|
},
|
|
"image_revision": {
|
|
"maximum": 4294967295,
|
|
"minimum": 1,
|
|
"title": "Image Revision",
|
|
"type": "integer"
|
|
},
|
|
"toolchain_id": {
|
|
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$",
|
|
"title": "Toolchain Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"toolchain_id",
|
|
"image_kind",
|
|
"image_revision"
|
|
],
|
|
"title": "Toolchain",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"$id": "urn:kf-oj:judge-admission:v1",
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"additionalProperties": false,
|
|
"description": "Trusted node policy. A manifest never supplies or replaces this policy.",
|
|
"properties": {
|
|
"compile_ceiling": {
|
|
"$ref": "#/$defs/RunLimits"
|
|
},
|
|
"max_concurrent_jobs": {
|
|
"default": 1,
|
|
"maximum": 64,
|
|
"minimum": 1,
|
|
"title": "Max Concurrent Jobs",
|
|
"type": "integer"
|
|
},
|
|
"max_job_wall_time_us": {
|
|
"maximum": 3600000000,
|
|
"minimum": 1000,
|
|
"title": "Max Job Wall Time Us",
|
|
"type": "integer"
|
|
},
|
|
"max_package_bytes": {
|
|
"maximum": 67108864,
|
|
"minimum": 1,
|
|
"title": "Max Package Bytes",
|
|
"type": "integer"
|
|
},
|
|
"max_retries": {
|
|
"default": 2,
|
|
"maximum": 4,
|
|
"minimum": 0,
|
|
"title": "Max Retries",
|
|
"type": "integer"
|
|
},
|
|
"prefetch": {
|
|
"default": 1,
|
|
"maximum": 64,
|
|
"minimum": 1,
|
|
"title": "Prefetch",
|
|
"type": "integer"
|
|
},
|
|
"run_ceiling": {
|
|
"$ref": "#/$defs/RunLimits"
|
|
},
|
|
"toolchain": {
|
|
"$ref": "#/$defs/Toolchain"
|
|
}
|
|
},
|
|
"required": [
|
|
"max_job_wall_time_us",
|
|
"max_package_bytes",
|
|
"toolchain",
|
|
"compile_ceiling",
|
|
"run_ceiling"
|
|
],
|
|
"title": "AdmissionPolicy",
|
|
"type": "object"
|
|
}
|