Skip to main content

qualia_core_db/net/peer/connectivity/
evidence.rs

1//! Honest qualification flags. Source names are not evidence.
2
3/// In-tree connection-manager contract is present. Not an Internet trial.
4pub const fn connection_manager_implemented() -> bool {
5    true
6}
7
8/// Local rustls WSS verifies the server certificate against a pinned CA.
9pub const fn local_tls_wss_verified() -> bool {
10    true
11}
12
13/// Envelope length is a u16. The old u8 length field is rejected.
14pub const fn envelope_length_is_u16() -> bool {
15    true
16}
17
18/// SessionReady is issued only after QSession admit. WG alone is not enough.
19pub const fn session_ready_requires_qsession() -> bool {
20    true
21}
22
23/// ICE nomination requires a recorded connectivity check.
24pub const fn ice_requires_connectivity_check() -> bool {
25    true
26}
27
28/// Durable jobs persist to a CRC-checked file and recover after drop.
29pub const fn durable_storage_recovery_verified() -> bool {
30    true
31}
32
33/// A public Internet relay URL has not been dialed.
34pub const fn public_relay_dialed() -> bool {
35    false
36}
37
38/// Internet two-host handshake has not been executed.
39pub const fn internet_two_host_handshake_executed() -> bool {
40    false
41}
42
43/// Address-dependent mapping is not a universal “must relay” law.
44pub const fn address_dependent_is_not_universal_relay_law() -> bool {
45    true
46}
47
48/// Independent protocol/key-lifecycle review remains outstanding.
49pub const fn independent_protocol_review_executed() -> bool {
50    false
51}
52
53/// Browser TURN/WebRTC interop against a live TURN URI has not been executed.
54pub const fn browser_turn_interop_executed() -> bool {
55    false
56}
57
58/// QUIC/iroh alternative has been recorded, not benchmarked here.
59pub const fn quic_iroh_benchmark_executed() -> bool {
60    false
61}
62
63/// Local capability-scoped fabric (kernel, leases, loopback bound-UDP).
64pub const fn capability_fabric_local_executed() -> bool {
65    true
66}
67
68/// Public MASQUE bound-UDP / HTTP/3 proxy has not been dialed.
69pub const fn masque_bound_udp_internet_executed() -> bool {
70    false
71}
72
73/// noq has not been admitted as the Internet QUIC engine.
74pub const fn noq_transport_admitted() -> bool {
75    false
76}
77
78/// Native Independent Ethernet is a different path.
79pub const fn native_independent_from_this_path() -> bool {
80    false
81}
82
83#[cfg(test)]
84mod tests {
85    use super::*;
86
87    #[test]
88    fn honesty() {
89        assert!(connection_manager_implemented());
90        assert!(local_tls_wss_verified());
91        assert!(envelope_length_is_u16());
92        assert!(session_ready_requires_qsession());
93        assert!(ice_requires_connectivity_check());
94        assert!(durable_storage_recovery_verified());
95        assert!(!public_relay_dialed());
96        assert!(!internet_two_host_handshake_executed());
97        assert!(address_dependent_is_not_universal_relay_law());
98        assert!(!browser_turn_interop_executed());
99        assert!(!quic_iroh_benchmark_executed());
100        assert!(capability_fabric_local_executed());
101        assert!(!masque_bound_udp_internet_executed());
102        assert!(!noq_transport_admitted());
103        assert!(!native_independent_from_this_path());
104    }
105}