- Jobs speichern Ergebnis nur per bedingtem UPDATE auf den analysierten Hash; publish() prüft bei ki/scheduler unter der Zeilensperre die jüngste gültige Klassifikation und plant sonst eine neue Prüfung ein (StaleClassificationException) - Re-Check ohne Routing: Rot bei einer PM in Review lehnt wie die Erstprüfung ab - consumePublishSlot() zählt eine NULL-Periode wie den laufenden Monat; Backfill-Migration setzt die Periode für Altverbrauch - ApiPortalResolutionTest: gemeinsame Kategorie wegen der U10-Prüfung Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
28 lines
1 KiB
PHP
28 lines
1 KiB
PHP
<?php
|
|
|
|
namespace App\Services\PressRelease;
|
|
|
|
use RuntimeException;
|
|
|
|
/**
|
|
* Die freigebende KI-Klassifikation gehört zu einer anderen Inhaltsversion
|
|
* als der, die unter der Zeilensperre veröffentlicht werden sollte
|
|
* (Audit U02). Die automatische Veröffentlichung (KI-Job, Scheduler) bricht
|
|
* ab; eine Prüfung mit Routing für den aktuellen Stand ist bereits
|
|
* eingeplant. Manuelle Admin-Freigaben prüfen das nicht.
|
|
*/
|
|
class StaleClassificationException extends RuntimeException
|
|
{
|
|
public function __construct(
|
|
public readonly int $pressReleaseId,
|
|
public readonly ?string $analyzedHash,
|
|
public readonly string $currentHash,
|
|
) {
|
|
parent::__construct(sprintf(
|
|
'PM #%d: Die KI-Klassifikation gilt für eine ältere Inhaltsversion (%s statt %s) — nicht automatisch veröffentlicht, Prüfung neu eingeplant.',
|
|
$pressReleaseId,
|
|
$analyzedHash === null ? 'ohne Prüfsumme' : substr($analyzedHash, 0, 12),
|
|
substr($currentHash, 0, 12),
|
|
));
|
|
}
|
|
}
|