{
  "id": "environment_registry",
  "label": "Environment Registry Canonical",
  "phase": "phase-04",
  "category": "containerization",
  "status": "ACTIVE_DH_MIRROR",
  "purpose": "Define the registered environments where DEVON-DEV may operate before any container, runtime, deployment, filesystem action, shell action, backup, validation or promotion can target a server surface.",
  "function": "Bind each environment to project_id, environment_id, environment_type, sandbox_path, production_path, runtime, webserver, database, ports, domain, branch, deploy_policy, status, owner and last_validation so DEVON-DEV cannot execute the right action against the wrong environment.",
  "environment_contract": {
    "requires_project_id": true,
    "requires_environment_id": true,
    "requires_environment_type": true,
    "requires_sandbox_path": true,
    "requires_production_path": true,
    "requires_runtime": true,
    "requires_webserver": true,
    "requires_database": true,
    "requires_ports": true,
    "requires_domain": true,
    "requires_branch": true,
    "requires_deploy_policy": true,
    "requires_status": true,
    "requires_owner": true,
    "requires_last_validation": true,
    "blocks_unknown_environment": true,
    "blocks_sandbox_production_confusion": true,
    "requires_environment_validation_before_action": true,
    "decision_authority": "NONE_FSM_DECIDES"
  },
  "technology_requirements": [
    {
      "technology": "Environment Registry",
      "required_for": "Register every sandbox, production and runtime environment DEVON-DEV may target with identity, path, runtime, webserver, database, ports, domain, branch, deploy policy, status, owner and validation state.",
      "required_by_phase": "phase-04",
      "required_by_category": "environment_registry",
      "required_by_buckets": [
        "Prerequisites",
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until environment schema and persisted registry exist",
      "validation_command": "MISSING until environment registration, lookup, type validation and last_validation checks exist",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/environment_registry_canonical.json",
      "status_source": "Documentation Hub + future Environment Registry + devon-server-ops + Execution Ledger",
      "blocking_if_missing": true,
      "failure_impact": "Without Environment Registry, DEVON-DEV cannot prove whether an operation targets sandbox, production, a specific branch, a specific domain, a specific database or a validated runtime."
    },
    {
      "technology": "Environment Policy Validator",
      "required_for": "Validate deploy_policy, environment_type, branch, domain, runtime and production restrictions before DEVON-DEV executes environment-bound work.",
      "required_by_phase": "phase-04",
      "required_by_category": "environment_registry",
      "required_by_buckets": [
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until environment policy rules and validation path exist",
      "validation_command": "MISSING until policy validation can prove allowed sandbox action, blocked production action, branch match, domain match and deploy policy gate",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/environment_registry_canonical.json",
      "status_source": "Documentation Hub + future Environment Policy Validator + FSM decision record",
      "blocking_if_missing": true,
      "failure_impact": "Without Environment Policy Validator, DEVON-DEV can treat sandbox and production as labels instead of enforceable operating boundaries."
    },
    {
      "technology": "Environment Resolver",
      "required_for": "Resolve task intent, project identity and execution context into the correct registered environment before tools, containers, tests, backups or deployments are invoked.",
      "required_by_phase": "phase-04",
      "required_by_category": "environment_registry",
      "required_by_buckets": [
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until environment resolution logic exists inside devon-server-ops or devon-api-core",
      "validation_command": "MISSING until environment resolver can prove project_id, environment_id, type, root path, branch and policy selection",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/environment_registry_canonical.json",
      "status_source": "Documentation Hub + future devon-server-ops resolver logs + Execution Ledger",
      "blocking_if_missing": true,
      "failure_impact": "Without Environment Resolver, DEVON-DEV may have registered environments but still choose the wrong target at execution time."
    }
  ],
  "depends_on": [
    "cdms",
    "server_workspace_manager",
    "server_registry",
    "sandbox_environment",
    "deployment_order",
    "tool_registry",
    "config_registry",
    "fsm_absolute_decision",
    "decision_rule_registry",
    "architecture_source_registry"
  ],
  "used_by": [
    "container_image_registry_build_pipeline",
    "container_network_policy",
    "volume_persistence_governance",
    "filesystem_operations",
    "shell_execution",
    "production_deployment_gate",
    "backup_rollback",
    "test_validation_runner",
    "execution_ledger",
    "future_execution_monitoring_panel"
  ]
}
