|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://schemas.srcos.ai/v2/LoaderFault.json", |
| 4 | + "title": "LoaderFault", |
| 5 | + "description": "A typed, stable-coded fault the resilient loader (rld) constructs BEFORE any degradation or halt (invariant I5 / rule R2: no bare abort). The class of the failing import edge deterministically fixes severity (REQUIRED->fatal, FEATURE->degraded, LAZY->handled-or-fatal, WEAK->info) — the classifier is a table, not a heuristic. Degradations (non-fatal FEATURE/LAZY misses) are recorded here too, giving a full 'what quietly turned off' trail. Embedded in a ResilientDiagnosticRecord.", |
| 6 | + "type": "object", |
| 7 | + "additionalProperties": false, |
| 8 | + "required": ["type", "kind", "code", "severity"], |
| 9 | + "properties": { |
| 10 | + "type": { "const": "LoaderFault", "description": "Type discriminator; always 'LoaderFault'." }, |
| 11 | + "kind": { |
| 12 | + "type": "string", |
| 13 | + "enum": ["MissingProvider", "VersionUnsatisfied", "InterfaceMismatch", "SignatureInvalid", "CorruptImage", "SandboxDenied", "ResourceExhausted"], |
| 14 | + "description": "The fault variant." |
| 15 | + }, |
| 16 | + "code": { |
| 17 | + "type": "string", |
| 18 | + "enum": ["LDR-DEP-MISSING", "LDR-DEP-VERSION", "LDR-ABI-MISMATCH", "LDR-SIG-INVALID", "LDR-IMG-CORRUPT", "LDR-SBX-DENY", "LDR-RES-EXHAUST"], |
| 19 | + "description": "Stable machine code; the root-cause line is a pure lookup on this (no free-text parsing)." |
| 20 | + }, |
| 21 | + "severity": { |
| 22 | + "type": "string", |
| 23 | + "enum": ["fatal", "degraded", "handled", "info"], |
| 24 | + "description": "Determined by the failing edge's binding class, not by heuristics." |
| 25 | + }, |
| 26 | + "import": { |
| 27 | + "type": "object", |
| 28 | + "additionalProperties": false, |
| 29 | + "description": "The import reference that failed (present for dependency/ABI faults).", |
| 30 | + "properties": { |
| 31 | + "name": { "type": "string", "description": "Required interface name." }, |
| 32 | + "versionReq": { "type": "string", "description": "Requested version range." }, |
| 33 | + "binding": { "type": "string", "enum": ["REQUIRED", "FEATURE", "LAZY", "WEAK"], "description": "Binding class of the failing edge (drives severity). The reference incident's defect: this was REQUIRED where it should have been FEATURE." }, |
| 34 | + "capability": { "type": "string", "description": "Feature capability token kappa, when binding=FEATURE." }, |
| 35 | + "requestedBy": { "type": "string", "description": "The module that requested the import." }, |
| 36 | + "chain": { "type": "array", "items": { "type": "string" }, "description": "Causal requester chain root -> ... -> requester." } |
| 37 | + } |
| 38 | + }, |
| 39 | + "searched": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "description": "Symbolic store queries attempted (named stores, not filesystem paths) — PII-free by construction." }, |
| 40 | + "want": { "type": "string", "description": "Expected interface/ABI digest (InterfaceMismatch)." }, |
| 41 | + "got": { "type": "string", "description": "Actual digest found (InterfaceMismatch)." }, |
| 42 | + "hash": { "type": "string", "description": "Content hash of the offending image (SignatureInvalid/CorruptImage)." }, |
| 43 | + "reason": { "type": "string", "description": "Signature-failure reason (SignatureInvalid)." }, |
| 44 | + "candidate": { "type": "string", "description": "Symbolic store candidate rejected by policy (SandboxDenied)." }, |
| 45 | + "rule": { "type": "string", "description": "Policy rule id that denied the load (SandboxDenied)." }, |
| 46 | + "resourceKind": { "type": "string", "enum": ["VMEM", "FD", "MAPSLOTS"], "description": "Exhausted resource (ResourceExhausted)." }, |
| 47 | + "limit": { "type": "integer", "description": "Resource limit hit (ResourceExhausted)." } |
| 48 | + } |
| 49 | +} |
0 commit comments