# CONFIGURATION SCHEMA CONTRACT (K2381–K2385) - **Move Range:** `K2381–K2385` - **Phase:** `Phase 18 — Daily Use Applications` - **Module:** `configuration.schema` - **Title:** `Sürümlü servis yapılandırması` - **Invariant:** `Şema ve bilinmeyen zorunlu alan ayrılır` - **Positive Case:** `Console ve shell config` (`k2385-consoleshellcfg`) - **Counterexample:** `Döngü veya aşırı uzunluk` (`k2385-cycleoverflowcfg`) - **Acceptance Criterion:** `Eski güvenli config korunur` - **Crate:** `os-configuration` (`src/schema.rs`) - **Inspection Symbol:** `os_configuration_schema` ## 1. Scope and Invariants 1. **Separation of Schema Version and Unknown Required Fields (`K2381–K2382`):** - Versioned service configuration parsing must strictly separate schema version checks from unknown required fields (`schema_or_unknown_required_field_conflated == false`, `separated_schema_fields == 4`) and preserve the previous safe configuration on any rejection (`previous_safe_config_preserved == true`, `corrupted_previous_configs == 0`). - Any attempt to conflate schema version with unknown required fields or overwrite the previous safe configuration is deterministically refused (`ConfigurationSchemaError::SchemaOrUnknownRequiredFieldConflated`, `ConfigurationSchemaError::PreviousSafeConfigOverwritten`). 2. **Refusal of Cycles or Excessive Length (`K2383`):** - Configuration inputs containing reference cycles or excessive field lengths (`cycle_or_excessive_length_detected == true`, `k2385-cycleoverflowcfg`) are rejected before any configuration state is committed (`ConfigurationSchemaError::CycleOrExcessiveLengthDetected`), leaving `committed_receipt()` as `None`. 3. **Console and Shell Versioned Service Configuration (`K2384–K2385`):** - The positive path (`k2385-consoleshellcfg`) commits 2 versioned service configurations (console and shell, `versioned_service_configs == 2`) with 4 separated schema fields (`separated_schema_fields == 4`), 2 preserved safe fallbacks (`preserved_safe_fallbacks == 2`), and 0 corrupted previous configs (`corrupted_previous_configs == 0`), bound by a monotonic `schema_epoch` and FNV-1a digest (`compute_configuration_schema_binding_digest`).