# NETWORK TOOLS DIAGNOSTIC CONTRACT (K2376–K2380) - **Move Range:** `K2376–K2380` - **Phase:** `Phase 18 — Daily Use Applications` - **Module:** `network_tools.diagnostic` - **Title:** `Route ARP socket görünümü` - **Invariant:** `Yetkisiz session ayrıntısı açıklanmaz` - **Positive Case:** `Kendi socket ve route listesi` (`k2380-ownroutesock`) - **Counterexample:** `Başka principal sessionı` (`k2380-foreignsession`) - **Acceptance Criterion:** `Yalnız izinli metadata gösterilir` - **Crate:** `os-network-tools` (`src/diagnostic.rs`) - **Inspection Symbol:** `os_network_tools_diagnostic` ## 1. Scope and Invariants 1. **No Unauthorized Session Disclosure (`K2376–K2377`):** - The network diagnostic tool (`route`, `arp`, `socket` view) must never disclose unauthorized session details (`unauthorized_session_detail_disclosed == false`, `unauthorized_session_disclosures == 0`) and must display only permitted metadata (`only_permitted_metadata_shown == true`). - Any attempt to disclose unauthorized session details or expose unpermitted metadata is deterministically refused (`NetworkToolsDiagnosticError::UnauthorizedSessionDetailDisclosed`, `NetworkToolsDiagnosticError::UnpermittedMetadataExposed`). 2. **Refusal of Foreign Principal Session Queries (`K2378`):** - Queries targeting another principal's network session (`foreign_principal_session_requested == true`, `k2380-foreignsession`) are refused before any diagnostic view is committed (`NetworkToolsDiagnosticError::ForeignPrincipalSessionRequested`), leaving `committed_receipt()` as `None`. 3. **Own Socket and Route List with Permitted Metadata (`K2379–K2380`):** - The positive path (`k2380-ownroutesock`) commits 4 own socket and route entries (`own_sockets_and_routes == 4`) with 2 authorized ARP entries (`authorized_arp_entries == 2`), 4 permitted metadata fields (`permitted_metadata_fields == 4`), and 0 unauthorized session disclosures (`unauthorized_session_disclosures == 0`), bound by a monotonic `diagnostic_epoch` and FNV-1a digest (`compute_network_tools_diagnostic_binding_digest`).