Repository navigation
Expand file tree
/
Copy pathconformance.schema.json
More file actions
70 lines (70 loc) · 4.21 KB
/
Copy pathconformance.schema.json
File metadata and controls
70 lines (70 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "coding-study runner conformance expectations",
"description": "The outcome every runner must produce for each conformance fixture and approach. Spec: docs/specs/runners.md#conformance-suite",
"type": "object",
"additionalProperties": false,
"required": ["version", "expectations"],
"properties": {
"$schema": { "type": "string" },
"version": { "const": 1 },
"expectations": { "type": "array", "items": { "$ref": "#/$defs/expectation" } }
},
"$defs": {
"expectation": {
"type": "object",
"additionalProperties": false,
"required": ["problem", "approach", "outcome"],
"properties": {
"problem": { "description": "Fixture slug under runners/conformance/", "type": "string" },
"approach": { "description": "Approach id declared in the fixture's meta.yaml, or broken-<id> for a project fixture's broken overlay in solutions/broken/<id>/", "type": "string" },
"outcome": { "description": "Expected for every case unless cases overrides it", "$ref": "#/$defs/outcome" },
"cases": {
"description": "Per-case overrides, keyed by case id",
"type": "object",
"additionalProperties": { "$ref": "#/$defs/outcome" }
},
"tests": {
"description": "Project fixtures: the reference's native suite runs, and every test it reports is listed here by test id, each reported once and no other",
"type": "object",
"minProperties": 1,
"additionalProperties": { "$ref": "#/$defs/testOutcome" }
}
}
},
"testOutcome": {
"type": "object",
"additionalProperties": false,
"required": ["status"],
"properties": {
"status": {
"description": "The suite job's status for the test; timeout and crashed: the CLI ended the runner during the test and restarted the suite without it, or, for a suite of one process per test (Rust), the test's own process ended",
"enum": ["ok", "failed", "error", "skipped", "timeout", "crashed"]
},
"message": { "description": "failed, error and skipped: the exact message", "type": "string" },
"stdout": { "description": "The exact captured standard output", "type": "string" }
}
},
"outcome": {
"type": "object",
"additionalProperties": false,
"required": ["status"],
"properties": {
"status": {
"description": "pass: runner status ok and the problem's comparator accepts the output; load_error applies to the whole job; fail: stress cases only; stalled: stress cases, and cases on the virtual clock that deadlock or leave goroutines behind",
"enum": ["pass", "error", "invalid_output", "timeout", "load_error", "fail", "stalled"]
},
"message": { "description": "error: the exact exception message; stalled on the virtual clock: the exact reason", "type": "string" },
"op_index": { "description": "error in a class kind, or stalled on the virtual clock: the failing operation", "type": "integer", "minimum": 0 },
"partial_output": { "description": "error in a class kind, or stalled on the virtual clock: outputs before the failing operation", "type": "array" },
"stdout": { "description": "pass: the exact captured standard output", "type": "string" },
"runs": { "description": "Stress cases: runs per variant (default 10)", "type": "integer", "minimum": 1, "maximum": 100 },
"min_failed": { "description": "Stress cases: at least this many runs fail with status (default: every run)", "type": "integer", "minimum": 0 },
"max_failed": { "description": "Stress cases: at most this many runs fail (default 0 with pass)", "type": "integer", "minimum": 0 },
"phase": { "description": "Stress error: the failing phase", "enum": ["setup", "worker", "final"] },
"deterministic": { "description": "Stress cases: a repeated seed gives an identical run record, and different seeds give at least two distinct records", "type": "boolean" },
"restart_requested": { "description": "The runner asked to be restarted after a run of a stress case, or after a case on the virtual clock", "type": "boolean" }
}
}
}
}