mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 00:27:20 -05:00
campaign.py review applies or rejects an open finding with the reason read in the code. Applied fields go through the profile editor with the finding's records as evidence. The rule table reads on_mismatch: warn and counts a signature as a content check.
59 lines
2.8 KiB
JSON
59 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/campaign-finding.schema.json",
|
|
"title": "RetroBIOS campaign finding",
|
|
"description": "One line of measurements/findings.jsonl: what a real-condition run showed about one field of one profile entry, the rule that settled it or the reason it waits for review, and the records that show it. Lines are appended, never rewritten: the latest line of a key is its state.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "id", "found_at", "key", "emulator", "system", "file", "field",
|
|
"status", "rule", "profile_says", "run_shows", "statement", "evidence", "core", "content"],
|
|
"properties": {
|
|
"schema_version": { "const": 1 },
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$",
|
|
"description": "Date and the first 12 hex digits of the sha256 of the line without its id, in canonical JSON."
|
|
},
|
|
"found_at": { "type": "string", "format": "date-time" },
|
|
"key": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "emulator/system/file/field: the lines of one key are the history of one claim."
|
|
},
|
|
"emulator": { "type": "string", "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$" },
|
|
"system": { "type": "string", "minLength": 1 },
|
|
"file": { "type": "string", "minLength": 1 },
|
|
"field": { "type": "string", "minLength": 1 },
|
|
"status": {
|
|
"enum": ["applied", "open", "flagged", "resolved", "rejected"],
|
|
"description": "applied: the rule table, or a review of the code, settled the field and the profile was changed. open: no rule settles it, it waits for review. flagged: a declared file the runs never opened. resolved: a later run found the profile in agreement. rejected: a review of the code kept the profile as it is."
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Written by a review (campaign.py review): what the code does, with its file:line."
|
|
},
|
|
"rule": { "type": "string", "minLength": 1 },
|
|
"profile_says": {},
|
|
"run_shows": {},
|
|
"statement": { "type": "string", "minLength": 1 },
|
|
"evidence": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$" },
|
|
"description": "Ids of the records in measurements/<emulator>.jsonl that show it."
|
|
},
|
|
"core": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["file", "sha256", "library_version"],
|
|
"properties": {
|
|
"file": { "type": "string", "minLength": 1 },
|
|
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
"library_version": { "type": ["string", "null"] }
|
|
}
|
|
},
|
|
"content": { "type": ["string", "null"] }
|
|
}
|
|
}
|