## Spec 178 — Operations Lifecycle Alignment & Cross-Surface Truth Consistency Härtet die Run-Lifecycle-Wahrheit und Cross-Surface-Konsistenz über alle zentralen Operator-Flächen hinweg. ### Kern-Änderungen **Lifecycle Truth Alignment** - Einheitliche stale/stuck-Semantik zwischen Tenant-, Workspace-, Admin- und System-Surfaces - `OperationRunFreshnessState` wird konsistent über alle Widgets und Seiten propagiert - Gemeinsame Problem-Klassen-Trennung: `terminal_follow_up` vs. `active_stale_attention` **BulkOperationProgress Freshness** - Overlay zeigt nur noch `healthyActive()` Runs statt alle aktiven Runs - Likely-stale Runs halten das Polling nicht mehr künstlich aktiv - Terminal Runs verschwinden zeitnah aus dem Progress-Overlay **Decision Zone im Run Detail** - Stale/reconciled Attention in der primären Decision-Hierarchie - Klare Antworten: aktiv? stale? reconciled? nächster Schritt? - Artifact-reiche Runs behalten Lifecycle-Truth vor Deep-Diagnostics **Cross-Surface Link-Continuity** - Dashboard → Operations Hub → Run Detail erzählen dieselbe Geschichte - Notifications referenzieren korrekte Problem-Klasse - Workspace/Tenant-Attention verlinken problemklassengerecht **System-Plane Fixes** - `/system/ops/failures` 500-Error behoben (panel-sichere Artifact-URLs) - System-Stuck/Failures zeigen reconciled stale lineage ### Weitere Fixes - Inventory auth guard bereinigt (Gate statt ad-hoc Facades) - Browser-Smoke-Tests stabilisiert (DOM-Assertions statt fragile Klicks) - Test-Assertion-Drift für Verification/Lifecycle-Texte korrigiert ### Test-Ergebnis Full Suite: **3269 passed**, 8 skipped, 0 failed ### Spec-Artefakte - `specs/178-ops-truth-alignment/spec.md` - `specs/178-ops-truth-alignment/plan.md` - `specs/178-ops-truth-alignment/tasks.md` - `specs/178-ops-truth-alignment/research.md` - `specs/178-ops-truth-alignment/data-model.md` - `specs/178-ops-truth-alignment/quickstart.md` - `specs/178-ops-truth-alignment/contracts/operations-truth-alignment.openapi.yaml` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #209
209 lines
9.2 KiB
PHP
209 lines
9.2 KiB
PHP
@php
|
|
/** @var \App\Models\OperationRun $run */
|
|
$run = $this->run;
|
|
|
|
$statusSpec = \App\Support\Badges\BadgeRenderer::spec(
|
|
\App\Support\Badges\BadgeDomain::OperationRunStatus,
|
|
[
|
|
'status' => (string) $run->status,
|
|
'freshness_state' => $run->freshnessState()->value,
|
|
],
|
|
);
|
|
|
|
$outcomeSpec = \App\Support\Badges\BadgeRenderer::spec(
|
|
\App\Support\Badges\BadgeDomain::OperationRunOutcome,
|
|
[
|
|
'outcome' => (string) $run->outcome,
|
|
'status' => (string) $run->status,
|
|
'freshness_state' => $run->freshnessState()->value,
|
|
],
|
|
);
|
|
|
|
$summaryCounts = is_array($run->summary_counts) ? $run->summary_counts : [];
|
|
$hasSummary = count($summaryCounts) > 0;
|
|
$integrityNote = \App\Support\RedactionIntegrity::noteForRun($run);
|
|
$guidance = \App\Support\OpsUx\OperationUxPresenter::surfaceGuidance($run);
|
|
$decisionTruth = \App\Support\OpsUx\OperationUxPresenter::decisionZoneTruth($run);
|
|
@endphp
|
|
|
|
<x-filament-panels::page>
|
|
<div class="space-y-6">
|
|
<x-filament::section>
|
|
<x-slot name="heading">
|
|
Operation #{{ (int) $run->getKey() }}
|
|
</x-slot>
|
|
|
|
<x-slot name="description">
|
|
{{ \App\Support\OperationCatalog::label((string) $run->type) }}
|
|
</x-slot>
|
|
|
|
<x-slot name="afterHeader">
|
|
<div class="flex items-center gap-2">
|
|
<x-filament::badge
|
|
:color="$statusSpec->color"
|
|
:icon="$statusSpec->icon"
|
|
>
|
|
{{ $statusSpec->label }}
|
|
</x-filament::badge>
|
|
|
|
@if ($outcomeSpec)
|
|
<x-filament::badge
|
|
:color="$outcomeSpec->color"
|
|
:icon="$outcomeSpec->icon"
|
|
>
|
|
{{ $outcomeSpec->label }}
|
|
</x-filament::badge>
|
|
@endif
|
|
</div>
|
|
</x-slot>
|
|
|
|
<dl class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Workspace</dt>
|
|
<dd class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ $run->workspace?->name ?? 'Unknown workspace' }}
|
|
</dd>
|
|
</div>
|
|
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Tenant</dt>
|
|
<dd class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ $run->tenant?->name ?? 'Tenantless' }}
|
|
</dd>
|
|
</div>
|
|
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Started</dt>
|
|
<dd class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ $run->started_at?->toDayDateTimeString() ?? '—' }}
|
|
</dd>
|
|
</div>
|
|
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Completed</dt>
|
|
<dd class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ $run->completed_at?->toDayDateTimeString() ?? '—' }}
|
|
</dd>
|
|
</div>
|
|
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Initiator</dt>
|
|
<dd class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ (string) ($run->initiator_name ?? '—') }}
|
|
</dd>
|
|
</div>
|
|
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Navigation</dt>
|
|
<dd class="mt-1 text-sm">
|
|
<div class="flex flex-col gap-2">
|
|
<x-filament::link href="{{ \App\Support\System\SystemOperationRunLinks::index() }}">
|
|
Show all operations
|
|
</x-filament::link>
|
|
|
|
<x-filament::link href="{{ \App\Filament\System\Pages\Ops\Runbooks::getUrl(panel: 'system') }}">
|
|
Go to runbooks
|
|
</x-filament::link>
|
|
</div>
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</x-filament::section>
|
|
|
|
<x-filament::section>
|
|
<x-slot name="heading">
|
|
Current lifecycle truth
|
|
</x-slot>
|
|
|
|
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
|
<div class="rounded-lg bg-gray-50 px-4 py-3 dark:bg-white/5">
|
|
<div class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Still active</div>
|
|
<div class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ ($decisionTruth['isCurrentlyActive'] ?? false) ? 'Yes' : 'No' }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rounded-lg bg-gray-50 px-4 py-3 dark:bg-white/5">
|
|
<div class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Automatic reconciliation</div>
|
|
<div class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ ($decisionTruth['isReconciled'] ?? false) ? 'Yes' : 'No' }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rounded-lg bg-gray-50 px-4 py-3 dark:bg-white/5">
|
|
<div class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Problem class</div>
|
|
<div class="mt-1 text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ $decisionTruth['problemClassLabel'] ?? 'None' }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if (filled($decisionTruth['attentionNote'] ?? null))
|
|
<div class="mt-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-100">
|
|
{{ $decisionTruth['attentionNote'] }}
|
|
</div>
|
|
@endif
|
|
|
|
@if (filled($decisionTruth['staleLineageNote'] ?? null))
|
|
<div class="mt-4 rounded-lg border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-900 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-100">
|
|
{{ $decisionTruth['staleLineageNote'] }}
|
|
</div>
|
|
@endif
|
|
</x-filament::section>
|
|
|
|
@if ($integrityNote)
|
|
<x-filament::section>
|
|
<div class="rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-100">
|
|
{{ $integrityNote }}
|
|
</div>
|
|
</x-filament::section>
|
|
@endif
|
|
|
|
@if ($guidance)
|
|
<x-filament::section>
|
|
<x-slot name="heading">
|
|
Next step
|
|
</x-slot>
|
|
|
|
<div class="rounded-lg border border-gray-200 bg-gray-50 px-4 py-3 text-sm text-gray-800 dark:border-white/10 dark:bg-white/5 dark:text-gray-100">
|
|
{{ $guidance }}
|
|
</div>
|
|
</x-filament::section>
|
|
@endif
|
|
|
|
@if ($hasSummary)
|
|
<x-filament::section>
|
|
<x-slot name="heading">
|
|
Summary counts
|
|
</x-slot>
|
|
|
|
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4">
|
|
@foreach ($summaryCounts as $key => $value)
|
|
<div class="rounded-lg bg-gray-50 px-4 py-3 dark:bg-white/5">
|
|
<p class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">
|
|
{{ \App\Support\OpsUx\SummaryCountsNormalizer::label((string) $key) }}
|
|
</p>
|
|
<p class="mt-1 text-xl font-bold text-gray-950 dark:text-white">
|
|
{{ is_numeric($value) ? number_format((int) $value) : $value }}
|
|
</p>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</x-filament::section>
|
|
@endif
|
|
|
|
@if (! empty($run->failure_summary))
|
|
<x-filament::section>
|
|
<x-slot name="heading">
|
|
<div class="flex items-center gap-2 text-danger-600 dark:text-danger-400">
|
|
<x-heroicon-m-exclamation-circle class="h-5 w-5" />
|
|
Failures
|
|
</div>
|
|
</x-slot>
|
|
|
|
@include('filament.partials.json-viewer', ['value' => $run->failure_summary])
|
|
</x-filament::section>
|
|
@endif
|
|
</div>
|
|
</x-filament-panels::page>
|