Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Feature ID: PF-83
Status: ✅ Implemented (Phase 1)
Spec: PF-83-sla-management-platform-layer.md
Last Updated: 2026-03-17

Overview

PF-83 provides event-driven SLA tracking across cores using SLA definitions and runtime SLA instances. It integrates with FW domain events for trigger/completion, PF-84 business calendar logic for deadline calculations, PF-10 for warning/breach notifications, and optional FW-03 automation for escalation actions.

Integration Points (from Spec)

  • FW-16 domain events (fw_domain_events) — Event / Consumes: pf_create_sla_instance_on_event() listens for trigger/completion events and updates SLA instances.
  • PF-84 business calendar — Platform/API / Consumes: fw_calculate_sla_deadline() provides business-hours-aware deadline calculation.
  • PF-10 notifications — Platform Layer / Publishes: SLA checker/escalation paths emit warning and breach notifications.
  • FW-03 workflow automation — Event/API / Publishes (optional): escalation levels may trigger automation rules on breach.
  • PF-01 organizations — Data / Consumes: organization_id scoping and tenant isolation for definitions and instances.

Event Contracts

PF-83 consumes domain events from fw_domain_events and uses configured names from each SLA definition:
  • Trigger event: starts SLA timer and creates pf_sla_instances row
  • Completion event: resolves active SLA instance for matching entity
Event payload requirements for matching:
  • organization_id (required)
  • correlation_id (recommended for traceability)
  • Entity identifier fields mapped by entity_match_config
No new event name is mandated by PF-83 itself; it reuses event names from feature-specific producers.

API / Platform Contracts

  • Platform hook surface (planned): @/platform/sla
    • useSLA(entityType, entityId)
    • useSLAInstances(filters)
    • useSLADashboard(period)
    • useSLADefinitions()
    • useSLAActions(instanceId)
  • Edge function (planned): pf-sla-checker
    • Triggered by pg_cron every minute
    • Evaluates at-risk and breached instances
    • Dispatches warning/breach actions through PF-10/FW-03 integrations

Security and Tenant Isolation

  • All PF-83 tables are organization-scoped with RLS enabled.
  • Policies require tenant access checks through security-definer-safe helpers.
  • Update policies include WITH CHECK to prevent tenant boundary mutation.
  • Event payloads used for SLA context should avoid PHI/PII and prefer IDs.