Implements the 074 verification checklist framework. Highlights: - Versioned verification report contract stored in operation_runs.context.verification_report (DB-only viewer). - Strict sanitizer/redaction (evidence pointers only; no tokens/headers/payloads) + schema validation. - Centralized BADGE-001 semantics for check status, severity, and overall report outcome. - Deterministic start (dedupe while active) via shared StartVerification service; capability-first authorization (non-member 404, member missing capability 403). - Completion audit event (verification.completed) with redacted metadata. - Integrations: OperationRun detail viewer, onboarding wizard verification step, provider connection start surfaces. Tests: - vendor/bin/sail artisan test --compact tests/Feature/Verification tests/Unit/Badges/VerificationBadgesTest.php - vendor/bin/sail bin pint --dirty Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #89
129 lines
3.5 KiB
JSON
129 lines
3.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://tenantpilot.local/contracts/verification-report.schema.json",
|
|
"title": "VerificationReport",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_version",
|
|
"flow",
|
|
"generated_at",
|
|
"summary",
|
|
"checks"
|
|
],
|
|
"properties": {
|
|
"schema_version": {
|
|
"type": "string",
|
|
"description": "Version of the verification report schema (SemVer)."
|
|
},
|
|
"flow": {
|
|
"type": "string",
|
|
"description": "Verification flow identifier (v1 aligns with OperationRun.type)."
|
|
},
|
|
"generated_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"identity": {
|
|
"type": "object",
|
|
"description": "Scope identifiers for what is being verified.",
|
|
"additionalProperties": true
|
|
},
|
|
"summary": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["overall", "counts"],
|
|
"properties": {
|
|
"overall": {
|
|
"type": "string",
|
|
"enum": ["ready", "needs_attention", "blocked", "running"],
|
|
"description": "Overall state derived from check results."
|
|
},
|
|
"counts": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["total", "pass", "fail", "warn", "skip", "running"],
|
|
"properties": {
|
|
"total": {"type": "integer", "minimum": 0},
|
|
"pass": {"type": "integer", "minimum": 0},
|
|
"fail": {"type": "integer", "minimum": 0},
|
|
"warn": {"type": "integer", "minimum": 0},
|
|
"skip": {"type": "integer", "minimum": 0},
|
|
"running": {"type": "integer", "minimum": 0}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"checks": {
|
|
"type": "array",
|
|
"minItems": 0,
|
|
"items": {"$ref": "#/$defs/CheckResult"}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"CheckResult": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"key",
|
|
"title",
|
|
"status",
|
|
"severity",
|
|
"blocking",
|
|
"reason_code",
|
|
"message",
|
|
"evidence",
|
|
"next_steps"
|
|
],
|
|
"properties": {
|
|
"key": {"type": "string"},
|
|
"title": {"type": "string"},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["pass", "fail", "warn", "skip", "running"]
|
|
},
|
|
"severity": {
|
|
"type": "string",
|
|
"enum": ["info", "low", "medium", "high", "critical"]
|
|
},
|
|
"blocking": {"type": "boolean"},
|
|
"reason_code": {"type": "string"},
|
|
"message": {"type": "string"},
|
|
"evidence": {
|
|
"type": "array",
|
|
"items": {"$ref": "#/$defs/EvidencePointer"}
|
|
},
|
|
"next_steps": {
|
|
"type": "array",
|
|
"description": "Navigation-only CTAs (links) in v1.",
|
|
"items": {"$ref": "#/$defs/NextStep"}
|
|
}
|
|
}
|
|
},
|
|
"EvidencePointer": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["kind", "value"],
|
|
"properties": {
|
|
"kind": {"type": "string"},
|
|
"value": {
|
|
"description": "Safe pointer value (ID/masked string/hash).",
|
|
"oneOf": [
|
|
{"type": "integer"},
|
|
{"type": "string"}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"NextStep": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["label", "url"],
|
|
"properties": {
|
|
"label": {"type": "string"},
|
|
"url": {"type": "string"}
|
|
}
|
|
}
|
|
}
|
|
}
|