🦚 Peacock Unified

🏗️ App Invariants

Layer 2 — application architecture · 1,820 documents

IDDocumentSource
app_invariants__2b0eab0d7144c7f4INVARIANT: Hydration Structural Quorum SHADOW: Requires the client-side DOM to reach a perfect structural match with server-rendered HTML before enabling interactivity, ensuring state…—
app_invariants__ab2e39efc825f094INVARIANT: Subscription Lifecycle Atomicity SHADOW: Guarantees that every reactive subscription is paired with a mandatory teardown mechanism to prevent memory leaks and orphaned execution…—
app_invariants__24e550af9bbf2c2cINVARIANT: Rune-Based Variable Shadowing Prevention SHADOW: Protects the integrity of the reactivity DSL by forbidding the use of reserved symbols ($state, $derived) in non-reactive scopes. BYPASS:…—
app_invariants__e4170fb96730e2b0INVARIANT: State mutations are captured in isolated batches and flushed atomically to prevent intermediate inconsistent renders. SHADOW: Ensures the UI only reflects fully resolved state…—
app_invariants__1454adddb4a23590INVARIANT: State updates are aborted if the new value is strictly equal to the current value (or safely equal for objects/NaN). SHADOW: Prevents infinite loops in reactive graphs and eliminates…—
app_invariants__e7f0bdab5dc7ff6bINVARIANT: Synchronous operations are deduplicated and deferred to the end of the current execution tick via a microtask queue. SHADOW: Prevents main-thread blocking by coalescing high-frequency…—
app_invariants__bc32538115422d8bINVARIANT: Reactive proxies must be deeply traversed and cloned to extract a static, immutable representation of the current state. SHADOW: Allows developers to capture a point-in-time value of a…—
app_invariants__ce5c70e8026f824eINVARIANT: Server-side asynchronous state must be serialized into a deterministic string format and embedded in the DOM for client-side reconstruction. SHADOW: Bridges the gap between…—
app_invariants__168b4fd6a8c2b362INVARIANT: Toolchain Provenance Enforcement SHADOW: The system mandates that the Go toolchain revision used at compile-time must match a hard-coded embedded hash. This prevents 'ghost' builds from…—
app_invariants__d6a23df0f8e6be75INVARIANT: All-or-Nothing Persistence SHADOW: Writes to the JSON database must utilize atomic file operations (write-to-temp then rename). This neutralizes the risk of data corruption where a crash…—
app_invariants__511d7bdc7f4a8d39INVARIANT: Transition-Only Timestamp Updates SHADOW: Kubernetes status conditions must only update their 'LastTransitionTime' if the 'Status' value actually changes. This prevents reconciliation…—
app_invariants__1790ac4b8a435912INVARIANT: Architectural Identity Immutability SHADOW: Core resource identifiers, such as ProxyGroup types and Tailnet targets, are immutable post-creation. Changing these mid-lifecycle is forbidden…—
app_invariants__abf053fce2ff03fdINVARIANT: HA Storage Consistency Requirements SHADOW: Session recorders running multiple replicas must use shared S3 storage. This enforces a 'Single Source of Truth' for recordings; otherwise, a…—
app_invariants__299aed19e6358ee8INVARIANT: Identity Header Sanitization SHADOW: The API server proxy must strip all incoming 'Authorization' and 'Impersonate-*' headers before injecting its own derived identity headers. This…—
app_invariants__83c3231bc1dcad40INVARIANT: Stream Metadata Precedence SHADOW: In session recording, the Asciinema 'CastHeader' must be successfully transmitted before any payload data is accepted. This is a hard requirement for…—
app_invariants__606f6d1ec7555229INVARIANT: Flap-Resilient Log Suppression SHADOW: Network monitoring logs must be rate-limited per unique format string during 'major' link changes. This prevents a 'log DoS' where rapidly toggling…—
app_invariants__bd4146a0c5ff762fINVARIANT: Gateway Cache Invalidation on Rebind SHADOW: Any network change flagged as requiring a socket rebind must force a full invalidation of the home router IP cache. Stale gateway data is…—
app_invariants__87ddce165ec7db50INVARIANT: File-based DNS configuration updates must be atomic to prevent partial or corrupted states from affecting live resolution. SHADOW: Failure to ensure atomic file writes can lead to a…—
app_invariants__ac034fbc5974a189INVARIANT: The system must self-heal and re-apply its desired DNS configuration upon detecting external restarts or state resets of critical OS DNS services. SHADOW: If the underlying…—
app_invariants__7c6e4127f08971f4INVARIANT: Critical configuration objects must be clonable to ensure deep copies for immutable state or safe concurrent modification patterns, preventing unintended side effects and data…—
app_invariants__6c259f9cc6bab177INVARIANT: DNS queries to upstream resolvers must be orchestrated with delays and racing mechanisms to maximize resilience against latency, partial network failures, and slow responders. SHADOW:…—
app_invariants__6a40edc3ec79fb4eINVARIANT: Network state changes must trigger the invalidation and re-establishment of external port mappings to maintain reachability and prevent stale or non-functional NAT rules. SHADOW: If…—
app_invariants__962c4a37bd299721INVARIANT: Port mapping requests must be idempotent such that retries or duplicate calls do not result in multiple, conflicting, or unintended NAT mappings. SHADOW: Without idempotent port mapping,…—
app_invariants__7f14c1ba204558e1INVARIANT: Network connection sockets must be explicitly bound to a specific network interface or isolated namespace to prevent routing loops and ensure traffic correctly egresses the host…—
app_invariants__07992cb66e616261INVARIANT: The local cache of system proxy settings must be invalidated upon detection of network interface or routing table changes to ensure up-to-date proxy selection. SHADOW: Relying on stale…—
app_invariants__4c49b79b50ab7ef2INVARIANT: All TLS connections must verify server certificates against both system-provided and baked-in fallback CA roots to ensure cryptographic trust, even on systems with incomplete or outdated…—
app_invariants__b0c2603d6ed184b4INVARIANT: Each DNS query transaction ID must be strictly validated against the corresponding response to prevent cache poisoning and ensure the integrity of DNS replies. SHADOW: Mismatched…—
app_invariants__850508113a0d5c88INVARIANT: UDP relay endpoints must be explicitly expired and garbage collected after predefined bind and steady-state lifetimes to manage server resources and prevent accumulation of stale…—
app_invariants__b6219c4ea98247bbINVARIANT: UDP relay endpoint allocations must be ordered using Lamport IDs to ensure a consistent global ordering of allocation events across clients, resolving race conditions from concurrent…—
app_invariants__3f3395b71557c3e3INVARIANT: UDP GSO/GRO (Generic Segmentation/Receive Offload) must gracefully fall back to single-packet I/O if kernel errors indicate that offload capabilities are not supported or have failed…—
app_invariants__7d74645c8f5c4d4bINVARIANT: All modifications to IP addresses within a packet must be accompanied by a recalculation and update of relevant checksums to maintain data integrity. SHADOW: Failing to update checksums…—
app_invariants__ad10753f6ce82f02INVARIANT: The system must continuously validate the host's IP forwarding configuration and warn of misconfigurations that prevent subnet routing or exit node functionality. SHADOW: Incorrect IP…—
app_invariants__16d02b086c769f41INVARIANT: Active system network connections must be closed on detection of network link changes to prevent them from becoming stale or routing incorrectly. SHADOW: Network interface changes (e.g.,…—
app_invariants__a99f4a233a71ad9eINVARIANT: DNS responses must be clamped to advertised EDNS buffer sizes and marked as truncated when necessary to ensure interoperability with clients and prevent packet loss. SHADOW: Sending DNS…—
app_invariants__093006f9cce20f88INVARIANT: Recursive DBus connection attempts to systemd-resolved must employ exponential backoff and retry logic to avoid resource exhaustion and gracefully handle transient daemon…—
app_invariants__79e9a8d0be43ee1aINVARIANT: The health of DNS forwarding must be actively monitored and surfaced as a critical warning to promptly alert operators of resolution failures affecting connectivity. SHADOW: Unmonitored…—
app_invariants__da178f9f791d31a0INVARIANT: IP packet parsing must rigorously validate header lengths and fragmentation offsets to prevent fragmentation-based firewall bypass attacks. SHADOW: Malformed or intentionally crafted IP…—
app_invariants__fe8b5f37f26520b9INVARIANT: Virtual Network Identifiers (VNIs) for UDP relay sessions must be unique across all active endpoints to prevent misrouting and cross-talk between sessions. SHADOW: If multiple relay…—
app_invariants__8c72fb59a0380621INVARIANT: Error logging for frequently failing operations (e.g., proxy detection) must be rate-limited to prevent log spam and disk/CPU resource exhaustion. SHADOW: Without rate-limiting, a…—
app_invariants__68d00eb109244549INVARIANT: Tuple identity must remain stable regardless of field order or alignment optimizations. SHADOW: The Tuple is the primary index for flow tracking. If the serialization or mapping logic…—
app_invariants__f811f1cc79cbce43INVARIANT: Captive portal detection must terminate immediately upon the discovery of any single positive signal. SHADOW: The detection logic runs probes in parallel to minimize latency on…—
app_invariants__4be304c8bcaf6ff5INVARIANT: The identification of a protocol stream must occur within the first read operation without consuming the stream content. SHADOW: The muxer must peek at the protocol identifier (the…—
app_invariants__b30e332ddb755eefINVARIANT: Network state discovery must prioritize reaching the preferred region node over global probing when latency data exists. SHADOW: Probing logic uses historical latency to suppress regional…—
app_invariants__203b5fc287341745INVARIANT: Capability versions are monotonically increasing integers representing supported protocol semantics. SHADOW: This ensures backward and forward compatibility between the coordination…—
app_invariants__f7863962904e6080INVARIANT: Node identities are immutable and globally unique per control plane URL. SHADOW: Assigning a permanent ID that is never reused prevents 'identity collision' or 'ghosting' where stale…—
app_invariants__5ab7e7c818b702bfINVARIANT: Registration and configuration updates are transactional, guarded by cryptographic signatures. SHADOW: By requiring node keys and signatures for registration and health updates, the…—
app_invariants__1a3bc4065549c34bINVARIANT: Control plane communication handles state delta-encoding to minimize bandwidth and processing overhead. SHADOW: Incremental updates (delta-encoding) prevent massive CPU and network spikes…—
app_invariants__d08b3b93b8135b8dINVARIANT: Session exit status and completion state are idempotent. SHADOW: The `sess.exited` flag ensures that a session's exit status is set only once, preventing inconsistencies if multiple exit…—
app_invariants__e1529e517ee1cbdbINVARIANT: SSH connection deadlines are consistently updated and enforced across all I/O operations. SHADOW: The `serverConn.updateDeadline` method ensures that network I/O operations (Read, Write)…—
app_invariants__12995d338285c722INVARIANT: Outgoing channel data is strictly flow-controlled, preventing remote buffer overflows. SHADOW: The `channel.WriteExtended` method respects the `maxRemotePayload` size and the remote…—