feat(use-case-controls): Adressat-Achse — out-of-scope advisory + additiver GOV-Tag
2-Pass-Haiku-Klassifikation (konservativ + Re-Confirm jeder Nicht-unternehmen- Einstufung) der Review-Tier-Atome: wer muss die Pflicht erfuellen? - Migration 155: atom_classification.addressee (unternehmen/oeffentliche_stelle/ aufsichtsbefugnis/staat_eu/dritter/meta), additiv, kein CHECK. [migration-approved] - Service: addressee + applicable + is_gov pro Control; include_out_of_scope-Param (Default false -> out-of-scope advisory ausgeblendet, NIE geloescht); out_of_scope_count. Pure Helper addressee_applicable/addressee_is_gov (+ Tests). - Route: optionaler include_out_of_scope-Query (contract-safe, additiv). - Frontend: GOV-Chip (additiv) + "kein Kunden-Pruefaspekt"-Chip + 1-Klick-Toggle zum Einblenden der out-of-scope-Atome. Daten: 40.859 Adressat-Tags auf macmini geladen (81% applicable, 19% advisory, 3.146 GOV). Konservativ: NULL/Unklar = applicable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
-- Migration 155: Adressat-Achse (addressee) auf atom_classification.
|
||||
-- Wer muss eine Pflicht erfuellen? unternehmen / oeffentliche_stelle (=GOV-
|
||||
-- Routing, Public-Sector-Kunde) / aufsichtsbefugnis / staat_eu / dritter / meta.
|
||||
-- Ergebnis eines 2-Pass-Haiku-Laufs (konservativ + Re-Confirm jeder Nicht-
|
||||
-- unternehmen-Einstufung, 2026-06-16). Verwendung: out-of-scope (aufsichts-
|
||||
-- befugnis/staat_eu/dritter/meta) = ADVISORY (default-aus, NICHT geloescht);
|
||||
-- oeffentliche_stelle = ADDITIVER GOV-Hinweis (Atom bleibt im Use Case).
|
||||
-- NULL = (noch) nicht klassifiziert -> gilt als applicable. KEIN CHECK (neue
|
||||
-- Werte ohne Migration). Additiv, idempotent. [migration-approved]
|
||||
|
||||
SET search_path TO compliance, public;
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (SELECT 1 FROM information_schema.tables
|
||||
WHERE table_schema = 'compliance'
|
||||
AND table_name = 'atom_classification') THEN
|
||||
|
||||
ALTER TABLE atom_classification
|
||||
ADD COLUMN IF NOT EXISTS addressee VARCHAR(24);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_atomcls_addressee
|
||||
ON atom_classification(use_case, addressee);
|
||||
|
||||
END IF;
|
||||
END $$;
|
||||
Reference in New Issue
Block a user