{
  "id": "execution_logs",
  "label": "Execution Logs Canonical",
  "phase": "phase-07",
  "category": "observability_audit",
  "status": "ACTIVE_DH_MIRROR",
  "purpose": "Define how DEVON-DEV records readable and structured logs for actions, tools, commands, runtime services, validation, errors, retries and recovery without turning logs into the authority of truth.",
  "function": "Translate ledger-backed execution into diagnosable log streams by binding severity, message, stream, correlation_id, task_id, tool, command, environment, component, elapsed time, error detail, retry context and retention class to observable operation.",
  "log_contract": {
    "requires_structured_log_event": true,
    "requires_human_readable_message": true,
    "requires_severity": true,
    "requires_stream": true,
    "requires_correlation_id": true,
    "requires_task_id": true,
    "requires_ledger_event_id": true,
    "requires_tool_or_component": true,
    "requires_environment": true,
    "requires_elapsed_time": true,
    "requires_error_detail_when_failed": true,
    "requires_retry_context_when_retried": true,
    "requires_retention_class": true,
    "records_allowed_actions": true,
    "records_blocked_actions": true,
    "records_failed_actions": true,
    "records_recovery_actions": true,
    "blocks_orphan_logs_without_ledger_link": true,
    "decision_authority": "NONE_FSM_DECIDES"
  },
  "log_streams": [
    "execution",
    "fsm",
    "tool",
    "filesystem",
    "shell",
    "validation",
    "build",
    "deploy",
    "rollback",
    "runtime",
    "security",
    "external_knowledge",
    "model_runtime",
    "rag",
    "observability"
  ],
  "technology_requirements": [
    {
      "technology": "Structured Log Store",
      "required_for": "Persist structured DEVON-DEV log events with severity, stream, correlation_id, task_id, ledger_event_id, component, environment, message and timestamp.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_logs",
      "required_by_buckets": [
        "Prerequisites",
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until structured log schema and persistent log storage exist",
      "validation_command": "MISSING until log writes can prove stream, severity, correlation_id, task_id, ledger_event_id, environment and timestamp",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_logs_canonical.json",
      "status_source": "Documentation Hub + future Logging Stack + Execution Ledger Store + Observability Core",
      "blocking_if_missing": true,
      "failure_impact": "Without Structured Log Store, DEVON-DEV can emit visible output that disappears before debugging, incident review or audit can use it."
    },
    {
      "technology": "Log Collector",
      "required_for": "Collect logs from devon-api-core, devon-fsm-core, devon-server-ops, workers, test runner, build runner, runtime services and observability components.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_logs",
      "required_by_buckets": [
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery"
      ],
      "expected_version": "MISSING until services emit compatible logs and collector routing exists",
      "validation_command": "MISSING until collector can prove source service, stream, ingestion time, correlation_id and storage result",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_logs_canonical.json",
      "status_source": "Documentation Hub + future Log Collector + Runtime Status + Observability Core",
      "blocking_if_missing": true,
      "failure_impact": "Without Log Collector, each service keeps its own local output and the panel cannot reconstruct cross-service execution behavior."
    },
    {
      "technology": "Log Retention Policy",
      "required_for": "Define how long execution, runtime, security, validation, build, deploy, rollback, model and retrieval logs must be preserved.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_logs",
      "required_by_buckets": [
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until retention classes and cleanup rules exist",
      "validation_command": "MISSING until retention policy can prove log class, keep/delete window, protected streams and cleanup result",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_logs_canonical.json",
      "status_source": "Documentation Hub + future Retention Policy Registry + Volume & Persistence Governance + Logging Stack",
      "blocking_if_missing": true,
      "failure_impact": "Without Log Retention Policy, critical execution evidence can be deleted too early or sensitive log data can remain longer than permitted."
    },
    {
      "technology": "Realtime Log Stream",
      "required_for": "Expose live execution logs to the future Execution & Monitoring Panel without replacing durable log storage.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_logs",
      "required_by_buckets": [
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery"
      ],
      "expected_version": "MISSING until SSE or realtime event routing can stream log events with correlation_id and ledger_event_id",
      "validation_command": "MISSING until realtime stream can prove emitted event, received event, correlation_id, task_id and storage reference",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_logs_canonical.json",
      "status_source": "Documentation Hub + future SSE / Realtime Events + Observability Core + Execution Ledger Store",
      "blocking_if_missing": false,
      "failure_impact": "Without Realtime Log Stream, the panel depends on refresh or delayed polling and loses live operator visibility during long-running work."
    }
  ],
  "depends_on": [
    "oac",
    "execution_ledger",
    "runtime_status_support",
    "runtime_row_semantics",
    "tool_registry",
    "server_workspace_manager",
    "environment_registry",
    "filesystem_operations",
    "shell_execution",
    "test_validation_runner",
    "backup_rollback",
    "production_deployment_gate",
    "fsm_absolute_decision",
    "decision_rule_registry",
    "architecture_source_registry"
  ],
  "used_by": [
    "audit_trail",
    "runtime_row_semantics",
    "observability_core",
    "self_monitoring",
    "incident_management",
    "notification_service",
    "future_execution_monitoring_panel"
  ]
}
