{
  "id": "resource_governance",
  "label": "Resource Governance Canonical",
  "phase": "phase-05",
  "category": "latency_performance",
  "status": "ACTIVE_DH_MIRROR",
  "purpose": "Define how DEVON-DEV controls CPU, RAM, disk, jobs, local models, embeddings, cache, crawler throughput, build activity, backup activity and concurrency before expensive operations can run.",
  "function": "Prevent the platform from taking itself down by enforcing resource budgets, pressure guards, concurrency locks, job timeouts, heavy-model restrictions, indexing/deploy exclusion, build/backup exclusion, crawler throttling and no-GPU saturation boundaries.",
  "resource_contract": {
    "requires_cpu_budget": true,
    "requires_ram_budget": true,
    "requires_disk_budget": true,
    "requires_job_budget": true,
    "requires_model_runtime_budget": true,
    "requires_embeddings_budget": true,
    "requires_cache_budget": true,
    "requires_crawler_budget": true,
    "requires_concurrency_budget": true,
    "blocks_indexing_during_deploy": true,
    "blocks_heavy_model_when_ram_is_critical": true,
    "blocks_concurrent_build_and_backup": true,
    "blocks_infinite_jobs": true,
    "blocks_unbounded_crawler": true,
    "blocks_no_gpu_server_saturation": true,
    "requires_pressure_state": true,
    "requires_preflight_resource_check": true,
    "requires_runtime_resource_observability": true,
    "decision_authority": "NONE_FSM_DECIDES"
  },
  "resource_states": [
    "RESOURCE_OK",
    "CPU_PRESSURE",
    "RAM_PRESSURE",
    "DISK_PRESSURE",
    "QUEUE_PRESSURE",
    "MODEL_PRESSURE",
    "CACHE_PRESSURE",
    "CRAWLER_PRESSURE",
    "CONCURRENCY_LOCKED",
    "RESOURCE_BLOCKED"
  ],
  "technology_requirements": [
    {
      "technology": "Resource Monitor",
      "required_for": "Observe CPU, RAM, disk, queue depth, model load, embeddings activity, cache pressure, crawler pressure and concurrency state before DEVON-DEV runs expensive work.",
      "required_by_phase": "phase-05",
      "required_by_category": "resource_governance",
      "required_by_buckets": [
        "Prerequisites",
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until runtime resource probes and pressure-state records exist",
      "validation_command": "MISSING until resource monitor can prove CPU, RAM, disk, job queue, model runtime, cache and concurrency readings",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/resource_governance_canonical.json",
      "status_source": "Documentation Hub + future Runtime Status + Observability Core + Execution Ledger",
      "blocking_if_missing": true,
      "failure_impact": "Without Resource Monitor, DEVON-DEV cannot distinguish safe execution from CPU, RAM, disk, queue, model or cache pressure."
    },
    {
      "technology": "Resource Budget Registry",
      "required_for": "Register allowed CPU, RAM, disk, job, model, embeddings, cache, crawler and concurrency budgets per environment and operation class.",
      "required_by_phase": "phase-05",
      "required_by_category": "resource_governance",
      "required_by_buckets": [
        "Prerequisites",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until resource budget schema and environment-bound limits exist",
      "validation_command": "MISSING until budget lookup can prove allowed limit, current usage, environment, operation type and block/pass result",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/resource_governance_canonical.json",
      "status_source": "Documentation Hub + future Resource Budget Registry + Environment Registry",
      "blocking_if_missing": true,
      "failure_impact": "Without Resource Budget Registry, DEVON-DEV has metrics but no enforceable line between acceptable load and unsafe load."
    },
    {
      "technology": "Concurrency Lock Manager",
      "required_for": "Prevent incompatible operations such as indexing during deploy, heavy model execution during RAM pressure, build during backup, and unbounded crawler or job execution.",
      "required_by_phase": "phase-05",
      "required_by_category": "resource_governance",
      "required_by_buckets": [
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until lock classes and operation incompatibility matrix exist",
      "validation_command": "MISSING until lock manager can prove acquire, deny, release, timeout and conflict reason records",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/resource_governance_canonical.json",
      "status_source": "Documentation Hub + future Scheduler + Job Queue + Execution Ledger",
      "blocking_if_missing": true,
      "failure_impact": "Without Concurrency Lock Manager, DEVON-DEV can run safe operations at unsafe times and overload the same server surface."
    },
    {
      "technology": "Job Timeout Guard",
      "required_for": "Stop infinite or runaway jobs before they monopolize server resources or block queues.",
      "required_by_phase": "phase-05",
      "required_by_category": "resource_governance",
      "required_by_buckets": [
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery"
      ],
      "expected_version": "MISSING until timeout policy and job cancellation records exist",
      "validation_command": "MISSING until job timeout can prove start time, deadline, timeout event, cancellation result and recovery state",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/resource_governance_canonical.json",
      "status_source": "Documentation Hub + future Job Queue + Execution Ledger",
      "blocking_if_missing": true,
      "failure_impact": "Without Job Timeout Guard, a crawler, embedding run, build, backup, validation or model task can consume resources indefinitely."
    },
    {
      "technology": "Crawler Throttle",
      "required_for": "Limit external crawling and fetch activity so internet research cannot consume CPU, RAM, disk, network, cache or queue capacity.",
      "required_by_phase": "phase-05",
      "required_by_category": "resource_governance",
      "required_by_buckets": [
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery"
      ],
      "expected_version": "MISSING until crawler limits and external access budgets exist",
      "validation_command": "MISSING until crawler throttle can prove rate, concurrency, timeout, queue depth and stop conditions",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/resource_governance_canonical.json",
      "status_source": "Documentation Hub + future External Knowledge Access + Crawler logs + Execution Ledger",
      "blocking_if_missing": true,
      "failure_impact": "Without Crawler Throttle, external knowledge access can become a resource denial mechanism against DEVON-DEV itself."
    }
  ],
  "depends_on": [
    "lpc",
    "server_registry",
    "server_workspace_manager",
    "environment_registry",
    "container_image_registry_build_pipeline",
    "volume_persistence_governance",
    "local_llm_runtime",
    "embeddings_engine",
    "vector_index",
    "external_knowledge_access",
    "planning_engine",
    "impact_analysis_engine",
    "modelops_llmops",
    "benchmark_evaluation_harness",
    "execution_ledger",
    "runtime_status_support",
    "fsm_absolute_decision",
    "decision_rule_registry",
    "tool_registry",
    "config_registry",
    "architecture_source_registry"
  ],
  "used_by": [
    "scheduler",
    "job_queue",
    "worker_pool",
    "external_knowledge_access",
    "retrieval_engine",
    "embeddings_engine",
    "vector_index",
    "modelops_llmops",
    "container_image_registry_build_pipeline",
    "backup_rollback",
    "test_validation_runner",
    "runtime_status_support",
    "observability_core",
    "future_execution_monitoring_panel"
  ]
}
