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
2.0 KiB
2.0 KiB
Data Model: Verification Checklist Framework (074)
Overview
This feature introduces a versioned verification report document attached to an existing OperationRun.
No new database tables are required for v1.
Existing Entities Used
OperationRun (operation_runs)
Selected fields:
idtenant_iduser_idtype(used as the verification flow identifier)status(queued|running|completed)outcome(pending|succeeded|failed)summary_counts(JSONB)failure_summary(JSONB)context(JSONB)started_at,completed_at
Idempotency:
- DB-enforced dedupe for active runs via partial unique index on
(tenant_id, run_identity_hash)wherestatus IN ('queued','running').
New Logical Data (stored inside OperationRun context)
VerificationReport (operation_runs.context.verification_report)
- Stored as JSON in
contextunderverification_report. - Versioned by
schema_version. - Rendered DB-only (no external calls during view).
High-level shape (see contracts/verification-report.schema.json for the canonical contract):
schema_versionflow(identifier; for v1 this can align withoperation_runs.type)identity(scope identifiers such astenant_id,provider_connection_id, etc.)generated_atsummary(counts, overall state)checks[](check results)
CheckResult (within checks[])
key,titlestatus:pass|fail|warn|skip|runningseverity:info|low|medium|high|criticalblocking: booleanreason_codemessageevidence[]: safe pointers onlynext_steps[]: links only in v1
Audit
Verification start and completion are recorded in audit_logs using stable action identifiers (via App\Support\Audit\AuditActionId). Metadata is minimal and sanitized.
Notes / Constraints
- Viewer must be DB-only: rendering the report must not dispatch jobs or perform HTTP.
- Evidence must be redacted/safe: no secrets/tokens/payload dumps in stored or rendered report.