chore: merge the automatic test campaign

This commit is contained in:
Abdessamad Derraz committed 2026-10-27 14:05:18 +01:00
commit 9c8dbcd99a
31 files changed
+4132 -49

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
{
"$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"],
"description": "applied: the rule table 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."
},
"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"] }
}
}
+58
View File
@@ -0,0 +1,58 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/campaign-run.schema.json",
"title": "RetroBIOS campaign run",
"description": "One line of measurements/campaign-runs.jsonl: one pass of scripts/campaign.py, what it left done, failed and pending, and the records and findings it added. Lines are appended, never rewritten.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "id", "started_at", "ended_at", "result", "detail", "counts",
"pending_reasons", "failed", "records", "findings"],
"properties": {
"schema_version": { "const": 1 },
"id": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$" },
"started_at": { "type": "string", "format": "date-time" },
"ended_at": { "type": "string", "format": "date-time" },
"result": {
"enum": ["complete", "budget", "paused", "stopped", "refused"],
"description": "complete: nothing runnable was left. budget: the time budget ended the pass. paused: a busy host or a full disk ended it, the next pass resumes. stopped: interrupted. refused: no sandbox for third-party code, nothing ran."
},
"detail": { "type": "string" },
"counts": {
"type": "object",
"additionalProperties": false,
"required": ["done", "failed", "pending"],
"properties": {
"done": { "type": "integer", "minimum": 0 },
"failed": { "type": "integer", "minimum": 0 },
"pending": { "type": "integer", "minimum": 0 }
}
},
"pending_reasons": {
"type": "object",
"additionalProperties": { "type": "integer", "minimum": 1 },
"description": "Pending checks counted by reason."
},
"failed": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["emulator", "check", "reason"],
"properties": {
"emulator": { "type": "string" },
"check": { "type": "string" },
"reason": { "type": "string" }
}
}
},
"records": {
"type": "array",
"items": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$" }
},
"findings": {
"type": "object",
"additionalProperties": { "type": "integer", "minimum": 0 },
"description": "Finding lines added by this pass, counted by status."
}
}
}
+9
View File
@@ -125,6 +125,11 @@
"string",
"null"
]
},
"artifact": {
"type": "string",
"format": "uri",
"description": "Where the .so was downloaded from, such as a libretro buildbot nightly. Absent for a core built locally."
}
}
},
@@ -681,6 +686,10 @@
"tracing": {
"type": "string"
},
"isolation": {
"type": "string",
"description": "How the core ran: `bwrap` (read-only tree, no network, the user's credentials masked, an empty environment beside the --env values) or `environment only: ...` with the reason bubblewrap was not used."
},
"input_queries": {
"type": "integer",
"minimum": 0
+12
View File
@@ -478,6 +478,18 @@
"hle_fallback": {
"type": "boolean"
},
"evidence": {
"description": "Real-condition runs that settled a field of this entry, by field: the ids of the core probe records in measurements/<emulator>.jsonl. Written by scripts/campaign.py when its rule table settles the field.",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"required": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$"}},
"hle_fallback": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$"}},
"path": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$"}},
"aliases": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{12}$"}}
}
},
"adler32_byteswap": {
"type": "boolean"
},