from __future__ import annotations from pathlib import Path from govoplan_core.core.access import ( CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER, ) from govoplan_core.core.dataflows import CAPABILITY_DATAFLOW_DATASET_OUTPUT from govoplan_core.core.files import CAPABILITY_FILES_ARTIFACT_STORE from govoplan_core.core.mail import CAPABILITY_MAIL_NOTIFICATION_DELIVERY from govoplan_core.core.module_guards import ( drop_table_retirement_provider, persistent_table_uninstall_guard, ) from govoplan_core.core.modules import ( CapabilityDocumentation, DocumentationCondition, DocumentationLink, DocumentationTopic, FrontendModule, FrontendRoute, MigrationSpec, ModuleContext, ModuleInterfaceProvider, ModuleInterfaceRequirement, ModuleManifest, NavItem, PermissionDefinition, ProductAreaContribution, RoleTemplate, ) from govoplan_core.core.provider_governance import ( ModuleArchitectureDeclaration, ModuleArchitectureDocumentation, ModuleMaturityEvidence, ) from govoplan_core.core.reporting import ( CAPABILITY_POLICY_REPORTING_GOVERNANCE, CAPABILITY_REPORTING_RETENTION, ) from govoplan_core.core.search import SearchSourceProviderRegistration from govoplan_core.core.views import ViewSurface from govoplan_core.db.base import Base from govoplan_reporting.backend.acl import ReportingScopeAclProvider from govoplan_reporting.backend.contracts import ( CAPABILITY_REPORTING_CHART_RENDERER, CAPABILITY_REPORTING_PUBLICATION_FILES, CAPABILITY_REPORTING_PUBLICATION_MAIL, CAPABILITY_REPORTING_REGISTRY, CAPABILITY_REPORTING_RUNNER, CAPABILITY_REPORTING_SCHEDULER, ) from govoplan_reporting.backend.db import models as reporting_models from govoplan_reporting.backend.dsar_provider import ( REPORTING_DSAR_CAPABILITY, ReportingDsarProvider, ) from govoplan_reporting.backend.definitions import ( ADMIN_SCOPE, READ_SCOPE, WRITE_SCOPE, ) from govoplan_reporting.backend.execution import ( QUALITY_SCOPE, RUN_SCOPE, SqlReportingRunner, ) from govoplan_reporting.backend.operations import ( IMPORT_SCOPE, PUBLISH_SCOPE, SCHEDULE_SCOPE, SqlReportingScheduler, ) from govoplan_reporting.backend.query_engine import DefaultChartRenderer from govoplan_reporting.backend.publication_targets import ( FilesReportingPublicationTarget, MailReportingPublicationTarget, ) from govoplan_reporting.backend.registry import SqlReportingRegistry from govoplan_reporting.backend.search_source import create_reporting_search_source MODULE_ID = "reporting" MODULE_NAME = "Reporting" MODULE_VERSION = "0.1.21" def _permission(scope: str, label: str, description: str) -> PermissionDefinition: module_id, resource, action = scope.split(":", 2) return PermissionDefinition( scope=scope, label=label, description=description, category=MODULE_NAME, level="tenant", module_id=module_id, resource=resource, action=action, ) PERMISSIONS = ( _permission( READ_SCOPE, "View reporting definitions", "Read accessible datasets, semantic models, reports, and quality plans.", ), _permission( WRITE_SCOPE, "Manage reporting definitions", "Create immutable revisions of Reporting definitions.", ), _permission( ADMIN_SCOPE, "Administer reporting", "Manage restricted definitions and Reporting governance.", ), _permission( RUN_SCOPE, "Run reports", "Execute accessible report revisions and export their authorized result.", ), _permission( PUBLISH_SCOPE, "Publish reports", "Send successful report results to configured publication providers.", ), _permission( SCHEDULE_SCOPE, "Schedule reports", "Create schedules and dispatch due report runs.", ), _permission( QUALITY_SCOPE, "Run report quality plans", "Evaluate dataset quality plans and inspect evidence.", ), _permission( IMPORT_SCOPE, "Assess report imports", "Assess external BI metadata and accept bounded approximations.", ), ) ROLE_TEMPLATES = ( RoleTemplate( slug="reporting_analyst", name="Reporting analyst", description="Define semantic reports, run them, and save analytical views.", permissions=(READ_SCOPE, WRITE_SCOPE, RUN_SCOPE, QUALITY_SCOPE), ), RoleTemplate( slug="reporting_publisher", name="Reporting publisher", description="Run, schedule, export, and publish accessible reports.", permissions=(READ_SCOPE, RUN_SCOPE, PUBLISH_SCOPE, SCHEDULE_SCOPE), ), RoleTemplate( slug="reporting_administrator", name="Reporting administrator", description="Administer definitions, imports, quality, schedules, and publications.", permissions=tuple(item.scope for item in PERMISSIONS), ), ) def _router(context: ModuleContext): from govoplan_reporting.backend.router import create_router return create_router(context.registry) def _registry(context: ModuleContext) -> SqlReportingRegistry: del context return SqlReportingRegistry() def _runner(context: ModuleContext) -> SqlReportingRunner: return SqlReportingRunner(context.registry) def _scheduler(context: ModuleContext) -> SqlReportingScheduler: return SqlReportingScheduler(context.registry) def _chart_renderer(context: ModuleContext) -> DefaultChartRenderer: del context return DefaultChartRenderer() def _files_publication(context: ModuleContext) -> FilesReportingPublicationTarget: return FilesReportingPublicationTarget(context.registry) def _mail_publication(context: ModuleContext) -> MailReportingPublicationTarget: return MailReportingPublicationTarget(context.registry) def _retention(context: ModuleContext): del context from govoplan_reporting.backend.retention import ReportingRetentionService return ReportingRetentionService() def _dsar_provider(context: ModuleContext) -> ReportingDsarProvider: del context return ReportingDsarProvider() def _tenant_summary(session, tenant_id: str) -> dict[str, int]: definitions = ( session.query(reporting_models.ReportingDefinitionRevision) .filter( reporting_models.ReportingDefinitionRevision.tenant_id == tenant_id, reporting_models.ReportingDefinitionRevision.superseded_at.is_(None), ) .count() ) reports = ( session.query(reporting_models.ReportingDefinitionRevision) .filter( reporting_models.ReportingDefinitionRevision.tenant_id == tenant_id, reporting_models.ReportingDefinitionRevision.definition_kind == "report", reporting_models.ReportingDefinitionRevision.superseded_at.is_(None), ) .count() ) executions = ( session.query(reporting_models.ReportingExecution) .filter(reporting_models.ReportingExecution.tenant_id == tenant_id) .count() ) schedules = ( session.query(reporting_models.ReportingSchedule) .filter( reporting_models.ReportingSchedule.tenant_id == tenant_id, reporting_models.ReportingSchedule.enabled.is_(True), ) .count() ) return { "reporting_definitions": definitions, "reports": reports, "report_executions": executions, "active_report_schedules": schedules, } manifest = ModuleManifest( id=MODULE_ID, name=MODULE_NAME, version=MODULE_VERSION, dependencies=("access",), optional_dependencies=( "dataflow", "datasources", "connectors", "dashboard", "files", "mail", "templates", "workflow_engine", "policy", "search", "notifications", ), required_capabilities=( CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR, ), optional_capabilities=( CAPABILITY_DATAFLOW_DATASET_OUTPUT, CAPABILITY_POLICY_REPORTING_GOVERNANCE, CAPABILITY_FILES_ARTIFACT_STORE, CAPABILITY_MAIL_NOTIFICATION_DELIVERY, ), permissions=PERMISSIONS, role_templates=ROLE_TEMPLATES, route_factory=_router, nav_items=( NavItem( path="/reports", label="Reporting", icon="clipboard-pen-line", required_any=(READ_SCOPE,), order=74, surface_id="reporting.navigation", ), ), frontend=FrontendModule( module_id=MODULE_ID, package_name="@govoplan/reporting-webui", routes=( FrontendRoute( path="/reports", component="ReportingPage", required_any=(READ_SCOPE,), order=74, surface_id="reporting.workspace", ), FrontendRoute( path="/reporting", component="ReportingPage", required_any=(READ_SCOPE,), order=175, surface_id="reporting.compatibility", ), ), nav_items=( NavItem( path="/reports", label="Reporting", icon="clipboard-pen-line", required_any=(READ_SCOPE,), order=74, surface_id="reporting.navigation", ), ), product_areas=( ProductAreaContribution( id="data-assurance", module_id=MODULE_ID, label="i18n:govoplan-core.product_area.data_assurance", icon="database-zap", description="i18n:govoplan-core.product_area.data_assurance_description", surface_ids=( "reporting.navigation", "reporting.workspace", "reporting.compatibility", ), order=60, ), ), view_surfaces=( ViewSurface( id="reporting.parameters", module_id=MODULE_ID, kind="section", label="Report parameters and filters", parent_id="reporting.workspace", order=30, ), ViewSurface( id="reporting.results", module_id=MODULE_ID, kind="section", label="Authorized report results", parent_id="reporting.workspace", order=40, ), ViewSurface( id="reporting.widget.reports", module_id=MODULE_ID, kind="section", label="Reports dashboard widget", order=75, ), ), ), provides_interfaces=( ModuleInterfaceProvider(name="reporting.registry", version="0.1.0"), ModuleInterfaceProvider(name="reporting.runner", version="0.1.0"), ModuleInterfaceProvider(name="reporting.scheduler", version="0.1.0"), ModuleInterfaceProvider(name="reporting.chart_renderer", version="0.1.0"), ModuleInterfaceProvider( name=CAPABILITY_REPORTING_PUBLICATION_FILES, version="1.0.0" ), ModuleInterfaceProvider( name=CAPABILITY_REPORTING_PUBLICATION_MAIL, version="1.0.0" ), ModuleInterfaceProvider(name=CAPABILITY_REPORTING_RETENTION, version="1.0.0"), ModuleInterfaceProvider(name=REPORTING_DSAR_CAPABILITY, version="0.1.0"), ), requires_interfaces=( ModuleInterfaceRequirement( name="dataflow.dataset_output", version_min="0.1.0", version_max_exclusive="0.2.0", optional=True, ), ModuleInterfaceRequirement( name=CAPABILITY_POLICY_REPORTING_GOVERNANCE, version_min="1.0.0", version_max_exclusive="2.0.0", optional=True, ), ModuleInterfaceRequirement( name=CAPABILITY_FILES_ARTIFACT_STORE, version_min="0.1.14", version_max_exclusive="0.2.0", optional=True, ), ModuleInterfaceRequirement( name="mail.notification_delivery", version_min="0.1.0", version_max_exclusive="2.0.0", optional=True, ), ), capability_factories={ CAPABILITY_REPORTING_REGISTRY: _registry, CAPABILITY_REPORTING_RUNNER: _runner, CAPABILITY_REPORTING_SCHEDULER: _scheduler, CAPABILITY_REPORTING_CHART_RENDERER: _chart_renderer, CAPABILITY_REPORTING_PUBLICATION_FILES: _files_publication, CAPABILITY_REPORTING_PUBLICATION_MAIL: _mail_publication, CAPABILITY_REPORTING_RETENTION: _retention, REPORTING_DSAR_CAPABILITY: _dsar_provider, }, capability_documentation={ CAPABILITY_REPORTING_REGISTRY: CapabilityDocumentation( label="Reporting definition registry", summary="Stores versioned datasets, semantic models, reports, and quality plans.", contract_version="0.1.0", ), CAPABILITY_REPORTING_RUNNER: CapabilityDocumentation( label="Governed report runner", summary="Executes a pinned report graph over an authorized provider-owned dataset.", contract_version="0.1.0", ), CAPABILITY_REPORTING_SCHEDULER: CapabilityDocumentation( label="Report schedule dispatcher", summary="Claims due report schedules and records run/publication evidence.", contract_version="0.1.0", ), CAPABILITY_REPORTING_CHART_RENDERER: CapabilityDocumentation( label="Report chart renderer", summary="Builds provider-neutral chart models with an accessible tabular fallback.", contract_version="0.1.0", ), CAPABILITY_REPORTING_PUBLICATION_FILES: CapabilityDocumentation( label="Files report publication", summary="Stores an immutable authorized report output through Files managed artifact storage.", contract_version="1.0.0", ), CAPABILITY_REPORTING_PUBLICATION_MAIL: CapabilityDocumentation( label="Mail report publication", summary="Submits an idempotent report notice through Mail's durable delivery outbox.", contract_version="1.0.0", ), CAPABILITY_REPORTING_RETENTION: CapabilityDocumentation( label="Reporting result retention", summary="Minimizes expired provider-report detail while retaining audit hashes and provenance.", contract_version="1.0", documentation_types=("admin",), audience=("privacy_officer", "operator", "system_admin"), ), REPORTING_DSAR_CAPABILITY: CapabilityDocumentation( label="Reporting data-subject request provider", summary="Finds subject-owned Reporting state and minimizes derived report copies.", contract_version="0.1.0", documentation_types=("admin", "user"), audience=("privacy_officer", "operator", "user"), ), }, search_sources=( SearchSourceProviderRegistration( id="reporting.reports", factory=create_reporting_search_source, ), ), migration_spec=MigrationSpec( module_id=MODULE_ID, metadata=Base.metadata, script_location=str(Path(__file__).with_name("migrations") / "versions"), retirement_supported=True, retirement_provider=drop_table_retirement_provider( reporting_models.ReportingImportAssessment, reporting_models.ReportingQualityResult, reporting_models.ReportingPublication, reporting_models.ReportingSchedule, reporting_models.ReportingSavedView, reporting_models.ReportingDefinitionGrant, reporting_models.ReportingExecution, reporting_models.ReportingDrillContext, reporting_models.ReportingProviderExport, reporting_models.ReportingProviderExecution, reporting_models.ReportingDefinitionRevision, reporting_models.ReportingDefinitionIdentity, label="Reporting", ), retirement_notes=( "Destructive retirement requires a database snapshot and removes " "Reporting definitions, results, quality evidence, schedules, and publications." ), ), uninstall_guard_providers=( persistent_table_uninstall_guard( reporting_models.ReportingDefinitionIdentity, reporting_models.ReportingDefinitionRevision, reporting_models.ReportingDefinitionGrant, reporting_models.ReportingExecution, reporting_models.ReportingDrillContext, reporting_models.ReportingProviderExecution, reporting_models.ReportingProviderExport, reporting_models.ReportingSavedView, reporting_models.ReportingSchedule, reporting_models.ReportingPublication, reporting_models.ReportingQualityResult, reporting_models.ReportingImportAssessment, label="Reporting", ), ), resource_acl_providers=( ReportingScopeAclProvider("analytical_dataset"), ReportingScopeAclProvider("semantic_model"), ReportingScopeAclProvider("report"), ReportingScopeAclProvider("report_execution"), ), tenant_summary_providers=(_tenant_summary,), documentation=( DocumentationTopic( id="reporting.data-subject-requests", title="Reporting data-subject requests", summary="Review personal workspace state and derived report copies without confusing them with source-owned facts.", body=( "Reporting matches exact tenant-scoped artifact references and account, identity, or membership ownership and attribution. Access output is deliberately minimized: report rows, parameters, filters, delivery targets, source payloads, diagnostics, provenance bodies, and hashes are not copied into the DSAR result. Source modules remain responsible for finding and correcting subject facts; Reporting cannot safely infer a person by scanning arbitrary aggregate output. " "Private saved views and short-lived drill contexts can be deleted, subject grants can be revoked, and explicitly identified retained execution or publication detail can be minimized idempotently while hashes remain. Shared views, definitions, schedules, quality/import evidence, and staff attribution require authorized review or retention. Correct the source before rerunning a report or republishing an output." ), layer="configured", documentation_types=("admin", "user"), audience=("user", "operator", "module_admin", "auditor"), related_modules=("core", "datasources", "dataflow", "policy"), metadata={ "kind": "reference", "help_contexts": [ "reporting.data-subject-requests", "reporting.workspace", ], "consequence_classes": { "export_minimized_attribution": ( "Returns ownership and lifecycle context without report rows, parameters, or payloads." ), "retain_governed_evidence": ( "Shared definitions, schedules, quality evidence, and required staff attribution remain subject to authorized review and retention." ), "correct_authoritative_source": ( "Source facts must be corrected in their owner module before reports are rerun or republished." ), }, }, translations={ "de": { "title": "Datenschutzanfragen im Reporting", "summary": ( "Persönliche Arbeitsbereichsdaten und abgeleitete Berichtskopien prüfen, " "ohne sie mit Fakten aus führenden Quellsystemen zu verwechseln." ), "body": ( "Reporting gleicht innerhalb des exakten Mandanten nur ausdrückliche " "Artefaktverweise sowie die Zuordnung oder Urheberschaft von Konten, " "Identitäten und Mitgliedschaften ab. Die Auskunft ist bewusst minimiert: " "Berichtszeilen, Parameter, Filter, Zustellziele, Quellinhalte, Diagnosen, " "Provenienzinhalte und Prüfsummen werden nicht in das Ergebnis kopiert. " "Die Quellmodule bleiben dafür verantwortlich, personenbezogene Fakten zu " "finden und zu berichtigen; Reporting darf Personen nicht durch das Durchsuchen " "beliebiger Aggregatergebnisse ableiten. Private gespeicherte Ansichten und " "kurzlebige Drilldown-Kontexte können gelöscht, personenbezogene Freigaben " "entzogen und ausdrücklich bestimmte aufbewahrte Ausführungs- oder " "Veröffentlichungsdetails idempotent minimiert werden, während Prüfsummen " "erhalten bleiben. Gemeinsame Ansichten, Definitionen, Zeitpläne, Qualitäts- " "und Importnachweise sowie dienstliche Zuschreibungen erfordern eine befugte " "Prüfung oder Aufbewahrung. Die Quelle ist zu berichtigen, bevor ein Bericht " "erneut ausgeführt oder veröffentlicht wird." ), } }, structured_translation_version="1", structured_translations={ "de": { "consequence_classes": { "export_minimized_attribution": ( "Gibt Zuordnungs- und Lebenszykluskontext ohne Berichtszeilen, Parameter oder Inhalte zurück." ), "retain_governed_evidence": ( "Gemeinsame Definitionen, Zeitpläne, Qualitätsnachweise und erforderliche dienstliche Zuschreibungen unterliegen weiterhin befugter Prüfung und Aufbewahrung." ), "correct_authoritative_source": ( "Quellfakten müssen im führenden Modul berichtigt werden, bevor Berichte erneut ausgeführt oder veröffentlicht werden." ), } } }, links=( DocumentationLink( label="Reporting governance and retention", href="govoplan-reporting/README.md", kind="repository", ), ), order=9, ), DocumentationTopic( id="reporting.governed-bi", title="Governed reporting and semantic BI", summary="Build reproducible reports over provider-owned datasets without bypassing module or row-level access.", body=( "Reporting pins dataset, semantic-model, and report revisions. Runs retain " "definition hashes, source fingerprints, policy provenance, quality evidence, " "authorized result rows, diagnostics, and output hashes. Safe dimensions, " "aggregations, typed expressions, filters, pivots, saved views, chart models, " "schedules, exports, and publication providers replace unchecked SQL in the " "presentation layer. PostgreSQL executes bounded semantic plans when available. " "Calculated measure keys may contain the documented dots and hyphens, including in nested references; generated bind names remain internal and values remain parameters, not SQL fragments. " "Signed drill contexts reauthorize contributor rows, and Files/Mail publication " "adapters retain idempotent evidence. A dataset may pin one successful published Dataflow run, which is read from its exact Datasource materialization after both source boundaries reauthorize the current principal. Dataflow and module read models remain source owners. " "The contributor drill-down action stays in a shared action column at the right edge of horizontally scrolled results; opening it still reauthorizes every contributor." ), layer="available", documentation_types=("admin", "user"), audience=("user", "operator", "module_admin", "product_owner"), conditions=(DocumentationCondition(required_scopes=(READ_SCOPE,)),), related_modules=("datasources", "dataflow", "policy", "files", "mail"), metadata={ "kind": "workflow", "help_contexts": [ "reporting.workspace", "reporting.definitions", "reporting.executions", "reporting.publications", ], "purpose": ( "Create and run a reproducible report over an authorized, revision-pinned dataset." ), "prerequisites": [ "The actor can read Reporting and has the additional scope required for each offered action.", "The selected dataset and every contributing row remain authorized by their owner providers.", ], "steps": [ "Select or create a dataset definition and pin an immutable source revision.", "Define safe dimensions, measures, filters, pivots, and a report revision.", "Run the pinned revision and review quality, policy, provenance, and diagnostics evidence.", "Inspect authorized rows or use a signed drill context that reauthorizes every contributor.", "Export, schedule, or publish only when the corresponding action and target are authorized.", ], "limitations": [ "Reporting never replaces source-module authorization or authoritative source correction.", "XLSX and PDF output require an installed renderer provider; native browser export is CSV or JSON.", ], "operational_consequences": { "run": "Creates immutable execution, provenance, quality, diagnostic, and output-hash evidence.", "publish": "Creates idempotent target-delivery evidence and may cause an external effect.", "schedule": "Allows future executions under the then-current authorization and policy state.", }, "verification": [ "The execution names the pinned definition and source fingerprints.", "Quality and policy results are visible before publication evidence is accepted.", "Drilldown and publication access are reauthorized for the current principal.", ], }, translations={ "de": { "title": "Gesteuertes Reporting und semantische BI", "summary": ( "Reproduzierbare Berichte auf anbietergeführten Datensätzen erstellen, " "ohne Modul- oder Zeilenberechtigungen zu umgehen." ), "body": ( "Reporting fixiert Revisionen von Datensätzen, semantischen Modellen und " "Berichten. Ausführungen bewahren Definitionsprüfsummen, Quellfingerabdrücke, " "Richtlinienherkunft, Qualitätsnachweise, berechtigte Ergebniszeilen, Diagnosen " "und Ausgabeprüfsummen. Sichere Dimensionen, Aggregationen, typisierte Ausdrücke, " "Filter, Pivotierungen, gespeicherte Ansichten, Diagrammmodelle, Zeitpläne, " "Exporte und Veröffentlichungsanbieter ersetzen ungeprüftes SQL in der " "Darstellungsschicht. PostgreSQL führt begrenzte semantische Pläne aus, sofern " "verfügbar. Kennungen berechneter Kennzahlen dürfen auch in verschachtelten Verweisen die vorgesehenen Punkte und Bindestriche enthalten; " "erzeugte Bindungsnamen bleiben intern, und Werte bleiben Parameter statt SQL-Fragmente. Signierte Drilldown-Kontexte autorisieren beitragende Zeilen erneut; " "Adapter für Dateien und Mail bewahren idempotente Nachweise. Ein Datensatz kann " "genau eine erfolgreiche veröffentlichte Dataflow-Ausführung fixieren, die nach " "erneuter Autorisierung beider Quellgrenzen aus ihrer exakten Datasource-" "Materialisierung gelesen wird. Dataflow und die Lesemodelle der Module bleiben " "führende Quellen. Die Aktion zum Aufschlüsseln beitragender Zeilen bleibt in einer gemeinsamen Aktionsspalte am rechten Rand horizontal gescrollter Ergebnisse; beim Öffnen wird jeder Beitrag erneut autorisiert." ), } }, structured_translation_version="1", structured_translations={ "de": { "purpose": ( "Einen reproduzierbaren Bericht über einen berechtigten, revisionsgenau fixierten Datensatz erstellen und ausführen." ), "prerequisites": [ "Die handelnde Person darf Reporting lesen und besitzt für jede angebotene Aktion die zusätzlich erforderliche Berechtigung.", "Der ausgewählte Datensatz und jede beitragende Zeile bleiben durch ihre führenden Anbieter autorisiert.", ], "steps": [ "Eine Datensatzdefinition auswählen oder erstellen und eine unveränderliche Quellrevision fixieren.", "Sichere Dimensionen, Kennzahlen, Filter, Pivotierungen und eine Berichtsrevision definieren.", "Die fixierte Revision ausführen und Qualitäts-, Richtlinien-, Provenienz- und Diagnosenachweise prüfen.", "Berechtigte Zeilen prüfen oder einen signierten Drilldown-Kontext verwenden, der jeden Beitrag erneut autorisiert.", "Nur mit der jeweiligen Aktions- und Zielberechtigung exportieren, planen oder veröffentlichen.", ], "limitations": [ "Reporting ersetzt weder die Autorisierung der Quellmodule noch die Berichtigung in der führenden Quelle.", "XLSX- und PDF-Ausgaben erfordern einen installierten Renderer-Anbieter; der native Browserexport unterstützt CSV und JSON.", ], "operational_consequences": { "run": "Erzeugt unveränderliche Nachweise zu Ausführung, Provenienz, Qualität, Diagnosen und Ausgabeprüfsumme.", "publish": "Erzeugt idempotente Nachweise zur Zielzustellung und kann eine externe Wirkung auslösen.", "schedule": "Erlaubt künftige Ausführungen unter dem dann gültigen Berechtigungs- und Richtlinienstand.", }, "verification": [ "Die Ausführung nennt die fixierte Definition und die Quellfingerabdrücke.", "Qualitäts- und Richtlinienergebnisse sind sichtbar, bevor ein Veröffentlichungsnachweis akzeptiert wird.", "Drilldown- und Veröffentlichungszugriffe werden für die aktuelle Person erneut autorisiert.", ], } }, links=( DocumentationLink( label="Reporting module boundary", href="govoplan-reporting/docs/REPORTING_BOUNDARY.md", kind="repository", ), DocumentationLink( label="SuperX capability assessment", href="govoplan-reporting/docs/SUPERX_CAPABILITY_ASSESSMENT.md", kind="repository", ), DocumentationLink( label="Reporting user guide", href="govoplan-reporting/docs/USER_GUIDE.md", kind="repository", ), DocumentationLink( label="Reporting administration guide", href="govoplan-reporting/docs/ADMIN_GUIDE.md", kind="repository", ), DocumentationLink( label="Reporting interface pattern audit", href="govoplan-reporting/docs/INTERFACE_PATTERN_MIGRATION.md", kind="repository", ), ), ), ), architecture=ModuleArchitectureDeclaration( layer="data_reporting_integration", kind="domain", maturity="vertical_slice", evidence=( ModuleMaturityEvidence( kind="test", reference="tests/test_reporting_service.py", summary="Proves revision pinning, safe semantic execution, quality gates, access, replay, exports, and import blocking.", ), ModuleMaturityEvidence( kind="documentation", reference="docs/REPORTING_BOUNDARY.md", summary="Defines governed analytical source, semantic, execution, and publication ownership.", ), ), known_limits=( "Dataflow is the first live dataset adapter; additional module read models use the provider-neutral contract.", "Direct browser export supports CSV and JSON. Files supports CSV, JSON, and HTML publication; Mail submits a bounded report notice. XLSX/PDF require a renderer provider.", "Import assessment produces blocking diagnostics but does not execute source SQL or automatically activate generated definitions.", "The built-in chart catalogue covers bounded bar, column, line, area, pie, donut, and metric views; specialized visual renderers remain replaceable adapters.", ), owned_concepts=( "analytical dataset binding", "semantic dimension hierarchy and measure", "report definition and saved view", "report execution and publication evidence", "report quality plan and import assessment", ), non_owned_concepts=( "raw datasource ingestion", "data transformation pipeline", "source module authorization", "template document rendering", "file or DMS storage", ), documentation=ModuleArchitectureDocumentation( operations=("docs/OPERATIONS.md",), recovery=("docs/OPERATIONS.md",), security=("docs/OPERATIONS.md",), ), ), ) def get_manifest() -> ModuleManifest: return manifest