Implements Spec 117 (Golden Master Baseline Drift Engine): - Adds provider-chain resolver for current state hashes (content evidence via PolicyVersion, meta evidence via inventory) - Updates baseline capture + compare jobs to use resolver and persist provenance + fidelity - Adds evidence_fidelity column/index + Filament UI badge/filter/provenance display for findings - Adds performance guard test + integration tests for drift, fidelity semantics, provenance, filter behavior - UX fix: Policies list shows "Sync from Intune" header action only when records exist; empty-state CTA remains and is functional Tests: - `vendor/bin/sail artisan test --compact tests/Feature/Filament/PolicySyncCtaPlacementTest.php` - `vendor/bin/sail artisan test --compact --filter=Baseline` Checklist: - specs/117-baseline-drift-engine/checklists/requirements.md ✓ Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #142
26 lines
627 B
PHP
26 lines
627 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Baselines;
|
|
|
|
use App\Models\Tenant;
|
|
use App\Services\Baselines\Evidence\ResolvedEvidence;
|
|
use Carbon\CarbonImmutable;
|
|
|
|
interface CurrentStateEvidenceProvider
|
|
{
|
|
public function name(): string;
|
|
|
|
/**
|
|
* @param list<array{policy_type: string, subject_external_id: string}> $subjects
|
|
* @return array<string, ResolvedEvidence> keyed by "policy_type|subject_external_id"
|
|
*/
|
|
public function resolve(
|
|
Tenant $tenant,
|
|
array $subjects,
|
|
?CarbonImmutable $since = null,
|
|
?int $latestInventorySyncRunId = null,
|
|
): array;
|
|
}
|