ki/quota: Hash-Bindung atomar bis in den Publish-Lock, roter Re-Check lehnt ab, Kontingent-Altbestand (Block 7, U02–U04)
- 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>
This commit is contained in:
parent
eb95b3b830
commit
082e6bb76c
11 changed files with 698 additions and 25 deletions
28
app/Services/PressRelease/StaleClassificationException.php
Normal file
28
app/Services/PressRelease/StaleClassificationException.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?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),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue